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"
36 PXR_NAMESPACE_OPEN_SCOPE
43 struct HdRprimSharedData;
47 using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
49 using HdBufferSourceSharedPtrVector = std::vector<HdBufferSourceSharedPtr>;
50 using HdBufferSpecVector = std::vector<struct HdBufferSpec>;
51 using HdStShaderCodeSharedPtr = std::shared_ptr<class HdStShaderCode>;
53 using HdComputationSharedPtr = std::shared_ptr<class HdComputation>;
55 using HdStResourceRegistrySharedPtr =
56 std::shared_ptr<HdStResourceRegistry>;
68 void HdStMarkGarbageCollectionNeeded(
HdRenderParam *renderParam);
75 HdPrimvarDescriptorVector
76 HdStGetPrimvarDescriptors(
78 HdStDrawItem
const * drawItem,
80 HdInterpolation interpolation);
84 HdPrimvarDescriptorVector
85 HdStGetInstancerPrimvarDescriptors(
101 bool hasDisplayOpacityPrimvar,
102 bool occludedSelectionShowsThrough);
106 HdStShaderCodeSharedPtr
107 HdStGetMaterialShader(
116 bool HdStIsValidBAR(HdBufferArrayRangeSharedPtr
const& range);
121 bool HdStCanSkipBARAllocationOrUpdate(
122 HdBufferSourceSharedPtrVector
const& sources,
123 HdStComputationSharedPtrVector
const& computations,
124 HdBufferArrayRangeSharedPtr
const& curRange,
125 HdDirtyBits dirtyBits);
128 bool HdStCanSkipBARAllocationOrUpdate(
129 HdBufferSourceSharedPtrVector
const& sources,
130 HdBufferArrayRangeSharedPtr
const& curRange,
131 HdDirtyBits dirtyBits);
139 HdStGetRemovedPrimvarBufferSpecs(
140 HdBufferArrayRangeSharedPtr
const& curRange,
141 HdPrimvarDescriptorVector
const& newPrimvarDescs,
142 HdExtComputationPrimvarDescriptorVector
const& newCompPrimvarDescs,
148 HdStGetRemovedPrimvarBufferSpecs(
149 HdBufferArrayRangeSharedPtr
const& curRange,
150 HdPrimvarDescriptorVector
const& newPrimvarDescs,
158 void HdStUpdateDrawItemBAR(
159 HdBufferArrayRangeSharedPtr
const& newRange,
161 HdRprimSharedData *sharedData,
168 bool HdStIsPrimvarExistentAndValid(
171 HdPrimvarDescriptorVector
const& primvars,
180 bool HdStShouldPopulateConstantPrimvars(
181 HdDirtyBits
const *dirtyBits,
188 void HdStPopulateConstantPrimvars(
190 HdRprimSharedData *sharedData,
194 HdDirtyBits *dirtyBits,
195 HdPrimvarDescriptorVector
const& constantPrimvars,
196 bool *hasMirroredTransform =
nullptr);
204 void HdStUpdateInstancerData(
208 HdStDrawItem *drawItem,
209 HdRprimSharedData *sharedData,
210 HdDirtyBits rprimDirtyBits);
215 bool HdStIsInstancePrimvarExistentAndValid(
226 void HdStProcessTopologyVisibility(
227 VtIntArray invisibleElements,
228 int numTotalElements,
229 VtIntArray invisiblePoints,
231 HdRprimSharedData *sharedData,
232 HdStDrawItem *drawItem,
235 HdStResourceRegistrySharedPtr
const &resourceRegistry,
276 bool HdStIsEnabledSharedVertexPrimvar();
279 uint64_t HdStComputeSharedPrimvarId(
281 HdBufferSourceSharedPtrVector
const &sources,
282 HdStComputationSharedPtrVector
const &computations);
285 void HdStGetBufferSpecsFromCompuations(
286 HdStComputationSharedPtrVector
const& computations,
287 HdBufferSpecVector *bufferSpecs);
289 PXR_NAMESPACE_CLOSE_SCOPE
291 #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...