Header menu logo Mibo.Raylib

RenderBuffer3D Type

An allocation-friendly buffer for 3D render commands.

Commands are accumulated each frame via RenderBuffer3D.Add, then executed in insertion order by the active pipeline. The pipeline may re-sort internally if needed for state efficiency (e.g., front-to-back, material batching), but the buffer itself does not impose an order. Uses ArrayPool for the backing store to avoid per-frame heap allocations. The buffer is designed to be cleared and repopulated each frame. RenderBuffer3D.Clear resets the count without deallocating the internal array.

Constructors

Constructor Description

RenderBuffer3D(?capacity)

Full Usage: RenderBuffer3D(?capacity)

Parameters:
    ?capacity : int

Returns: RenderBuffer3D
?capacity : int
Returns: RenderBuffer3D

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:

Adds a render command to the buffer.

cmd : Command3D

this.Clear

Full Usage: this.Clear

Clears all commands from the buffer without deallocating the backing array. Call this at the start of each frame before populating with new commands.

this.Count

Full Usage: this.Count

Returns: int

The number of commands currently in the buffer.

Returns: int

this[i]

Full Usage: this[i]

Parameters:
    i : int

Returns: Command3D

Gets the command at the specified index.

i : int
Returns: Command3D

this.Sort

Full Usage: this.Sort

Parameters:

Sorts commands using the provided comparer. Pipelines may call this internally to optimize draw order.

comparer : IComparer<Command3D>

Type something to start searching.