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, bool createBindlessHandle, 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 ()

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,
bool  createBindlessHandle,
HdStShaderCodePtr const shaderCode,
HdSt_TextureHandleRegistry textureHandleRegistry 
HDST_API HdStTextureHandle::~HdStTextureHandle ( )

Member Function Documentation

size_t HdStTextureHandle::GetMemoryRequest ( ) const

Get how much memory this handle requested for the texture.

Definition at line 98 of file textureHandle.h.

HdStSamplerObjectSharedPtr const& HdStTextureHandle::GetSamplerObject ( ) const

Get sampler object.

Can be accessed after commit.

Definition at line 86 of file textureHandle.h.

HdSamplerParameters const& HdStTextureHandle::GetSamplerParameters ( ) const

Get sampler parameters.

Definition at line 92 of file textureHandle.h.

HdStShaderCodePtr const& HdStTextureHandle::GetShaderCode ( ) const

Get the shader code associated with this handle.

Definition at line 104 of file textureHandle.h.

HdStTextureObjectSharedPtr const& HdStTextureHandle::GetTextureObject ( ) const

Get texture object.

Can be accessed after commit.

Definition at line 79 of file textureHandle.h.

HDST_API void HdStTextureHandle::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: