Added separate test and rest of _currentVAO to State::resetCurrentVertexArrayStateOnMatch(..) method
This commit is contained in:
parent
8a5d1b9f44
commit
84bae01643
@ -549,8 +549,12 @@ class OSG_EXPORT State : public Referenced
|
|||||||
/** Set the getCurrentVertexArrayState to the GlobalVertexArrayState.*/
|
/** Set the getCurrentVertexArrayState to the GlobalVertexArrayState.*/
|
||||||
void setCurrentToGlobalVertexArrayState() { _vas = _globalVertexArrayState.get(); }
|
void setCurrentToGlobalVertexArrayState() { _vas = _globalVertexArrayState.get(); }
|
||||||
|
|
||||||
/** Reset the CurrentVertexArrayObject if it's value equals the specificied vas - use when deleting a vas.*/
|
/** Reset the CurrentVertexArrayState/VertexArrayObject if it's value matches the specificied vas - use when deleting a vas.*/
|
||||||
void resetCurrentVertexArrayStateOnMatch(VertexArrayState* vas) { if (_vas==vas) { _vas = _globalVertexArrayState.get(); _currentVAO = 0; } }
|
void resetCurrentVertexArrayStateOnMatch(VertexArrayState* vas)
|
||||||
|
{
|
||||||
|
if (vas->getVertexArrayObject()== _currentVAO) _currentVAO = 0;
|
||||||
|
if (_vas==vas) _vas = _globalVertexArrayState.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/
|
/** disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/
|
||||||
|
Loading…
Reference in New Issue
Block a user