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

Don't bind attribute buffers for the same program if they don't change #34

Open
w0rm opened this issue Aug 14, 2020 · 0 comments
Open

Comments

@w0rm
Copy link
Collaborator

w0rm commented Aug 14, 2020

If the same mesh is rendered many times in a row using the same shaders, the current behaviour would still call gl.bindBuffer, gl.enableVertexAttribArray and gl.vertexAttribPointer for the same mesh. These extra calls could be potentially avoided.

This should improve the performance of 2D games with many sprites, that are rendered using the same quad mesh, the same shaders, but different uniforms. This should also improve the rendering of scenes like this http://unsoundscapes.com/elm-physics/examples/boxes/

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

No branches or pull requests

1 participant