HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdSt_TextureObjectRegistry Class Referencefinal

#include <textureObjectRegistry.h>

Public Member Functions

 HdSt_TextureObjectRegistry (HdStResourceRegistry *registry)
 
 ~HdSt_TextureObjectRegistry ()
 
HDST_API HdStTextureObjectSharedPtr AllocateTextureObject (const HdStTextureIdentifier &textureId, HdTextureType textureType)
 
HDST_API std::set
< HdStTextureObjectSharedPtr
Commit ()
 
HDST_API void GarbageCollect ()
 
HDST_API void MarkTextureFilePathDirty (const TfToken &filePath)
 
HDST_API void MarkTextureObjectDirty (HdStTextureObjectPtr const &textureObject)
 
HDST_API HdStResourceRegistryGetResourceRegistry () const
 
int64_t GetTotalTextureMemory () const
 
HDST_API void AdjustTotalTextureMemory (int64_t memDiff)
 
size_t GetNumberOfTextureObjects () const
 The number of texture objects. More...
 

Detailed Description

A central registry for texture GPU resources.

Definition at line 52 of file textureObjectRegistry.h.

Constructor & Destructor Documentation

HdSt_TextureObjectRegistry::HdSt_TextureObjectRegistry ( HdStResourceRegistry registry)
explicit
HdSt_TextureObjectRegistry::~HdSt_TextureObjectRegistry ( )

Member Function Documentation

HDST_API void HdSt_TextureObjectRegistry::AdjustTotalTextureMemory ( int64_t  memDiff)

Add signed number to total texture memory amount. Called from texture objects when (de-)allocated GPU resources.

HDST_API HdStTextureObjectSharedPtr HdSt_TextureObjectRegistry::AllocateTextureObject ( const HdStTextureIdentifier textureId,
HdTextureType  textureType 
)

Allocate texture.

This just creates the HdStTextureObject, the actual GPU resources won't be allocated until the Commit phase.

HDST_API std::set<HdStTextureObjectSharedPtr> HdSt_TextureObjectRegistry::Commit ( )

Create GPU texture objects, load textures from files and upload to GPU.

HDST_API void HdSt_TextureObjectRegistry::GarbageCollect ( )

Free GPU resources of textures not used by any client.

size_t HdSt_TextureObjectRegistry::GetNumberOfTextureObjects ( ) const
inline

The number of texture objects.

Definition at line 112 of file textureObjectRegistry.h.

HDST_API HdStResourceRegistry* HdSt_TextureObjectRegistry::GetResourceRegistry ( ) const
inline

Get resource registry

Definition at line 95 of file textureObjectRegistry.h.

int64_t HdSt_TextureObjectRegistry::GetTotalTextureMemory ( ) const
inline

The total GPU memory consumed by all textures managed by this registry.

Definition at line 101 of file textureObjectRegistry.h.

HDST_API void HdSt_TextureObjectRegistry::MarkTextureFilePathDirty ( const TfToken filePath)

Mark texture file path as dirty. All textures whose identifier contains the file path will be reloaded during the next Commit.

HDST_API void HdSt_TextureObjectRegistry::MarkTextureObjectDirty ( HdStTextureObjectPtr const textureObject)

Mark that the GPU resource for a texture needs to be (re-)loaded, e.g., because the memory request changed.


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