HDK
|
#include <dependencySceneIndexPlugin.h>
Public Member Functions | |
HdSt_DependencySceneIndexPlugin () | |
![]() | |
HD_API HdSceneIndexBaseRefPtr | AppendSceneIndex (const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) |
![]() | |
virtual HF_API | ~HfPluginBase () |
Protected Member Functions | |
HdSceneIndexBaseRefPtr | _AppendSceneIndex (const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) override |
![]() | |
virtual HD_API HdSceneIndexBaseRefPtr | _AppendSceneIndex (const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) |
HdSceneIndexPlugin ()=default | |
HD_API | ~HdSceneIndexPlugin () override |
![]() | |
HF_API | HfPluginBase ()=default |
Plugin adds a scene index that declares Storm-specific dependencies to trigger the necessary invalidation.
Currently, the scene index has two uses.
1) For volumes. Specfically, the declaration allows the volumeFieldBinding data source locator of a volume prim to be invalidated if any of the targeted volume fields changes. That is, if, e.g., the filePath of a volume field changes, then the volume using that volume field will be dirtied so that HdStVolume will update which 3d textures it will use.
2) For meshes. Adding dependency of the material binding on the material datasource of the bound material. Recall that a mesh has to be quadrangulated if the bound material is using any ptex texture. If there is any change to the material, this scene index will dirty the mesh's materialBindings locator. This causes a HdStMesh::Sync with the HdChangeTracker::DirtyMaterialId dirty bit set so the mesh will re-evaluate whether the bound material is using any ptex texture. Note that this was previously achieved by HdStMaterial::Sync calling HdChangeTracker::MarkAllRprimsDirty when a material has changed in such a way that the _hasPtex flag has changed. HdChangeTracker::MarkAllRprimsDirty, however, only works for prims originating from a scene delegate (that is, being added to the legacy retained scene index used by emulation). Furthermore, that call did do a potentially massive overinvalidation.
Definition at line 48 of file dependencySceneIndexPlugin.h.
HdSt_DependencySceneIndexPlugin::HdSt_DependencySceneIndexPlugin | ( | ) |
|
overrideprotectedvirtual |
Subclasses implement this to instantiate one or more scene indicies which take the provided scene as input. The return value should be the final scene created – or the inputScene itself if nothing is created.
Reimplemented from HdSceneIndexPlugin.