57 void setInt(
const char* name,
int val);
Definition application.h:13
ShaderType
Shader Type (more to be added in the future such as geometry).
Definition shader.h:22
@ FRAGMENT
Definition shader.h:24
@ VERTEX
Definition shader.h:23
ShaderStatus
Statuses for shader operations.
Definition shader.h:14
unsigned int ShaderProgram
Definition shader.h:11
@ SUCCESSFUL
Definition renderer.h:20
const char * fragmentSRC
Definition shader.h:29
const char * vertexSRC
Definition shader.h:28
ShaderStatus addSubShader(const char *src, ShaderType type)
Adds a new subShader to the ShaderProgram.
Definition shader.cpp:33
Shader()
Definition shader.cpp:9
void setInt(const char *name, int val)
Sets a int uniform.
Definition shader.cpp:81
~Shader()
Definition shader.cpp:29
const char * getCompilationErrorMessage()
Returns the last compilation error.
Definition shader.cpp:50
void bind()
Binds the shader.
Definition shader.cpp:77
void init(const ShaderCreateInfo &createInfo)
Creates 2 shaders for the Vertex and Fragment Shader.
Definition shader.cpp:11
ShaderProgram getShaderProgram()
Returns the raw ShaderProgram object for GL uses.
Definition shader.h:51