Loading...
Searching...
No Matches
HdStTextureHandle Class Reference

Represents a texture and sampler that will be allocated and loaded from a texture file during commit, possibly a texture sampler handle and a memory request. More...

#include <textureHandle.h>

Public Member Functions

HDST_API HdStTextureHandle (HdStTextureObjectSharedPtr const &textureObject, const HdSamplerParameters &samplerParams, size_t memoryRequest, HdStShaderCodePtr const &shaderCode, HdSt_TextureHandleRegistry *textureHandleRegistry)
 See HdStResourceRegistry::AllocateTextureHandle for details.
 
HdStTextureObjectSharedPtr const & GetTextureObject () const
 Get texture object.
 
HdStSamplerObjectSharedPtr const & GetSamplerObject () const
 Get sampler object.
 
HdSamplerParameters const & GetSamplerParameters () const
 Get sampler parameters.
 
size_t GetMemoryRequest () const
 Get how much memory this handle requested for the texture.
 
HdStShaderCodePtr const & GetShaderCode () const
 Get the shader code associated with this handle.
 
HDST_API void ReallocateSamplerIfNecessary ()
 Allocate sampler for this handle (not thread-safe).
 
bool UseBindlessHandles () const
 Get whether bindless texture handles are enabled.
 

Detailed Description

Represents a texture and sampler that will be allocated and loaded from a texture file during commit, possibly a texture sampler handle and a memory request.

It is intended for HdStShaderCode and HdStShaderCode::AddResourcesFromTextures() is called whenever the underlying texture and sampler gets allocated and (re-)loaded so that the shader code can react to, e.g., changing texture sampler handle for bindless or changing texture metadata such as a field bounding box for volumes.

Definition at line 60 of file textureHandle.h.

Constructor & Destructor Documentation

◆ HdStTextureHandle()

HDST_API HdStTextureHandle ( HdStTextureObjectSharedPtr const &  textureObject,
const HdSamplerParameters samplerParams,
size_t  memoryRequest,
HdStShaderCodePtr const &  shaderCode,
HdSt_TextureHandleRegistry *  textureHandleRegistry 
)

Member Function Documentation

◆ GetMemoryRequest()

size_t GetMemoryRequest ( ) const
inline

Get how much memory this handle requested for the texture.

Definition at line 97 of file textureHandle.h.

◆ GetSamplerObject()

HdStSamplerObjectSharedPtr const & GetSamplerObject ( ) const
inline

Get sampler object.

Can be accessed after commit.

Definition at line 85 of file textureHandle.h.

◆ GetSamplerParameters()

HdSamplerParameters const & GetSamplerParameters ( ) const
inline

Get sampler parameters.

Definition at line 91 of file textureHandle.h.

◆ GetShaderCode()

HdStShaderCodePtr const & GetShaderCode ( ) const
inline

Get the shader code associated with this handle.

Definition at line 103 of file textureHandle.h.

◆ GetTextureObject()

HdStTextureObjectSharedPtr const & GetTextureObject ( ) const
inline

Get texture object.

Can be accessed after commit.

Definition at line 78 of file textureHandle.h.

◆ ReallocateSamplerIfNecessary()

HDST_API void ReallocateSamplerIfNecessary ( )

Allocate sampler for this handle (not thread-safe).

◆ UseBindlessHandles()

bool UseBindlessHandles ( ) const

Get whether bindless texture handles are enabled.


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