This establishes a default state of using the OpenGL fixed function pipeline.
Otherwise a shader program from a state set can leak into state sets that don't
use shaders at all.
#include <osg/Notify>
#include <osg/PolygonMode>
#include <osg/PolygonOffset>
+#include <osg/Program>
#include <osg/Version>
#include <osg/TexEnv>
// as the rest of the scene. This may not be true in practice.
mRealRoot->addChild(thesky->getCloudRoot());
mRealRoot->addChild(FGCreateRedoutNode());
+ // Attach empty program to the scene root so that shader programs
+ // don't leak into state sets (effects) that shouldn't have one.
+ stateSet = mRealRoot->getOrCreateStateSet();
+ stateSet->setAttributeAndModes(new osg::Program, osg::StateAttribute::ON);
}