Untitled Game engine no.5
1.0
|
Container for a shader. More...
#include <Shader.hpp>
Public Member Functions | |
Shader (const std::string &vert, const std::string &frag) | |
constructor, requires a vertex shader and a fragment shader in text form | |
Shader (const std::string &path) | |
constructor, requires a path to a shader file | |
void | Bind () |
bind the shader to drawspace | |
void | Unbind () |
unbind the the shader from the drawing register | |
void | SetUniformInt1 (const std::string &name, int i) |
set a uniform int | |
void | SetUniformIntN (const std::string &name, int *values, const uint32_t &n) |
set n uniform ints | |
void | SetUniformFloat1 (const std::string &name, float v0) |
set a uniform float | |
void | SetUniformFloat2 (const std::string &name, float v0, float v1) |
set a uniform float pair | |
void | SetUniformFloat3 (const std::string &name, float v0, float v1, float v2) |
set a uniform float triplet | |
void | SetUniformFloat4 (const std::string &name, float v0, float v1, float v2, float v3) |
set a uniform float quad | |
void | SetUniformMat4 (const std::string &name, const glm::mat4) |
set a uniform float 4x4 matrix | |
unsigned int | CreateShader (const std::string &vert, const std::string &frag) |
create a shader from vertex string and a fragment string returns a system id | |
Container for a shader.