Fixed handling of reassignment of ArrayDispatch when vertex aliasing is toggled

This commit is contained in:
Robert Osfield
2017-12-31 12:35:44 +00:00
parent 5afd32b2d9
commit 94a1a84a59
2 changed files with 37 additions and 17 deletions

View File

@@ -34,6 +34,8 @@ class OSG_EXPORT VertexArrayState : public osg::Referenced
modifiedCount(0xffffffff),
active(false) {}
virtual bool isVertexAttribDispatch() const { return false; }
virtual const char* className() const = 0; // { return "ArrayDispatch"; }
virtual void enable_and_dispatch(osg::State& /*state*/, const osg::Array* /*new_array*/) {} // = 0;
@@ -108,6 +110,8 @@ class OSG_EXPORT VertexArrayState : public osg::Referenced
void resetBufferObjectPointers() { _currentVBO = 0; _currentEBO = 0; }
bool correctArrayDispatchAssigned(const ArrayDispatch* ad);
void assignAllDispatchers();
void assignVertexArrayDispatcher();