rem: (setGeoMaterial));
add: (setMaterial));
context: int main(int argc, char **argv){    osgInit(argc,argv);    // GLUT init    glutInit(&argc, argv);        glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);        glutCreateWindow("OpenSG");        glutReshapeFunc(reshape);    glutDisplayFunc(display);    glutIdleFunc(display);    glutMouseFunc(mouse);    glutMotionFunc(motion);    glutKeyboardFunc(keyboard);    PassiveWindowPtr pwin=PassiveWindow::create();    pwin->init();    // create the scene    NodePtr scene;        if(argc > 1)    {        scene = SceneFileHandler::the().read(argv[1]);    }    else    {        // scene = makeTorus(.5, 3, 16, 16);        scene = makeSphere(3, 1);    }    // create the cube reflection material    cuberefmat = SimpleMaterial::create();        ttransform = TextureTransformChunk::create();        CubeTextureChunkPtr cubetex = CubeTextureChunk::create();    setTestCubeImages(cubetex);        TexGenChunkPtr texgen = TexGenChunk::create();    beginEditCP(texgen);    texgen->setGenFuncS(GL_REFLECTION_MAP_ARB);    texgen->setGenFuncT(GL_REFLECTION_MAP_ARB);    texgen->setGenFuncR(GL_REFLECTION_MAP_ARB);       endEditCP(texgen);      beginEditCP(cuberefmat);    cuberefmat->setDiffuse( Color3f( .8,.8,.8 ) );    cuberefmat->setAmbient( Color3f( .5,.5,.5 ) );    cuberefmat->setSpecular( Color3f( 1,1,1 ) );    cuberefmat->setShininess( 30 );    cuberefmat->addChunk(cubetex);    cuberefmat->addChunk(ttransform);    cuberefmat->addChunk(texgen);     endEditCP(cuberefmat);        // set all geos to use the cube reflection material    traverse(scene,              osgTypedFunctionFunctor1CPtrRef<Action::ResultE, NodePtr>             (setGeoMaterial));    // create the SimpleSceneManager helper    mgr = new SimpleSceneManager;    // create the window and initial camera/viewport    mgr->setWindow(pwin );    // tell the manager what to manage    mgr->setRoot  (scene);        // show the whole scene    mgr->showAll();    mgr->redraw();       // GLUT main loop    glutMainLoop();    return 0;}