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... | |
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.
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.
|
inline |
Get how much memory this handle requested for the texture.
Definition at line 98 of file textureHandle.h.
|
inline |
|
inline |
Get sampler parameters.
Definition at line 92 of file textureHandle.h.
|
inline |
Get the shader code associated with this handle.
Definition at line 104 of file textureHandle.h.
|
inline |
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.