24 #ifndef PXR_IMAGING_HD_ST_COMMAND_BUFFER_H
25 #define PXR_IMAGING_HD_ST_COMMAND_BUFFER_H
47 std::shared_ptr<class HdStResourceRegistry>;
51 = std::shared_ptr<HdDrawItemConstPtrVector>;
92 unsigned currentBatchVersion,
102 if (_drawItems)
return _drawItems->size();
112 return _drawItems->size() - _visibleSize;
121 void _RebuildDrawBatches(
Hgi const *hgi);
124 void _FrustumCullCPU(
GfMatrix4d const &cullMatrix);
127 std::vector<HdStDrawItemInstance> _drawItemInstances;
130 unsigned int _visChangeCount;
131 unsigned int _drawBatchesVersion;
137 #endif //PXR_IMAGING_HD_ST_COMMAND_BUFFER_H
std::shared_ptr< class HdStRenderPassState > HdStRenderPassStateSharedPtr
std::shared_ptr< HdDrawItemConstPtrVector > HdDrawItemConstPtrVectorSharedPtr
HDST_API HdStCommandBuffer()
HDST_API void SyncDrawItemVisibility(unsigned visChangeCount)
Sync visibility state from RprimSharedState to DrawItemInstances.
HDST_API void SetDrawItems(HdDrawItemConstPtrVectorSharedPtr const &drawItems, unsigned currentBatchVersion, Hgi const *hgi)
size_t GetTotalSize() const
Returns the total number of draw items, including culled items.
size_t GetVisibleSize() const
Returns the number of draw items, excluding culled items.
HDST_API void SetEnableTinyPrimCulling(bool tinyPrimCulling)
HDST_API void ExecuteDraw(HgiGraphicsCmds *gfxCmds, HdStRenderPassStateSharedPtr const &renderPassState, HdStResourceRegistrySharedPtr const &resourceRegistry)
Execute the command buffer.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
size_t GetCulledSize() const
Returns the number of culled draw items.
std::vector< HdSt_DrawBatchSharedPtr > HdSt_DrawBatchSharedPtrVector
HDST_API ~HdStCommandBuffer()
HDST_API void RebuildDrawBatchesIfNeeded(unsigned currentBatchVersion, Hgi const *hgi)
Rebuild all draw batches if any underlying buffer array is invalidated.
#define PXR_NAMESPACE_CLOSE_SCOPE
HDST_API void PrepareDraw(HgiGraphicsCmds *gfxCmds, HdStRenderPassStateSharedPtr const &renderPassState, HdRenderIndex *renderIndex)
Prepare the command buffer for draw.
std::vector< class HdDrawItem const * > HdDrawItemConstPtrVector
std::shared_ptr< class HdStResourceRegistry > HdStResourceRegistrySharedPtr
std::shared_ptr< class HdSt_DrawBatch > HdSt_DrawBatchSharedPtr