Required background reading for this topic comes from a June 16 2010 post by Tim
Moore with subject line: "articles on StateSet, State, and StateGraph".
Check out these two URLs:
http://www.bricoworks.com/articles/stateset/stateset.html
http://www.bricoworks.com/articles/stategraph/stategraph.html
That might not answer your questions, but it's required reading and quite
informative.
I'd also advise you to review the RenderStage.cpp source code, which is where
OSG sets much of the state that you're concerned with.
-Paul
On 12/27/2011 10:06 AM, Sean O'Connell wrote:
Hi,
I'm a little stuck on solving an issue related to integrating a standalone
OpenGL-based API with a simple OSG demo. The OpenGL library sets some states
in the background, specifically: framebuffer object, multisampling, stencil
tests, scissor tests and viewport settings. How do I tell OSG to use these
default settings when it runs?
The OpenGL library essentially dictates to my application N view points to
render the scene from, so it passes back to me projection and modelview
matrices and assumes that I don't change certain states after that point (which
include the ones I described above). After I pass the matrices to the current
Camera class object, how/where would I tell OSG not to change the bound
framebuffer, mess with enabling/disabling multisampling, and the other OpenGL
states I mentioned?
I've read that you can integrate OSG into an existing OpenGL application that
creates its own window and sets state, but I can't seem to find an example to
show me how to do what I need.
Thank you!
Cheers,
Sean
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org