[cairo] glitz, pbuffers, and OpenGL 2.0

David Reveman davidr at novell.com
Tue Feb 14 06:43:56 PST 2006


It should be fixed now.

Thanks,

-David

On Mon, 2006-02-13 at 19:56 -0700, David Simmons wrote:
> Your modification fixes one part of the problem -- the GLX 1.2/1.3 
> issue.  However, I still can't use pbuffers because the pbuffer 
> extension is not being advertised and flagged as a feature in glitz.  If 
> I add a few lines to force the fbconfig and pbuffer flags to be set, as 
> shown below, pbuffers work fine.
> 
> David
> 
> diff -Nru glitz-20060213.orig/src/glx/glitz_glx_extension.c 
> glitz-20060213/src/glx/glitz_glx_extension.c
> --- glitz-20060213.orig/src/glx/glitz_glx_extension.c   2006-02-10 
> 02:04:32.000000000 -0700
> +++ glitz-20060213/src/glx/glitz_glx_extension.c        2006-02-13 
> 19:41:37.000000000 -0700
> @@ -73,6 +73,11 @@
>             /* ATI's driver emulates GLX 1.3 support */
>             if (!strncmp ("ATI", vendor, 3))
>                 screen_info->glx_version = 1.3f;
> +
> +           /* ATI's latest driver supports fbconfig and pbuffer,
> +              although they are not advertised as extensions. */
> +           screen_info->glx_feature_mask |= 
> GLITZ_GLX_FEATURE_FBCONFIG_MASK;
> +           screen_info->glx_feature_mask |= GLITZ_GLX_FEATURE_PBUFFER_MASK;
>         }
>      }
>  }
> 
> 
> David Reveman wrote:
> > Hey,
> >
> > I know that ati's driver has support for pbuffers even though they don't
> > have server side GLX 1.3. I've committed some code that checks if vendor
> > string starts with ATI and assumes GLX 1.3 if that's true. I haven't
> > tested it yet, let me know if it doesn't work for you.
> >
> > -David
> >
> > On Wed, 2006-02-08 at 08:25 -0700, David Simmons wrote:
> >   
> >> [ 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
> >>
> >> _______________________________________________
> >> cairo mailing list
> >> cairo at cairographics.org
> >> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
> >>     
> >
> >
> >   
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo




More information about the cairo mailing list