[osg-users] Problem setting a skydome

Alberto Luaces aluaces at udc.es
Fri Jul 11 08:48:55 PDT 2008


I'm having trouble setting a skydome into my scene. It is messing with the 
autocomputed near and far planes (the near plane goes too far, cutting near 
objects). In order to avoid it, I tried to disable culling for its subgraph 
and even giving it a ComputeBoundingSphereCallback that only generates 
invalid boundingSpheres, but the problem stays. Any ideas?

My "invalid bounds" generator:

class invalidBoundsCallback: public osg::Node::ComputeBoundingSphereCallback{
    osg::BoundingSphere computeBound (const osg::Node &) const
       return osg::BoundingSphere();

Setting of the subgraph containing the skydome (group->SkynodeGeode):

osg::ref_ptr<osg::Node> n = osgDB::readNodeFile( skydome);
n->setComputeBoundingSphereCallback(new invalidBoundsCallback);


More information about the osg-users mailing list