aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Bergmeier <abergmeier@gmx.net>2014-02-14 15:42:59 +0100
committerAndreas Bergmeier <abergmeier@gmx.net>2014-02-14 15:42:59 +0100
commit5e952a9e3778c09db6befd48712786092e939261 (patch)
treec94387181064c77252d5da66e8498478d08be740
parent5c1c6af37d4f4e0c88a5caf9b67afef0a0ffa58a (diff)
Remove flush from eglSwapBuffers emulation.
-rw-r--r--src/library_egl.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library_egl.js b/src/library_egl.js
index 551169d1..e2d1df43 100644
--- a/src/library_egl.js
+++ b/src/library_egl.js
@@ -548,7 +548,6 @@ var LibraryEGL = {
return EGL.currentContext ? 62000 /* Magic ID for Emscripten 'default display' */ : 0;
},
- eglSwapBuffers__deps: ['glFlush', '$GL'],
// EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
eglSwapBuffers: function() {
if (!EGL.defaultDisplayInitialized) {
@@ -558,8 +557,10 @@ var LibraryEGL = {
} else if (Module.ctx.isContextLost()) {
EGL.setErrorCode(0x300E /* EGL_CONTEXT_LOST */);
} else {
- // According to documentation this does an implicit flush
- _glFlush();
+ // According to documentation this does an implicit flush.
+ // Due to discussion at https://github.com/kripken/emscripten/pull/1871
+ // the flush was removed since this _may_ result in slowing code down.
+ //_glFlush();
EGL.setErrorCode(0x3000 /* EGL_SUCCESS */);
return 1; // EGL_TRUE
}