Re: Colormaps, etc.

Mark Lee (mlee@heartlab.rri.uwo.ca)
Wed, 4 Dec 1996 17:43:01 -0500 (EST)

To subscribers of the xforms list from Mark Lee <mlee@heartlab.rri.uwo.ca> :

Hi All,

I have written a program that opens a glcanvas (on a form) and displays
an image under Xforms 0.81 (Irix 5.3). If another image is loaded the form is
hidden and then resized using:

fl_set_form_size(fd_image_form->image_form,im.xsize+45,im.ysize+130);
fl_set_object_size(fd_image_form->image_box,im.xsize+45,im.ysize+130);
fl_set_object_size(fd_image_form->gl_canvas1,im.xsize,im.ysize);
fl_set_object_size(fd_image_form->Window_width,im.xsize+15,20);
fl_set_object_size(fd_image_form->Window_centre,im.xsize+15,20);
fl_set_object_position(fd_image_form->Window_width,15,im.ysize+45);
fl_set_object_position(fd_image_form->Window_centre,15,im.ysize+85);

fl_show_form(fd_image_form->image_form,FL_PLACE_GEOMETRY,FL_FULLBORDER," Video Window ");
win1=fl_get_canvas_id(fd_image_form->gl_canvas1);
XSetWindowColormap(dpy,win1,cmap);
glXMakeCurrent(dpy,win1,win1_ctx);
fl_set_canvas_colormap(fd_image_form->gl_canvas1,cmap);
fl_redraw_form(fd_image_form->image_form);

This all works and the images are displayed correctly in a framed form;
however, when I run this program on a remote machine and display it
on my local machine (Yes both machines have GLX extensions
Indy->Indigo^2) a GLXBadCurrentWindow error occurs. That is the first
image displays correctly but when a different size image is loaded
afterwards this error message is displayed.

X Error of failed request: GLXBadCurrentWindow
Major opcode of failed request: 139 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 535
Current serial number in output stream: 535

If anyone has any advice on why when remote display is used a
GLXBadCurrentWindow error occurs I would be appreicate it.

-Thanks

Mark

(Also when I display it on a Linux Machine runnig MetroX OGL A forms
error can't get visual and can't initialize glcanvas error occurs every
so often)

__
________/\ \ __ Mark Lee "There is thin line between
/\ __ __ \ \/\_\ mlee@irus.rri.uwo.ca Genuis and Insanity and
\ \ \ \ \ \ \/ / / Advanced Imaging Group I'm stuck in a singularity"
\ \ \ \ \ \_\/ / Robarts Research Institute
\/_/\/_/\/___/ London, Ontario Canada

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html