@@ -136,7 +136,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
136136 emscripten_webgl_enable_WEBGL_multi_draw : ( ctx ) => webgl_enable_WEBGL_multi_draw ( GL . contexts [ ctx ] . GLctx ) ,
137137
138138 $getEmscriptenSupportedExtensions__internal : true ,
139- $getEmscriptenSupportedExtensions : function ( ctx ) {
139+ $getEmscriptenSupportedExtensions : ( ctx ) => {
140140 // Restrict the list of advertised extensions to those that we actually
141141 // support.
142142 var supportedExtensions = [
@@ -280,7 +280,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
280280 // glGetError() to fetch it. As per GLES2 spec, only the first error is
281281 // remembered, and subsequent errors are discarded until the user has
282282 // cleared the stored error by a call to glGetError().
283- recordError : function recordError ( errorCode ) {
283+ recordError : ( errorCode ) => {
284284#if GL_TRACK_ERRORS
285285 if ( ! GL . lastError ) {
286286 GL . lastError = errorCode ;
@@ -370,7 +370,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
370370 }
371371 } ,
372372
373- getTempVertexBuffer : function getTempVertexBuffer ( sizeBytes ) {
373+ getTempVertexBuffer : ( sizeBytes ) = > {
374374 var idx = GL . log2ceilLookup ( sizeBytes ) ;
375375 var ringbuffer = GL . currentContext . tempVertexBuffers1 [ idx ] ;
376376 var nextFreeBufferIndex = GL . currentContext . tempVertexBufferCounters1 [ idx ] ;
@@ -387,7 +387,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
387387 return ringbuffer [ nextFreeBufferIndex ] ;
388388 } ,
389389
390- getTempIndexBuffer : function getTempIndexBuffer ( sizeBytes ) {
390+ getTempIndexBuffer : ( sizeBytes ) => {
391391 var idx = GL . log2ceilLookup ( sizeBytes ) ;
392392 var ibo = GL . currentContext . tempIndexBuffers [ idx ] ;
393393 if ( ibo ) {
@@ -405,7 +405,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
405405 // doublebuffered temp VB memory pointers, so that every second frame
406406 // utilizes different set of temp buffers. The aim is to keep the set of
407407 // buffers being rendered, and the set of buffers being updated disjoint.
408- newRenderingFrameStarted : function newRenderingFrameStarted ( ) {
408+ newRenderingFrameStarted : ( ) = > {
409409 if ( ! GL . currentContext ) {
410410 return ;
411411 }
@@ -450,13 +450,13 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
450450
451451#if GL_FFP_ONLY
452452 enabledClientAttribIndices : [ ] ,
453- enableVertexAttribArray : function enableVertexAttribArray ( index ) {
453+ enableVertexAttribArray : ( index ) = > {
454454 if ( ! GL . enabledClientAttribIndices [ index ] ) {
455455 GL . enabledClientAttribIndices [ index ] = true ;
456456 GLctx . enableVertexAttribArray ( index ) ;
457457 }
458458 } ,
459- disableVertexAttribArray : function disableVertexAttribArray ( index ) {
459+ disableVertexAttribArray : ( index ) => {
460460 if ( GL . enabledClientAttribIndices [ index ] ) {
461461 GL . enabledClientAttribIndices [ index ] = false ;
462462 GLctx . disableVertexAttribArray ( index ) ;
@@ -465,7 +465,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
465465#endif
466466
467467#if FULL_ES2
468- calcBufLength : function calcBufLength ( size , type , stride , count ) {
468+ calcBufLength : ( size , type , stride , count ) => {
469469 if ( stride > 0 ) {
470470 return count * stride ; // XXXvlad this is not exactly correct I don't think
471471 }
@@ -475,7 +475,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
475475
476476 usedTempBuffers : [ ] ,
477477
478- preDrawHandleClientVertexAttribBindings : function preDrawHandleClientVertexAttribBindings ( count ) {
478+ preDrawHandleClientVertexAttribBindings : ( count ) = > {
479479 GL . resetBufferBinding = false ;
480480
481481 // TODO: initial pass to detect ranges we need to upload, might not need
@@ -499,7 +499,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
499499 }
500500 } ,
501501
502- postDrawHandleClientVertexAttribBindings : function postDrawHandleClientVertexAttribBindings ( ) {
502+ postDrawHandleClientVertexAttribBindings : ( ) = > {
503503 if ( GL . resetBufferBinding ) {
504504 GLctx . bindBuffer ( 0x8892 /*GL_ARRAY_BUFFER*/ , GL . buffers [ GLctx . currentArrayBufferBinding ] ) ;
505505 }
@@ -1607,6 +1607,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
16071607#endif
16081608 ] ,
16091609 glTexImage2D : ( target , level , internalFormat , width , height , border , format , type , pixels ) => {
1610+ err ( "glTexImage2D" , pixels ) ;
16101611#if MAX_WEBGL_VERSION >= 2
16111612#if WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION
16121613 if ( { { { isCurrentContextWebGL2( ) } } } ) {
@@ -3100,6 +3101,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
31003101#if GL_ASSERTIONS
31013102 GL . validateGLObjectID ( GL . shaders , shader , 'glShaderSource' , 'shader' ) ;
31023103#endif
3104+ out ( 'glShaderSource' , shader , count , string , length ) ;
31033105 var source = GL . getSource ( shader , count , string , length ) ;
31043106
31053107#if WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION
@@ -3673,7 +3675,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
36733675 , '$emulGlGenVertexArrays'
36743676#endif
36753677 ] ,
3676- glGenVertexArrays : function ( n , arrays ) {
3678+ glGenVertexArrays : ( n , arrays ) = > {
36773679#if LEGACY_GL_EMULATION
36783680 emulGlGenVertexArrays ( n , arrays ) ;
36793681#else
0 commit comments