elm-explorations / elm-explorations/webgl
Don't bind attribute buffers for the same program if they don't change
Open
- Dominant language
- Elm
- Stars
- 123
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
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/
Contributor guide
Assessment
This issue has not been assessed yet.