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

#include <resourceRegistry.h>

+ Inheritance diagram for HdResourceRegistry:

Public Types

typedef size_t TextureKey
 

Public Member Functions

 HF_MALLOC_TAG_NEW ("new HdResourceRegistry")
 
HD_API HdResourceRegistry ()
 
virtual HD_API ~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)
 
virtual HD_API VtDictionary GetResourceAllocation () const
 

Protected Member Functions

virtual HD_API void _Commit ()
 A hook for derived registries to perform additional resource commits. More...
 
virtual HD_API void _GarbageCollect ()
 

Detailed Description

A central registry for resources.

Definition at line 50 of file resourceRegistry.h.

Member Typedef Documentation

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

Definition at line 70 of file resourceRegistry.h.

Constructor & Destructor Documentation

HD_API HdResourceRegistry::HdResourceRegistry ( )
virtual HD_API HdResourceRegistry::~HdResourceRegistry ( )
virtual

Member Function Documentation

virtual HD_API void HdResourceRegistry::_Commit ( )
protectedvirtual

A hook for derived registries to perform additional resource commits.

Reimplemented in HdStResourceRegistry.

virtual HD_API void HdResourceRegistry::_GarbageCollect ( )
protectedvirtual

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

Reimplemented in HdStResourceRegistry.

HD_API void HdResourceRegistry::Commit ( )

Commits all in-flight source data.

HD_API void HdResourceRegistry::GarbageCollect ( )

cleanup all buffers and remove if empty

virtual HD_API VtDictionary HdResourceRegistry::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.

HdResourceRegistry::HF_MALLOC_TAG_NEW ( "new HdResourceRegistry )
virtual HD_API void HdResourceRegistry::InvalidateShaderRegistry ( )
virtual

Invalidate any shaders registered with this registry.

Reimplemented in HdStResourceRegistry.

virtual HD_API void HdResourceRegistry::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: