[Xcb] how to use xcb_glx_get_fb_configs_property_list?

Adam Burton adz21c at googlemail.com
Sat Dec 22 02:04:47 PST 2007

On Saturday 22 December 2007 02:42:29 Barton C Massey wrote:
> In message <200712220046.03806.adz21c at googlemail.com> you wrote:
> > I have just been experimenting with xcb. I just started
> > looking at xcb_glx and got stuck :-(. I got an
> > xcb_glx_get_fb_configs_reply_t which appears to work fine
> > with xcb_glx_get_fb_configs_property_list. I don't know how
> > to use the returned list though as I can't find
> > documentation to explain the structure.  Judging from a
> > previous post I read I would assume it returns the
> > attributes for an fbconfigs (much like glXGetFBConfigAttrib
> > ... just it gets them for all 140 fbconfigs ... so
> > xcb_glx_get_fb_configs_reply_t.num_FB_configs says).  I'd
> > appreciate a nudge in the right direction.
> I know very little about GLX, but I'm guessing the folks
> here who do are all off list on vacation or something, so
> here's what I can figure out...
> It looks like the get_fb_configs_reply should be passed to
> get_fb_configs_property_list to actually extract the
> property list data.  The properties seem to just be of type
> uint32_t, so you should be able to just say something
> generic like
>    uint32_t *props = xcb_glx_get_fb_configs_property_list(reply);
>    uint32_t n = xcb_glx_get_fb_configs_property_list_length(reply);
>    uint32_t i;
>    for (i = 0; i < n; i++)
>        process(props[i]);
> Actually, I'm not so sure that properties aren't supposed to
> be xcb_glx_bool32_t.  Also, I don't see any obvious way to
> construct an initial iterator for the properties---there's
> an end iterator, but no obvious initial or next iterator.
> Maybe somebody could look at the GLX spec and see that
> everything is good here and I'm just confused?
> 	Bart

Yea, thats exactly what I assume. In xlib there is a function 
glXGetFBConfigAttribs where if I remember correctly you pass in the 
attributes (in this case I would assume properites) you want information on 
for a specific fbconfig and it returns the information (such as red_size, 
green_size, doublebuffered etc). I assume this is the same thing just gets 
every property for every fbconfig.
One thing I was curious about (which you may be able to answer as I would 
guess its an Xcb general rule) is the length member of the 
xcb_glx_get_fb_config_reply structure the size of the structure in bytes?

Thanks for the assistance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/xcb/attachments/20071222/0797e2b6/attachment.pgp 

More information about the Xcb mailing list