]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/moon.cxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / sky / moon.cxx
index 73cc8e8b3d90ac2ea7a0105d520bc2c0efd13ad9..1fa724ef710a8479864a64ae5c506b0563c6c1d5 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <iostream>
 
+#include <simgear/structure/OSGVersion.hxx>
 #include <osg/Array>
 #include <osg/AlphaFunc>
 #include <osg/BlendFunc>
@@ -46,7 +47,7 @@
 #include <simgear/constants.h>
 #include <simgear/screen/colors.hxx>
 #include <simgear/scene/model/model.hxx>
-#include <simgear/misc/PathOptions.hxx>
+#include <simgear/scene/util/SGReaderWriterOptions.hxx>
 
 #include "sphere.hxx"
 #include "moon.hxx"
@@ -74,8 +75,8 @@ SGMoon::build( SGPath path, double moon_size ) {
     stateSet->setRenderBinDetails(-5, "RenderBin");
 
     // set up the orb state
-    osg::ref_ptr<osgDB::ReaderWriter::Options> options
-        = makeOptionsFromPath(path);
+    osg::ref_ptr<SGReaderWriterOptions> options;
+    options = SGReaderWriterOptions::fromPath(path.str());
 
     osg::Texture2D* texture = SGLoadTexture2D("moon.png", options.get());
     stateSet->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);