]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/shadanim.cxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / model / shadanim.cxx
index 6c0ad494101bd4d6075f2540d4c46c87cd16830b..ea1f1c2617479af9b37c965874d634fa1e5e5a3a 100644 (file)
@@ -107,8 +107,8 @@ public:
     // FIXME: need an update or callback ...
     // generate the six highlight map images (light direction = [1, 1, -1])
     osg::ref_ptr<osgUtil::HighlightMapGenerator> mapgen;
-    mapgen = new osgUtil::HighlightMapGenerator(_lastLightDirection.osg(),
-                                                _lastLightColor.osg(), 5);
+    mapgen = new osgUtil::HighlightMapGenerator(toOsg(_lastLightDirection),
+                                                toOsg(_lastLightColor), 5);
     mapgen->generateMap();
 
     // assign the six images to the texture object
@@ -187,7 +187,7 @@ static void create_specular_highlights(osg::Node *node)
 
 SGShaderAnimation::SGShaderAnimation(const SGPropertyNode* configNode,
                                      SGPropertyNode* modelRoot,
-                                     const osgDB::ReaderWriter::Options*
+                                     const osgDB::Options*
                                      options) :
   SGAnimation(configNode, modelRoot)
 {
@@ -209,8 +209,8 @@ public:
     if (!combine)
        return;
     // An approximation for light reflected back by chrome.
-    osg::Vec4 globalColor = (updateVisitor->getAmbientLight().osg() * .4f
-                            + updateVisitor->getDiffuseLight().osg());
+    osg::Vec4 globalColor = toOsg(updateVisitor->getAmbientLight() * .4f
+                                  + updateVisitor->getDiffuseLight());
     globalColor.a() = 1.0f;
     combine->setConstantColor(globalColor);
   }