Render sky with depth test off.

Also, don't set BACKGROUND_BIT for cloud layers.
This commit is contained in:
timoore 2008-12-10 22:37:52 +00:00
parent f7e91f1f08
commit b96c5c9e4b

View File

@ -25,13 +25,16 @@
# include <simgear_config.h>
#endif
#include <simgear/math/sg_random.h>
#include <simgear/scene/util/RenderConstants.hxx>
#include "sky.hxx"
#include "cloudfield.hxx"
#include "newcloud.hxx"
#include <simgear/math/sg_random.h>
#include <simgear/scene/util/RenderConstants.hxx>
#include <osg/StateSet>
#include <osg/Depth>
// Constructor
SGSky::SGSky( void ) {
effective_visibility = visibility = 10000.0;
@ -50,8 +53,12 @@ SGSky::SGSky( void ) {
pre_root = new osg::Group;
pre_root->setNodeMask(simgear::BACKGROUND_BIT);
osg::StateSet* preStateSet = new osg::StateSet;
preStateSet->setAttribute(new osg::Depth(osg::Depth::LESS, 0.0, 1.0,
false));
pre_root->setStateSet(preStateSet);
cloud_root = new osg::Group;
cloud_root->setNodeMask(simgear::BACKGROUND_BIT | simgear::MODEL_BIT);
cloud_root->setNodeMask(simgear::MODEL_BIT);
pre_selector = new osg::Switch;