Shader parameter class that holds a single parameter for shader setting.
More...
#include <shader_setting.hpp>
|
| | ShaderParameter () |
| | Default constructor.
|
| |
| template<typename T > |
| | ShaderParameter (std::uint64_t name, const T &v) |
| | Constructor.
|
| |
| bool | valid () const |
| | Check if the parameter is valid.
|
| |
| void | invalidate () |
| | Invalidate the parameter.
|
| |
| template<typename T > |
| T | get_value () const |
| | Get the parameter value.
|
| |
| template<typename T > |
| void | set_value (const T &value) |
| | Get the parameter value.
|
| |
| void | set (glk::GLSLShader &shader) const |
| | Set the parameter to the shader.
|
| |
|
| ShaderDataType | type |
| | Data type of the parameter.
|
| |
| std::uint64_t | name |
| | Name of the parameter (hashed)
|
| |
| Eigen::Matrix4f | mat4f |
| | Value of the parameter (stored as 4x4 float matrix)
|
| |
Shader parameter class that holds a single parameter for shader setting.
- Note
- The maximum size of the parameter value is 4x4 float matrix.
◆ ShaderParameter() [1/2]
| guik::ShaderParameter::ShaderParameter |
( |
| ) |
|
|
inline |
◆ ShaderParameter() [2/2]
template<typename T >
| guik::ShaderParameter::ShaderParameter |
( |
std::uint64_t |
name, |
|
|
const T & |
v |
|
) |
| |
|
inline |
◆ get_value()
template<typename T >
| T guik::ShaderParameter::get_value |
( |
| ) |
const |
|
inline |
◆ invalidate()
| void guik::ShaderParameter::invalidate |
( |
| ) |
|
|
inline |
Invalidate the parameter.
◆ set()
Set the parameter to the shader.
◆ set_value()
template<typename T >
| void guik::ShaderParameter::set_value |
( |
const T & |
value | ) |
|
|
inline |
◆ valid()
| bool guik::ShaderParameter::valid |
( |
| ) |
const |
|
inline |
Check if the parameter is valid.
◆ mat4f
| Eigen::Matrix4f guik::ShaderParameter::mat4f |
Value of the parameter (stored as 4x4 float matrix)
◆ name
| std::uint64_t guik::ShaderParameter::name |
Name of the parameter (hashed)
◆ type
Data type of the parameter.
The documentation for this struct was generated from the following file: