I have been busy playing with this. You can have an osgViewer embedded in a
FLTK window. I haven't tried to render with multiple threads yet, but it
works for a single thread. You can draw FLTK windows in multiple threads but
you have to use a mutex (part of the FLTK system) so you can only draw in
one window at a time. I am not sure if this also applies to OpenGL (and thus
OSG) drawing in FLTK windows.

Under Linux (and Windows I think) you can have an OSG window that processes
OSG events in a separate thread from your FLTK window in the FLTK thread
processing FLTK events. This approach does not work on the Mac, and I'm not
entirely sure why. I had to combine my two event processing threads into one
to get it to work on the Mac. One annoying limitation in this approach is
that if you are selecting an FLTK menu, OSG rendering stops in your other
window. There seems to be no way around this.

I am playing with an improved FLTK viewer which expands upon the
osgviewerFLTK example, but it is still in progress.

-Eric

On Tue, Apr 14, 2009 at 12:03 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC <shayne.tuel...@hill.af.mil> wrote:

>  Another question…
>
>
>
> Can you have an osgViewer embedded in a FLTK windowing framework? If so,
> can osgViewer still render with multi-threading? I know there are some
> limitations along this line when an osgViewer is embedded in a GLUT window.
> I’m wondering if having an osgViewer in a FLTK window suffers from the same
> limitations…
>
>
>
> Any input would be appreciated…
>
>
>
> -Shayne
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to