Skip to content

Commit c5b1aad

Browse files
authored
fixed getAttributeLocations function (#634)
Using the i from the for loop was a bit too optimistic for some devices.
2 parents a4cc01b + 44b53fa commit c5b1aad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/lib/WebGlContextWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ export class WebGlContextWrapper {
725725
const result = {} as Record<string, number>;
726726
for (let i = 0; i < length; i++) {
727727
const { name } = gl.getActiveAttrib(program, i) as WebGLActiveInfo;
728-
result[name] = i;
728+
result[name] = gl.getAttribLocation(program, name);
729729
}
730730
return result;
731731
}

0 commit comments

Comments
 (0)