MaterialX 1.39.1
Loading...
Searching...
No Matches
GlslResourceBindingContext Class Reference

Class representing a resource binding for Glsl shader resources. More...

#include <GlslResourceBindingContext.h>

Inheritance diagram for GlslResourceBindingContext:
HwResourceBindingContext GenUserData

Public Member Functions

 GlslResourceBindingContext (size_t uniformBindingLocation, size_t samplerBindingLocation)
 
void initialize () override
 
void emitDirectives (GenContext &context, ShaderStage &stage) override
 
void emitResourceBindings (GenContext &context, const VariableBlock &uniforms, ShaderStage &stage) override
 
void emitStructuredResourceBindings (GenContext &context, const VariableBlock &uniforms, ShaderStage &stage, const std::string &structInstanceName, const std::string &arraySuffix) override
 
void enableSeparateBindingLocations (bool separateBindingLocation)
 
virtual void initialize ()=0
 
virtual void emitDirectives (GenContext &context, ShaderStage &stage)=0
 
virtual void emitResourceBindings (GenContext &context, const VariableBlock &uniforms, ShaderStage &stage)=0
 
virtual void emitStructuredResourceBindings (GenContext &context, const VariableBlock &uniforms, ShaderStage &stage, const std::string &structInstanceName, const std::string &arraySuffix=EMPTY_STRING)=0
 
- Public Member Functions inherited from GenUserData
GenUserDataPtr getSelf ()
 Return a shared pointer for this object.
 
ConstGenUserDataPtr getSelf () const
 Return a shared pointer for this object.
 
template<class T >
shared_ptr< T > asA ()
 Return this object cast to a templated type.
 
template<class T >
shared_ptr< const T > asA () const
 Return this object cast to a templated type.
 

Static Public Member Functions

static GlslResourceBindingContextPtr create (size_t uniformBindingLocation=0, size_t samplerBindingLocation=0)
 

Protected Attributes

StringSet _requiredExtensions
 
size_t _hwUniformBindLocation = 0
 
size_t _hwInitUniformBindLocation = 0
 
size_t _hwSamplerBindLocation = 0
 
size_t _hwInitSamplerBindLocation = 0
 
bool _separateBindingLocation = false
 

Detailed Description

Class representing a resource binding for Glsl shader resources.

Member Function Documentation

◆ emitDirectives()

void emitDirectives ( GenContext context,
ShaderStage stage 
)
overridevirtual

◆ emitResourceBindings()

void emitResourceBindings ( GenContext context,
const VariableBlock uniforms,
ShaderStage stage 
)
overridevirtual

◆ emitStructuredResourceBindings()

void emitStructuredResourceBindings ( GenContext context,
const VariableBlock uniforms,
ShaderStage stage,
const std::string &  structInstanceName,
const std::string &  arraySuffix 
)
overridevirtual

◆ initialize()

void initialize ( )
overridevirtual

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