Carna  Version 3.3.2
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Carna::base::ShaderUniform< ValueType > Class Template Reference

Implements ShaderUniformBase class for particular ValueType. More...

#include <ShaderUniform.h>

+ Inheritance diagram for Carna::base::ShaderUniform< ValueType >:
+ Collaboration diagram for Carna::base::ShaderUniform< ValueType >:

Public Types

typedef ValueType Value
 Holds the accepted value type.
 

Public Member Functions

 ShaderUniform (const std::string &name, const ValueType &value)
 
- Public Member Functions inherited from Carna::base::ShaderUniformBase
 ShaderUniformBase (const std::string &name)
 Instantiates.
 
virtual ~ShaderUniformBase ()
 Does nothing.
 
bool upload () const
 Uploads this uniform to the current shader. Returns true if the current shader has a matching uniform defined or false otherwise.
 

Public Attributes

ValueType value
 
- Public Attributes inherited from Carna::base::ShaderUniformBase
std::string name
 Holds the name of this uniform.
 

Protected Member Functions

virtual void uploadTo (int location) const override
 Uploads this uniform to location.
 

Detailed Description

template<typename ValueType>
class Carna::base::ShaderUniform< ValueType >

Implements ShaderUniformBase class for particular ValueType.

Parameters
ValueTypespecifies the accepted value type.

The particular glUniform function used for upload is chosen by the mapping ShaderUniformType and its specializations induce.

Author
Leonid Kostrykin
Date
22.2.15 - 14.3.15

Definition at line 166 of file ShaderUniform.h.

Constructor & Destructor Documentation

◆ ShaderUniform()

template<typename ValueType >
Carna::base::ShaderUniform< ValueType >::ShaderUniform ( const std::string &  name,
const ValueType &  value 
)

Instantiates.

Definition at line 194 of file ShaderUniform.h.

Member Data Documentation

◆ value

template<typename ValueType >
ValueType Carna::base::ShaderUniform< ValueType >::value

Holds the value of this uniform.

Definition at line 184 of file ShaderUniform.h.


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