Re: [osg-users] Mixing GL
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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mixing GL
Never mind, just read stephen's post Haven't tried yet though. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dorosky, Christopher G Sent: Wednesday, November 21, 2007 10: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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mixing GL
There's a pretty good example here of mixing systems. You could apply it either way around.. The way I have gnerally done it is to put OSG inside the other applications loop. http://www.3drealtimesimulation.com/osg/osg_faq_1.htm#f40 Not sure how deprecated it is now, but worked for me not so long ago.. Kind regards, Stephen. On Nov 21, 2007, at 6:49 AM, Paul Martz wrote: 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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org