From 21bcd61c92c3af8e4ee7f576d404e23868d4a9af Mon Sep 17 00:00:00 2001 From: Julien Valentin Date: Tue, 29 Aug 2017 14:47:56 +0200 Subject: [PATCH] add MorphTransformHW for RigGeometry sources that are MorphGeometry --- examples/osganimationhardware/osganimationhardware.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/osganimationhardware/osganimationhardware.cpp b/examples/osganimationhardware/osganimationhardware.cpp index eb7d8b3ea..4c65644a8 100644 --- a/examples/osganimationhardware/osganimationhardware.cpp +++ b/examples/osganimationhardware/osganimationhardware.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include @@ -182,8 +184,11 @@ struct SetupRigGeometry : public osg::NodeVisitor if (_hardware) { osgAnimation::RigGeometry* rig = dynamic_cast(&geom); - if (rig) + if (rig){ rig->setRigTransformImplementation(new MyRigTransformHardware); + osgAnimation::MorphGeometry *morph=dynamic_cast(rig->getSourceGeometry()); + if(morph)morph->setMorphTransformImplementation(new osgAnimation::MorphTransformHardware); + } } #if 0