Hi Zoltan,

SDL is design around single threaded, single context model for doing
windowing, for a general purpose and scalable scene graph like the OSG
this is pretty restrictive, so I would recommend using SDL for
windowing, and would suggest one use osgViewer's native windowing
support as this supports multi-threading, multiple graphics context
and pbuffers without any complexity being pushed on the user.

SDL however is good for device support like joysticks, and its use
works just fine with an osgViewer based app, just poll the events from
the frame loop as I previously suggested.

Robert.

On Wed, May 7, 2008 at 2:36 PM, Zoltán <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  there is something I don't understand:
>
>  you say that threading is a complex matter, and if possible
>  better to avoid:
>
>  Robert Osfield wrote on Wednesday 07 May 2008:
>
> > as threading while perfectly doable does add its own
>  > very steep learning curve.
>
>  yet you also said that SDL is not very good because it
>  prevents multi-threading:
>
>  > "Personally I wouldn't recommend SDL for windowing for
>  > serious 3d graphics applications, its just way too
>  > limiting - its really just designed for single threaded,
>  > single context apps."
>  >
>  > http://lists.openscenegraph.org/pipermail/osg-users-opens
>  >cenegraph.org/2007-August/000558.html
>
>  How do I know whether my application needs multi-threading ?
>  Or multiple contexts ?
>  If I have to use SDL anyway (for joystick handling) would
>  that make it automatically single-threaded ?
>  What limitations would SDL impose if I created the window
>  and graphical context with it, for OSG to render in it ?
>
>  What I have is:
>
>     viewer.realize();
>     while ( !viewer.done() && !quit )
>     {
>         [...]
>         if (joystick) inputDev.handleJoystick();
>         [...]
>         viewer.getCamera()->setViewMatrix( CameraMatrix );
>         viewer.frame();
>     }
>
>  If multi-threading is complex, I'll avoid it anyway, so SDL
>  might not limit me in this case.
>
>  I'm a bit confused.
>
>  Zoltán
>
>
>  --
>
>  ____________________________________
>
>  Zoltan
>
>  http://sourceforge.net/projects/zsim
>  ____________________________________
>
>
>
>
>  _______________________________________________
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to