QuadIndexBuffer
Index
Constructors
constructor
Parameters
gl: WebGL2RenderingContext
WebGL2RenderingContext this layout will be attached to, these cannot be reused across contexts.
numberOfQuads: number
Specify the max number of quads you want to draw
optionaluseUint16: boolean
Optionally force a uint16 buffer
Returns QuadIndexBuffer
Properties
publicbuffer
Access to the webgl buffer handle
publicbufferData
Access to the raw data of the index buffer
publicbufferGlType
Depending on the browser this is either gl.UNSIGNED_SHORT or gl.UNSIGNED_INT
Accessors
publicsize
Returns number
Methods
publicbind
Bind this index buffer
Returns void
publicdispose
Returns void
publicupload
Upload data to the GPU
Returns void
Helper that defines and index buffer for quad geometry
Index buffers allow you to save space in vertex buffers when you share vertices in geometry it is almost always worth it in terms of performance to use an index buffer.