From: <dc...@us...> - 2014-03-05 01:40:22
|
Revision: 1678 http://sourceforge.net/p/freeglut/code/1678 Author: dcnieho Date: 2014-03-05 01:40:18 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Fix issues with context lost on Android Modified Paths: -------------- trunk/freeglut/freeglut/src/android/fg_window_android.c Modified: trunk/freeglut/freeglut/src/android/fg_window_android.c =================================================================== --- trunk/freeglut/freeglut/src/android/fg_window_android.c 2014-01-24 10:35:48 UTC (rev 1677) +++ trunk/freeglut/freeglut/src/android/fg_window_android.c 2014-03-05 01:40:18 UTC (rev 1678) @@ -83,6 +83,14 @@ fghPlatformOpenWindowEGL(window); + /* Bind context to the current thread if it's lost */ + if (eglGetCurrentContext() == EGL_NO_CONTEXT && + eglMakeCurrent(fgDisplay.pDisplay.egl.Display, + window->Window.pContext.egl.Surface, + window->Window.pContext.egl.Surface, + window->Window.Context) == EGL_FALSE) + fgError("eglMakeCurrent: err=%x\n", eglGetError()); + window->State.Visible = GL_TRUE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |