24 #ifndef PXR_IMAGING_HD_ST_PRIM_UTILS_H 25 #define PXR_IMAGING_HD_ST_PRIM_UTILS_H 28 #include "pxr/imaging/hdSt/api.h" 29 #include "pxr/imaging/hdSt/resourceRegistry.h" 30 #include "pxr/imaging/hd/sceneDelegate.h" 31 #include "pxr/imaging/hd/rprim.h" 37 PXR_NAMESPACE_OPEN_SCOPE
44 struct HdRprimSharedData;
48 using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
50 using HdBufferSourceSharedPtrVector = std::vector<HdBufferSourceSharedPtr>;
51 using HdBufferSpecVector = std::vector<struct HdBufferSpec>;
52 using HdSt_MaterialNetworkShaderSharedPtr =
53 std::shared_ptr<class HdSt_MaterialNetworkShader>;
55 using HdComputationSharedPtr = std::shared_ptr<class HdComputation>;
57 using HdStResourceRegistrySharedPtr =
58 std::shared_ptr<HdStResourceRegistry>;
70 void HdStMarkGeomSubsetDrawItemsDirty(
HdRenderParam *renderParam);
73 void HdStMarkGarbageCollectionNeeded(
HdRenderParam *renderParam);
80 HdPrimvarDescriptorVector
81 HdStGetPrimvarDescriptors(
83 HdStDrawItem
const * drawItem,
85 HdInterpolation interpolation,
86 const HdReprSharedPtr &repr =
nullptr,
87 HdMeshGeomStyle descGeomStyle = HdMeshGeomStyleInvalid,
88 int geomSubsetDescIndex = 0,
89 size_t numGeomSubsets = 0);
93 HdPrimvarDescriptorVector
94 HdStGetInstancerPrimvarDescriptors(
125 bool hasDisplayOpacityPrimvar,
126 bool occludedSelectionShowsThrough);
130 HdSt_MaterialNetworkShaderSharedPtr
131 HdStGetMaterialNetworkShader(
136 HdSt_MaterialNetworkShaderSharedPtr
137 HdStGetMaterialNetworkShader(
147 bool HdStIsValidBAR(HdBufferArrayRangeSharedPtr
const& range);
152 bool HdStCanSkipBARAllocationOrUpdate(
153 HdBufferSourceSharedPtrVector
const& sources,
154 HdStComputationSharedPtrVector
const& computations,
155 HdBufferArrayRangeSharedPtr
const& curRange,
156 HdDirtyBits dirtyBits);
159 bool HdStCanSkipBARAllocationOrUpdate(
160 HdBufferSourceSharedPtrVector
const& sources,
161 HdBufferArrayRangeSharedPtr
const& curRange,
162 HdDirtyBits dirtyBits);
170 HdStGetRemovedPrimvarBufferSpecs(
171 HdBufferArrayRangeSharedPtr
const& curRange,
172 HdPrimvarDescriptorVector
const& newPrimvarDescs,
173 HdExtComputationPrimvarDescriptorVector
const& newCompPrimvarDescs,
179 HdStGetRemovedPrimvarBufferSpecs(
180 HdBufferArrayRangeSharedPtr
const& curRange,
181 HdPrimvarDescriptorVector
const& newPrimvarDescs,
189 void HdStUpdateDrawItemBAR(
190 HdBufferArrayRangeSharedPtr
const& newRange,
192 HdRprimSharedData *sharedData,
199 bool HdStIsPrimvarExistentAndValid(
202 HdPrimvarDescriptorVector
const& primvars,
211 bool HdStShouldPopulateConstantPrimvars(
212 HdDirtyBits
const *dirtyBits,
219 void HdStPopulateConstantPrimvars(
221 HdRprimSharedData *sharedData,
225 HdDirtyBits *dirtyBits,
226 HdPrimvarDescriptorVector
const& constantPrimvars,
227 bool *hasMirroredTransform =
nullptr);
235 void HdStUpdateInstancerData(
239 HdStDrawItem *drawItem,
240 HdRprimSharedData *sharedData,
241 HdDirtyBits rprimDirtyBits);
246 bool HdStIsInstancePrimvarExistentAndValid(
257 void HdStProcessTopologyVisibility(
258 VtIntArray invisibleElements,
259 int numTotalElements,
260 VtIntArray invisiblePoints,
262 HdRprimSharedData *sharedData,
263 HdStDrawItem *drawItem,
266 HdStResourceRegistrySharedPtr
const &resourceRegistry,
307 bool HdStIsEnabledSharedVertexPrimvar();
310 uint64_t HdStComputeSharedPrimvarId(
312 HdBufferSourceSharedPtrVector
const &sources,
313 HdStComputationSharedPtrVector
const &computations);
316 void HdStGetBufferSpecsFromCompuations(
317 HdStComputationSharedPtrVector
const& computations,
318 HdBufferSpecVector *bufferSpecs);
320 PXR_NAMESPACE_CLOSE_SCOPE
322 #endif // PXR_IMAGING_HD_ST_PRIM_UTILS_H The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Token for efficient comparison, assignment, and hashing of known strings.
The render engine state for a given rprim from the scene graph.
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
HdSt implements instancing by drawing each proto multiple times with a single draw call.
A draw item is a light-weight representation of an HdRprim's resources and material to be used for re...