NAP
Public Member Functions | Public Attributes | List of all members
UniformStruct Class Reference

#include <uniform.h>

Public Member Functions

void addUniform (Uniform &uniform)
 
UniformfindUniform (const std::string &name)
 
const UniformfindUniform (const std::string &name) const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::vector< rtti::ObjectPtr< Uniform > > mUniforms
 
- Public Attributes inherited from Uniform
std::string mName
 Name of uniform in shader. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Contains other uniforms, including: values, structs and arrays. myshader.frag example:

struct PointLight
{
vec3 mPosition;
vec3 mIntensity;
};
Inheritance diagram for UniformStruct:
[legend]
Collaboration diagram for UniformStruct:
[legend]

Member Function Documentation

◆ addUniform()

void addUniform ( Uniform uniform)

Adds a uniform.

Parameters
uniformthe uniform to add

◆ findUniform() [1/2]

Uniform* findUniform ( const std::string &  name)
Parameters
namethe name of the uniform to find.
Returns
a uniform with the given name, nullptr if not found

◆ findUniform() [2/2]

const Uniform* findUniform ( const std::string &  name) const
Parameters
namethe name of the uniform to find.
Returns
a uniform with the given name, nullptr if not found

Member Data Documentation

◆ mUniforms

std::vector<rtti::ObjectPtr<Uniform> > mUniforms