Hi,
thank you for your answer.
I solved using :
osg::Geode* mGeodeWhoHasTexture; // Geode with texture
osg::ref_ptr<osg::Texture2D> mGeodeTexture;
osg::ref_ptr<osg::Image> mOriginalImage; // original image
osg::ref_ptr<osg::Image> mImageOne; // new image
// After image load
...
mGeodeTexture=dynamic_cast<osg::Texture2D*>
(mGeodeWhoHasTexture->getDrawable(0)->getStateSet()->getTextureAttribute(Channel,osg::StateAttribute::TEXTURE));
if (mGeodeTexture.get())
{
mOriginalImage = mGeodeTexture->getImage();
mGeodeTexture->setImage(mImageOne.get());
}
Is there a way to load all the images during start application to avoid
waiting time during image switching?
Beccouse each time i load a new image, i see a rescaling process. (i don't want
to rescale image) that could take some seconds.
Thank you!
Cheers,
Andrea
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44985#44985
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org