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

Method UseAttributeArray

Rendering/OpenGL2/vtkShaderProgram.cxx:732–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730#define BUFFER_OFFSET(i) (reinterpret_cast<char*>(i))
731
732bool vtkShaderProgram::UseAttributeArray(const char* name, int offset, size_t stride,
733 int elementType, int elementTupleSize, NormalizeOption normalize)
734{
735 GLint location = static_cast<GLint>(this->FindAttributeArray(name));
736 if (location == -1)
737 {
738 this->Error = "Could not use attribute (does not exist) ";
739 this->Error += name;
740 return false;
741 }
742 glVertexAttribPointer(location, elementTupleSize, convertTypeToGL(elementType),
743 normalize == Normalize ? GL_TRUE : GL_FALSE, static_cast<GLsizei>(stride),
744 BUFFER_OFFSET(offset));
745 return true;
746}
747
748bool vtkShaderProgram::SetUniformi(const char* name, int i)
749{

Callers 1

RenderVolumeGeometryMethod · 0.80

Calls 2

FindAttributeArrayMethod · 0.95
convertTypeToGLFunction · 0.70

Tested by

no test coverage detected