[osg-users] Textures and Images
jason at digitalartforms.com
Mon Nov 2 10:30:56 PST 2009
I recently had similar issues. There are multiple ways to store textures in
the model. You can convert your model to .osg format and look to see how
the textures are stored in your model. And/or have your code try all the
possibilities until you no longer get NULL.
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Julian
Sent: Sunday, November 01, 2009 1:16 PM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Textures and Images
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
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?
Why would this work for some models and not others? Is it a difference in
the loaders for different image formats?
Read this topic online here:
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users