| 759 | } |
| 760 | |
| 761 | bool vtkShaderProgram::SetUniformf(const char* name, float f) |
| 762 | { |
| 763 | GLint location = static_cast<GLint>(this->FindUniform(name)); |
| 764 | if (location == -1) |
| 765 | { |
| 766 | this->Error = "Could not set uniform (does not exist) "; |
| 767 | this->Error += name; |
| 768 | return false; |
| 769 | } |
| 770 | glUniform1f(location, static_cast<GLfloat>(f)); |
| 771 | return true; |
| 772 | } |
| 773 | |
| 774 | bool vtkShaderProgram::SetUniformMatrix(const char* name, vtkMatrix4x4* matrix) |
| 775 | { |