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:
parent
6ec66edb7c
commit
b0132be53f
2 changed files with 2 additions and 10 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue