HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
renderIndex.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_RENDER_INDEX_H
25 #define PXR_IMAGING_HD_RENDER_INDEX_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
31 #include "pxr/imaging/hd/perfLog.h"
35 #include "pxr/imaging/hd/tokens.h"
36 
37 #include "pxr/imaging/hf/perfLog.h"
38 
39 #include "pxr/usd/sdf/path.h"
40 
41 #include "pxr/base/gf/vec4i.h"
42 #include "pxr/base/tf/hashmap.h"
43 
44 #include <tbb/enumerable_thread_specific.h>
45 
46 #include <vector>
47 #include <unordered_map>
48 #include <memory>
49 
51 
52 class HdRprim;
53 class HdSprim;
54 class HdBprim;
55 class HdDrawItem;
56 class HdRprimCollection;
57 class HdSceneDelegate;
58 class HdRenderDelegate;
59 class HdExtComputation;
60 class VtValue;
61 class HdInstancer;
62 class HdDriver;
63 
64 using HdDirtyListSharedPtr = std::shared_ptr<class HdDirtyList>;
65 
66 using HdTaskSharedPtr = std::shared_ptr<class HdTask>;
67 
68 using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
69 using HdTaskSharedPtrVector = std::vector<HdTaskSharedPtr>;
70 using HdTaskContext = std::unordered_map<TfToken,
71  VtValue,
73 using HdDriverVector = std::vector<HdDriver*>;
74 
75 /// \class HdRenderIndex
76 ///
77 /// The Hydra render index is a flattened representation of the client scene
78 /// graph, which may be composed of several self-contained scene graphs, each of
79 /// which provides a HdSceneDelegate adapter for data access.
80 ///
81 /// Thus, multiple HdSceneDelegate's may be tied to the same HdRenderIndex.
82 ///
83 /// The render index, however, is tied to a single HdRenderDelegate, which
84 /// handles the actual creation and deletion of Hydra scene primitives. These
85 /// include geometry and non-drawable objects (such as the camera and texture
86 /// buffers). The render index simply holds a handle to these primitives, and
87 /// tracks any changes to them via the HdChangeTracker.
88 /// It also tracks computations and tasks that may update resources and render a
89 /// subset of the renderable primitives.
90 ///
91 /// The render index orchestrates the "syncing" of scene primitives, by
92 /// providing the relevant scene delegate for data access, and leaves resource
93 /// management to the rendering backend (via HdResourceRegistry).
94 ///
95 /// It also provides "execution" functionality for application facing Hydra
96 /// concepts (such as HdTask/HdRenderPass) in computing the set of HdDrawItems
97 /// for a given HdRprimCollection, for rendering.
98 ///
99 /// \sa
100 /// HdChangeTracker
101 /// HdDrawItem
102 /// HdRenderDelegate
103 /// HdRprimCollection
104 /// HdSceneDelegate
105 ///
106 /// \note
107 /// The current design ties a HdRenderIndex to a HdRenderDelegate.
108 /// However, the HdRenderIndex isn't tied to a viewer (viewport).
109 /// It is common to have multiple viewers image the composed scene (for example,
110 /// with different cameras), in which case the HdRenderIndex and
111 /// HdRenderDelegate are shared by the viewers.
112 ///
113 /// If two viewers use different HdRenderDelegate's, then it may unfortunately
114 /// require populating two HdRenderIndex's.
115 ///
116 class HdRenderIndex final
117 {
118 public:
119  typedef std::vector<HdDrawItem const*> HdDrawItemPtrVector;
120 
121  /// Create a render index with the given render delegate.
122  /// Returns null if renderDelegate is null.
123  /// The render delegate and render tasks may require access to a renderer's
124  /// device provided by the application. The objects can be
125  /// passed in as 'drivers'. Hgi is an example of a HdDriver.
126  // hgi = Hgi::CreatePlatformDefaultHgi()
127  // hgiDriver = new HdDriver<Hgi*>(HgiTokens→renderDriver, hgi)
128  // HdRenderIndex::New(_renderDelegate, {_hgiDriver})
129  HD_API
130  static HdRenderIndex* New(
131  HdRenderDelegate *renderDelegate,
132  HdDriverVector const& drivers);
133 
134  HD_API
135  ~HdRenderIndex();
136 
137  /// Clear all r (render), s (state) and b (buffer) prims.
138  HD_API
139  void Clear();
140 
141  /// Clear all entries in the render index under
142  /// the given root and belong to a specified delegate.
143  ///
144  /// Used for example to unload a delegate.
145  HD_API
146  void RemoveSubtree(const SdfPath &root, HdSceneDelegate* sceneDelegate);
147 
148  // ---------------------------------------------------------------------- //
149  /// Given a prim id, returns the path of the corresponding rprim
150  /// or an empty path if none is found.
151  HD_API
152  SdfPath GetRprimPathFromPrimId(int primId) const;
153 
154  // ---------------------------------------------------------------------- //
155  /// \name Synchronization
156  // ---------------------------------------------------------------------- //
157 
158  /// Adds the dirty list to the sync queue. The actual processing of the
159  /// dirty list happens later in SyncAll().
160  ///
161  /// This is typically called from HdRenderPass::Sync. However, the current
162  /// call chain ties it to SyncAll, i.e.
163  /// HdRenderIndex::SyncAll > .... > HdRenderPass::Sync > HdRenderIndex::Sync
164  HD_API
165  void EnqueuePrimsToSync(
166  HdDirtyListSharedPtr const &dirtyList,
167  HdRprimCollection const &collection);
168 
169  /// Syncs input tasks, B & S prims, (external) computations and processes
170  /// all pending dirty lists (which syncs the R prims). At the end of this
171  /// step, all the resources that need to be updated have handles to their
172  /// data sources.
173  /// This is the first phase in Hydra's execution. See HdEngine::Execute
174  HD_API
175  void SyncAll(HdTaskSharedPtrVector *tasks, HdTaskContext *taskContext);
176 
177  // ---------------------------------------------------------------------- //
178  /// \name Execution
179  // ---------------------------------------------------------------------- //
180 
181  /// Returns a list of relevant draw items that match the criteria specified
182  // by renderTags and collection.
183  /// The is typically called during render pass execution, which is the
184  /// final phase in the Hydra's execution. See HdRenderPass::Execute
185  HD_API
187  TfTokenVector const& renderTags);
188 
189  // ---------------------------------------------------------------------- //
190  /// \name Change Tracker
191  // ---------------------------------------------------------------------- //
192 
193  HdChangeTracker& GetChangeTracker() { return _tracker; }
194  HdChangeTracker const& GetChangeTracker() const { return _tracker; }
195 
196  // ---------------------------------------------------------------------- //
197  /// \name Renderable prims (e.g. meshes, basis curves)
198  // ---------------------------------------------------------------------- //
199 
200  /// Returns whether the rprim type is supported by this render index.
201  HD_API
202  bool IsRprimTypeSupported(TfToken const& typeId) const;
203 
204  /// Insert a rprim into index
205  HD_API
206  void InsertRprim(TfToken const& typeId,
207  HdSceneDelegate* sceneDelegate,
208  SdfPath const& rprimId);
209 
210  /// Remove a rprim from index
211  HD_API
212  void RemoveRprim(SdfPath const& id);
213 
214  /// Returns true if rprim \p id exists in index.
215  bool HasRprim(SdfPath const& id) {
216  return _rprimMap.find(id) != _rprimMap.end();
217  }
218 
219  /// Returns the rprim of id
220  HD_API
221  HdRprim const *GetRprim(SdfPath const &id) const;
222 
223  /// Returns the scene delegate for the given rprim
224  HD_API
226 
227  /// Query function to return the id's of the scene delegate and instancer
228  /// associated with the Rprim at the given path.
229  HD_API
231  SdfPath* sceneDelegateId,
232  SdfPath* instancerId) const;
233 
234  /// Returns the render tag for the given rprim
235  HD_API
236  TfToken GetRenderTag(SdfPath const& id) const;
237 
238  /// Return the material tag for the given rprim
239  HD_API
240  TfToken GetMaterialTag(SdfPath const& id) const;
241 
242  /// Returns a sorted list of all Rprims in the render index.
243  /// The list is sorted by std::less<SdfPath>
244  HD_API
245  const SdfPathVector &GetRprimIds() { return _rprimIds.GetIds(); }
246 
247 
248  /// Returns the subtree rooted under the given path.
249  HD_API
251 
252 
253  // ---------------------------------------------------------------------- //
254  /// \name Instancer Support
255  // ---------------------------------------------------------------------- //
256 
257  /// Insert an instancer into index
258  HD_API
259  void InsertInstancer(HdSceneDelegate* delegate,
260  SdfPath const &id);
261 
262  /// Remove an instancer from index
263  HD_API
264  void RemoveInstancer(SdfPath const& id);
265 
266  /// Returns true if instancer \p id exists in index.
267  bool HasInstancer(SdfPath const& id) {
268  return _instancerMap.find(id) != _instancerMap.end();
269  }
270 
271  /// Returns the instancer of id
272  HD_API
273  HdInstancer *GetInstancer(SdfPath const &id) const;
274 
275  // ---------------------------------------------------------------------- //
276  /// \name Task Support
277  // ---------------------------------------------------------------------- //
278 
279  /// Inserts a new task into the render index with an identifier of \p id.
280  template <typename T>
281  void InsertTask(HdSceneDelegate* delegate, SdfPath const& id);
282 
283  /// Removes the given task from the RenderIndex.
284  HD_API
285  void RemoveTask(SdfPath const& id);
286 
287  /// Returns true if a task exists in the index with the given \p id.
288  bool HasTask(SdfPath const& id) {
289  return _taskMap.find(id) != _taskMap.end();
290  }
291 
292  /// Returns the task for the given \p id.
293  HD_API
294  HdTaskSharedPtr const& GetTask(SdfPath const& id) const;
295 
296  // ---------------------------------------------------------------------- //
297  /// \name Scene state prims (e.g. camera, light)
298  // ---------------------------------------------------------------------- //
299 
300  /// Returns whether the sprim type is supported by this render index.
301  HD_API
302  bool IsSprimTypeSupported(TfToken const& typeId) const;
303 
304  /// Insert a sprim into index
305  HD_API
306  void InsertSprim(TfToken const& typeId,
307  HdSceneDelegate* delegate,
308  SdfPath const& sprimId);
309 
310  HD_API
311  void RemoveSprim(TfToken const& typeId, SdfPath const &id);
312 
313  HD_API
314  HdSprim *GetSprim(TfToken const& typeId, SdfPath const &id) const;
315 
316  /// Returns the subtree rooted under the given path for the given sprim
317  /// type.
318  HD_API
319  SdfPathVector GetSprimSubtree(TfToken const& typeId,
320  SdfPath const& root);
321 
322  /// Returns the fullback prim for the Sprim of the given type.
323  HD_API
324  HdSprim *GetFallbackSprim(TfToken const& typeId) const;
325 
326 
327  // ---------------------------------------------------------------------- //
328  /// \name Buffer prims (e.g. textures, buffers)
329  // ---------------------------------------------------------------------- //
330 
331  /// Returns whether the bprim type is supported by this render index.
332  HD_API
333  bool IsBprimTypeSupported(TfToken const& typeId) const;
334 
335  /// Insert a bprim into index
336  HD_API
337  void InsertBprim(TfToken const& typeId,
338  HdSceneDelegate* delegate,
339  SdfPath const& bprimId);
340 
341  HD_API
342  void RemoveBprim(TfToken const& typeId, SdfPath const &id);
343 
344  HD_API
345  HdBprim *GetBprim(TfToken const& typeId, SdfPath const &id) const;
346 
347  /// Returns the subtree rooted under the given path for the given bprim
348  /// type.
349  HD_API
350  SdfPathVector GetBprimSubtree(TfToken const& typeId,
351  SdfPath const& root);
352 
353  /// Returns the fallback prim for the Bprim of the given type.
354  HD_API
355  HdBprim *GetFallbackBprim(TfToken const& typeId) const;
356 
357  // ---------------------------------------------------------------------- //
358  /// \name Render Delegate
359  // ---------------------------------------------------------------------- //
360  /// Currently, a render index only supports connection to one type of
361  /// render delegate, due to the inserted information and change tracking
362  /// being specific to that delegate type.
363  HD_API
365 
366  // The render delegate may require access to a render context / device
367  // that is provided by the application.
368  HD_API
369  HdDriverVector const& GetDrivers() const;
370 
371  /// Returns a shared ptr to the resource registry of the current render
372  /// delegate.
373  HD_API
375 
376 private:
377  // The render index constructor is private so we can check
378  // renderDelegate before construction: see HdRenderIndex::New(...).
380  HdRenderDelegate *renderDelegate,
381  HdDriverVector const& drivers);
382 
383  // ---------------------------------------------------------------------- //
384  // Private Helper methods
385  // ---------------------------------------------------------------------- //
386 
387  // Go through all RPrims and reallocate their instance ids
388  // This is called once we have exhausted all all 24bit instance ids.
389  void _CompactPrimIds();
390 
391  // Allocate the next available instance id to the prim
392  void _AllocatePrimId(HdRprim* prim);
393 
394  // Inserts the task into the index and updates tracking state.
395  // _TrackDelegateTask is called by the inlined InsertTask<T>, so it needs
396  // to be marked HD_API.
397  HD_API
398  void _TrackDelegateTask(HdSceneDelegate* delegate,
399  SdfPath const& taskId,
400  HdTaskSharedPtr const& task);
401 
402  template <typename T>
403  static inline const TfToken & _GetTypeId();
404 
405  void _RemoveRprimSubtree(const SdfPath &root,
406  HdSceneDelegate* sceneDelegate);
407  void _RemoveInstancerSubtree(const SdfPath &root,
408  HdSceneDelegate* sceneDelegate);
409  void _RemoveExtComputationSubtree(const SdfPath &root,
410  HdSceneDelegate* sceneDelegate);
411  void _RemoveTaskSubtree(const SdfPath &root,
412  HdSceneDelegate* sceneDelegate);
413 
414  // ---------------------------------------------------------------------- //
415  // Index State
416  // ---------------------------------------------------------------------- //
417  struct _RprimInfo {
418  HdSceneDelegate *sceneDelegate;
419  HdRprim *rprim;
420  };
421 
422  struct _TaskInfo {
423  HdSceneDelegate *sceneDelegate;
424  HdTaskSharedPtr task;
425  };
426 
427  typedef std::unordered_map<SdfPath, _TaskInfo, SdfPath::Hash> _TaskMap;
429  typedef std::vector<SdfPath> _RprimPrimIDVector;
430 
431  typedef Hd_PrimTypeIndex<HdSprim> _SprimIndex;
432  typedef Hd_PrimTypeIndex<HdBprim> _BprimIndex;
433 
434  _RprimMap _rprimMap;
435  Hd_SortedIds _rprimIds;
436 
437  _RprimPrimIDVector _rprimPrimIdMap;
438 
439  _TaskMap _taskMap;
440 
441  _SprimIndex _sprimIndex;
442  _BprimIndex _bprimIndex;
443 
444  HdChangeTracker _tracker;
445 
447  _InstancerMap _instancerMap;
448 
449  struct _SyncQueueEntry {
450  HdDirtyListSharedPtr dirtyList;
451  HdRprimCollection collection;
452 
453  };
454  typedef std::vector<_SyncQueueEntry> _SyncQueue;
455  _SyncQueue _syncQueue;
456 
457  /// With the removal of task-based collection include/exclude path
458  /// filtering, HdDirtyLists were generating their lists of dirty rprim IDs
459  /// by looking through every rprim in the render index. When the number of
460  /// tasks/render passes/dirty lists grew large, this resulted in
461  /// significant overhead and lots of duplication of work.
462  /// Instead, the render index itself now takes care of generating the
463  /// complete list of dirty rprim IDs when requested by the HdDirtyList.
464  /// During SyncAll(), the first HdDirtyList to request the list of dirty
465  /// IDs for a given HdDirtyBits mask triggers the render index to produce
466  /// that list and cache it in a map. Subsequent requests reuse the cached
467  /// list. At the end of SyncAll(), the map is cleared in preparation for
468  /// the next sync.
469  std::unordered_map<HdDirtyBits, const SdfPathVector> _dirtyRprimIdsMap;
470 
471  friend class HdDirtyList;
472  const SdfPathVector& _GetDirtyRprimIds(HdDirtyBits mask);
473 
474  HdRenderDelegate *_renderDelegate;
475  HdDriverVector _drivers;
476 
477  // ---------------------------------------------------------------------- //
478  // Sync State
479  // ---------------------------------------------------------------------- //
480  TfTokenVector _activeRenderTags;
481  unsigned int _renderTagVersion;
482 
483  /// Register the render delegate's list of supported prim types.
484  void _InitPrimTypes();
485 
486  /// Creates fallback prims for each supported prim type.
487  bool _CreateFallbackPrims();
488 
489  /// Release the fallback prims.
490  void _DestroyFallbackPrims();
491 
492  void _GatherRenderTags(const HdTaskSharedPtrVector *tasks);
493 
494  typedef tbb::enumerable_thread_specific<HdDrawItemPtrVector>
495  _ConcurrentDrawItems;
496 
497  void _AppendDrawItems(const SdfPathVector &rprimIds,
498  size_t begin,
499  size_t end,
500  HdRprimCollection const& collection,
501  _ConcurrentDrawItems* result);
502 
503  /// Register core hydra reprs. Only ever called once, the first time
504  /// a render index is created.
505  /// XXX: This code should move to the application layer.
506  static void _ConfigureReprs();
507 
508  // Remove default constructor
509  HdRenderIndex() = delete;
510 
511  // Don't allow copies
512  HdRenderIndex(const HdRenderIndex &) = delete;
513  HdRenderIndex &operator=(const HdRenderIndex &) = delete;
514 
515 };
516 
517 template <typename T>
518 void
520 {
523 
524  HdTaskSharedPtr task = std::make_shared<T>(delegate, id);
525  _TrackDelegateTask(delegate, id, task);
526 }
527 
529 
530 #endif //PXR_IMAGING_HD_RENDER_INDEX_H
HD_API void InsertBprim(TfToken const &typeId, HdSceneDelegate *delegate, SdfPath const &bprimId)
Insert a bprim into index.
HD_API ~HdRenderIndex()
void InsertTask(HdSceneDelegate *delegate, SdfPath const &id)
Inserts a new task into the render index with an identifier of id.
Definition: renderIndex.h:519
HD_API void RemoveInstancer(SdfPath const &id)
Remove an instancer from index.
std::shared_ptr< class HdResourceRegistry > HdResourceRegistrySharedPtr
HD_API void InsertSprim(TfToken const &typeId, HdSceneDelegate *delegate, SdfPath const &sprimId)
Insert a sprim into index.
HD_API void EnqueuePrimsToSync(HdDirtyListSharedPtr const &dirtyList, HdRprimCollection const &collection)
iterator end()
Definition: hashmap.h:318
std::vector< HdDrawItem const * > HdDrawItemPtrVector
Definition: renderIndex.h:119
uint32_t HdDirtyBits
Definition: types.h:127
HD_API void Clear()
Clear all r (render), s (state) and b (buffer) prims.
HD_API HdSprim * GetSprim(TfToken const &typeId, SdfPath const &id) const
Returns whether the sprim type is supported by this render index.
#define HF_MALLOC_TAG_FUNCTION()
Definition: perfLog.h:37
HD_API HdRenderDelegate * GetRenderDelegate() const
HD_API void RemoveSubtree(const SdfPath &root, HdSceneDelegate *sceneDelegate)
HD_API SdfPathVector GetRprimSubtree(SdfPath const &root)
Returns the subtree rooted under the given path.
#define HD_API
Definition: api.h:40
bool HasTask(SdfPath const &id)
Returns true if a task exists in the index with the given id.
Definition: renderIndex.h:288
HD_API HdDrawItemPtrVector GetDrawItems(HdRprimCollection const &collection, TfTokenVector const &renderTags)
Returns a list of relevant draw items that match the criteria specified.
Functor to use for hash maps from tokens to other things.
Definition: token.h:166
HD_API SdfPathVector GetBprimSubtree(TfToken const &typeId, SdfPath const &root)
HD_API bool IsSprimTypeSupported(TfToken const &typeId) const
Returns whether the sprim type is supported by this render index.
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
Definition: renderIndex.h:69
HD_API HdRprim const * GetRprim(SdfPath const &id) const
Returns the rprim of id.
HdChangeTracker const & GetChangeTracker() const
Definition: renderIndex.h:194
HD_API TfToken GetRenderTag(SdfPath const &id) const
Returns the render tag for the given rprim.
bool HasRprim(SdfPath const &id)
Returns true if rprim id exists in index.
Definition: renderIndex.h:215
HD_API SdfPathVector GetSprimSubtree(TfToken const &typeId, SdfPath const &root)
Definition: token.h:87
GLuint64EXT * result
Definition: glew.h:14311
std::vector< HdDriver * > HdDriverVector
HD_API HdResourceRegistrySharedPtr GetResourceRegistry() const
HD_API void SyncAll(HdTaskSharedPtrVector *tasks, HdTaskContext *taskContext)
Definition: rprim.h:68
GLint GLuint mask
Definition: glcorearb.h:123
GLuint GLuint end
Definition: glcorearb.h:474
HD_API void RemoveBprim(TfToken const &typeId, SdfPath const &id)
Returns whether the bprim type is supported by this render index.
HD_API void InsertInstancer(HdSceneDelegate *delegate, SdfPath const &id)
Insert an instancer into index.
#define HD_TRACE_FUNCTION()
Definition: perfLog.h:57
GLuint id
Definition: glcorearb.h:654
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
HD_API TfToken GetMaterialTag(SdfPath const &id) const
Return the material tag for the given rprim.
Definition: path.h:288
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
Definition: path.h:209
HD_API HdSprim * GetFallbackSprim(TfToken const &typeId) const
Returns the fullback prim for the Sprim of the given type.
HD_API HdBprim * GetBprim(TfToken const &typeId, SdfPath const &id) const
Returns whether the bprim type is supported by this render index.
std::unordered_map< TfToken, VtValue, TfToken::HashFunctor > HdTaskContext
Definition: renderIndex.h:72
Definition: sprim.h:52
HD_API bool GetSceneDelegateAndInstancerIds(SdfPath const &id, SdfPath *sceneDelegateId, SdfPath *instancerId) const
HdChangeTracker & GetChangeTracker()
Definition: renderIndex.h:193
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
HD_API const SdfPathVector & GetRprimIds()
Definition: renderIndex.h:245
static HD_API HdRenderIndex * New(HdRenderDelegate *renderDelegate, HdDriverVector const &drivers)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HD_API SdfPath GetRprimPathFromPrimId(int primId) const
Definition: bprim.h:56
HD_API bool IsRprimTypeSupported(TfToken const &typeId) const
Returns whether the rprim type is supported by this render index.
HD_API void RemoveSprim(TfToken const &typeId, SdfPath const &id)
Returns whether the sprim type is supported by this render index.
HD_API HdDriverVector const & GetDrivers() const
HD_API HdInstancer * GetInstancer(SdfPath const &id) const
Returns the instancer of id.
HD_API bool IsBprimTypeSupported(TfToken const &typeId) const
Returns whether the bprim type is supported by this render index.
HD_API const SdfPathVector & GetIds()
Sorts the ids if needed and returns the sorted list of ids.
HD_API void RemoveTask(SdfPath const &id)
Removes the given task from the RenderIndex.
std::shared_ptr< class HdDirtyList > HdDirtyListSharedPtr
Definition: dirtyList.h:39
HD_API void RemoveRprim(SdfPath const &id)
Remove a rprim from index.
Definition: value.h:168
std::shared_ptr< class HdTask > HdTaskSharedPtr
Definition: renderIndex.h:66
HD_API void InsertRprim(TfToken const &typeId, HdSceneDelegate *sceneDelegate, SdfPath const &rprimId)
Insert a rprim into index.
HD_API HdBprim * GetFallbackBprim(TfToken const &typeId) const
Returns the fallback prim for the Bprim of the given type.
HD_API HdSceneDelegate * GetSceneDelegateForRprim(SdfPath const &id) const
Returns the scene delegate for the given rprim.
HD_API HdTaskSharedPtr const & GetTask(SdfPath const &id) const
Returns the task for the given id.
bool HasInstancer(SdfPath const &id)
Returns true if instancer id exists in index.
Definition: renderIndex.h:267