An extension to FoxVertexBuffer to store multiple attributes in a single buffer
Constructor
Variables
Methods
addRegion(dataPerVertex:Int, stride:Int, offset:Int = 0, normalized:Bool = false):Void
Adds an attribute region for the vertex buffer
Note: The order of the regions should follow the order of attributes in your shader
Parameters:
dataPerVertex | How many elements per vertex for the attribute |
|---|---|
stride | The number of bytes to skip to reach the next batch, usually calculated as |
offset | The byte offset to where start reading the buffer |
normalized | if enabled, values from the byte/short/int range will be normalized from -1 to 1 (or 0 to 1 in the case of unsigned) |