#include <material.h>
Public Member Functions | |
BaseMaterial (Core &core) | |
virtual | ~BaseMaterial ()=default |
const BaseShader & | getShader () |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
![]() | |
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 |
Public Attributes | |
std::vector< ResourcePtr< UniformStruct > > | mUniforms |
Property: 'Uniforms' Static uniforms (as read from file, or as set in code before calling init()) More... | |
std::vector< ResourcePtr< BufferBinding > > | mBuffers |
Property: 'Buffers' Static buffer bindings (as read from file, or as set in code before calling init()) More... | |
std::vector< ResourcePtr< Sampler > > | mSamplers |
Property: 'Samplers' Static samplers (as read from file, or as set in code before calling init()) More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
bool | rebuild (const BaseShader &shader, utility::ErrorState &errorState) |
![]() | |
UniformStructInstance & | createUniformRootStruct (const ShaderVariableStructDeclaration &declaration, const UniformCreatedCallback &uniformCreatedCallback) |
BufferBindingInstance & | addBindingInstance (std::unique_ptr< BufferBindingInstance > instance) |
SamplerInstance & | addSamplerInstance (std::unique_ptr< SamplerInstance > instance) |
Additional Inherited Members | |
![]() | |
using | UniformStructInstanceList = std::vector< std::unique_ptr< UniformStructInstance > > |
using | BufferBindingInstanceList = std::vector< std::unique_ptr< BufferBindingInstance > > |
using | SamplerInstanceList = std::vector< std::unique_ptr< SamplerInstance > > |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Acts as the main interface to any type of shader. Creates and holds a set of uniform struct instances, matching those exposed by the shader. If a uniform exposed by this material is updated, all the objects rendered using this material will use that same value, unless overridden by a nap::MaterialInstanceResource.
BaseMaterial | ( | Core & | core | ) |
Base constructor associated with a material
|
virtualdefault |
const BaseShader& getShader | ( | ) |
|
protected |
std::vector<ResourcePtr<BufferBinding> > mBuffers |
Property: 'Buffers' Static buffer bindings (as read from file, or as set in code before calling init())
std::vector<ResourcePtr<Sampler> > mSamplers |
Property: 'Samplers' Static samplers (as read from file, or as set in code before calling init())
std::vector<ResourcePtr<UniformStruct> > mUniforms |
Property: 'Uniforms' Static uniforms (as read from file, or as set in code before calling init())