HDK
|
#include <commandBuffer.h>
Public Member Functions | |
HDST_API | HdStCommandBuffer () |
HDST_API | ~HdStCommandBuffer () |
HDST_API void | PrepareDraw (HdStRenderPassStateSharedPtr const &renderPassState, HdStResourceRegistrySharedPtr const &resourceRegistry) |
Prepare the command buffer for draw. More... | |
HDST_API void | ExecuteDraw (HdStRenderPassStateSharedPtr const &renderPassState, HdStResourceRegistrySharedPtr const &resourceRegistry) |
Execute the command buffer. More... | |
HDST_API void | FrustumCull (GfMatrix4d const &cullMatrix) |
Cull drawItemInstances based on passed in combined view and projection matrix. More... | |
HDST_API void | SyncDrawItemVisibility (unsigned visChangeCount) |
Sync visibility state from RprimSharedState to DrawItemInstances. More... | |
HDST_API void | SwapDrawItems (std::vector< HdStDrawItem const * > *items, unsigned currentBatchVersion) |
HDST_API void | RebuildDrawBatchesIfNeeded (unsigned currentBatchVersion) |
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 60 of file commandBuffer.h.
HDST_API HdStCommandBuffer::HdStCommandBuffer | ( | ) |
HDST_API HdStCommandBuffer::~HdStCommandBuffer | ( | ) |
HDST_API void HdStCommandBuffer::ExecuteDraw | ( | HdStRenderPassStateSharedPtr const & | renderPassState, |
HdStResourceRegistrySharedPtr const & | resourceRegistry | ||
) |
Execute the command buffer.
HDST_API void HdStCommandBuffer::FrustumCull | ( | GfMatrix4d const & | cullMatrix | ) |
Cull drawItemInstances based on passed in combined view and projection matrix.
|
inline |
Returns the number of culled draw items.
Definition at line 102 of file commandBuffer.h.
|
inline |
Returns the total number of draw items, including culled items.
Definition at line 96 of file commandBuffer.h.
|
inline |
Returns the number of draw items, excluding culled items.
Definition at line 99 of file commandBuffer.h.
HDST_API void HdStCommandBuffer::PrepareDraw | ( | HdStRenderPassStateSharedPtr const & | renderPassState, |
HdStResourceRegistrySharedPtr const & | resourceRegistry | ||
) |
Prepare the command buffer for draw.
Rebuild all draw batches if any underlying buffer array is invalidated.
HDST_API void HdStCommandBuffer::SwapDrawItems | ( | std::vector< HdStDrawItem const * > * | items, |
unsigned | currentBatchVersion | ||
) |
Destructively swaps the contents of items
with the internal list of all draw items. Culling state is reset, with no items visible.
Sync visibility state from RprimSharedState to DrawItemInstances.