MCPcopy Create free account
hub / github.com/Kitware/VTK / SetUniformf

Method SetUniformf

Rendering/OpenGL2/vtkShaderProgram.cxx:761–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759}
760
761bool 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
774bool vtkShaderProgram::SetUniformMatrix(const char* name, vtkMatrix4x4* matrix)
775{

Callers 15

CopyOpaqueDepthBufferMethod · 0.45
RenderMethod · 0.45
RenderMethod · 0.45
ProjectMethod · 0.45
ApplyFilterMethod · 0.45
PreDrawMethod · 0.45
RenderMethod · 0.45
UpdateUniformsMethod · 0.45

Calls 1

FindUniformMethod · 0.95

Tested by 4

UnitTestOpenGLUniformsFunction · 0.36
TestUserShader2DFunction · 0.36
ExecuteMethod · 0.36