From 23fcb6ba4389bf7981125394f0ccc2c073d8a1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Mon, 15 Jul 2019 12:40:13 +0300 Subject: [PATCH 1/2] Remove duplicate eglDestroyContext --- src/library_egl.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/library_egl.js b/src/library_egl.js index 44735d038b8ba..353ffe49726da 100644 --- a/src/library_egl.js +++ b/src/library_egl.js @@ -406,22 +406,6 @@ var LibraryEGL = { return 1 /* EGL_TRUE */; }, - // EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); - eglDestroyContext: function(display, context) { - if (display != 62000 /* Magic ID for Emscripten 'default display' */) { - EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); - return 0; - } - - if (context != 62004 /* Magic ID for Emscripten EGLContext */) { - EGL.setErrorCode(0x3006 /* EGL_BAD_CONTEXT */); - return 0; - } - - EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); - return 1; - }, - // EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); eglQuerySurface__proxy: 'sync', eglQuerySurface__sig: 'iiiii', From 468c197a9ec77451e41dc20f50c44cffc87f7a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Tue, 16 Jul 2019 12:34:10 +0300 Subject: [PATCH 2/2] Fix eglDestroyContext --- src/library_egl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library_egl.js b/src/library_egl.js index 353ffe49726da..6edcfcabbc241 100644 --- a/src/library_egl.js +++ b/src/library_egl.js @@ -398,7 +398,7 @@ var LibraryEGL = { return 0; } - GL.destroyContext(EGL.context); + GL.deleteContext(EGL.context); EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); if (EGL.currentContext == context) { EGL.currentContext = 0;