PipelineBufferExtensions Type
Provides a fluent, discoverable API for submitting 3D rendering commands to a RenderBuffer.
Most methods return the buffer instance to allow for method chaining. These extensions are optimized for the 3D pipeline and handle the transition between opaque and transparent rendering passes automatically.
Static members
| Static member |
Description
|
Full Usage:
PipelineBufferExtensions.AddLight(this, light)
Parameters:
PipelineBuffer<RenderCommand>
light : Light
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Adds a single dynamic light to the current lighting environment. Unlike 'Lighting', this does not replace existing lights. It appends the new light to the collection for the current frame. Useful for lights attached to dynamic objects.
|
Full Usage:
PipelineBufferExtensions.Billboard(this, texture, billboard)
Parameters:
PipelineBuffer<RenderCommand>
texture : Texture2D
billboard : Billboard3D
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a camera-facing billboard to the Transparent pass. Useful for particles, lens flares, and foliage. The pipeline handles the orientation math based on the active camera at render time.
|
Full Usage:
PipelineBufferExtensions.BillboardOpaque(this, texture, billboard)
Parameters:
PipelineBuffer<RenderCommand>
texture : Texture2D
billboard : Billboard3D
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a camera-facing billboard to the Opaque pass. Rarely used, but effective for high-performance impostors that do not require alpha blending.
|
Full Usage:
PipelineBufferExtensions.Camera(this, camera)
Parameters:
PipelineBuffer<RenderCommand>
camera : Camera
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Configures the view and projection matrices for all subsequent draw calls in the current buffer. This command triggers an internal state change. If multiple cameras are needed (e.g., for a split-screen or a minimap), you should submit a new Camera command between the respective draw calls.
Example
|
Full Usage:
PipelineBufferExtensions.Clear(this, color)
Parameters:
PipelineBuffer<RenderCommand>
-
The render buffer.
color : Color
-
The background color to fill the target with.
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Clears the color and depth buffers of the current render target.
|
Full Usage:
PipelineBufferExtensions.ClearDepth(this)
Parameters:
PipelineBuffer<RenderCommand>
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Resets the depth buffer without affecting the color data. Essential when drawing transparent overlays or "always-on-top" objects (like silhouettes) that should not be occluded by world geometry.
|
Full Usage:
PipelineBufferExtensions.ClearTarget(this, color, clearDepth)
Parameters:
PipelineBuffer<RenderCommand>
-
The render buffer.
color : Color
-
The background color. If black is desired, pass Color.Black.
clearDepth : bool
-
If true, the Z-buffer is reset to 1.0, allowing new depth tests to pass.
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Performs a targeted clear operation on the current render target.
|
Full Usage:
PipelineBufferExtensions.Custom(this, drawFn)
Parameters:
PipelineBuffer<RenderCommand>
drawFn : GraphicsDevice -> Camera -> unit
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Injects a custom rendering callback for low-level GraphicsDevice access. This is an "escape hatch" for operations not supported by the DSL, such as dispatching compute shaders or drawing custom vertex buffers.
|
Full Usage:
PipelineBufferExtensions.Draw(this, drawable)
Parameters:
PipelineBuffer<RenderCommand>
-
The render buffer.
drawable : Drawable voption
-
The object to render. Passing ValueNone is a safe no-op.
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Adds a pre-configured drawable to the pipeline. This is the standard way to submit meshes. The pipeline will automatically assign the drawable to the Opaque or Transparent pass based on its material flags.
|
Full Usage:
PipelineBufferExtensions.DrawMany(this, drawables)
Parameters:
PipelineBuffer<RenderCommand>
drawables : 'a
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline Type parameters: 'a |
Efficiently submits a collection of drawables.
Ideal for rendering lists of entities or particles. Skips all
|
Full Usage:
PipelineBufferExtensions.Lighting(this, lighting)
Parameters:
PipelineBuffer<RenderCommand>
lighting : LightingState
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Sets the global lighting environment, including ambient light and the dynamic light collection. The 3D pipeline uses this state to pack light data into textures for the PBR shader. Only one lighting state can be active at a time; submitting a new one replaces the previous.
|
Full Usage:
PipelineBufferExtensions.Line(this, p1, p2, color)
Parameters:
PipelineBuffer<RenderCommand>
-
The render buffer.
p1 : Vector3
-
Starting point in world space.
p2 : Vector3
-
Ending point in world space.
color : Color
-
The color of the line.
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a single unlit line segment.
|
Full Usage:
PipelineBufferExtensions.Lines(this, verts, lineCount)
Parameters:
PipelineBuffer<RenderCommand>
-
The render buffer.
verts : VertexPositionColor[]
-
Interleaved start/end vertices.
lineCount : int
-
Number of segments (verts.Length / 2).
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a batch of line segments for efficient rendering.
|
Full Usage:
PipelineBufferExtensions.LinesEffect(this, pass, effect, setup, verts, lineCount)
Parameters:
PipelineBuffer<RenderCommand>
pass : RenderPass
effect : Effect
setup : (Effect -> EffectContext -> unit) voption
verts : VertexPositionColor[]
lineCount : int
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a batch of lines to be rendered with a custom shader effect. Used for advanced effects like distance-faded grids or glowing neon paths.
|
Full Usage:
PipelineBufferExtensions.Quad(this, texture, quad)
Parameters:
PipelineBuffer<RenderCommand>
texture : Texture2D
quad : Quad3D
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a textured quad to the Opaque rendering pass. Opaque quads are rendered with depth-write enabled and do not support semi-transparency. Ideal for floors, walls, and solid world geometry.
|
Full Usage:
PipelineBufferExtensions.QuadTransparent(this, texture, quad)
Parameters:
PipelineBuffer<RenderCommand>
texture : Texture2D
quad : Quad3D
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Submits a textured quad to the Transparent rendering pass. Transparent quads are automatically sorted back-to-front by the pipeline to ensure correct alpha blending. Use this for decals, markers, and UI elements.
|
Full Usage:
PipelineBufferExtensions.Submit(this)
Parameters:
PipelineBuffer<RenderCommand>
Modifiers: inline |
Terminates the fluent command chain. While this method is currently a no-op, using it is recommended for visual clarity and to signal the completion of a frame's command submission.
|
Full Usage:
PipelineBufferExtensions.Viewport(this, viewport)
Parameters:
PipelineBuffer<RenderCommand>
viewport : Viewport
Returns: PipelineBuffer<RenderCommand>
Modifiers: inline |
Restricts rendering to a specific sub-region of the screen. Use this for UI overlays, minimaps, or local viewport effects. The viewport stays active until another Viewport command is submitted.
|
Mibo