|
@@ -89,4 +89,16 @@ void Shader::setInt(const GLchar* name, GLint data) {
|
|
|
|
|
|
void Shader::setFloat(const GLchar* name, GLfloat data) {
|
|
void Shader::setFloat(const GLchar* name, GLfloat data) {
|
|
glUniform1f(glGetUniformLocation(program, name), data);
|
|
glUniform1f(glGetUniformLocation(program, name), data);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void Shader::setVector(const GLchar* name, const Vector2& v) {
|
|
|
|
+ glUniform2fv(glGetUniformLocation(program, name), 1, &(v[0]));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void Shader::setVector(const GLchar* name, const Vector3& v) {
|
|
|
|
+ glUniform3fv(glGetUniformLocation(program, name), 1, &(v[0]));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void Shader::setVector(const GLchar* name, const Vector4& v) {
|
|
|
|
+ glUniform4fv(glGetUniformLocation(program, name), 1, &(v[0]));
|
|
}
|
|
}
|