Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/lib/libwebgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
#endif // GL_SUPPORT_AUTOMATIC_ENABLE_EXTENSIONS
#if FULL_ES2 || LEGACY_GL_EMULATION
'$registerPreMainLoop',
#endif
#if FULL_ES2
'$webglBufferSubData',
#endif
],
Expand Down Expand Up @@ -1666,7 +1668,7 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
},

glTexImage2D__deps: ['$emscriptenWebGLGetTexPixelData'
#if MAX_WEBGL_VERSION >= 2
#if WEBGL_USE_GARBAGE_FREE_APIS
, '$heapObjectForWebGLType', '$toTypedArrayIndex'
#endif
],
Expand Down Expand Up @@ -1713,9 +1715,9 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixelData);
},

glTexSubImage2D__deps: ['$emscriptenWebGLGetTexPixelData'
#if MAX_WEBGL_VERSION >= 2
, '$heapObjectForWebGLType', '$toTypedArrayIndex'
glTexSubImage2D__deps: ['$emscriptenWebGLGetTexPixelData',
#if WEBGL_USE_GARBAGE_FREE_APIS
'$heapObjectForWebGLType', '$toTypedArrayIndex',
#endif
],
glTexSubImage2D: (target, level, xoffset, yoffset, width, height, format, type, pixels) => {
Expand Down Expand Up @@ -1751,7 +1753,7 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
#if INCLUDE_WEBGL1_FALLBACK
'$emscriptenWebGLGetTexPixelData',
#endif
#if MAX_WEBGL_VERSION >= 2
#if WEBGL_USE_GARBAGE_FREE_APIS
'$heapObjectForWebGLType', '$toTypedArrayIndex',
#endif
],
Expand Down Expand Up @@ -2180,7 +2182,9 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};

// Returns the WebGLUniformLocation object corresponding to the location index
// integer on the currently active shader in this GL context.
#if GL_EXPLICIT_UNIFORM_LOCATION
$webglGetProgramUniformLocation__deps: ['$webglPrepareUniformLocationsBeforeFirstUse'],
#endif
$webglGetProgramUniformLocation: (program, location) => {
#if !GL_TRACK_ERRORS && ASSERTIONS
// In -sGL_TRACK_ERRORS=0 build mode do not allow calling glUniform*()
Expand Down Expand Up @@ -3881,7 +3885,9 @@ for (/**@suppress{duplicate}*/var i = 0; i <= {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
#endif
},

#if FULL_ES2
glDrawElements__deps: ['$webglBufferSubData'],
#endif
glDrawElements: (mode, count, type, indices) => {
#if FULL_ES2
var buf;
Expand Down
13 changes: 8 additions & 5 deletions src/lib/libwebgl2.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ var LibraryWebGL2 = {
GLctx.invalidateSubFramebuffer(target, list, x, y, width, height);
},

glTexImage3D__deps: ['$heapObjectForWebGLType', '$toTypedArrayIndex',
#if !WEBGL_USE_GARBAGE_FREE_APIS
glTexImage3D__deps: ['$heapObjectForWebGLType',
#if WEBGL_USE_GARBAGE_FREE_APIS
'$toTypedArrayIndex',
#else
'$emscriptenWebGLGetTexPixelData',
#endif
],
Expand All @@ -172,8 +174,10 @@ var LibraryWebGL2 = {
}
},

glTexSubImage3D__deps: ['$heapObjectForWebGLType', '$toTypedArrayIndex',
#if !WEBGL_USE_GARBAGE_FREE_APIS
glTexSubImage3D__deps: ['$heapObjectForWebGLType',
#if WEBGL_USE_GARBAGE_FREE_APIS
'$toTypedArrayIndex',
#else
'$emscriptenWebGLGetTexPixelData',
#endif
],
Expand Down Expand Up @@ -757,7 +761,6 @@ var LibraryWebGL2 = {

// N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttribI4uiv(),
// otherwise the results are undefined. (GLES3 spec 6.1.12)
glGetVertexAttribIuiv__deps: ['$emscriptenWebGLGetVertexAttrib'],
glGetVertexAttribIuiv: 'glGetVertexAttribIiv',

glUniform1ui__deps: ['$webglGetUniformLocation'],
Expand Down
Loading