Loading...
Searching...
No Matches
HdStPtexTextureObject Class Referencefinal

A Ptex texture. More...

#include <ptexTextureObject.h>

+ Inheritance diagram for HdStPtexTextureObject:

Public Member Functions

HDST_API HdStPtexTextureObject (const HdStTextureIdentifier &textureId, HdSt_TextureObjectRegistry *textureObjectRegistry)
 
HgiTextureHandle GetTexelTexture () const
 Get the GPU texture handle for the texels.
 
HgiTextureHandle GetLayoutTexture () const
 Get the GPU texture handle for the layout.
 
HDST_API bool IsValid () const override
 Is texture valid? Only correct after commit phase.
 
HDST_API HdTextureType GetTextureType () const override
 Get texture type.
 
- Public Member Functions inherited from HdStTextureObject
const HdStTextureIdentifierGetTextureIdentifier () const
 Get texture identifier.
 
size_t GetTargetMemory () const
 Get the target memory for the texture.
 
HDST_API void SetTargetMemory (size_t)
 Set the target memory (in bytes).
 
virtual HDST_API bool IsValid () const =0
 Is texture valid? Only correct after commit phase.
 
virtual HDST_API HdTextureType GetTextureType () const =0
 Get texture type.
 

Protected Member Functions

HDST_API void _Load () override
 Load texture to CPU (thread-safe)
 
HDST_API void _Commit () override
 Commit texture to GPU (not thread-safe)
 
- Protected Member Functions inherited from HdStTextureObject
 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
 Load texture to CPU (thread-safe)
 
virtual HDST_API void _Commit ()=0
 Commit texture to GPU (not thread-safe)
 
HDST_API void _AdjustTotalTextureMemory (int64_t memDiff)
 Add signed number to total texture memory amount maintained by registry.
 
HDST_API void _AddToTotalTextureMemory (const HgiTextureHandle &texture)
 Compute memory of texture and add to total texture memory amount maintained by registry.
 
HDST_API void _SubtractFromTotalTextureMemory (const HgiTextureHandle &texture)
 Compute memory of texture and subtract to total texture memory amount maintained by registry.
 

Detailed Description

A Ptex texture.

Definition at line 59 of file ptexTextureObject.h.

Member Function Documentation

◆ _Commit()

HDST_API void _Commit ( )
overrideprotectedvirtual

Commit texture to GPU (not thread-safe)

Implements HdStTextureObject.

◆ _Load()

HDST_API void _Load ( )
overrideprotectedvirtual

Load texture to CPU (thread-safe)

Implements HdStTextureObject.

◆ GetLayoutTexture()

HgiTextureHandle GetLayoutTexture ( ) const
inline

Get the GPU texture handle for the layout.

Only valid after commit phase.

Definition at line 80 of file ptexTextureObject.h.

◆ GetTexelTexture()

HgiTextureHandle GetTexelTexture ( ) const
inline

Get the GPU texture handle for the texels.

Only valid after commit phase.

Definition at line 74 of file ptexTextureObject.h.

◆ GetTextureType()

HDST_API HdTextureType GetTextureType ( ) const
overridevirtual

Get texture type.

Implements HdStTextureObject.

◆ IsValid()

HDST_API bool IsValid ( ) const
overridevirtual

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.

Implements HdStTextureObject.


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