Skip to content

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

@w0rm

Description

@w0rm

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions