| 730 | #define BUFFER_OFFSET(i) (reinterpret_cast<char*>(i)) |
| 731 | |
| 732 | bool 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 | |
| 748 | bool vtkShaderProgram::SetUniformi(const char* name, int i) |
| 749 | { |
no test coverage detected