The FAQ is for 1.2 http://www.vis-sim.com/osg/osg_faq_1.htm#f40 so it may be
different for 2.x not, I'm still stuck on 1.2 until the new year

 

But you can push all bits along the lines of 

 

glPushAttrib( GL_ALL_ATTRIB_BITS );

 

glMatrixMode( GL_PROJECTION );

 

glPushMatrix();

 

glMatrixMode( GL_TEXTURE );

 

glPushMatrix();

 

glMatrixMode( GL_MODELVIEW );

 

glPushMatrix();

 

//

//........................

//

 

Your code here...

 

//

//........................

//

 

glMatrixMode( GL_TEXTURE );

 

glPopMatrix();

 

glMatrixMode( GL_PROJECTION );

 

glPopMatrix();

 

glMatrixMode( GL_MODELVIEW );

 

glPopMatrix();

glPopAttrib();


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dorosky,
Christopher G
Sent: Wednesday, November 21, 2007 11:33 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Mixing GL


yup. I might be missing something though.
Don;'t know intelligent way to do other than to push each mode,attr, then
pop them.
Is there an overall one?
 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Tuesday, November 20, 2007 5:50 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] Mixing GL


Have you tried pushing and popping around the call to your OpenGL code?
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dorosky,
Christopher G
Sent: Tuesday, November 20, 2007 3:29 PM
To: OpenSceneGraph Users
Subject: [osg-users] Mixing GL


Hi all,
 
What is the easiest way to protect myself from a GL app that I am calling
that isn't cleaning up after itself?
I think that it is changing the states or attrs, or vertex arrays or
something, so that osg lazy eval gets messed up.
 
We have called
state::dirtyAllModes
dirtyAllAttributes
dirtyAllVertexArrays()
 
but it doesn't seem enough.
 
Maybe we are missing a state.
 
Is there either a getAllStates() that we can call to do this to, or a
disableLazyEval, or something?
 
Thanks,
 
Chris

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to