Helper around creating vertex attributes in a given [[VertexBuffer]], this is useful for describing the memory layout for your vertices inside a particular buffer

Note: This helper assumes interleaved attributes in one [[VertexBuffer]], not many.

Working with gl.vertexAttribPointer can be tricky, and this attempts to double check you

Hierarchy

  • VertexLayout

Constructors

Accessors

Methods

  • Bind this layout with it's associated vertex buffer

    Parameters

    • uploadBuffer: boolean = false

      Optionally indicate you wish to upload the buffer to the GPU associated with this layout

    • Optional count: number

    Returns void