Ligthing working

This commit is contained in:
k
2025-05-27 22:22:34 -04:00
parent 78f53fdd54
commit 6d6bac8ca1
7 changed files with 144 additions and 39 deletions

View File

@@ -45,6 +45,11 @@ void Shader::setFloat(const std::string &name, float value) {
glUniform1f(glGetUniformLocation(ID, name.c_str()), value);
}
void Shader::setVec3(const std::string &name, glm::vec3 value) {
glUniform3fv(glGetUniformLocation(ID, name.c_str()), 1,
glm::value_ptr(value));
}
void Shader::setMat4(const std::string &name, glm::mat4 value) {
glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE,
glm::value_ptr(value));