rem: dlight->addChild( file );
add: dlight->addChild(sceneTrN);
context: int main (int argc, char **argv){    osgInit(argc,argv);    // GLUT init    glutInit(&argc, argv);    glutInitDisplayMode( GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);    int winid = glutCreateWindow("OpenSG");    glutKeyboardFunc(key);    glutVisibilityFunc(vis);    glutReshapeFunc(reshape);    glutDisplayFunc(display);           glutMouseFunc(mouse);       glutMotionFunc(motion);         glutIdleFunc(display);      // glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );        glEnable( GL_DEPTH_TEST );    glEnable( GL_LIGHTING );    glEnable( GL_LIGHT0 );    // OSG    SceneFileHandler::the().print();    // create the graph    // beacon for camera and light      NodePtr b1n = Node::create();    GroupPtr b1 = Group::create();    beginEditCP(b1n);    b1n->setCore( b1 );    endEditCP(b1n);    // transformation    NodePtr t1n = Node::create();    TransformPtr t1 = Transform::create();    beginEditCP(t1n);    t1n->setCore( t1 );    t1n->addChild( b1n );    endEditCP(t1n);    cam_trans = t1;    // light        NodePtr dlight = Node::create();    DirectionalLightPtr dl = DirectionalLight::create();    beginEditCP(dlight);    dlight->setCore( dl );    endEditCP(dlight);        beginEditCP(dl);    dl->setAmbient( .3, .3, .3, 1 );    dl->setDiffuse( 1, 1, 1, 1 );    dl->setDirection(0,0,1);    dl->setBeacon( b1n);    endEditCP(dl);    // root    root = Node::create();    GroupPtr gr1 = Group::create();    beginEditCP(root);    root->setCore( gr1 );    root->addChild( t1n );    root->addChild( dlight );    endEditCP(root);    // Load the file    NodePtr file = NullFC;        if ( argc > 1 )        file = SceneFileHandler::the().read(argv[1]);        if ( file == NullFC )    {        cerr << "Couldn't load file, ignoring" << endl;        file = makeTorus( .5, 2, 16, 16 );    }        file->updateVolume();    Vec3f min,max;    file->getVolume().getBounds( min, max );        cout << "Volume: from " << min << " to " << max << endl;    beginEditCP(dlight);    dlight->addChild( file );    endEditCP(dlight);    cerr << "Tree: " << endl;//  root->dump();    // Camera        cam = PerspectiveCamera::create();    cam->setBeacon( b1n );    cam->setFov( deg2rad( 90 ) );    cam->setNear( 0.1 );    cam->setFar( 100000 );    // Background    SolidBackgroundPtr bkgnd = SolidBackground::create();    // Viewport    vp = Viewport::create();    vp->setCamera( cam );    vp->setBackground( bkgnd );    vp->setRoot( root );    vp->setSize( 0,0, 1,1 );    // Window    cout << "GLUT winid: " << winid << endl;    GLUTWindowPtr gwin;    GLint glvp[4];    glGetIntegerv( GL_VIEWPORT, glvp );    gwin = GLUTWindow::create();    gwin->setId(winid);    gwin->setSize( glvp[2], glvp[3] );    win = gwin;    win->addPort( vp );    win->init();    // Action        ract = DrawAction::create();    // tball    Vec3f pos( 0, 0, max[2] + ( max[2] - min[2] ) * 1.5 );    tball.setMode( Trackball::OSGObject );    tball.setStartPosition( pos, true );    tball.setSum( true );    tball.setTranslationMode( Trackball::OSGFree );    // run...        glutMainLoop();        return 0;}