Skip to content

VertexArray: Instanced rendering support #54

@maltebp

Description

@maltebp

Using instanced rendering (especially for recangles), it's can reduce the buffer data size quite a bit. The glVertexAttribDivisor allows for reusing data shared across all the vertices of each rectangle (instance).

Note: I have later found sources stating that the overhead from instancing is not worth it when rendering sprites

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glVertexAttribDivisor.xhtml

SO post on indexed + instanced rendering:
https://stackoverflow.com/questions/31398169/how-attribute-divisor-works-with-indexed-drawing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions