#include <uniformcontainer.h>
Public Types | |
using | UniformStructInstanceList = std::vector< std::unique_ptr< UniformStructInstance > > |
using | BufferBindingInstanceList = std::vector< std::unique_ptr< BufferBindingInstance > > |
using | SamplerInstanceList = std::vector< std::unique_ptr< SamplerInstance > > |
Public Member Functions | |
UniformContainer ()=default | |
virtual | ~UniformContainer ()=default |
UniformContainer (const UniformContainer &)=delete | |
UniformContainer & | operator= (const UniformContainer &)=delete |
UniformStructInstance * | findUniform (const std::string &name) |
BufferBindingInstance * | findBinding (const std::string &name) |
UniformStructInstance & | getUniform (const std::string &name) |
BufferBindingInstance & | getBinding (const std::string &name) |
const SamplerInstanceList & | getSamplers () const |
const BufferBindingInstanceList & | getBufferBindings () const |
const UniformStructInstanceList & | getUniformStructs () const |
SamplerInstance * | findSampler (const std::string &name) const |
Protected Member Functions | |
UniformStructInstance & | createUniformRootStruct (const ShaderVariableStructDeclaration &declaration, const UniformCreatedCallback &uniformCreatedCallback) |
BufferBindingInstance & | addBindingInstance (std::unique_ptr< BufferBindingInstance > instance) |
SamplerInstance & | addSamplerInstance (std::unique_ptr< SamplerInstance > instance) |
Manages uniform struct and sampler instances. Every struct and sampler is tied to a shader declaration. The declaration acts as the interface to a uniform struct or sampler on a shader. Both the nap::Material and nap::MaterialInstance are a uniform container.
using BufferBindingInstanceList = std::vector<std::unique_ptr<BufferBindingInstance> > |
using SamplerInstanceList = std::vector<std::unique_ptr<SamplerInstance> > |
using UniformStructInstanceList = std::vector<std::unique_ptr<UniformStructInstance> > |
|
default |
|
virtualdefault |
|
delete |
|
protected |
|
protected |
|
protected |
BufferBindingInstance* findBinding | ( | const std::string & | name | ) |
Tries to find a buffer binding instance with the given name.
name | name of the buffer binding as declared in the shader. |
SamplerInstance* findSampler | ( | const std::string & | name | ) | const |
Tries to find a sampler instance with the given name.
name | the name of the sampler as declared in the shader. |
UniformStructInstance* findUniform | ( | const std::string & | name | ) |
Tries to find a uniform struct instance with the given name.
name | name of the uniform struct (ubo) as declared in the shader. |
BufferBindingInstance& getBinding | ( | const std::string & | name | ) |
Returns a buffer binding instance with the given name. The binding must exist.
name | name of the buffer binding as declared in the shader. |
const BufferBindingInstanceList& getBufferBindings | ( | ) | const |
const SamplerInstanceList& getSamplers | ( | ) | const |
UniformStructInstance& getUniform | ( | const std::string & | name | ) |
Returns a uniform struct instance with the given name, the struct has to exist.
name | name of the uniform struct as declared in the shader. |
const UniformStructInstanceList& getUniformStructs | ( | ) | const |
|
delete |