#include <osg/TextureCubeMap>
#include <osg/TexMat>
#include <osg/Fog>
-#if SG_OSG_MIN_VERSION_REQUIRED(2,9,5)
-#include <osgDB/Options>
-#endif
#include <simgear/math/sg_random.h>
-#include <simgear/scene/util/PathOptions.hxx>
+#include <simgear/scene/util/SGReaderWriterOptions.hxx>
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/model/model.hxx>
#include <simgear/scene/util/RenderConstants.hxx>
{
osg::StateSet *stateSet = new osg::StateSet;
- osg::ref_ptr<osgDB::Options> options
- = makeOptionsFromPath(path);
+ osg::ref_ptr<SGReaderWriterOptions> options;
+ options = SGReaderWriterOptions::fromPath(path.str());
stateSet->setTextureAttribute(0, SGLoadTexture2D(colorTexture,
options.get()));
stateSet->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::ON);
->getWhiteTexture(),
osg::StateAttribute::ON);
rootSet->setDataVariance(osg::Object::DYNAMIC);
-
+
+ // Ensure repeatability of the random seed within 10 minutes,
+ // to keep multi-computer systems in sync.
+ sg_srandom_time_10();
base = osg::Vec2(sg_random(), sg_random());
group_top->addChild(layer_transform.get());
group_bottom->addChild(layer_transform.get());