Add basic phong lighting
(ambient+diffuse+specular)
This commit is contained in:
@@ -111,6 +111,11 @@ void ShaderProgram::setUniform(const char *name, glm::vec3 vector) const {
|
||||
glUniform3f(location, vector.x, vector.y, vector.z);
|
||||
}
|
||||
|
||||
void ShaderProgram::setUniform(const char *name, glm::mat3 matrix) const {
|
||||
GLint location = glGetUniformLocation(shaderProgramId, name);
|
||||
glUniformMatrix3fv(location, 1, GL_FALSE, glm::value_ptr(matrix));
|
||||
}
|
||||
|
||||
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