From: Ong Tze Lin (tzelin++at++sgi.com)
Date: 12/16/2002 22:49:13
Hi
You may want to refer to a post by Don Burns on 8/8/2000...
Tze Lin
--
Ong Tze Lin | Principal Consultant | SGI ASEAN
(D) +65 6771 0219 (F) +65 6779 3650 (H) +65 9832 7125
89 Science Park Drive #03-06 Singapore 118 261
-=-=-
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
> -----Original Message-----
> From: Andrew Kudilczak [mailto:a.kudilczak++at++ugrad.unimelb.edu.au]
> Sent: Tuesday, December 17, 2002 12:25 PM
> To: info-performer++at++sgi.com
> Subject: [info-performer] Widget Library Embedding
>
>
> Hello,
>
> I am working on embedding the view created by the
> pfPipeWindow inside a GL
> canvas from a Widget library (eg. glcanvas in wxwindows)... an idea
> inspired from the Virtual Terrain Project. This would allow
> for the full
> power of a widget library in addition to the Performer
> rendering engine.
>
> I am not sure how to get Performer to render to the canvas
> provided by the
> library and not a seperate window. Setting the GL context for the
> pipewindow causes the program to seg fault. How else can I
> redirect the
> OpenGL commands produced when pfFrame() is called?
>
> System: Debian, kernel 2.4.18, TNT2, Performer 2.5.2, latest
> NV drivers.
>
> Any ideas or help would be much appreciated.
>
> Cheers,
> Andrew
>
>
> --------------------------------------------------------------
> ---------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> --------------------------------------------------------------
> ---------
>
This archive was generated by hypermail 2b29 : Mon Dec 16 2002 - 22:42:21 PST