some more info: the texture is generated with:

Code:
osg::TextureCubeMap* generateTexture()
{
    // 2D image texture
    osg::TextureCubeMap* texture = new osg::TextureCubeMap;
    // load  images
    osg::Image* frontTextureImage = 
osgDB::readImageFile("./texture/frontLarge.png");
    osg::Image* backTextureImage = 
osgDB::readImageFile("./texture/backLarge.png");
    osg::Image* leftTextureImage = 
osgDB::readImageFile("./texture/leftLarge.png");
    osg::Image* rightTextureImage = 
osgDB::readImageFile("./texture/rightLarge.png");
    osg::Image* topTextureImage = 
osgDB::readImageFile("./texture/topLarge.png");
    osg::Image* bottomTextureImage = 
osgDB::readImageFile("./texture/bottomLarge.png");

    // Assign the texture to the imagesread from file:
    texture->setImage(osg::TextureCubeMap::POSITIVE_X,leftTextureImage);
    
texture->setImage(osg::TextureCubeMap::NEGATIVE_X,rightTextureImage);//swapped 
left and right to be consistent with OSG's throats orientation
    texture->setImage(osg::TextureCubeMap::POSITIVE_Y,backTextureImage);
    texture->setImage(osg::TextureCubeMap::NEGATIVE_Y,frontTextureImage);
    texture->setImage(osg::TextureCubeMap::POSITIVE_Z,topTextureImage);
    texture->setImage(osg::TextureCubeMap::NEGATIVE_Z,bottomTextureImage);

    return texture;
}


 and in the main I have:

Code:
   
    osg::TexGen *tg = new osg::TexGen;
    tg->setMode(osg::TexGen::OBJECT_LINEAR);

    // Create a StateSet with default settings:
    osg::StateSet* stateOne = new osg::StateSet();

    
stateOne->setTextureAttributeAndModes(0,generateTexture(),osg::StateAttribute::ON);
    stateOne->setTextureAttributeAndModes(0, tg, osg::StateAttribute::OVERRIDE 
| osg::StateAttribute::ON);



Can anyone suggest why would this stop working properly after the update? 
Cheers,
Maurizio.


PS the frontLarge.png does not display correctly in the forum preview.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18919#18919





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to