Header menu logo Mibo

RenderBuffer<'Key, 'Cmd> Type

A small, allocation-friendly buffer that stores render commands tagged with a sort key.

This is the core data structure for deferred rendering. Commands are accumulated during the view phase and then sorted/executed by the renderer.

Constructors

Constructor Description

RenderBuffer(?capacity, ?keyComparer)

Full Usage: RenderBuffer(?capacity, ?keyComparer)

Parameters:
    ?capacity : int
    ?keyComparer : IComparer<'Key>

Returns: RenderBuffer<'Key, 'Cmd>
?capacity : int
?keyComparer : IComparer<'Key>
Returns: RenderBuffer<'Key, 'Cmd>

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    key : 'Key
    cmd : 'Cmd

Adds a command with its sort key to the buffer.

key : 'Key
cmd : 'Cmd

this.Clear

Full Usage: this.Clear

Clears all commands from the buffer without deallocating.

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: 'Key * 'Cmd

Gets the command at the specified index as a (key, command) struct tuple.

i : int
Returns: 'Key * 'Cmd

this.Sort

Full Usage: this.Sort

Sorts the buffer by key. Call this before iterating if order matters.

Type something to start searching.