By the way while I have your attention is this how you would do a visitor to
access all images?
Code:
void ImageResizeVisitor::apply(osg::Node& node)
{
osg::StateSet* ss = node.getStateSet();
if ( ss )
{
osg::StateAttribute* sa =
ss->getAttribute(osg::StateAttribute::TEXTURE);
for( int j = 0; j < ss->getNumTextureAttributeLists(); j++ )
{
osg::Texture2D* tex = dynamic_cast<osg::Texture2D*>(
ss->getTextureAttribute(j, osg::StateAttribute::TEXTURE) );
if( tex )
{
for(int i = 0; i < tex->getNumImages(); i++)
{
osg::Image* im = tex->getImage(i);
It works but took quite a while to tease the images out.
------------------------
http://www.hrwallingford.com/facilities/ship-simulation-centre
(http://www.hrwallingford.com/facilities/ship-simulation-centre)
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65887#65887
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org