diff --git a/include/shader.hpp b/include/shader.hpp index 19742df..1fcb277 100644 --- a/include/shader.hpp +++ b/include/shader.hpp @@ -96,6 +96,11 @@ public: glUniform1f(glGetUniformLocation(ID, name.c_str()), value); } + void setVec3(const std::string &name, glm::vec3 value) const + { + glUniform3f(glGetUniformLocation(ID, name.c_str()), value.x, value.y, value.z); + } + void setMat4(const std::string &name, glm::mat4 value) const { glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, glm::value_ptr(value));