[cairo] new pattern interface and OpenGL patch

Bill Spitzak spitzak at d2.com
Thu Mar 25 18:43:34 PST 2004


On Monday 22 March 2004 06:43 pm, Carl Worth wrote:
>     +XVisualInfo *
>     +cairo_glx_find_best_visual_info (Display *dpy,
>     +                                 int screen,
>     +                                 int options);
>
> What's this function? It seems a bit out of place.

This is an annoying problem with many of the GLX implementations, such as 
Irix.

Bascally they encode some OpenGL options, such as the existence of the 
backing or alpha or accumulation buffers, into the visual id. You must create 
a window with the correct visual in order to use certain OpenGL operations. 
This is unbelievably annoying as you must know about OpenGL and X visuals in 
code that otherwise should not care one bit about it. He probably felt that 
this call was needed as only the Cairo OpenGL backend really knows that 
OpenGL options are needed and thus only it can produce the visual ID.

As far as I can tell XFree86 and other Linux X implementations do not have 
this problem. You can pretty much draw OpenGL into any X window and still get 
backing buffers and anything else at any time. It may be best to say that 
this is a defect in those X servers, and Cairo should not be providing calls 
just to work around them.

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list