# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
> I cannot make a simple program work with multiple canvases. Either
> only one canvas displays (usually the last one drawn to), or neither of
> them does.
>
> I'm doing something along the lines of:
>
> glXMakeCurrent( fl_get_display(), fl_get_canvas_id( canvas1
> ),
> fl_get_glcanvas_context( canvas1 ) );
>
> < .. GL CODE HERE .. >
>
> glXSwapBuffers ( fl_get_display(), glXGetCurrentDrawable ( ) );
>
>
> I use something similar in each Expose callback.. and both callbacks
> are called, but only the second one produces a picture. Is this
> something I"m doing or a problem with Mesa perhaps? Or maybe glX? I'm
> out of ideas.
Dunno. Mesa is a pretty close approximation of OpenGL and if things
are as you say, it should work. I have applications which I used to
run under Mesa with multiple windows and multiple `GLXContext's and
they worked just fine.
It's possible that somehow Mesa and your app are mutually confused as
to what the current Drawable is for some reason. You might try
glXSwapBuffers( fl_get_display(), FL_ObjWin( canvas ) );
rather than what you show. That may help.
If you can reduce the problem to a simple example, you might post it
and let the list take a look.
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Sun Jan 30 2000 - 19:49:41 EST