--- a/m3g/m3gcore11/src/m3g_rendercontext.c Thu Aug 19 11:11:18 2010 +0300
+++ b/m3g/m3gcore11/src/m3g_rendercontext.c Tue Aug 31 16:31:06 2010 +0300
@@ -424,6 +424,7 @@
/* EGL might not be initialized yet, so do it here just in case. */
eglInitialize(eglGetDisplay(EGL_DEFAULT_DISPLAY), NULL, NULL);
+ eglBindAPI(EGL_OPENGL_ES_API);
eglMakeCurrent(eglGetDisplay(EGL_DEFAULT_DISPLAY), NULL, NULL, NULL);
/* Delete EGL surfaces */
@@ -1387,8 +1388,8 @@
* last time we rendered, then release the GL context so we don't
* hog resources */
# if !defined(M3G_NGL_CONTEXT_API)
- if (ctx->target.type != SURFACE_EGL) {
-// m3gSwapBuffers(ctx->target.surface);
+ if (ctx->target.type == SURFACE_WINDOW) {
+ m3gSwapBuffers(ctx->target.surface);
}
# endif
m3gCollectGLObjects(M3G_INTERFACE(ctx));