Hi, I have a very strange problem. I've written an FLTK application, which use the viewer (pretty similar to the FLTKViewer in the OSG examples), that compose and show LOD models. I can load multiples models and I inserted these models as childs of an osg::LOD node. Then, I've tried to write the LOD model into a file using writeObject method and ref_ptr original LOD pointer as first parameter.
Now, I've a strange behaviour. In the viewer ALL WORKS FINE, I can see the models switch and all relatives textures correctly. The written LOD model is correct in terms of meshes (I see the correct models transition when the bound is reached) but there is a very strange problem with the textures (assuming to use 2 models): 1. If I DON'T switch between near and middle object in the viewer, then the LOD model written have NO TEXTURE for the NEAR object, but have the CORRECT texture for the second model! 2. If I SWITCH between near and middle object in the viewer, then I see NO TEXTURE for all LOD objects models. I've tried to disable the my_viewer->setSceneData(LOD_model_pointer) (and the Fl::redraw() idle action), so that I can't view the models loaded in the viewer. In this case, the LOD written model is correct!!! There are all textures!!! I've tried also writing the LOD model without using the graphical application (this is rougly the same test...) and, obviously, all works fine!!! So, seems that if an object is visualized under the viewer, then the writeObject method don't writes the textures informations, otherwise is ok. In effects, the near model is ever showed as first and so don't ever has the textures. The viewer "locks" the texture informations...?!? This is very strange for me... Can you help me? Many thanks! Thank you! Cheers, Dario ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31019#31019 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

