]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/shadanim.cxx
Merge branch 'jmt/waypt' into next
[simgear.git] / simgear / scene / model / shadanim.cxx
index 9f94730df5687f824b82982ee260309d25258c61..cb9270a30cdbf5df1513c9ded3a3cfce0ea16c99 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
@@ -132,6 +132,7 @@ private:
 
 static Mutex cubeMutex;
 
+#if 0
 static osg::TextureCubeMap*
 getOrCreateTextureCubeMap()
 {
@@ -181,6 +182,7 @@ static void create_specular_highlights(osg::Node *node)
   te->setOperand1_RGB(osg::TexEnvCombine::SRC_COLOR);
   ss->setTextureAttributeAndModes(0, te, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
 }
+#endif
 
 
 SGShaderAnimation::SGShaderAnimation(const SGPropertyNode* configNode,
@@ -207,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);
   }