hi dirk,
thx for the NegZ hint, i was finally able to load all the six faces... 
I also swapped to makeLatLongSphereGeo primitive. Now the problem is
that my sphere isn't cubemapped... My application just wraps around the
sphere one of the faces (the negx one). Here is my code, is there
anything wrong?

////////////////////////////////////////////////////////
///  diffuse map generation - fasten your seatbelts  ///
///  **********************************************  ///
void DiffuseMapBilder()
{
    CubeTextureChunkPtr cubemap;
    cubemap=CubeTextureChunk::create();
    
    ImagePtr immagine;
    immagine=Image::create();
    
    UInt8 skydataposx[256*256*3];
    LoadImg("0.bmp",skydataposx);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydataposx);
    cubemap->setPosXImage(immagine) ;
    
    UInt8 skydatanegx[256*256*3];
    LoadImg("1.bmp",skydatanegx);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydatanegx);
    cubemap->setNegXImage(immagine) ;

    UInt8 skydataposy[256*256*3];
    LoadImg("2.bmp",skydataposy);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydataposy);
    cubemap->setPosYImage(immagine) ;

    UInt8 skydatanegy[256*256*3];
    LoadImg("3.bmp",skydatanegy);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydatanegy);
    cubemap->setNegYImage(immagine) ;

    UInt8 skydataposz[256*256*3];
    LoadImg("4.bmp",skydataposz);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydataposz);
    cubemap->setPosZImage(immagine) ;

    UInt8 skydatanegz[256*256*3];
    LoadImg("5.bmp",skydatanegz);
    immagine->set (Image::OSG_RGB_PF,256,256, 1, 1, 1, 0, skydatanegz);
    cubemap->setImage(immagine) ;

    cubemap->setMagFilter(GL_NEAREST);
    cubemap->setMinFilter(GL_NEAREST);

    diffCubeMap->addChunk(cubemap);
    
    // DISCONNECTED PROGRAMS
    //diffCubeMap->addChunk(vp);
    //diffCubeMap->addChunk(fp);
             
    MaterialGroupPtr grp = MaterialGroup::create();
        
    grp->setMaterial(diffCubeMap);
    MaterialPtr mat=NullFC;
    mat=grp->getMaterial();

    beginEditCP(geosfera, Geometry::MaterialFieldMask );

    geosfera->setMaterial(mat);
    endEditCP(geosfera, Geometry::MaterialFieldMask );
    printf("Farewell and thank you for the fish\n");
}

now why when i try to display my sphere i find it wrapped just into the
NegXImage? Do i have to set up any of the env parameters? 

second quastion: as u can see my app has 2 disconnected handles to v/f
programs. Even if i uncomment em nothing changes. I am pretty sure that
the loading part is correct, since no error message is prompted. Any
clues?
Thank you enrico



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to