flush

fun flush(context: DrawContext, drawStyle: DrawStyle, vertices: VertexBuffer)(source)

Flushes the currently queued drawing commands and renders them using the specified context, style, and vertex buffer. This method ensures that the queued vertex data is uploaded, the appropriate shader is applied, and the rendering pipeline is executed.

Parameters

context

The drawing context containing transformation matrices and rendering parameters.

drawStyle

The style to apply when drawing, including properties such as fill color, stroke properties, and font settings.

vertices

The vertex buffer containing vertex data to be rendered. This buffer is used to store data for the current batch of quads.