1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00

do not dirty unchanged arrays (#3164)

This PR proposes a simple change to `RigGeometry` `dirtyGLObjects` logic.

1. We will avoid dirtying unmodified arrays.
2. We can drop an osg version guard since `Drawable::dirtyGLObjects` is not nearly as harmful as `Geometry::dirtyGLObjects`.
3. We will avoid crashes in an as yet unfinished future PR concerning `Array` sharing improvements.
This commit is contained in:
Bo Svensson 2021-10-12 11:47:42 +00:00 committed by GitHub
parent 6ec66edb7c
commit b0132be53f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View file

@ -2,8 +2,6 @@
#include <cassert>
#include <osg/Version>
namespace SceneUtil
{
@ -178,9 +176,7 @@ void MorphGeometry::cull(osg::NodeVisitor *nv)
positionDst->dirty();
#if OSG_MIN_VERSION_REQUIRED(3, 5, 6)
geom.dirtyGLObjects();
#endif
geom.osg::Drawable::dirtyGLObjects();
nv->pushOntoNodePath(&geom);
nv->apply(geom);

View file

@ -1,7 +1,5 @@
#include "riggeometry.hpp"
#include <osg/Version>
#include <components/debug/debuglog.hpp>
#include <osg/MatrixTransform>
@ -249,9 +247,7 @@ void RigGeometry::cull(osg::NodeVisitor* nv)
if (tangentDst)
tangentDst->dirty();
#if OSG_MIN_VERSION_REQUIRED(3, 5, 6)
geom.dirtyGLObjects();
#endif
geom.osg::Drawable::dirtyGLObjects();
nv->pushOntoNodePath(&geom);
nv->apply(geom);