HDK
|
#include <textureObject.h>
Public Member Functions | |
const HdStTextureIdentifier & | GetTextureIdentifier () const |
size_t | GetTargetMemory () const |
HDST_API void | SetTargetMemory (size_t) |
virtual HDST_API bool | IsValid () const =0 |
virtual HDST_API HdTextureType | GetTextureType () const =0 |
virtual HDST_API | ~HdStTextureObject () |
Protected Member Functions | |
HdStTextureObject (const HdStTextureIdentifier &textureId, HdSt_TextureObjectRegistry *textureObjectRegistry) | |
HDST_API HdStResourceRegistry * | _GetResourceRegistry () const |
HDST_API Hgi * | _GetHgi () const |
HDST_API std::string | _GetDebugName (const HdStTextureIdentifier &textureId) const |
HDST_API bool | _GetPremultiplyAlpha (const HdStSubtextureIdentifier *const subId) const |
HDST_API HioImage::SourceColorSpace | _GetSourceColorSpace (const HdStSubtextureIdentifier *const subId) const |
virtual HDST_API void | _Load ()=0 |
virtual HDST_API void | _Commit ()=0 |
HDST_API void | _AdjustTotalTextureMemory (int64_t memDiff) |
HDST_API void | _AddToTotalTextureMemory (const HgiTextureHandle &texture) |
HDST_API void | _SubtractFromTotalTextureMemory (const HgiTextureHandle &texture) |
Friends | |
class | HdSt_TextureObjectRegistry |
Base class for a texture object. The actual GPU resources will be allocated during the commit phase.
Definition at line 58 of file textureObject.h.
|
virtual |
|
protected |
|
protected |
Compute memory of texture and add to total texture memory amount maintained by registry.
Add signed number to total texture memory amount maintained by registry.
Commit texture to GPU (not thread-safe)
Implemented in HdStFieldTextureObject, HdStAssetUvTextureObject, HdStDynamicUvTextureObject, HdStPtexTextureObject, and HdStUdimTextureObject.
|
protected |
|
protected |
|
protected |
|
protected |
Load texture to CPU (thread-safe)
Implemented in HdStFieldTextureObject, HdStAssetUvTextureObject, HdStDynamicUvTextureObject, HdStPtexTextureObject, and HdStUdimTextureObject.
|
protected |
Compute memory of texture and subtract to total texture memory amount maintained by registry.
|
inline |
Get the target memory for the texture.
Definition at line 69 of file textureObject.h.
|
inline |
Get texture identifier
Definition at line 65 of file textureObject.h.
|
pure virtual |
Get texture type
Implemented in HdStFieldTextureObject, HdStUvTextureObject, HdStPtexTextureObject, and HdStUdimTextureObject.
|
pure virtual |
Is texture valid? Only correct after commit phase.
E.g., no file at given file path. Consulted by clients to determine whether to use the fallback value.
Implemented in HdStFieldTextureObject, HdStAssetUvTextureObject, HdStDynamicUvTextureObject, HdStPtexTextureObject, and HdStUdimTextureObject.
Set the target memory (in bytes).
When uploading the texture to the GPU, it will be downsampled to meet this target memory.
|
friend |
Definition at line 144 of file textureObject.h.