HDK
|
#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 HdStResourceRegistry * | GetResourceRegistry () const |
int64_t | GetTotalTextureMemory () const |
HDST_API void | AdjustTotalTextureMemory (int64_t memDiff) |
size_t | GetNumberOfTextureObjects () const |
The number of texture objects. More... | |
A central registry for texture GPU resources.
Definition at line 52 of file textureObjectRegistry.h.
|
explicit |
HdSt_TextureObjectRegistry::~HdSt_TextureObjectRegistry | ( | ) |
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.
Free GPU resources of textures not used by any client.
|
inline |
The number of texture objects.
Definition at line 112 of file textureObjectRegistry.h.
|
inline |
Get resource registry
Definition at line 95 of file textureObjectRegistry.h.
|
inline |
The total GPU memory consumed by all textures managed by this registry.
Definition at line 101 of file textureObjectRegistry.h.
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.