shader: allow to send vec3 uniforms
parent
b4dd3be584
commit
6bd3bdecb8
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue