ah, I missread it. from your original post the map texture was not initialized and was used later in the statest. I had to write something like:
osg::ref_ptr<osg::Texture2D> map = new osg::Texture2D; stateset->setTextureAttributeAndModes( 0,map); if you post your code in whole then the chance to get help if higher Nick On Sun, Jun 9, 2013 at 10:29 PM, Gaëtan André <gaetan.an...@gmail.com>wrote: > Hi, > Thank you for the reply. > > I am not quite sure to understand your answer. > > Do you mean I should do this : > > //does not display the texture > osg::StateSet* stateset = HUD_camera->getOrCreateStateSet(); > osg::ref_ptr<osg::Texture2D> lm = new osg::Texture2D; > stateset->setTextureAttributeAndModes( 0,map); > lm->setImage(map->getImage()); > stateset->setTextureAttributeAndModes( 0,lm); > > > Seems quite odd to me. > > Cheers, > > Gaëtan[/quote] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=54503#54503 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org