HDK
|
#include <commandBuffer.h>
Public Member Functions | |
HDST_API | HdStCommandBuffer () |
HDST_API | ~HdStCommandBuffer () |
HDST_API void | PrepareDraw (HgiGraphicsCmds *gfxCmds, HdStRenderPassStateSharedPtr const &renderPassState, HdRenderIndex *renderIndex) |
Prepare the command buffer for draw. More... | |
HDST_API void | ExecuteDraw (HgiGraphicsCmds *gfxCmds, HdStRenderPassStateSharedPtr const &renderPassState, HdStResourceRegistrySharedPtr const &resourceRegistry) |
Execute the command buffer. More... | |
HDST_API void | SyncDrawItemVisibility (unsigned visChangeCount) |
Sync visibility state from RprimSharedState to DrawItemInstances. More... | |
HDST_API void | SetDrawItems (HdDrawItemConstPtrVectorSharedPtr const &drawItems, unsigned currentBatchVersion, Hgi const *hgi) |
HDST_API void | RebuildDrawBatchesIfNeeded (unsigned currentBatchVersion, Hgi const *hgi) |
Rebuild all draw batches if any underlying buffer array is invalidated. More... | |
size_t | GetTotalSize () const |
Returns the total number of draw items, including culled items. More... | |
size_t | GetVisibleSize () const |
Returns the number of draw items, excluding culled items. More... | |
size_t | GetCulledSize () const |
Returns the number of culled draw items. More... | |
HDST_API void | SetEnableTinyPrimCulling (bool tinyPrimCulling) |
A buffer of commands (HdStDrawItem or HdComputeItem objects) to be executed.
The HdStCommandBuffer is responsible for accumulating draw items and sorting them for correctness (e.g. alpha transparency) and efficiency (e.g. the fewest number of GPU state changes).
Definition at line 64 of file commandBuffer.h.
HDST_API HdStCommandBuffer::HdStCommandBuffer | ( | ) |
HDST_API HdStCommandBuffer::~HdStCommandBuffer | ( | ) |
HDST_API void HdStCommandBuffer::ExecuteDraw | ( | HgiGraphicsCmds * | gfxCmds, |
HdStRenderPassStateSharedPtr const & | renderPassState, | ||
HdStResourceRegistrySharedPtr const & | resourceRegistry | ||
) |
Execute the command buffer.
|
inline |
Returns the number of culled draw items.
Definition at line 110 of file commandBuffer.h.
|
inline |
Returns the total number of draw items, including culled items.
Definition at line 101 of file commandBuffer.h.
|
inline |
Returns the number of draw items, excluding culled items.
Definition at line 107 of file commandBuffer.h.
HDST_API void HdStCommandBuffer::PrepareDraw | ( | HgiGraphicsCmds * | gfxCmds, |
HdStRenderPassStateSharedPtr const & | renderPassState, | ||
HdRenderIndex * | renderIndex | ||
) |
Prepare the command buffer for draw.
HDST_API void HdStCommandBuffer::RebuildDrawBatchesIfNeeded | ( | unsigned | currentBatchVersion, |
Hgi const * | hgi | ||
) |
Rebuild all draw batches if any underlying buffer array is invalidated.
HDST_API void HdStCommandBuffer::SetDrawItems | ( | HdDrawItemConstPtrVectorSharedPtr const & | drawItems, |
unsigned | currentBatchVersion, | ||
Hgi const * | hgi | ||
) |
Sets the draw items to use for batching. If the shared pointer or version is different, batches are rebuilt and the batch version is updated.
Sync visibility state from RprimSharedState to DrawItemInstances.