From 53188f61fcec55150046dad4bd4a1cd5ec68a3c6 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 18 Dec 2018 19:44:30 +0000 Subject: [PATCH] Fix animation bug with VAOs --- components/sceneutil/morphgeometry.cpp | 6 ++++++ components/sceneutil/riggeometry.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/components/sceneutil/morphgeometry.cpp b/components/sceneutil/morphgeometry.cpp index 1b7e4ca93..01bb35c45 100644 --- a/components/sceneutil/morphgeometry.cpp +++ b/components/sceneutil/morphgeometry.cpp @@ -2,6 +2,8 @@ #include +#include + namespace SceneUtil { @@ -176,6 +178,10 @@ void MorphGeometry::cull(osg::NodeVisitor *nv) positionDst->dirty(); +#if OSG_MIN_VERSION_REQUIRED(3, 5, 6) + geom.dirtyGLObjects(); +#endif + nv->pushOntoNodePath(&geom); nv->apply(geom); nv->popFromNodePath(); diff --git a/components/sceneutil/riggeometry.cpp b/components/sceneutil/riggeometry.cpp index 30a3f076c..b086cf628 100644 --- a/components/sceneutil/riggeometry.cpp +++ b/components/sceneutil/riggeometry.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include #include "skeleton.hpp" @@ -235,6 +237,10 @@ void RigGeometry::cull(osg::NodeVisitor* nv) if (tangentDst) tangentDst->dirty(); +#if OSG_MIN_VERSION_REQUIRED(3, 5, 6) + geom.dirtyGLObjects(); +#endif + nv->pushOntoNodePath(&geom); nv->apply(geom); nv->popFromNodePath();