Shader Abstract class.
More...
#include <base_struct.h>
|
| | Shader ()=default |
| |
| virtual | ~Shader ()=default |
| |
| virtual void | activate () const =0 |
| |
| virtual void | set_value (const std::string &name, float value)=0 |
| |
| virtual void | set_value (const std::string &name, int value)=0 |
| |
| virtual void | set_value (const std::string &name, Uint32 value)=0 |
| |
| virtual void | set_value (const std::string &name, glm::mat4 value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, const int *value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, const float *value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, glm::vec2 value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, glm::vec3 value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, glm::vec4 value, Uint32 count=1)=0 |
| |
| virtual void | set_value (const std::string &name, const glm::mat4 *values, Uint32 count=1)=0 |
| |
| virtual void | destroy ()=0 |
| |
| virtual Uint32 | get_id () const =0 |
| |
| virtual bool | is_valid () const =0 |
| |
|
| Uint32 | id = 0 |
| |
| std::unordered_map< std::string, Uint32 > | _uniforms |
| |
Shader Abstract class.
- Compile the shader
- Bind the shader
- Send uniforms
- Version
- 0.0.2
- Parameters
-
| string | vertex The shader source |
| string | fragment The shader source |
◆ Shader()
◆ ~Shader()
| virtual Shader::~Shader |
( |
| ) |
|
|
virtualdefault |
◆ activate()
| virtual void Shader::activate |
( |
| ) |
const |
|
pure virtual |
◆ destroy()
| virtual void Shader::destroy |
( |
| ) |
|
|
pure virtual |
◆ get_id()
| virtual Uint32 Shader::get_id |
( |
| ) |
const |
|
pure virtual |
◆ is_valid()
| virtual bool Shader::is_valid |
( |
| ) |
const |
|
pure virtual |
◆ set_value() [1/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
const float * |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [2/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
const glm::mat4 * |
values, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [3/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
const int * |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [4/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
float |
value |
|
) |
| |
|
pure virtual |
◆ set_value() [5/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
glm::mat4 |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [6/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
glm::vec2 |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [7/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
glm::vec3 |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [8/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
glm::vec4 |
value, |
|
|
Uint32 |
count = 1 |
|
) |
| |
|
pure virtual |
◆ set_value() [9/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
int |
value |
|
) |
| |
|
pure virtual |
◆ set_value() [10/10]
| virtual void Shader::set_value |
( |
const std::string & |
name, |
|
|
Uint32 |
value |
|
) |
| |
|
pure virtual |
◆ _uniforms
| std::unordered_map<std::string, Uint32> Shader::_uniforms |
|
protected |
◆ id
The documentation for this class was generated from the following file: