Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt
Use this file to discover all available pages before exploring further.
CommandBuffer is Prowl’s high-level wrapper around a Veldrid CommandList. Instead of interacting with the low-level Veldrid API directly, you record rendering operations into a CommandBuffer — setting render targets, binding materials, uploading shader properties, issuing draw calls — and then submit the entire recorded sequence to the GPU in one call. CommandBufferPool prevents allocation pressure by recycling buffer objects across frames. Together these types form the backbone of every render pass in the engine, from the default forward pipeline to user-authored post-processing effects.
CommandBufferPool
The pool is the preferred way to obtain aCommandBuffer. It recycles used buffers to avoid per-frame allocations.
Get
CommandBuffer. If a pooled buffer is available it is reused; otherwise a new one is created.
A debug name attached to the underlying Veldrid
CommandList. Useful for GPU capture tools.A
CommandBuffer whose BeginRecording() has already been called. Ready to accept commands immediately.Release
Graphics.SubmitCommandBuffer.
The buffer to return. Must not be used after this call.
Typical Usage Pattern
CommandBuffer Reference
Construction
CommandBufferPool.Get() over direct construction.
Get or set the debug name of the underlying command list.
Render Targets
SetRenderTarget
A Veldrid
Framebuffer to render into.A Prowl
RenderTexture; its Framebuffer property is used internally.ClearRenderTarget
When
true, clears the depth/stencil buffer to depth/stencil.When
true, clears colour attachments to backgroundColor.Index of the colour attachment to clear. Pass
-1 to clear all colour attachments.Materials and Passes
SetMaterial
The material to bind.
The shader pass index to activate.
SetPass
ShaderPass without going through a Material.
SetKeyword
The keyword name (e.g.
"_NORMALMAP").The keyword value (e.g.
"ON" or "OFF").Drawing
DrawSingle
Geometry to draw (e.g., a
Mesh which implements this interface).Number of indices to draw. Pass
-1 to draw all indices in drawData.Offset into the index buffer.
DrawIndexed
SetDrawData to have been called beforehand.
DrawIndirect / DrawIndexedIndirect
GraphicsBuffer.
Blit Operations
Blit (Texture2D → Framebuffer)
Texture2D to a Framebuffer using a full-screen quad.
Blit (RenderTexture → Framebuffer)
RenderTexture.
Shader Properties
Set scalar, vector, matrix, texture, and buffer values that are uploaded to shaders at draw time.ApplyPropertyState
PropertyState (a map of typed shader properties) into the buffer’s active property state, overriding any previously set values with the same names.
Viewports and Scissors
Wireframe
Solid and Wireframe for subsequent draw calls.
Texture Operations
CopyTexture
src to dest.
ResolveMultisampledTexture
InvalidOperationException otherwise.
Debug Groups
Lifecycle
Clear
Graphics, and resets all state. Called automatically by CommandBufferPool.Release.
Dispose
CommandList and all associated Veldrid resources. Do not use a buffer after calling Dispose.
PropertyState and KeywordState
PropertyState is a typed dictionary of shader uniform values — textures, scalars, vectors, matrices, and raw buffers — that travels with a CommandBuffer and is uploaded to the GPU when BindResources is called internally.
KeywordState stores string key/value pairs that select compiled shader variant permutations. Setting a keyword causes the pipeline cache to look up or compile the correct ShaderPipeline variant.
PropertyState values set directly on a CommandBuffer accumulate for the lifetime of the recording. They are reset when Clear() is called (i.e., when the buffer is returned to the pool).