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

Steve Lamont (
Fri, 14 Nov 97 06:29:25 PST

To subscribers of the xforms list from (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

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 ...]


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

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: