Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webgl): unbind buffer after setting attribute #2023

Merged
merged 1 commit into from Mar 13, 2024
Merged

Conversation

Pessimistress
Copy link
Collaborator

See inline comments

Change List

  • Unbind buffer after VertexArray.setBuffer()

@@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes for a noisier gl log but seems hard to drop this without side effects.

@ibgreen ibgreen merged commit e7c1c57 into master Mar 13, 2024
2 checks passed
@ibgreen ibgreen deleted the x/unbind-buffer branch March 13, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants