rem: cerr << "Cylinder Node: " << hex << objects[4] << endl;
add: std::cerr << "Cylinder Node: " << std::hex << objects[4] << std::endl;
context: int main (int argc, char **argv){    // GLUT init    osgInit(argc, argv);    FieldContainerPtr pProto = Geometry::getClassType().getPrototype();    GeometryPtr pGeoProto = GeometryPtr::dcast(pProto);    if(pGeoProto != NullFC)    {        pGeoProto->setDlistCache(true);    }    glutInit(&argc, argv);    glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);    glutCreateWindow("OpenSG");    glutKeyboardFunc(key);    glutReshapeFunc(resize);    glutDisplayFunc(display);           // glutMouseFunc(mouse);       // glutMotionFunc(motion);         glutIdleFunc(display);    glMatrixMode( GL_PROJECTION );    glLoadIdentity();    gluPerspective( 60, 1, 0.1, 10 );    glMatrixMode( GL_MODELVIEW );    glLoadIdentity();    gluLookAt( 3, 3, 3,  0, 0, 0,   0, 0, 1 );        glPointSize( 3 );        glEnable( GL_DEPTH_TEST );    glEnable( GL_LIGHTING );    glEnable( GL_LIGHT0 );    glClearColor( .3, .3, .8, 1 );    // OSG        // create a material (need that to test textures)        SimpleMaterialPtr mat;          mat = SimpleMaterial::create();    mat->setDiffuse( Color3f( 1,.8,.8 ) );    mat->setAmbient( Color3f( 0.1,0.1,0.1 ) );    mat->setSpecular( Color3f( 1,1,1 ) );    mat->setShininess( 20 );    // Texture chunk        UChar8 imgdata[] =         {  255,0,0,128,  0,255,0,128,  0,0,255,255,  255,255,255,255 };    Image image( Image::OSG_RGBA_PF, 2, 2, 1, 1, 1, 0, imgdata );    if ( argc > 1 )        image.read( argv[1] );        TextureChunkPtr xchunk;    xchunk = TextureChunk::create();    xchunk->setImage( &image );    xchunk->setMinFilter( GL_NEAREST );    xchunk->setMagFilter( GL_NEAREST );    xchunk->setWrapS( GL_REPEAT );    xchunk->setWrapT( GL_REPEAT );    xchunk->setEnvMode( GL_MODULATE );    mat->addChunk( xchunk );    // create the objects    objects[0] = makePlane( 1, 1, 2, 2 );    GeometryPtr::dcast(objects[0]->getCore())->setMaterial( mat );    cerr << "Plane Node: " << hex << objects[0] << endl;     unsigned int ntris = 0;    unsigned int nquads = 0;    unsigned int ngons = 0;    for(osg::FaceIterator fi =             GeometryPtr::dcast(objects[0]->getCore())->beginFaces();          fi != GeometryPtr::dcast(objects[0]->getCore())->endFaces(); ++ fi )    {        if ( fi.getLength() == 3 )            ntris ++ ;        else             if ( fi.getLength() == 4 )                nquads ++ ;            else                ngons ++ ;    }    fprintf(stderr, "ntris %d nquads %d ngons %d\n", ntris, nquads, ngons);    objects[1] = makeCone( 2.5, 2, 20, true, true );    GeometryPtr::dcast(objects[1]->getCore())->setMaterial( mat );    cerr << "Cone Node: " << hex << objects[1] << endl;    objects[2] = makeTorus( .6, 2, 8, 16 );    GeometryPtr::dcast(objects[2]->getCore())->setMaterial( mat );    cerr << "Torus Node: " << hex << objects[2] << endl;    objects[3] = makeSphere( 3, 1 );    GeometryPtr::dcast(objects[3]->getCore())->setMaterial( mat );    cerr << "Sphere Node: " << hex << objects[3] << endl;        objects[4] = makeCylinder( 3, 2, 20, true, true, true );    GeometryPtr::dcast(objects[4]->getCore())->setMaterial( mat );    cerr << "Cylinder Node: " << hex << objects[4] << endl;        objects[5] = makeConicalFrustum( 3, 2, 1, 3, true, true, true );    GeometryPtr::dcast(objects[5]->getCore())->setMaterial( mat );    cerr << "Frustum Node: " << hex << objects[5] << endl;    objects[6] = makeBox( 4, 3, 2, 4, 3, 2 );    GeometryPtr::dcast(objects[6]->getCore())->setMaterial( mat );    cerr << "Box Node: " << hex << objects[6] << endl;    objects[7] = makeLatLongSphere( 16, 32, 1 );    GeometryPtr::dcast(objects[7]->getCore())->setMaterial( mat );    cerr << "LatLongSphere Node: " << hex << objects[7] << endl;        // try the vertex normal calc    //OSG::GeometryPtr pGeo = dcast<GeometryPtr>(objects[3]->getCore());    //calcVertexNormals(pGeo);    // Normals        // normals material        SimpleMaterialPtr nmat;             nmat = SimpleMaterial::create();    nmat->setEmission( Color3f( 0,1,0 ) );        for ( UInt16 i = 0; i < nobjects; i++ )    {        normalobjects[i] = getNormals(            GeometryPtr::dcast(objects[i]->getCore()), .5);        GeometryPtr::dcast(normalobjects[i]->getCore())->setMaterial(nmat);    }        //     // The action    win = GLUTWindow::create();    win->init();        dact = DrawAction::create();    dact->setWindow( win.getCPtr() );    dact->setFrustumCulling( false );    glutMainLoop();        return 0;}