HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStTextureObject Class Referenceabstract

#include <textureObject.h>

+ Inheritance diagram for HdStTextureObject:

Public Member Functions

const HdStTextureIdentifierGetTextureIdentifier () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

virtual HDST_API HdStTextureObject::~HdStTextureObject ( )
virtual
HdStTextureObject::HdStTextureObject ( const HdStTextureIdentifier textureId,
HdSt_TextureObjectRegistry textureObjectRegistry 
)
protected

Member Function Documentation

HDST_API void HdStTextureObject::_AddToTotalTextureMemory ( const HgiTextureHandle texture)
protected

Compute memory of texture and add to total texture memory amount maintained by registry.

HDST_API void HdStTextureObject::_AdjustTotalTextureMemory ( int64_t  memDiff)
protected

Add signed number to total texture memory amount maintained by registry.

virtual HDST_API void HdStTextureObject::_Commit ( )
protectedpure virtual
HDST_API std::string HdStTextureObject::_GetDebugName ( const HdStTextureIdentifier textureId) const
protected
HDST_API Hgi* HdStTextureObject::_GetHgi ( ) const
protected
HDST_API bool HdStTextureObject::_GetPremultiplyAlpha ( const HdStSubtextureIdentifier *const  subId) const
protected
HDST_API HdStResourceRegistry* HdStTextureObject::_GetResourceRegistry ( ) const
protected
HDST_API HioImage::SourceColorSpace HdStTextureObject::_GetSourceColorSpace ( const HdStSubtextureIdentifier *const  subId) const
protected
virtual HDST_API void HdStTextureObject::_Load ( )
protectedpure virtual
HDST_API void HdStTextureObject::_SubtractFromTotalTextureMemory ( const HgiTextureHandle texture)
protected

Compute memory of texture and subtract to total texture memory amount maintained by registry.

size_t HdStTextureObject::GetTargetMemory ( ) const
inline

Get the target memory for the texture.

Definition at line 69 of file textureObject.h.

const HdStTextureIdentifier& HdStTextureObject::GetTextureIdentifier ( ) const
inline

Get texture identifier

Definition at line 65 of file textureObject.h.

virtual HDST_API HdTextureType HdStTextureObject::GetTextureType ( ) const
pure virtual
virtual HDST_API bool HdStTextureObject::IsValid ( ) const
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.

HDST_API void HdStTextureObject::SetTargetMemory ( size_t  )

Set the target memory (in bytes).

When uploading the texture to the GPU, it will be downsampled to meet this target memory.

Friends And Related Function Documentation

Definition at line 144 of file textureObject.h.


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