Add a basic entity class
This commit is contained in:
@@ -106,6 +106,11 @@ void ShaderProgram::setUniform(const char *name, float value) const {
|
||||
glUniform1f(location, value);
|
||||
}
|
||||
|
||||
void ShaderProgram::setUniform(const char *name, glm::vec3 vector) const {
|
||||
GLint location = glGetUniformLocation(shaderProgramId, name);
|
||||
glUniform3f(location, vector.x, vector.y, vector.z);
|
||||
}
|
||||
|
||||
void ShaderProgram::setUniform(const char *name, glm::mat4 matrix) const {
|
||||
GLint location = glGetUniformLocation(shaderProgramId, name);
|
||||
glUniformMatrix4fv(location, 1, GL_FALSE, glm::value_ptr(matrix));
|
||||
|
||||
Reference in New Issue
Block a user