Robert Osfield wrote:
> Hi Uli,
>
> Perhaps another solution would be to render the OSG scene to a a
> pbuffer and then use the pbuffer as a texture source for the original
> graphics context. This would isolate the OSG and your own OpenGL
> context completely from each other.
>
> Robert.
>
>
> On Fri, Jan 23, 2009 at 9:56 AM, Ulrich von Zadow
> <> wrote:
>
> > Hi,
> >
> > we are using OSG here to render into an OpenGL context created outside of
> > OSG. The application renders some stuff into the context, then OSG renders
> > its scene graph, and then the application renders some more things on top of
> > what OSG has rendered. This raises some state management questions.
> >
> > Here is some pseudocode that shows what we're doing:
> >
> > void render()
> > {
> > renderApplicationScene();
> >
> > pushGLState();
> > hackToSetStateToWhatOSGExpects();
> >
> > m_pSceneView->update();
> > m_pSceneView->cull();
> > m_pSceneView->draw();
> >
> > popGLState();
> >
> > renderMoreApplicationStuff();
> > }
> >
> > This works, but the line that sais 'hackToSetStateToWhatOSGExpects()'
> > bothers me ;-). Is there a way to tell OSG to set the OpenGL state in a
> > non-lazy fashion once?
> >
> > Some background: This is a plugin for the 2d engine libavg that places an
> > OSG scene graph inside of the 2d scene graph that libavg uses. libavg itself
> > has no dependency on OSG and it's rendering state should be completely
> > independent of the OSG state.
> >
> > Any ideas?
> >
> > Thanks,
> >
> > Uli
> >
> > --
> > Ulrich von Zadow
> > Software Engineer (Dipl. Inf.)
> > Exhibit Development
> >
> > Tel +49 (0)30 / 2000 577 12
> > Fax +49 (0)30 / 2000 577 20
> > Skype: uzadow
> >
> > Archimedes Solutions GmbH
> > SaarbrüŸcker Str. 24 10405 Berlin
> >
> > www.archimedes-solutions.com
> >
> > GeschŠftsfŸührung:
> > A. Valder | D. Feser | W. Rien | J. Schmidtsiefen | S. Spenling
> >
> > Amtsgericht: Berlin Charlottenburg
> > HR Nr.: 107563 B
> > UST-ID Nr.: DE-253.771.793
> >
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ------------------
> Post generated by Mail2Forum
If I use pbuffer, I can still keep osg manipulator somewhere?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=8908#8908
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org