Julian Looser wrote:
Hi,
I have a question about osg::Textures. In my program I load an IVE
file with embedded textures. Once it is loaded, I traverse the
subgraph with a custom visitor which inspects each osg::StateSet. I
find osg::Textures within these statesets, and I want to get the
filenames for the images the textures are using.
I thought I had this working as a bunch of test models loaded and
were analysed correctly. However, for some models, the textures are
found, but if I call getImage(n) on the texture, NULL is returned.
The texture looks fine in the viewer, so I know the image data has
been loaded at some point.
Shouldn't an osg::Texture loaded from an image file always have a
valid osg::Image you can access?
No, there is an option to unreference an image after it has been
applied. Search in the headers for UnRefImageDataAfterApply. This means
the CPU image can be deallocated after GL has the texture.
jp
Why would this work for some models and not others? Is it a
difference in the loaders for different image formats?
Cheers, Julian
------------------ Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18997#18997
_______________________________________________ osg-users mailing
list [email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org