projects
/
freeglut
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3afa35
)
Fix issues with context lost on Android
author
Michal Stawinski
<michal.stawinski@tieto.com>
Wed, 5 Mar 2014 01:40:18 +0000
(
01:40
+0000)
committer
Diederick Niehorster
<dcnieho@gmail.com>
Wed, 5 Mar 2014 01:40:18 +0000
(
01:40
+0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1678
7f0cb862
-5218-0410-a997-
914c9d46530a
src/android/fg_window_android.c
patch
|
blob
|
history
diff --git
a/src/android/fg_window_android.c
b/src/android/fg_window_android.c
index
1b4c80f
..
af2d691
100644
(file)
--- a/
src/android/fg_window_android.c
+++ b/
src/android/fg_window_android.c
@@
-83,6
+83,14
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
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;
}