Vertex buffers are limited to 65K vertexes because of the 16-bits limitation of the index buffers. BigPrimitive allows you to easily create large buffers by spliting the buffers.
Constructor
Variables
Methods
add(buf:FloatBuffer, idx:IndexBuffer, dx:Float = 0., dy:Float = 0., dz:Float = 0., rotation:Float = 0., scale:Float = 1., stride:Int = -1):Void
Adds a complete object to the primitive, with custom position,scale,rotation. See addSub for complete documentation.
inlineaddPoint(x:Float32, y:Float32, z:Float32):Void
This is similar to addVertexValue for X Y and Z, but will also update the bounds if you wish to have them calculated.
addSub(buf:FloatBuffer, idx:IndexBuffer, startVert:Int, startTri:Int, nvert:Int, triCount:Int, dx:Float = 0., dy:Float = 0., dz:Float = 0., rotation:Float = 0., scale:Float = 1., stride:Int = -1, deltaU:Float = 0., deltaV:Float = 0., color:Float = 1., ?mat:Matrix):Void
Adds a buffer to the primitive, with custom position,scale,rotation. The buffer can have more stride than the BigPrimitive, but not less. It is assumed that the buffer contains [X,Y,Z,NX,NY,NZ,U,V,R,G,B] (depending on his stride) so the different offsets are applied to the corresponding components. If hasTangent=true, we have [TX,TY,TZ] just after normal. However if the stride is 5, we assume [X,Y,Z,U,V] If mat is not null, it overrides dx, dy, dz, rotation, scale
begin(vcount:Int, icount:Int):Void
Call begin() before starting to add vertexes/indexes to the primitive. The count value is the number of vertexes you will add, it will automatically flush() if it doesn't fit into the current buffer.