maximum vertices allowed in buffer
maximum indices allowed in buffer
use color values in vertices
use texture coordinates in vertices
use normals in vertices
(false, default) use 2d positions (ie. x/y only), (true) use 3d positions (ie. x/y/z)
Number of Components in Vertex Color
Index Byte Size (Short.
Index Byte Size (Short.SIZE = bits)
Number of Components in Vertex Normal
Number of Components in Vertex Position for 2D
Number of Components in Vertex Position for 3D
Number of Components in Vertex Texture Coords
perform all required binding/state changes before rendering batches.
perform all required binding/state changes before rendering batches.
call once before calling draw() multiple times for this buffer.
draw the currently bound vertices in the vertex/index buffers
draw the currently bound vertices in the vertex/index buffers
can only be called after calling bind() for this buffer.
the type of primitive to draw
the offset in the vertex/index buffer to start at
the number of vertices (indices) to draw
draw the vertices in the vertex/index buffers
draw the vertices in the vertex/index buffers
the type of primitive to draw
the offset in the vertex/index buffer to start at
the number of vertices (indices) to draw
unoptimized version! use bind()/draw()/unbind() for batches
Index Buffer
Index Buffer
Number of Indices in Buffer
Number of Indices in Buffer
Number of Vertices in Buffer
Number of Vertices in Buffer
Number of Position Components (2=2D, 3=3D)
set the specified indices in the index buffer
set the specified indices in the index buffer
array of indices (shorts) to set
offset to first index in array
number of indices in array (from offset)
set the specified vertices in the vertex buffer
set the specified vertices in the vertex buffer
array of vertices (floats) to set
offset to first vertex in array
number of floats in the vertex array (total) for easy setting use: vtx_cnt * (this.vertexSize / 4)
optimized to use integer buffer!
set vertex elements - use this method to alter the color values for vertices
set vertex elements - use this method to alter the color values for vertices
vertex index
the a color to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the color values for vertices
set vertex elements - use this method to alter the color values for vertices
vertex index
the r color to set in buffer
the g color to set in buffer
the b color to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the color values for vertices
set vertex elements - use this method to alter the color values for vertices
vertex index
the r color to set in buffer
the g color to set in buffer
the b color to set in buffer
the a color to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the normals values for vertices
set vertex elements - use this method to alter the normals values for vertices
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the position values for vertices
set vertex elements - use this method to alter the position values for vertices
vertex index
the x position to set in buffer
the y position to set in buffer
the z position to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the position values for vertices
set vertex elements - use this method to alter the position values for vertices
vertex index
the x position to set in buffer
the y position to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
set vertex elements - use this method to alter the textcoords values for vertices
set vertex elements - use this method to alter the textcoords values for vertices
vertex index
the u texture coords to set in buffer
the v texture coords to set in buffer
it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!
Temp Buffer for Vertex Conversion
Temp Buffer for Vertex Conversion
clear binding states when done rendering batches.
clear binding states when done rendering batches.
call once before calling draw() multiple times for this buffer.
Bytesize of a Single Vertex
Vertex Stride (Element Size of a Single Vertex)
Vertex Buffer
Vertex Buffer
create the vertices/indices as specified (for 2d/3d)