rem: pLoader =  dynamic_cast<OSG::Thread *>( ThreadManager::the()->getThread("Loader", "OSGThread") );
add: pLoader = OSG::Thread::get("Loader");
context: int main (int argc, char **argv){    // OSG init    osgInit(argc,argv);    // GLUT init    glutInit(&argc, argv);    glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);    int winid = glutCreateWindow("OpenSG");    glutReshapeFunc(reshape);    glutDisplayFunc(display);    glutMouseFunc(mouse);    glutMotionFunc(motion);    // the connection between GLUT and OpenSG    GLUTWindowPtr gwin= GLUTWindow::create();    gwin->setWinID(winid);    gwin->init();       if ( argc < 2 )    {        FFATAL(("No file given!\n"));        return 1;    }    // create the loader thread    pLoader =  dynamic_cast<OSG::Thread *>(                    ThreadManager::the()->getThread("Loader", "OSGThread") );        if(pLoader == NULL)    {        FFATAL(("Could not create thread\n"));        return 1;    }    // run it, using a separate aspect    pLoader->run(load, 1, (void *) argv[1] );    // wait for it to finish    Thread::join(pLoader);        // success?    if(scene == NullFC)    {        FFATAL(("Could not load %s\n", argv[1] ));        return 1;    }    // merge the changes into our aspect    pLoader->getChangeList()->applyToCurrent();    pLoader->getChangeList()->clearAll();    // create the SimpleSceneManager helper    mgr = new SimpleSceneManager;    mgr->setWindow( gwin );    mgr->setRoot( scene );    mgr->showAll();    // GLUT main loop    glutMainLoop();    return 0;}