HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStTextureHandle Class Reference

#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. More...
 
HDST_API ~HdStTextureHandle ()
 
HdStTextureObjectSharedPtr constGetTextureObject () const
 
HdStSamplerObjectSharedPtr constGetSamplerObject () const
 
HdSamplerParameters constGetSamplerParameters () const
 
size_t GetMemoryRequest () const
 
HdStShaderCodePtr constGetShaderCode () const
 
HDST_API void ReallocateSamplerIfNecessary ()
 
bool UseBindlessHandles () const
 

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::HdStTextureHandle ( HdStTextureObjectSharedPtr const textureObject,
const HdSamplerParameters samplerParams,
size_t  memoryRequest,
HdStShaderCodePtr const shaderCode,
HdSt_TextureHandleRegistry textureHandleRegistry 
)
HDST_API HdStTextureHandle::~HdStTextureHandle ( )

Member Function Documentation

size_t HdStTextureHandle::GetMemoryRequest ( ) const
inline

Get how much memory this handle requested for the texture.

Definition at line 97 of file textureHandle.h.

HdStSamplerObjectSharedPtr const& HdStTextureHandle::GetSamplerObject ( ) const
inline

Get sampler object.

Can be accessed after commit.

Definition at line 85 of file textureHandle.h.

HdSamplerParameters const& HdStTextureHandle::GetSamplerParameters ( ) const
inline

Get sampler parameters.

Definition at line 91 of file textureHandle.h.

HdStShaderCodePtr const& HdStTextureHandle::GetShaderCode ( ) const
inline

Get the shader code associated with this handle.

Definition at line 103 of file textureHandle.h.

HdStTextureObjectSharedPtr const& HdStTextureHandle::GetTextureObject ( ) const
inline

Get texture object.

Can be accessed after commit.

Definition at line 78 of file textureHandle.h.

HDST_API void HdStTextureHandle::ReallocateSamplerIfNecessary ( )

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

bool HdStTextureHandle::UseBindlessHandles ( ) const

Get whether bindless texture handles are enabled.


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