Skip to content

Commit 250ccb6

Browse files
authored
Fix test_closure_full_js_library (#19105)
This test was updated in #19046, but went through CI before #19067 landed which made duplicate signatures into a warning. `glDrawRangeElements` is defined both in `library_glemu.js` and in `library_webgl2.js` with the former taking precedence because it is included later. This change avoid the duplicate definition.
1 parent 3a285cb commit 250ccb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/library_webgl2.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,8 @@ var LibraryWebGL2 = {
10211021
GLctx['vertexAttribIPointer'](index, size, type, stride, ptr);
10221022
},
10231023

1024+
#if !LEGACY_GL_EMULATION
1025+
// Defined in library_glemu.js when LEGACY_GL_EMULATION is set
10241026
glDrawRangeElements__sig: 'viiiiii',
10251027
glDrawRangeElements__deps: ['glDrawElements'],
10261028
glDrawRangeElements: function(mode, start, end, count, type, indices) {
@@ -1030,6 +1032,7 @@ var LibraryWebGL2 = {
10301032
// we work around by ignoring the range.
10311033
_glDrawElements(mode, count, type, indices);
10321034
},
1035+
#endif
10331036

10341037
glDrawArraysInstancedBaseInstanceWEBGL__sig: 'viiiii',
10351038
glDrawArraysInstancedBaseInstanceWEBGL: function(mode, first, count, instanceCount, baseInstance) {

0 commit comments

Comments
 (0)