|
BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
|
Abstracts working with shaders. More...
#include <shader.h>
Public Member Functions | |
| Shader () | |
| void | build (const std::string &vs, const std::string &fs) |
| Read and build the shader. More... | |
| void | use () |
| Activate built shader. More... | |
| void | set_bool (const std::string &name, bool value) const |
| Bind the bool variable to the shader. More... | |
| void | set_int (const std::string &name, int value) const |
| Bind the integer variable to the shader. More... | |
| void | set_float (const std::string &name, float value) const |
| Bind the float variable to the shader. More... | |
| void | set_mat4 (const std::string &name, glm::mat4 value) const |
| Bind the matrix 4x4 variable to the shader. More... | |
Public Attributes | |
| unsigned int | ID |
| Shader program id. More... | |
| Shader::Shader | ( | ) |
Definition at line 24 of file shader.cpp.
| void Shader::build | ( | const std::string & | vs, |
| const std::string & | fs | ||
| ) |
Read and build the shader.
| vs | Vertex shader string. |
| fs | Fragment shader string. |
Definition at line 27 of file shader.cpp.

| void Shader::set_bool | ( | const std::string & | name, |
| bool | value | ||
| ) | const |
Bind the bool variable to the shader.
| name | Name of the variable in the shader. |
| value | The set value of the variable. |
Definition at line 85 of file shader.cpp.
| void Shader::set_float | ( | const std::string & | name, |
| float | value | ||
| ) | const |
Bind the float variable to the shader.
| name | Name of the variable in the shader. |
| value | The set value of the variable. |
Definition at line 97 of file shader.cpp.
| void Shader::set_int | ( | const std::string & | name, |
| int | value | ||
| ) | const |
Bind the integer variable to the shader.
| name | Name of the variable in the shader. |
| value | The set value of the variable. |
Definition at line 91 of file shader.cpp.

| void Shader::set_mat4 | ( | const std::string & | name, |
| glm::mat4 | value | ||
| ) | const |
Bind the matrix 4x4 variable to the shader.
| name | Name of the variable in the shader. |
| value | The set value of the variable. |
Definition at line 103 of file shader.cpp.

| void Shader::use | ( | ) |
Activate built shader.
Has to be called after Shader::build function.
Definition at line 79 of file shader.cpp.
