Skip to content

Commit

Permalink
Merge pull request OpenMW#2083 from AnyOldName3/fix-vao-rig-bug
Browse files Browse the repository at this point in the history
Fix animation bug with VAOs
  • Loading branch information
AnyOldName3 authored Dec 19, 2018
2 parents 066b74e + 53188f6 commit 0f9f7f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/sceneutil/morphgeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <cassert>

#include <osg/Version>

namespace SceneUtil
{

Expand Down Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions components/sceneutil/riggeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <stdexcept>
#include <cstdlib>

#include <osg/Version>

#include <components/debug/debuglog.hpp>

#include "skeleton.hpp"
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0f9f7f0

Please sign in to comment.