X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=eglwrap.cpp;h=7237c5be7278fa2f76a552c1de06dca73c1f7a64;hb=fba28cfff8c488b83b052b92a9f58678c90f2afe;hp=ab575195d31a82fbdf9a95605718ac248a9235c3;hpb=2a342cb7b58f8e29ec4852e195beed47d5f40821;p=nanogl.git diff --git a/eglwrap.cpp b/eglwrap.cpp index ab57519..7237c5b 100644 --- a/eglwrap.cpp +++ b/eglwrap.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern "C++" GlESInterface* glEsImpl; extern "C++" void FlushOnStateChange(); - +void APIENTRY gl_unimplemented(GLenum none); EGLint eglGetError (void) { @@ -159,10 +159,14 @@ EGLContext eglGetCurrentContext (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(); }