Skip to content

Commit a178bc2

Browse files
committed
[wasm64] Fix pointer math in glTransformFeedbackVaryings() and glGetUniformIndices()
1 parent e43e97f commit a178bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/libwebgl2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ var LibraryWebGL2 = {
386386
program = GL.programs[program];
387387
var vars = [];
388388
for (var i = 0; i < count; i++)
389-
vars.push(UTF8ToString({{{ makeGetValue('varyings', 'i*4', 'i32') }}}));
389+
vars.push(UTF8ToString({{{ makeGetValue('varyings', 'i' + POINTER_SIZE, '*') }}}));
390390

391391
GLctx.transformFeedbackVaryings(program, vars, bufferMode);
392392
},
@@ -519,7 +519,7 @@ var LibraryWebGL2 = {
519519
program = GL.programs[program];
520520
var names = [];
521521
for (var i = 0; i < uniformCount; i++)
522-
names.push(UTF8ToString({{{ makeGetValue('uniformNames', 'i*4', 'i32') }}}));
522+
names.push(UTF8ToString({{{ makeGetValue('uniformNames', 'i*' + POINTER_SIZE, '*') }}}));
523523

524524
var result = GLctx.getUniformIndices(program, names);
525525
if (!result) return; // GL spec: If an error is generated, nothing is written out to uniformIndices.

0 commit comments

Comments
 (0)