Game Development Reference
In-Depth Information
if ( ! loadDriver(lib2) ) {
LOGE ("Failed to load %s.\n", lib2);
return 0;
}
else
driver = lib2;
}
else
driver = lib1;
void * eglLib;
LOGD ("**** Will Load EGL subs from %s ****", lib3);
eglLib = dlopen(lib3, RTLD_NOW | RTLD_LOCAL);
if ( ! eglLib ) {
LOGE ( "Failed to load %s", lib3);
}
// Load API gl* for 1.5+ else egl* gl*
if ( !CreateGlEsInterface(driver, glesLib, eglLib, (void *) gl_unimplemented) == -1)
{
// release lib
LOGE ( "CreateGlEsInterface failed.");
dlclose(glesLib);
return 0;
}
// Init nanoGL
InitGLStructs();
return 1;
}
void nanoGL_Destroy()
{
LOGD ("nanoGL_Destroy");
if (glEsImpl) {
free( glEsImpl);
glEsImpl = NULL;
}
// release lib
dlclose(glesLib);
}
Search WWH ::




Custom Search