Re: XForms: Handling more than one MESA canvas at the same time

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 14 Nov 97 06:29:25 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I'm developing an application using XForms 0.81 and Mesa 2.1 libraries.
> I tried to use two canvases in different windows at the same time, but the
> result was that only the last canvas shown seem to work, the other seem
> frozen and shows the last image drawn before the second one appeared even
> if I try to update it.
>
> I thought that if I give the correct canvas parameters to the function
> glXSwapBuffer() all should work well, but this seems to be false. So I
> think I miss a GL command, but I don't know which it could be.
> If you have any suggestions I will be happy to follow them. If you have a
> demo source or documentation that explain how to solve my problem I will
> appreciate it too.

I use multiple OpenGL/Mesa Canvases on multiple Windows with very little
difficulty.

Make sure you're drawing to the right GLXContext by always calling
fl_activate_glcanvas() before you start any OpenGL calls.

Make sure that you're flushing and swapping the right canvas with
something like:

fl_activate_glcanvas( canvas );

[... your OpenGL calls here ...]

glFlush();

glXSwapBuffers( fl_get_display(), FL_ObjWin( canvas ) );

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/