Hi Robert,

On 25/5/09 12:43 PM, Robert Osfield wrote:
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.

Indeed it does. I was hoping to use the various *GetCurrentContext() functions available on Carbon, Unix, and Windows.

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.

I hear you :-)
But this is for an existing framework/API that otherwise wouldn't have a dependency on OSG and there probably would be a few unhappy people if I suddenly introduce a new dependency as complex as OSG 'just' for the windowing...

- 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

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to