Skip to content

Commit

Permalink
fix(webgl): unbind buffer after setting attribute (#2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 13, 2024
1 parent d356b1a commit e7c1c57
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/webgl/src/adapter/resources/webgl-vertex-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export class WEBGLVertexArray extends VertexArray {
// Attaches ARRAY_BUFFER with specified buffer format to location
this.device.gl.vertexAttribPointer(location, size, type, normalized, stride, offset);
}
// Clear binding - keeping it may cause [.WebGL-0x12804417100]
// GL_INVALID_OPERATION: A transform feedback buffer that would be written to is also bound to a non-transform-feedback target
this.device.gl.bindBuffer(GL.ARRAY_BUFFER, null);

// Mark as non-constant
this.device.gl.enableVertexAttribArray(location);
Expand Down

0 comments on commit e7c1c57

Please sign in to comment.