Hi John,

I have, however, problems with textured models and the composite viewer. When I add a new view after initalization (application has entered the frame loop), the new view (within an QOSGWidet) does not show the textures. It the views are added before entering the frame loop there are no problems.

That's because of the unrefImageDataAfterApply setting. You're probably running the osgUtil::Optimizer on your data after loading it, and this sets this property of osg::Texture(1D, 2D, 3D) to true, which in turn frees the image data the first time the texture is uploaded to the graphics hardware. So when you create a new view (which creates a new graphics context, which requires that all textures be re-uploaded to it) the image data is not available anymore.

You can either not run the optimizer, run it but disable the texture setting optimization, or run just the osgUtil::Optimizer::TextureVisitor again after running the Optimizer the first time, to re-set that property to false.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to