File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ var LibraryBrowser = {
104
104
#endif
105
105
}
106
106
} ,
107
+ useWebGL : false ,
107
108
isFullscreen : false ,
108
109
pointerLock : false ,
109
110
moduleContextCreatedCallbacks : [ ] ,
@@ -309,7 +310,7 @@ var LibraryBrowser = {
309
310
#endif
310
311
Module . ctx = ctx ;
311
312
if ( useWebGL ) GL . makeContextCurrent ( contextHandle ) ;
312
- Module . useWebGL = useWebGL ;
313
+ Browser . useWebGL = useWebGL ;
313
314
Browser . moduleContextCreatedCallbacks . forEach ( ( callback ) => callback ( ) ) ;
314
315
Browser . init ( ) ;
315
316
}
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ var LibraryEGL = {
365
365
366
366
// Run callbacks so that GL emulation works
367
367
GL . makeContextCurrent ( EGL . context ) ;
368
- Module . useWebGL = true ;
368
+ Browser . useWebGL = true ;
369
369
Browser . moduleContextCreatedCallbacks . forEach ( function ( callback ) { callback ( ) } ) ;
370
370
371
371
// Note: This function only creates a context, but it shall not make it active.
Original file line number Diff line number Diff line change @@ -2821,7 +2821,7 @@ var LibraryGLEmulation = {
2821
2821
err ( 'WARNING: using emscripten GL immediate mode emulation. This is very limited in what it supports' ) ;
2822
2822
GLImmediate . initted = true ;
2823
2823
2824
- if ( ! Module . useWebGL ) return ; // a 2D canvas may be currently used TODO: make sure we are actually called in that case
2824
+ if ( ! Browser . useWebGL ) return ; // a 2D canvas may be currently used TODO: make sure we are actually called in that case
2825
2825
2826
2826
// User can override the maximum number of texture units that we emulate. Using fewer texture units increases runtime performance
2827
2827
// slightly, so it is advantageous to choose as small value as needed.
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ var Module = moduleArg;
27
27
var /** @type {{
28
28
canvas: HTMLCanvasElement,
29
29
ctx: Object,
30
- useWebGL: boolean,
31
30
}}
32
31
*/ Module ;
33
32
if ( ! Module ) /** @suppress {checkTypes}*/ Module = { "__EMSCRIPTEN_PRIVATE_MODULE_EXPORT_NAME_SUBSTITUTION__" :1 } ;
You can’t perform that action at this time.
0 commit comments