OpenGL attrib_list support

Alexander Monakov amonakov at ispras.ru
Wed Jul 3 02:38:37 PDT 2013



On Wed, 3 Jul 2013, Andreas Hartmetz wrote:

> Hello list,
> 
> I've been trying to implement attrib_list support for a few days now and I've 
> run out of approaches that aren't ugly or intrusive.
> (attrib_list is an array of ints interpreted as key-value pairs where the key 
> is an enum value and the value's interpreted type depends on the key; it is 
> usually int, enum, or bitfield.)

What's worse, for Xlib-style attrib lists (glXChooseVisual), some keys stand
on their own and don't have a corresponding value.

I would duplicate existing Array type into XAttribArray and GLXAttribArray and
write custom visitors for those.  Those visitors would hand off to existing
Array visitors, except where I would need a different behavior (trace dumping,
GUI).

Alexander


More information about the apitrace mailing list