Hi Ulrich, You'd need to be able to get access to the GLX/GLW etc handle for the context to be able to do this, something I think that SDL probably hides.
For this type of work you really should not use SDL, it really isn't and API that scales well to handling things like threading or multi-context work. The inbuilt features of osgViewer are much better for doing this, SDL offers nothing extra - only restrictives relative to what the inbuilt window support can provide. The only reason to use SDL in the context of the OSG is for doing device handling such as joysticks or basic audio. Robert. On Mon, May 25, 2009 at 11:19 AM, Ulrich Hertlein <[email protected]> wrote: > Hi all, > > does anybody know if it's possible to create an osg::GraphicsContext that's > sharing an existing OpenGL context (created by SDL, i.e. not wrapped in > another GraphicsContext)? > > What I'm trying to solve is: > - SDL creates an OpenGL context > - create an osgViewer that's sharing the SDL OpenGL context (pass the > context pointer as traits->sharedContext?) > - the OSG context should be off-screen if possible > - OSG would then render a FBO camera to an attached texture and the texture > ID could > be used in SDL to display the result > - the point is to avoid OGL state conflicts between the existing app and OSG > > Any comments, ideas, etc. are welcome. > > Cheers, > /ulrich > _______________________________________________ > 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

