[Xcb] how to use xcb_glx_get_fb_configs_property_list?
jkolb at brandeis.edu
Sat Dec 22 08:30:15 PST 2007
Quoting Barton C Massey <bart at cs.pdx.edu>:
> 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++)
> 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?
> Xcb mailing list
> Xcb at lists.freedesktop.org
I'm on vacation and don't have access to my linux box. This looks
vaguely familiar and there should be a list of attributes in the
protocol xml (look for something like RED_SIZE or whatever). The
protocol is on opengl.org "encode1.3.ps" I believe in the doc section.
Right now we get all fb configs, we need a utility function that
sorts through them like glXChooseFBConfig or whatever that function
is. Look at the wire protocol I listed above it should help you out.
More information about the Xcb