From 8a5d1b9f440fefb7b0dfba263f7591c914003f90 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 21 Jan 2019 18:13:43 +0000 Subject: [PATCH] Changed resetCurrentVertexArrayStateOnMatch() to reset _vas tp _globalVertexArrayState and currentVAO to 0. --- include/osg/State | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osg/State b/include/osg/State index d003e6bb9..864078c2e 100644 --- a/include/osg/State +++ b/include/osg/State @@ -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.*/