All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdResourceRegistry Class Reference

A central registry for resources. More...

+ Inheritance diagram for HdResourceRegistry:

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...
 
HD_API void GarbageCollectBprims ()
 cleanup all Bprim registries 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() or GarbageCollectBprims() is invoked. More...
 
virtual HD_API void _GarbageCollectBprims ()
 

Detailed Description

A central registry for resources.

Definition at line 50 of file resourceRegistry.h.

Member Typedef Documentation

typedef size_t TextureKey

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

Definition at line 74 of file resourceRegistry.h.

Member Function Documentation

virtual HD_API void _Commit ( )
protectedvirtual

A hook for derived registries to perform additional resource commits.

Reimplemented in HdStResourceRegistry.

virtual HD_API void _GarbageCollect ( )
protectedvirtual

Hooks for derived registries to perform additional GC when GarbageCollect() or GarbageCollectBprims() 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

HD_API void GarbageCollectBprims ( )

cleanup all Bprim registries

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.

virtual HD_API void InvalidateShaderRegistry ( )
virtual

Invalidate any shaders registered with this registry.

Reimplemented in HdStResourceRegistry.

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, HdxPrman_ResourceRegistry, and HdxPrman_ResourceRegistry.


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