Changed resetCurrentVertexArrayStateOnMatch() to reset _vas tp _globalVertexArrayState and currentVAO to 0.

This commit is contained in:
Robert Osfield 2019-01-21 18:13:43 +00:00
parent 488b4854b2
commit 8a5d1b9f44

View File

@ -550,7 +550,7 @@ class OSG_EXPORT State : public Referenced
void setCurrentToGlobalVertexArrayState() { _vas = _globalVertexArrayState.get(); }
/** Reset the CurrentVertexArrayObject if it's value equals the specificied vas - use when deleting a vas.*/
void resetCurrentVertexArrayStateOnMatch(VertexArrayState* vas) { if (_vas==vas) _vas = 0; }
void resetCurrentVertexArrayStateOnMatch(VertexArrayState* vas) { if (_vas==vas) { _vas = _globalVertexArrayState.get(); _currentVAO = 0; } }
/** disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/