File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,7 @@ var LibraryEGL = {
634634 eglGetCurrentDisplay : ( ) = > EGL . currentContext ? { { { eglDefaultDisplay } } } : 0 ,
635635
636636 // EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
637+ eglSwapBuffers__deps : [ '$GLctx' ] ,
637638 eglSwapBuffers__proxy : 'sync' ,
638639 eglSwapBuffers : ( dpy , surface ) => {
639640#if PROXY_TO_WORKER
@@ -642,9 +643,9 @@ var LibraryEGL = {
642643
643644 if ( ! EGL . defaultDisplayInitialized ) {
644645 EGL . setErrorCode ( 0x3001 /* EGL_NOT_INITIALIZED */ ) ;
645- } else if ( ! Module . ctx ) {
646+ } else if ( ! GLctx ) {
646647 EGL . setErrorCode ( 0x3002 /* EGL_BAD_ACCESS */ ) ;
647- } else if ( Module . ctx . isContextLost ( ) ) {
648+ } else if ( GLctx . isContextLost ( ) ) {
648649 EGL . setErrorCode ( 0x300E /* EGL_CONTEXT_LOST */ ) ;
649650 } else {
650651 // According to documentation this does an implicit flush.
Original file line number Diff line number Diff line change @@ -399,13 +399,13 @@ var LibraryGLUT = {
399399 var now = Date . now ( ) ;
400400 return now - GLUT . initTime ;
401401 case 0x0069 : /* GLUT_WINDOW_STENCIL_SIZE */
402- return Module . ctx . getContextAttributes ( ) . stencil ? 8 : 0 ;
402+ return GLctx . getContextAttributes ( ) . stencil ? 8 : 0 ;
403403 case 0x006A : /* GLUT_WINDOW_DEPTH_SIZE */
404- return Module . ctx . getContextAttributes ( ) . depth ? 8 : 0 ;
404+ return GLctx . getContextAttributes ( ) . depth ? 8 : 0 ;
405405 case 0x006E : /* GLUT_WINDOW_ALPHA_SIZE */
406- return Module . ctx . getContextAttributes ( ) . alpha ? 8 : 0 ;
406+ return GLctx . getContextAttributes ( ) . alpha ? 8 : 0 ;
407407 case 0x0078 : /* GLUT_WINDOW_NUM_SAMPLES */
408- return Module . ctx . getContextAttributes ( ) . antialias ? 1 : 0 ;
408+ return GLctx . getContextAttributes ( ) . antialias ? 1 : 0 ;
409409
410410 default :
411411 throw "glutGet(" + type + ") not implemented yet" ;
You can’t perform that action at this time.
0 commit comments