Thursday, October 18, 2007

I'm in ur X server adding visuals!

Maybe you've wondered why, when you run xdpyinfo, the X server reports a bunch of identical looking visuals. And in fact, for all xdpyinfo and X cares, they are identical. However, to GLX, the visuals are all different and they give you different features when you use them with OpenGL. Some specify a double buffer, some have a stencil buffer, and some have buffers I don't really know anything about. glxinfo is a good way to find out. In GLX version 1.3 and up, a new mechanism for specifying the configuration of the OpenGL drawable is introduced. Using a so called GLXFBConfig, you can specify, more or less orthogonal to the visual you're using, the OpenGL properties of your drawable.

What I've been working on recently is to clean up the way visuals are initialized and handled in the X server and to disentangle GLX visuals and GLXFBConfigs. There's a lot of nice code clean-up landing and the X server now has a lot less visuals by default. There's a new xorg.conf option that lets you pull in all the visuals or a minimal set if you want. The git version of glxinfo (found in mesa in progs/xdemos) will list GLX visuals and GLXFBConfigs separately now so you can see how the X server sets it up. It's bound to break something, but we'll fix it.

1 comment:

Anonymous said...

Tell us a bit more Kristian!!!

I can't wait to get to play with the work you're doing, redirected DRI, X cleanup, etc.
Seems like X is getting some major work done since the last year or so.