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

Method Release

Rendering/OpenGL2/vtkOpenGLVertexArrayObject.cxx:186–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void 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
222void vtkOpenGLVertexArrayObject::ShaderProgramChanged()
223{

Callers 1

ShaderProgramChangedMethod · 0.95

Calls 4

IsReadyMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected