diff --git a/simgear/scene/sky/dome.cxx b/simgear/scene/sky/dome.cxx index 5304a36b..15e45ac7 100644 --- a/simgear/scene/sky/dome.cxx +++ b/simgear/scene/sky/dome.cxx @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -143,11 +144,12 @@ SGSkyDome::build( double hscale, double vscale, simgear::SGReaderWriterOptions * stateSet->setAttributeAndModes(shadeModel); stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF); stateSet->setMode(GL_FOG, osg::StateAttribute::OFF); - stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); + stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON); stateSet->setMode(GL_CULL_FACE, osg::StateAttribute::ON); stateSet->setMode(GL_BLEND, osg::StateAttribute::OFF); stateSet->setMode(GL_ALPHA_TEST, osg::StateAttribute::OFF); + stateSet->setAttribute(new osg::Depth(osg::Depth::LESS, 0, 1, false)); stateSet->setAttribute(new osg::CullFace(osg::CullFace::BACK)); osg::Material* material = new osg::Material;