SDL3BatchRenderer Class
Handles vertex batching and indexed primitive rendering operations. All geometry is emitted as groups of four vertices with a pre-generated static index buffer using the quad pattern [0, 1, 2, 1, 3, 2], reducing vertex throughput by a third for quads.
internal sealed class SDL3BatchRenderer : System.IDisposable
Inheritance System.Object → SDL3BatchRenderer
Implements System.IDisposable
| Methods | |
|---|---|
| IndicesToDraw(int) | Converts a vertex count (always a multiple of Brine2D.Rendering.SDL3BatchRenderer.VerticesPerQuad) to the corresponding index count for indexed drawing. |
| StageForUpload() | Copies the current vertex batch to the transfer buffer (CPU-only, no GPU pass). Returns (firstVertex, vertexCount) for use in a later copy pass. |
| VertexOffsetToFirstIndex(int) | Converts a vertex offset (always quad-aligned) to the corresponding first-index offset in the static index buffer. |