![]() |
A central registry for resources. More...
Public Types | |
typedef size_t | TextureKey |
Globally unique id for texture, see HdRenderIndex::GetTextureKey() for details. More... | |
Public Member Functions | |
HF_MALLOC_TAG_NEW ("new HdResourceRegistry") | |
HD_API void | Commit () |
Commits all in-flight source data. More... | |
HD_API void | GarbageCollect () |
cleanup all buffers and remove if empty More... | |
virtual HD_API void | InvalidateShaderRegistry () |
Invalidate any shaders registered with this registry. More... | |
virtual HD_API void | ReloadResource (TfToken const &resourceType, std::string const &path) |
Generic method to inform RenderDelegate a resource needs to be reloaded. More... | |
virtual HD_API VtDictionary | GetResourceAllocation () const |
Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory in bytes for this registry. More... | |
Protected Member Functions | |
virtual HD_API void | _Commit () |
A hook for derived registries to perform additional resource commits. More... | |
virtual HD_API void | _GarbageCollect () |
Hooks for derived registries to perform additional GC when GarbageCollect() is invoked. More... | |
A central registry for resources.
Definition at line 50 of file resourceRegistry.h.
typedef size_t TextureKey |
Globally unique id for texture, see HdRenderIndex::GetTextureKey() for details.
Definition at line 70 of file resourceRegistry.h.
|
protectedvirtual |
A hook for derived registries to perform additional resource commits.
Reimplemented in HdStResourceRegistry.
|
protectedvirtual |
Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
Reimplemented in HdStResourceRegistry.
HD_API void Commit | ( | ) |
Commits all in-flight source data.
HD_API void GarbageCollect | ( | ) |
cleanup all buffers and remove if empty
|
virtual |
Returns a report of resource allocation by role in bytes and a summary total allocation of GPU memory in bytes for this registry.
Reimplemented in HdStResourceRegistry.
|
virtual |
Invalidate any shaders registered with this registry.
Reimplemented in HdStResourceRegistry.
|
virtual |
Generic method to inform RenderDelegate a resource needs to be reloaded.
This method can be used by the application to inform the renderDelegate that a resource, which may not have any prim representation in Hydra, needs to be reloaded. For example a texture found in a material network. The path
can be absolute or relative. It should usually match the path found for textures during HdMaterial::Sync.
Reimplemented in HdStResourceRegistry.