All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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...

Public Member Functions

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

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

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

Member Function Documentation

size_t GetMemoryRequest ( ) const
inline

Get how much memory this handle requested for the texture.

Definition at line 98 of file textureHandle.h.

HdStSamplerObjectSharedPtr const& GetSamplerObject ( ) const
inline

Get sampler object.

Can be accessed after commit.

Definition at line 86 of file textureHandle.h.

HdSamplerParameters const& GetSamplerParameters ( ) const
inline

Get sampler parameters.

Definition at line 92 of file textureHandle.h.

HdStShaderCodePtr const& GetShaderCode ( ) const
inline

Get the shader code associated with this handle.

Definition at line 104 of file textureHandle.h.

HdStTextureObjectSharedPtr const& GetTextureObject ( ) const
inline

Get texture object.

Can be accessed after commit.

Definition at line 79 of file textureHandle.h.

HDST_API void ReallocateSamplerIfNecessary ( )

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

This also creates the texture sampler handle (for bindless textures) and updates it on subsequent calls.


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