Wrapper for OpenGL shaders.
More...
#include <shader.hpp>
|
| void | Compile (std::string vsSrc, std::string fsSrc) |
| | Compile a shader with the source.
|
|
void | Bind () |
| | Bind the shader.
|
| void | SetUniform (const char *name, float value[4]) |
| | Sets a vec4 uniform.
|
| void | SetUniformMat4 (const char *name, const float mat[16]) const |
| | Set a mat4 uniform.
|
|
bool | IsCompiled () |
| | Returns if the Shader was compiled.
|
Wrapper for OpenGL shaders.
◆ Compile()
| void acheron::renderer::Shader::Compile |
( |
std::string | vsSrc, |
|
|
std::string | fsSrc ) |
|
inline |
Compile a shader with the source.
- Parameters
-
- Exceptions
-
| Runtime | erorr if shader didnt compile properly |
◆ SetUniform()
| void acheron::renderer::Shader::SetUniform |
( |
const char * | name, |
|
|
float | value[4] ) |
|
inline |
Sets a vec4 uniform.
- Parameters
-
| name | Name of the uniform |
| value | Value of the uniform |
◆ SetUniformMat4()
| void acheron::renderer::Shader::SetUniformMat4 |
( |
const char * | name, |
|
|
const float | mat[16] ) const |
|
inline |
Set a mat4 uniform.
- Parameters
-
| name | Name of the uniform |
| value | Value of the uniform |
The documentation for this struct was generated from the following file: