[Xcb] how to use xcb_glx_get_fb_configs_property_list?

Barton C Massey bart at cs.pdx.edu
Fri Dec 21 18:42:29 PST 2007


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


More information about the Xcb mailing list