Hi? Could you please sign your name so we know who to address.

Mixing the OSG and OpenGL is a bit awkward due to the OSG using lazy
state updating, so if you don't tell the OSG that you've changed
OpenGL state then it'll not know that it needs resetting.  In
osg::State there are haveApplied*() methods to help you pass on what
details have been changed by your OpenGL app.  One can also use
glPushAttrib/glPopAttrib around your OpenGL code to avoid issues.
Problems with the OSG state being passed into your OpenGL code also
exists, here it'd be useful to apply a fixed StateSet to the top of
your scene graph to set everything in the way you want it.

Robert.

2010/1/22  <[email protected]>:
>  Hi,
>
>  I have been learning the OSG for two months.As the need of my project,I
> would like to combine the OSG and OpenGL in MFC.In my programme,using the
> OpenGL draws the background(such as Terrain) in the main thread and the OSG
> draws the surface features(such as buildings) in the sub thread.When I run
> my programme,I found the result is normal in the first frame,however,from
> the second frame,It can't clear the window and leaves the traces of the
> previous frame.I know that It can be implemented by using the
> preDrawCallback,but the method does not meet the requirement drawing the
> background in the main thread.I have no idea how to do it.Do you have a
> solution to realize this situation? Please help me.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to