LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
LibCarna::base::ShaderUniform< ValueType > Class Template Reference

Implements ShaderUniformBase class for particular ValueType. More...

#include <ShaderUniform.hpp>

+ Inheritance diagram for LibCarna::base::ShaderUniform< ValueType >:
+ Collaboration diagram for LibCarna::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 LibCarna::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 LibCarna::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 LibCarna::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

Definition at line 167 of file ShaderUniform.hpp.

Member Typedef Documentation

◆ Value

Holds the accepted value type.

Definition at line 177 of file ShaderUniform.hpp.

Constructor & Destructor Documentation

◆ ShaderUniform()

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

Instantiates.

Definition at line 195 of file ShaderUniform.hpp.

Member Function Documentation

◆ uploadTo()

template<typename ValueType >
void LibCarna::base::ShaderUniform< ValueType >::uploadTo ( int  location) const
overrideprotectedvirtual

Uploads this uniform to location.

Implements LibCarna::base::ShaderUniformBase.

Definition at line 203 of file ShaderUniform.hpp.

Member Data Documentation

◆ value

Holds the value of this uniform.

Definition at line 185 of file ShaderUniform.hpp.


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