Skip to content

Functions (Batching)

Juju Adams edited this page Mar 11, 2021 · 16 revisions

CleanBatchBegin()

Returns: N/A (undefined)

Name Datatype Purpose
None

Starts a Clean Shapes batch. Shapes defined inside a batch won't be drawn until CleanBatchEndDraw() is called.

 

 

CleanBatchEndDraw()

Returns: N/A (undefined)

Name Datatype Purpose
None

Ends a batch started by CleanBatchBegin(), drawing the shapes that were defined.

 

 

CleanBatchEndReturnVertexBuffer()

Returns: Integer, a vertex buffer index

Name Datatype Purpose
None

Ends a batch started by CleanBatchBegin() but instead of immediately drawing the batch, this function returns a vertex buffer that you can draw yourself at a later time using CleanBatchDrawVertexBuffer(). Because this function returns a vertex buffer you will need to destroy that vertex buffer yourself when you no longer need it.

 

 

CleanBatchDrawVertexBuffer(vertexBuffer, [destroyVertexBuffer])

Returns: N/A (undefined)

Name Datatype Purpose
vertexBuffer vertex buffer Vertex buffer to be drawn
[destroyVertexBuffer] boolean Whether to destroy the vertex buffer after it's drawn. Defaults to false

Draws a vertex buffer created by CleanBatchEndReturnVertexBuffer().