@@ -28,27 +28,27 @@ var LibraryHtml5WebGL = {
2828#if PTHREADS && OFFSCREEN_FRAMEBUFFER
2929 // In offscreen framebuffer mode, we implement a proxied version of the
3030 // emscripten_webgl_create_context() function in JS.
31- emscripten_webgl_create_context_proxied__proxy : 'sync' ,
32- emscripten_webgl_create_context_proxied__deps : [ 'emscripten_webgl_do_create_context ' ] ,
33- emscripten_webgl_create_context_proxied : ( target , attributes ) = >
34- _emscripten_webgl_do_create_context ( target , attributes ) ,
31+ _emscripten_webgl_create_context_proxied__proxy : 'sync' ,
32+ _emscripten_webgl_create_context_proxied__deps : [ '_emscripten_webgl_do_create_context ' ] ,
33+ _emscripten_webgl_create_context_proxied : ( target , attributes ) = >
34+ __emscripten_webgl_do_create_context ( target , attributes ) ,
3535
3636 // The other proxied GL commands are defined in C (guarded by the
3737 // __EMSCRIPTEN_OFFSCREEN_FRAMEBUFFER__ definition).
3838#else
3939 // When not in offscreen framebuffer mode, these functions are implemented
4040 // in JS and forwarded without any proxying.
41- emscripten_webgl_create_context : 'emscripten_webgl_do_create_context ' ,
41+ emscripten_webgl_create_context : '_emscripten_webgl_do_create_context ' ,
4242
43- emscripten_webgl_get_current_context : 'emscripten_webgl_do_get_current_context ' ,
43+ emscripten_webgl_get_current_context : '_emscripten_webgl_do_get_current_context ' ,
4444
45- emscripten_webgl_commit_frame : 'emscripten_webgl_do_commit_frame ' ,
45+ emscripten_webgl_commit_frame : '_emscripten_webgl_do_commit_frame ' ,
4646
47- emscripten_webgl_destroy_context : 'emscripten_webgl_do_destroy_context ' ,
47+ emscripten_webgl_destroy_context : '_emscripten_webgl_do_destroy_context ' ,
4848#endif
4949
5050#if OFFSCREENCANVAS_SUPPORT
51- emscripten_webgl_do_create_context__postset : `
51+ _emscripten_webgl_do_create_context__postset : `
5252 registerPreMainLoop(() => {
5353 // If the current GL context is an OffscreenCanvas, but it was initialized
5454 // with implicit swap mode, perform the swap on behalf of the user.
@@ -58,18 +58,18 @@ var LibraryHtml5WebGL = {
5858 });` ,
5959#endif
6060
61- emscripten_webgl_do_create_context__deps : [
61+ _emscripten_webgl_do_create_context__deps : [
6262#if OFFSCREENCANVAS_SUPPORT
6363 '$registerPreMainLoop' ,
6464 'malloc' ,
6565 'emscripten_supports_offscreencanvas' ,
6666#endif
6767#if PTHREADS && OFFSCREEN_FRAMEBUFFER
68- 'emscripten_webgl_create_context_proxied ' ,
68+ '_emscripten_webgl_create_context_proxied ' ,
6969#endif
7070 '$webglPowerPreferences' , '$findCanvasEventTarget' ] ,
7171 // This function performs proxying manually, depending on the style of context that is to be created.
72- emscripten_webgl_do_create_context : ( target , attributes ) = > {
72+ _emscripten_webgl_do_create_context : ( target , attributes ) = > {
7373#if ASSERTIONS
7474 assert ( attributes ) ;
7575#endif
@@ -138,7 +138,7 @@ var LibraryHtml5WebGL = {
138138 { { { makeSetValue ( 'attributes' , C_STRUCTS . EmscriptenWebGLContextAttributes . renderViaOffscreenBackBuffer , '1' , 'i8' ) } } } ;
139139 { { { makeSetValue ( 'attributes' , C_STRUCTS . EmscriptenWebGLContextAttributes . preserveDrawingBuffer , '1' , 'i8' ) } } } ;
140140 }
141- return _emscripten_webgl_create_context_proxied ( target , attributes ) ;
141+ return __emscripten_webgl_create_context_proxied ( target , attributes ) ;
142142 }
143143 }
144144#endif
@@ -222,8 +222,8 @@ var LibraryHtml5WebGL = {
222222
223223#if PTHREADS && OFFSCREEN_FRAMEBUFFER
224224 // Runs on the calling thread, proxies if needed.
225- emscripten_webgl_make_context_current_calling_thread__sig : 'ip' ,
226- emscripten_webgl_make_context_current_calling_thread : ( contextHandle ) = > {
225+ _emscripten_webgl_make_context_current_calling_thread__sig : 'ip' ,
226+ _emscripten_webgl_make_context_current_calling_thread : ( contextHandle ) = > {
227227 var success = GL . makeContextCurrent ( contextHandle ) ;
228228 if ( success ) GL . currentContextIsProxied = false ; // If succeeded above, we will have a local GL context from this thread (worker or main).
229229 return success ? { { { cDefs . EMSCRIPTEN_RESULT_SUCCESS } } } : { { { cDefs . EMSCRIPTEN_RESULT_INVALID_PARAM } } } ;
@@ -256,7 +256,7 @@ var LibraryHtml5WebGL = {
256256 } ,
257257#endif
258258
259- emscripten_webgl_do_get_current_context : ( ) => GL . currentContext ? GL . currentContext . handle : 0 ,
259+ _emscripten_webgl_do_get_current_context : ( ) => GL . currentContext ? GL . currentContext . handle : 0 ,
260260
261261 emscripten_webgl_get_drawing_buffer_size__proxy : 'sync_on_webgl_context_handle_thread' ,
262262 emscripten_webgl_get_drawing_buffer_size : ( contextHandle , width , height ) => {
@@ -270,10 +270,10 @@ var LibraryHtml5WebGL = {
270270 return { { { cDefs . EMSCRIPTEN_RESULT_SUCCESS } } } ;
271271 } ,
272272
273- emscripten_webgl_do_commit_frame : ( ) => {
273+ _emscripten_webgl_do_commit_frame : ( ) => {
274274#if TRACE_WEBGL_CALLS
275275 var threadId = ( typeof _pthread_self !== 'undefined' ) ? _pthread_self : ( ) => 1 ;
276- err ( `[Thread ${ threadId ( ) } , GL ctx: ${ GL . currentContext . handle } ]: emscripten_webgl_do_commit_frame ()` ) ;
276+ err ( `[Thread ${ threadId ( ) } , GL ctx: ${ GL . currentContext . handle } ]: _emscripten_webgl_do_commit_frame ()` ) ;
277277#endif
278278 if ( ! GL . currentContext || ! GL . currentContext . GLctx ) {
279279#if GL_DEBUG
@@ -333,8 +333,8 @@ var LibraryHtml5WebGL = {
333333 return { { { cDefs . EMSCRIPTEN_RESULT_SUCCESS } } } ;
334334 } ,
335335
336- emscripten_webgl_do_destroy_context__proxy : 'sync_on_webgl_context_handle_thread ',
337- emscripten_webgl_do_destroy_context : ( contextHandle ) = > {
336+ _emscripten_webgl_do_destroy_context__proxy : 'sync_on_webgl_context_handle_thread ',
337+ _emscripten_webgl_do_destroy_context : ( contextHandle ) = > {
338338 if ( GL . currentContext == contextHandle ) GL . currentContext = 0 ;
339339 GL . deleteContext ( contextHandle ) ;
340340 } ,
0 commit comments