Werner, OSG does "lazy" state updates (only changes an OpenGL state when needed). Therefore, if you change the OpenGL state directly (with your pure OpenGL code) then you have to inform OSG that you have done this. Otherwise OSG will assume the state is as it left it and things will get screwed up. There are functions in osg::State (I think) that allow you to inform OSG what state changes you have made. Another way is to use glPushAttribute/glPopAttribute around your code so that the state changes you make are put back when you're done.
Corbin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 24, 2006 7:48 AM To: [email protected] Subject: [osg-users] Strange texture problem Hello there. We are now very close to have ported every aspect of our application to run on the OSG platform One "strange" problem we have encountered is with regard to texture settings. In our old application we have a material/texture editor. In order to get a preview of how the material will look in 3D, we implemented a simpel "pure" OpenGL view of a small spinning object with the material/texture applied to it. Now it seems like this preview is affecting our OSG view. The way it is affected, is that in some areas, the textures are not used at all on our objects. In other areas the wrong texture is applied, even though the input to OSG is correct. The OSG view is using Producer to handle the OpenGL context switching etc. Will our "pure" OpenGL implementation interfere with the context(s) used in Producer? As a test we ran our application without the material/texture view, and all seemed to work well. Regards, Werner Lindgård. _______________________________________________ Werner Lindgård, Programmerer Telephone +47 67 81 70 00 Direct line +47 67 81 70 68 [EMAIL PROTECTED] ViaNova Systems AS Leif Tronstads Plass 4, P.O.Box 434 N-1302 Sandvika, Norway ________________________________________________ http://www.vianova.no http://www.novapoint.com ________________________________________________ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
