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
|
|
|
Instance members
| Instance member |
Description
|
Adds a render command to the buffer.
|
|
Full Usage:
this.AddAnimatedModel
Parameters:
AnimatedModel
transform : Matrix
Modifiers: inline |
MonoGame animated draw: derives the bone palette from the state.
|
Full Usage:
this.AddAnimatedModelWith
Parameters:
AnimatedModel
transform : Matrix
material : Material3D
Modifiers: inline |
|
Full Usage:
this.AddAnimatedModelWithPerMesh
Parameters:
AnimatedModel
transform : Matrix
resolver : int -> Material3D
Modifiers: inline |
|
Full Usage:
this.AddBeginCamera
Parameters:
Camera3D
_layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Modifiers: inline |
|
Full Usage:
this.AddBeginCameraConfig
Parameters:
Camera3DConfig
_layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Modifiers: inline |
|
|
|
|
|
|
|
|
|
Full Usage:
this.AddDisableShadows3D
Modifiers: inline |
|
Full Usage:
this.AddDrawImmediate
Parameters:
SceneContext -> unit
_layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Modifiers: inline |
|
Full Usage:
this.AddDrawInstanced
Parameters:
PrimitiveMesh
transforms : Matrix[]
material : Material3D
instanceCount : int
Modifiers: inline |
|
Full Usage:
this.AddDrawMesh
Parameters:
PrimitiveMesh
transform : Matrix
material : Material3D
Modifiers: inline |
MonoGame's mesh-level draw is the effectless PrimitiveMesh.
|
|
|
Full Usage:
this.AddDrawModelWith
Parameters:
Model
transform : Matrix
material : Material3D
Modifiers: inline |
|
Full Usage:
this.AddDrawModelWithPerMesh
Parameters:
Model
transform : Matrix
resolver : int -> Material3D
Modifiers: inline |
|
Full Usage:
this.AddEnableShadows3D
Modifiers: inline |
|
Full Usage:
this.AddEndCamera
Parameters:
int<MeasureProduct<RenderLayer, MeasureOne>>
Modifiers: inline |
|
Full Usage:
this.AddEndEffect
Modifiers: inline |
|
|
|
|
|
|
|
Full Usage:
this.AddPostProcessWithDepth
Parameters:
PostProcessContext3D -> unit
Modifiers: inline |
|
|
|
|
|
|
|
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.
Resets the count every frame (clearing thousands of struct-DU slots per frame
is a hot-path cost we avoid), but periodically zeroes the backing array (~every
300 frames) so stale managed refs (Model/Texture2D/Effect) in slots above count
can't keep unloaded assets alive indefinitely after a scene shrinks. Dispose also
clears. This matches |
Full Usage:
this.Count
Returns: int
|
The number of commands currently in the buffer.
|
Full Usage:
this.DepthPostProcessCount
Returns: int
|
Number of
|
Full Usage:
this.PostProcessCount
Returns: int
|
Number of
|
Mibo