#ifdef FG_JPEG_SERVER
jpgRenderFrame = updateRenderer;
#endif
+
+ // it's not the real root, whatever that means
+ mRoot->setName("fakeRoot");
_numCascades = 4;
_cascadeFar[0] = 5.f;
void
FGRenderer::splashinit( void ) {
osgViewer::Viewer* viewer = getViewer();
+ viewer->setName("osgViewer");
mRealRoot = dynamic_cast<osg::Group*>(viewer->getSceneData());
+ mRealRoot->setName("realRoot");
+
ref_ptr<Node> splashNode = fgCreateSplashNode();
if (_classicalRenderer) {
mRealRoot->addChild(splashNode.get());
CameraInfo* info = new CameraInfo(flags);
// The camera group will always update the camera
camera->setReferenceFrame(Transform::ABSOLUTE_RF);
-
+ info->name = "classic";
+
Camera* farCamera = 0;
if ((flags & (CameraGroup::GUI | CameraGroup::ORTHO)) == 0) {
farCamera = new Camera;
+ farCamera->setName("farCamera");
farCamera->setAllowEventFocus(camera->getAllowEventFocus());
farCamera->setGraphicsContext(camera->getGraphicsContext());
farCamera->setCullingMode(camera->getCullingMode());
stateSet->setAttribute(hint);
osg::Group* sceneGroup = new osg::Group;
+ sceneGroup->setName("rendererScene");
sceneGroup->addChild(globals->get_scenery()->get_scene_graph());
sceneGroup->setNodeMask(~simgear::BACKGROUND_BIT);
// affect geometry anywhere in the scene graph that has its light
// number enabled in a state set.
LightSource* lightSource = new LightSource;
+ lightSource->setName("FGLightSource");
lightSource->getLight()->setDataVariance(Object::DYNAMIC);
// relative because of CameraView being just a clever transform node
lightSource->setReferenceFrame(osg::LightSource::RELATIVE_RF);
mRealRoot->addChild(lightSource);
// we need a white diffuse light for the phase of the moon
osg::LightSource* sunLight = new osg::LightSource;
+ sunLight->setName("sunLightSource");
sunLight->getLight()->setDataVariance(Object::DYNAMIC);
sunLight->getLight()->setLightNum(1);
sunLight->setUpdateCallback(new FGLightSourceUpdateCallback(true));
// Hang a StateSet above the sky subgraph in order to turn off
// light 0
Group* skyGroup = new Group;
+ skyGroup->setName("rendererSkyParent");
StateSet* skySS = skyGroup->getOrCreateStateSet();
skySS->setMode(GL_LIGHT0, StateAttribute::OFF);
skyGroup->addChild(_sky->getPreRoot());
}
osg::Switch* sw = new osg::Switch;
+ sw->setName("scenerySwitch");
sw->setUpdateCallback(new FGScenerySwitchCallback);
sw->addChild(mRoot.get());
mRealRoot->addChild(sw);
++hit) {
const osg::NodePath& np = hit->nodePath;
osg::NodePath::const_reverse_iterator npi;
+
for (npi = np.rbegin(); npi != np.rend(); ++npi) {
SGSceneUserData* ud = SGSceneUserData::getSceneUserData(*npi);
- if (!ud)
+ if (!ud || (ud->getNumPickCallbacks() == 0))
continue;
+
for (unsigned i = 0; i < ud->getNumPickCallbacks(); ++i) {
SGPickCallback* pickCallback = ud->getPickCallback(i);
if (!pickCallback)
sceneryPick.callback = pickCallback;
pickList.push_back(sceneryPick);
- }
- }
+ } // of installed pick callbacks iteration
+ } // of reverse node path walk
}
+
return !pickList.empty();
}