From 6c79c0fb3501da68708c791df0343e9f44217c17 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sun, 15 Apr 2018 12:38:03 +0000 Subject: [PATCH] Add an empty compileGLObjects implementation to Rig/MorphGeometry to avoid unnecessary creation of display list done by osg --- components/sceneutil/morphgeometry.hpp | 3 +++ components/sceneutil/riggeometry.hpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/morphgeometry.hpp b/components/sceneutil/morphgeometry.hpp index 122c1456c..ba3b40961 100644 --- a/components/sceneutil/morphgeometry.hpp +++ b/components/sceneutil/morphgeometry.hpp @@ -21,6 +21,9 @@ namespace SceneUtil /// @note The source geometry will not be modified. void setSourceGeometry(osg::ref_ptr sourceGeom); + // Currently empty as this is difficult to implement. Technically we would need to compile both internal geometries in separate frames but this method is only called once. Alternatively we could compile just the static parts of the model. + virtual void compileGLObjects(osg::RenderInfo& renderInfo) const {} + class MorphTarget { protected: diff --git a/components/sceneutil/riggeometry.hpp b/components/sceneutil/riggeometry.hpp index 64f4bf312..60b3edc9d 100644 --- a/components/sceneutil/riggeometry.hpp +++ b/components/sceneutil/riggeometry.hpp @@ -23,8 +23,8 @@ namespace SceneUtil META_Object(SceneUtil, RigGeometry) - // At this point compileGLObjects() remains unimplemented, hard to avoid race conditions - // and there is limited value in compiling anyway since the data will change again for the next frame + // Currently empty as this is difficult to implement. Technically we would need to compile both internal geometries in separate frames but this method is only called once. Alternatively we could compile just the static parts of the model. + virtual void compileGLObjects(osg::RenderInfo& renderInfo) const {} struct BoneInfluence {