Re: Colormaps, etc. (fwd)

Dr. T.C. Zhao (
Fri, 6 Dec 1996 21:58:29 -0600

To subscribers of the xforms list from "Dr. T.C. Zhao" <> :

From: Mark Lee <>

> int attrib[]={ GLX_RED_SIZE,8, GLX_GREEN_SIZE,8, GLX_BLUE_SIZE,8,
> GLX_DEPTH_SIZE,8, None };
> screen = DefaultScreen(dpy);
> if (!(vis=glXChooseVisual(dpy,screen,attrib)))
> fprintf(stderr,"Error: glXChooseVisual() failed.\n"); {
> return -1;
> }
>and an initial glx context was created with:
> win1_ctx=glXCreateContext(dpy,vis,0,GL_TRUE);

If you use glXMakeCurrent(anycanvaswindow, win1_ctx) you lose.
The configuration used to select the visual is different from the ones
used to create the canvas. If the particular attributes shown are the ones
you want, you can change the canvas attributes to match yours. Basically
the visual/window/context must have the same confiuration and your
code apparently does not. Try to get rid of your own code that
creates context (creating is ok as long as you don't use it)
To unsubscribe, send the message "unsubscribe" to or see