struct GlESInterface
{
-
int (*eglChooseConfig) (int dpy, const int *attrib_list, int *configs, int config_size, int *num_config) S;
int (*eglCopyBuffers) (int dpy, int surface, void* target) S;
int (*eglCreateContext) (int dpy, int config, int share_list, const int *attrib_list) S;
extern "C++" GlESInterface* glEsImpl;
extern "C++" void FlushOnStateChange();
-
+void gl_unimplemented();
EGLint eglGetError (void)
{
}
EGLSurface eglGetCurrentSurface (EGLint readdraw)
{
+ if( (void*)glEsImpl->eglGetCurrentSurface == (void*)gl_unimplemented )
+ return EGL_NO_SURFACE;
return glEsImpl->eglGetCurrentSurface(readdraw);
}
EGLDisplay eglGetCurrentDisplay (void)
{
+ if( (void*)glEsImpl->eglGetCurrentDisplay == (void*)gl_unimplemented )
+ return EGL_NO_DISPLAY;
return glEsImpl->eglGetCurrentDisplay();
}
extern void InitGLStructs();
-static void gl_unimplemented() {
+void gl_unimplemented() {
LOGE ("Called unimplemented OpenGL ES API\n");
}
LOGD ("<%s> @ 0x%p\n", *api, f);
}
}
- else
+ else
+ {
+ LOGE ( "libEGL.so not loaded!");
f = default_func;
+ }
}
else {
LOGD ("<%s> @ 0x%p\n", *api, f);