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

#include <textureBinder.h>

Public Types

using NamedTextureHandle = HdStShaderCode::NamedTextureHandle
 
using NamedTextureHandleVector = HdStShaderCode::NamedTextureHandleVector
 

Static Public Member Functions

static void GetBufferSpecs (const NamedTextureHandleVector &textures, bool useBindlessHandles, HdBufferSpecVector *specs)
 
static void ComputeBufferSources (const NamedTextureHandleVector &textures, bool useBindlessHandles, HdBufferSourceSharedPtrVector *sources)
 
static void BindResources (HdSt_ResourceBinder const &binder, bool useBindlessHandles, const NamedTextureHandleVector &textures)
 
static void UnbindResources (HdSt_ResourceBinder const &binder, bool useBindlessHandles, const NamedTextureHandleVector &textures)
 

Detailed Description

A class helping HdStShaderCode with binding textures.

This class helps binding GL texture names or populating the shader bar with texture sampler handles if bindless textures are used. It also includes writing texture metadata such as the sampling transform to the shader bar.

Definition at line 44 of file textureBinder.h.

Member Typedef Documentation

Member Function Documentation

static void HdSt_TextureBinder::BindResources ( HdSt_ResourceBinder const binder,
bool  useBindlessHandles,
const NamedTextureHandleVector textures 
)
static

Bind textures.

Specify whether to use the texture by binding it or by using bindless handles with useBindlessHandles.

static void HdSt_TextureBinder::ComputeBufferSources ( const NamedTextureHandleVector textures,
bool  useBindlessHandles,
HdBufferSourceSharedPtrVector sources 
)
static

Compute buffer sources for shader bar.

This works in conjunction with GetBufferSpecs, but unlike GetBufferSpecs is extracting information from the texture handles and thus can only be called after the textures have been committed in HdStShaderCode::AddResourcesFromTextures().

Specify whether to use the texture by binding it or by using bindless handles with useBindlessHandles.

static void HdSt_TextureBinder::GetBufferSpecs ( const NamedTextureHandleVector textures,
bool  useBindlessHandles,
HdBufferSpecVector specs 
)
static

Add buffer specs necessary for the textures (e.g., for bindless texture sampler handles or sampling transform).

Specify whether to use the texture by binding it or by using bindless handles with useBindlessHandles.

static void HdSt_TextureBinder::UnbindResources ( HdSt_ResourceBinder const binder,
bool  useBindlessHandles,
const NamedTextureHandleVector textures 
)
static

Unbind textures.

Specify whether to use the texture by binding it or by using bindless handles with useBindlessHandles.


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