![]() |
A uv texture that is managed but not populated by the Storm texture system. More...
Public Member Functions | |
HDST_API | HdStDynamicUvTextureObject (const HdStTextureIdentifier &textureId, HdSt_TextureObjectRegistry *textureObjectRegistry) |
void | CreateTexture (const HgiTextureDesc &desc) |
Allocate GPU resource using the texture descriptor. More... | |
void | GenerateMipmaps () |
Make GPU generate mipmaps. More... | |
void | DestroyTexture () |
Release GPU resource. More... | |
void | SetWrapParameters (const std::pair< HdWrap, HdWrap > &wrapParameters) |
Set wrap mode hints used when a texture node's wrap mode is use metadata. More... | |
void | SetCpuData (std::unique_ptr< HdStTextureCpuData > &&cpuData) |
Save CPU data for this texture (transfering ownership). More... | |
HdStTextureCpuData * | GetCpuData () const |
Get the CPU data stored for this texture. More... | |
HDST_API bool | IsValid () const override |
Always returns true - so that samplers for this texture are created. More... | |
![]() | |
HgiTextureHandle const & | GetTexture () const |
Get the handle to the actual GPU resource. More... | |
const std::pair< HdWrap, HdWrap > & | GetWrapParameters () const |
Opinion about wrapS and wrapT parameters from the texture file. More... | |
HDST_API HdTextureType | GetTextureType () const overridefinal |
Get texture type. More... | |
![]() | |
const HdStTextureIdentifier & | GetTextureIdentifier () const |
Get texture identifier. More... | |
size_t | GetTargetMemory () const |
Get the target memory for the texture. More... | |
HDST_API void | SetTargetMemory (size_t) |
Set the target memory (in bytes). More... | |
Protected Member Functions | |
HDST_API void | _Load () override |
Load texture to CPU (thread-safe) More... | |
HDST_API void | _Commit () override |
Commit texture to GPU (not thread-safe) More... | |
![]() | |
HdStUvTextureObject (const HdStTextureIdentifier &textureId, HdSt_TextureObjectRegistry *textureObjectRegistry) | |
void | _SetWrapParameters (const std::pair< HdWrap, HdWrap > &wrapParameters) |
void | _SetCpuData (std::unique_ptr< HdStTextureCpuData > &&) |
HdStTextureCpuData * | _GetCpuData () const |
void | _CreateTexture (const HgiTextureDesc &desc) |
void | _GenerateMipmaps () |
void | _DestroyTexture () |
![]() | |
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 |
HDST_API void | _AdjustTotalTextureMemory (int64_t memDiff) |
Add signed number to total texture memory amount maintained by registry. More... | |
HDST_API void | _AddToTotalTextureMemory (const HgiTextureHandle &texture) |
Compute memory of texture and add to total texture memory amount maintained by registry. More... | |
HDST_API void | _SubtractFromTotalTextureMemory (const HgiTextureHandle &texture) |
Compute memory of texture and subtract to total texture memory amount maintained by registry. More... | |
A uv texture that is managed but not populated by the Storm texture system.
Clients can allocate an instance of this class through HdStResourceRegistry::AllocateTextureHandle or AllocateTextureObject by passing an HdStTextureIdentifier with a HdStDynamicUvSubtextureIdentifier.
The client can allocate the GPU resource with CreateTexture and populate it by either giving data in the HgiTextureDesc or binding the texture as target for a computation or render.
Bindless texture sampler handles can only be created correctly if a client has created the texture before the texture commit phase is finished.
Definition at line 53 of file dynamicUvTextureObject.h.
|
overrideprotectedvirtual |
Commit texture to GPU (not thread-safe)
Implements HdStTextureObject.
|
overrideprotectedvirtual |
Load texture to CPU (thread-safe)
Implements HdStTextureObject.
|
inline |
Allocate GPU resource using the texture descriptor.
Populate if data are given in the descriptor.
Definition at line 67 of file dynamicUvTextureObject.h.
|
inline |
Release GPU resource.
Definition at line 79 of file dynamicUvTextureObject.h.
|
inline |
Make GPU generate mipmaps.
Definition at line 73 of file dynamicUvTextureObject.h.
|
inline |
Get the CPU data stored for this texture.
Typically used in HdStDynamicUvTextureImplementation::Commit to commit CPU data to GPU.
Definition at line 107 of file dynamicUvTextureObject.h.
|
overridevirtual |
Always returns true - so that samplers for this texture are created.
Implements HdStTextureObject.
|
inline |
Save CPU data for this texture (transfering ownership).
This is typically called from HdStDynamicUvTextureImplementation::Load so that the CPU data can be uploaded during commit.
To free the CPU data, call with nullptr.
Definition at line 99 of file dynamicUvTextureObject.h.
|
inline |
Set wrap mode hints used when a texture node's wrap mode is use metadata.
This is typically called from HdStDynamicUvTextureImplementation::Load when the texture file has wrap mode hints.
Definition at line 88 of file dynamicUvTextureObject.h.