Added reset of the State::CurrentVertexArrayState() to prevent the State::_vas becoming a dangling pointer when VertexArrayState objects are deleted.
This commit is contained in:
@@ -549,6 +549,9 @@ class OSG_EXPORT State : public Referenced
|
||||
/** Set the getCurrentVertexArrayState to the GlobalVertexArrayState.*/
|
||||
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; }
|
||||
|
||||
|
||||
/** disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/
|
||||
void disableAllVertexArrays();
|
||||
|
||||
Reference in New Issue
Block a user