Re: FLTK

New Message Reply Date view Thread view Subject view Author view

From: Don Burns (don_burns++at++peru.engr.sgi.com)
Date: 08/08/2000 15:18:59


On Aug 8, 11:06am, Dimi wrote:
> Subject: FLTK
>
> Hi,
> does anyone know how to set up fltk for use with performer ?
> A source example would be perfect.

There are often questions about how to use Performer with various types of
toolkits. There is a principle which, once learned, will enable the user to
use Performer with anything out there that can create an XWindow.

Follow these steps:

    1. Establish shared memory information between the Performer process
       and the GUI (or whatever) process. In this shared memory block, include
       a variable that will contain the X id of the window intended for
drawing.

    2. Fork the GUI process. This process may have the capability for creating
       a drawable with the correct visuals, etc. For motif there is the
       glxWidget, in FLTK, there is Fl_Gl_Window. Set the shared memory
       variable with the X Window ID of the drawable.

       If your particular toolkit does not create an OpenGL drawable, then you
       can create it yourself a'la glut, tk, aux, roll-yer-own. Examples are
        at /usr/share/src/OpenGL/toolkits (in IRIX).

    3. In the Performer APP process, spin and wait for the Xid of the drawable
        to be set correctly in the shared memory block.

    4. In Performer, create the pfPipeWindow class, and pass to it the drawble
       ID as follows:

        pw->setWSDrawable(pfGetCurWSConnection(), shared_memory->drawable_xid
);

Voila.

Attached is an FLTK example for those who need the explicit help. Works both
in Irix and Linux. I chose to create my own rendering window rather than use
Fl_Gl_Window due to different behavior in Irix and Linux. Spins our favorite
bovine.

-don




New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 08 2000 - 15:19:46 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.