Loading...
Searching...
No Matches
HdResourceRegistry Class Reference

A central registry for resources. More...

#include <resourceRegistry.h>

+ Inheritance diagram for HdResourceRegistry:

Public Types

typedef size_t TextureKey
 Globally unique id for texture, see HdRenderIndex::GetTextureKey() for details.
 

Public Member Functions

 HF_MALLOC_TAG_NEW ("new HdResourceRegistry")
 
HD_API void Commit ()
 Commits all in-flight source data.
 
HD_API void GarbageCollect ()
 cleanup all buffers and remove if empty
 
virtual HD_API void InvalidateShaderRegistry ()
 Invalidate any shaders registered with this registry.
 
virtual HD_API void ReloadResource (TfToken const &resourceType, std::string const &path)
 Generic method to inform RenderDelegate a resource needs to be reloaded.
 
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.
 

Protected Member Functions

virtual HD_API void _Commit ()
 A hook for derived registries to perform additional resource commits.
 
virtual HD_API void _GarbageCollect ()
 Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.
 

Detailed Description

A central registry for resources.

Definition at line 50 of file resourceRegistry.h.

Member Typedef Documentation

◆ TextureKey

typedef size_t TextureKey

Globally unique id for texture, see HdRenderIndex::GetTextureKey() for details.

Definition at line 70 of file resourceRegistry.h.

Member Function Documentation

◆ _Commit()

virtual HD_API void _Commit ( )
protectedvirtual

A hook for derived registries to perform additional resource commits.

Reimplemented in HdStResourceRegistry.

◆ _GarbageCollect()

virtual HD_API void _GarbageCollect ( )
protectedvirtual

Hooks for derived registries to perform additional GC when GarbageCollect() is invoked.

Reimplemented in HdStResourceRegistry.

◆ Commit()

HD_API void Commit ( )

Commits all in-flight source data.

◆ GarbageCollect()

HD_API void GarbageCollect ( )

cleanup all buffers and remove if empty

◆ GetResourceAllocation()

virtual HD_API VtDictionary GetResourceAllocation ( ) const
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.

◆ InvalidateShaderRegistry()

virtual HD_API void InvalidateShaderRegistry ( )
virtual

Invalidate any shaders registered with this registry.

Reimplemented in HdStResourceRegistry.

◆ ReloadResource()

virtual HD_API void ReloadResource ( TfToken const &  resourceType,
std::string const &  path 
)
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.


The documentation for this class was generated from the following file: