HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStDynamicUvTextureObject Class Referencefinal

#include <dynamicUvTextureObject.h>

+ Inheritance diagram for HdStDynamicUvTextureObject:

Public Member Functions

HDST_API HdStDynamicUvTextureObject (const HdStTextureIdentifier &textureId, HdSt_TextureObjectRegistry *textureObjectRegistry)
 
HDST_API ~HdStDynamicUvTextureObject () override
 
void CreateTexture (const HgiTextureDesc &desc)
 
void GenerateMipmaps ()
 
void DestroyTexture ()
 Release GPU resource. More...
 
void SetWrapParameters (const std::pair< HdWrap, HdWrap > &wrapParameters)
 
void SetCpuData (std::unique_ptr< HdStTextureCpuData > &&cpuData)
 
HdStTextureCpuDataGetCpuData () const
 
HDST_API bool IsValid () const override
 
- Public Member Functions inherited from HdStUvTextureObject
 ~HdStUvTextureObject () override
 
HgiTextureHandle constGetTexture () const
 
const std::pair< HdWrap, HdWrap > & GetWrapParameters () const
 
HDST_API HdTextureType GetTextureType () const overridefinal
 
- Public Member Functions inherited from HdStTextureObject
const HdStTextureIdentifierGetTextureIdentifier () const
 
size_t GetTargetMemory () const
 
HDST_API void SetTargetMemory (size_t)
 
virtual HDST_API ~HdStTextureObject ()
 

Protected Member Functions

HDST_API void _Load () override
 
HDST_API void _Commit () override
 
- Protected Member Functions inherited from HdStUvTextureObject
 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 ()
 
- 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
 
HDST_API void _AdjustTotalTextureMemory (int64_t memDiff)
 
HDST_API void _AddToTotalTextureMemory (const HgiTextureHandle &texture)
 
HDST_API void _SubtractFromTotalTextureMemory (const HgiTextureHandle &texture)
 

Detailed Description

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.

Constructor & Destructor Documentation

HDST_API HdStDynamicUvTextureObject::HdStDynamicUvTextureObject ( const HdStTextureIdentifier textureId,
HdSt_TextureObjectRegistry textureObjectRegistry 
)
HDST_API HdStDynamicUvTextureObject::~HdStDynamicUvTextureObject ( )
override

Member Function Documentation

HDST_API void HdStDynamicUvTextureObject::_Commit ( )
overrideprotectedvirtual

Commit texture to GPU (not thread-safe)

Implements HdStTextureObject.

HDST_API void HdStDynamicUvTextureObject::_Load ( )
overrideprotectedvirtual

Load texture to CPU (thread-safe)

Implements HdStTextureObject.

void HdStDynamicUvTextureObject::CreateTexture ( const HgiTextureDesc desc)
inline

Allocate GPU resource using the texture descriptor. Populate if data are given in the descriptor.

Definition at line 67 of file dynamicUvTextureObject.h.

void HdStDynamicUvTextureObject::DestroyTexture ( )
inline

Release GPU resource.

Definition at line 79 of file dynamicUvTextureObject.h.

void HdStDynamicUvTextureObject::GenerateMipmaps ( )
inline

Make GPU generate mipmaps.

Definition at line 73 of file dynamicUvTextureObject.h.

HdStTextureCpuData* HdStDynamicUvTextureObject::GetCpuData ( ) const
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.

HDST_API bool HdStDynamicUvTextureObject::IsValid ( ) const
overridevirtual

Always returns true - so that samplers for this texture are created.

Implements HdStTextureObject.

void HdStDynamicUvTextureObject::SetCpuData ( std::unique_ptr< HdStTextureCpuData > &&  cpuData)
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.

void HdStDynamicUvTextureObject::SetWrapParameters ( const std::pair< HdWrap, HdWrap > &  wrapParameters)
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.


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