[cairo] glitz, pbuffers, and OpenGL 2.0

David Simmons simmons at davidsimmons.com
Wed Feb 8 07:25:01 PST 2006


[ From my study of the archives, I'm assuming that it's okay to discuss 
glitz on this list. ]

Hi,

I'm using a version of glitz that I checked out from CVS on Jan 16, 
2006, and it doesn't seem to provide pbuffer support on my OpenGL 2.0 
platform -- an ATI Radeon 9550 running in Linux using the ATI fglrx 
8.21.7 driver.  ATI's sample fgl_glxgears pbuffer demo runs without 
complaint.

After some research and testing, my hypothesis is that OpenGL 2.0 / GLX 
1.3 does not advertise the GLX_SGIX_pbuffer and GLX_SGIX_fbconfig 
extensions because they are now part of the standard.  When glitz does 
not detect these extensions, it disables these features.  (I haven't 
studied the OpenGL/GLX specifications yet to see if this is indeed the 
proper behavior.)

I noticed that the SDL folks seem to agree with this hypothesis, as they 
made the following change to their code at some point:
-    if ( ExtensionSupported("GLX_SGIX_fbconfig", glx_extensions) &&
-         ExtensionSupported("GLX_SGIX_pbuffer", glx_extensions) &&
+    if ( ((this->gl_data->glx_version >= MAKE_GLX_VERSION(1, 3)) ||
+          (ExtensionSupported("GLX_SGIX_fbconfig", glx_extensions) &&
+           ExtensionSupported("GLX_SGIX_pbuffer", glx_extensions))) &&

I made two quick'n'nasty hacks to my glitz source to test this, and now 
pbuffers seem to be working properly and hardware accelerated:

1. glitz_glx_extension.c glitz_glx_query_extensions() -- I hard-coded 
the GLITZ_GLX_FEATURE_FBCONFIG_MASK and GLITZ_GLX_FEATURE_PBUFFER_MASK 
features into glx_feature_mask.
2. glitz_glx_info.c _glitz_glx_proc_address_lookup() -- I hard-coded my 
glx_version to be 1.3.  (for whatever reason, glxinfo reports my client 
glx version as 1.3, but my server glx version as 1.2.  No matter... 
fbconfig/pbuffer is present, really!)

David



More information about the cairo mailing list