OpenGL attrib_list support
Andreas Hartmetz
ahartmetz at gmail.com
Mon Jul 8 04:56:50 PDT 2013
On Wednesday 03 July 2013 13:38:37 Alexander Monakov wrote:
> 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
Thanks Alexander for your help here and on IRC. I've created a pull request
that might need some discussion still because there are a few choices to make
in the implementation.
https://github.com/apitrace/apitrace/pull/160
Work e-mail signature (advertising ;) because I did this on my employer's
time:
--
Andreas Hartmetz | andreas.hartmetz at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the apitrace
mailing list