Hi Xformers,
I just added another GL canvas to my application. The xforms manual says
to switch the graphics context using fl_activate_glcanvas(FL_OBJECT *ob),
but that gives me an X error. Here's the expose handler of the new canvas
(which I register after showing the form with the canvas on it):
int sl_canvas_expose(FL_OBJECT *ob, Window win, int w, int h, XEvent *xev,
void *ud) {
/* handler for slicer canvas Expose */
/* activate slicer canvas */
fl_activate_glcanvas(FMem.sl_xf->canvas);
/* clear canvas */
glClear(GL_COLOR_BUFFER_BIT);
/* display canvas by swapping buffers */
glXSwapBuffers(fl_display, fl_get_canvas_id(FMem.sl_xf->canvas));
/* reactivate main canvas */
fl_activate_glcanvas(FMem.main_xf->canvas);
return 0;
}
and this is the error (generated on first expose, as far as I can tell):
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 143 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 1637
Current serial number in output stream: 1637
Anybody know what's wrong?
Thanks, Dennis
_________________________________________________
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/