Hi Gaëtan,
If you are assigning a new Image to an already existing and possibly
bound texture, try to set the image dirty.
Secondly, you might want to try to set the texture explicitly to:
stateset->setTextureAttributeAndModes( 0,map, osg::StateAttribute::ON |
osg::StateAttribute::OVERRIDE);
Cheers
Sebastian
Hi,
I am trying to understand how texture ande Image are working
//some initialized texture with contents
osg::ref_ptr<osg::Texture2D> map
//displays correctly the texture
osg::StateSet* stateset = HUD_camera->getOrCreateStateSet();
stateset->setTextureAttributeAndModes( 0,map);
//does not display the texture
osg::ref_ptr<osg::Texture2D> lm = new osg::Texture2D;
lm->setImage(map->getImage());
stateset->setTextureAttributeAndModes( 0,lm);
Why ?
Thank you!
Cheers,
Gaëtan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54501#54501
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org