| 184 | } |
| 185 | |
| 186 | void vtkOpenGLVertexArrayObject::Release() |
| 187 | { |
| 188 | if (this->Internal->IsReady() && this->Internal->Supported) |
| 189 | { |
| 190 | glBindVertexArray(0); |
| 191 | } |
| 192 | else if (this->Internal->IsReady()) |
| 193 | { |
| 194 | Private::AttributeMap::const_iterator it; |
| 195 | for (it = this->Internal->Attributes.begin(); it != this->Internal->Attributes.end(); ++it) |
| 196 | { |
| 197 | std::vector<VertexAttributes>::const_iterator attrIt; |
| 198 | for (attrIt = it->second.begin(); attrIt != it->second.end(); ++attrIt) |
| 199 | { |
| 200 | int matrixCount = attrIt->IsMatrix ? attrIt->Size : 1; |
| 201 | for (int i = 0; i < matrixCount; ++i) |
| 202 | { |
| 203 | if (attrIt->Divisor > 0) |
| 204 | { |
| 205 | #ifdef GL_ES_VERSION_3_0 |
| 206 | glVertexAttribDivisor(attrIt->Index + i, 0); |
| 207 | #else |
| 208 | if (GLAD_GL_ARB_instanced_arrays) |
| 209 | { |
| 210 | glVertexAttribDivisorARB(attrIt->Index + i, 0); |
| 211 | } |
| 212 | #endif |
| 213 | } |
| 214 | glDisableVertexAttribArray(attrIt->Index + i); |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | this->Modified(); |
| 220 | } |
| 221 | |
| 222 | void vtkOpenGLVertexArrayObject::ShaderProgramChanged() |
| 223 | { |
no test coverage detected