summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51ccb8d)
raw | patch | inline | side by side (parent: 51ccb8d)
author | mittorn <mittorn@sibmail.com> | |
Thu, 12 May 2016 22:42:46 +0000 (22:42 +0000) | ||
committer | mittorn <mittorn@sibmail.com> | |
Thu, 12 May 2016 22:42:46 +0000 (22:42 +0000) |
GL/glesinterface.h | patch | blob | history | |
eglwrap.cpp | patch | blob | history | |
nanogl.cpp | patch | blob | history |
diff --git a/GL/glesinterface.h b/GL/glesinterface.h
index 46de9e4bda9cb1423fd179c9ce0df6a35ac61255..e8d42daea83648b32b6ca58e4ed672bca8a0aaf8 100644 (file)
--- a/GL/glesinterface.h
+++ b/GL/glesinterface.h
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;
diff --git a/eglwrap.cpp b/eglwrap.cpp
index ab575195d31a82fbdf9a95605718ac248a9235c3..0e6bd208514f5a779a13cb5e69427636e8d8262d 100644 (file)
--- a/eglwrap.cpp
+++ b/eglwrap.cpp
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();
}
diff --git a/nanogl.cpp b/nanogl.cpp
index 9130cecc1edfdca1da94048b5c359efc85ab7f9f..11bd1eac4faf162e8d1bd5e9063deaee398499f1 100644 (file)
--- a/nanogl.cpp
+++ b/nanogl.cpp
extern void InitGLStructs();
-static void gl_unimplemented() {
+void gl_unimplemented() {
LOGE ("Called unimplemented OpenGL ES API\n");
}
@@ -127,8 +127,11 @@ static int CreateGlEsInterface( const char * name, void * lib, void * lib1, void
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);