From 9ac2b2eb7b56fe88d5731847f0defbf708068f4c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Oct 2017 17:47:19 +0100 Subject: [PATCH] Added VertexArrayState::ArrayDispatch::className() method and implementation for each ArrayDispatch subclass to help with debugging --- include/osg/VertexArrayState | 2 ++ src/osg/VertexArrayState.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/osg/VertexArrayState b/include/osg/VertexArrayState index cfd8dae86..ce5956315 100644 --- a/include/osg/VertexArrayState +++ b/include/osg/VertexArrayState @@ -34,6 +34,8 @@ public: modifiedCount(0xffffffff), active(false) {} + virtual const char* className() const = 0; // { return "ArrayDispatch"; } + virtual void enable_and_dispatch(osg::State& /*state*/, const osg::Array* /*new_array*/) {} // = 0; virtual void enable_and_dispatch(osg::State& /*state*/, const osg::Array* /*new_array*/, const osg::GLBufferObject* /*vbo*/) {} // = 0; diff --git a/src/osg/VertexArrayState.cpp b/src/osg/VertexArrayState.cpp index 9f474fc0f..1095e11f4 100644 --- a/src/osg/VertexArrayState.cpp +++ b/src/osg/VertexArrayState.cpp @@ -118,6 +118,8 @@ struct VertexArrayDispatch : public VertexArrayState::ArrayDispatch { VertexArrayDispatch() {} + virtual const char* className() const { return "VertexArrayDispatch"; } + virtual void enable_and_dispatch(osg::State&, const osg::Array* new_array) { VAS_NOTICE<<" VertexArrayDispatch::enable_and_dispatch("<getNumElements()<<")"<getNumElements()<<")"<getNumElements()<<")"<getNumElements()<<") unit="<getPreserveDataType())