1#ifndef _RENDERCOMMANDQUEUE_H
2#define _RENDERCOMMANDQUEUE_H
20 uint32_t startIndexLocation = 0,
21 int32_t baseVertexLocation = 0,
22 bool castsShadow =
true
30 uint32_t startVertexLocation = 0
91 static constexpr int RETIRE_FRAMES = 3;
96 int m_retireIndex = 0;
Implements a dynamic array-like list for storing and managing a collection of elements.
Implements a FIFO (First-In, First-Out) queue data structure.
std::function< void(RenderContext *)> ExecuteFunction
Frame-scoped queue of recorded draw/state commands, replayed into a RenderContext at flush time.
void Clear()
Drops queued commands for the current frame, keeping the cached shadow draw list.
void SubmitUpdateConstantBuffer(RefPtr< BufferBase > buffer, void *Data, uint16_t Size)
Queues a constant buffer write with data captured at submit time.
void SubmitSetRenderMode(RenderMode mode)
void SubmitCustomCommand(CustomCommand::ExecuteFunction function)
Queues an arbitrary callback to run inline with other render commands.
void ExecuteCommands(RenderContext *context)
static RenderCommandQueue * GetInstance()
Lazily creates and returns the process-wide singleton instance.
bool HasCachedShadowDraws() const
void SubmitBindMaterial(::Sleak::Material *material)
Queues a material bind, switching shader/texture state for subsequent draws.
void ExecuteShadowPass(RenderContext *context)
void SubmitDrawIndexed(RefPtr< BufferBase > vertexBuffer, RefPtr< BufferBase > indexBuffer, List< RefPtr< BufferBase > > constantBuffers, uint32_t indexCount, uint32_t startIndexLocation=0, int32_t baseVertexLocation=0, bool castsShadow=true)
Queues an indexed draw with its vertex/index buffers and constant buffers.
void ClearAll()
Drops queued commands and the cached shadow draw list.
void SubmitDraw(RefPtr< BufferBase > vertexBuffer, List< RefPtr< BufferBase > > constantBuffers, uint32_t vertexCount, uint32_t startVertexLocation=0)
Queues a non-indexed draw with its vertex buffer and constant buffers.
void SubmitSetRenderFace(RenderFace face)
void SubmitBindConstantBuffer(RefPtr< BufferBase > buffer, uint8_t slot)
Queues a constant buffer bind at the given slot.
Abstract interface for high-level graphics command execution and resource management.
Backend-facing rendering layer shared by the four graphics backends.
RenderMode
Rasterizer fill style for a draw.
RenderFace
Which triangle winding gets culled.
Root namespace for everything the engine exposes.
A draw command paired with the transform/bone buffers it needs to replay in the shadow pass.
RefPtr< BufferBase > boneBuffer
RefPtr< RenderCommandBase > command
RefPtr< BufferBase > transformBuffer