[Xcb] more on the libGL port to XCB

Jamey Sharp jamey at minilop.net
Thu Mar 31 20:28:29 PST 2005


On Wed, Mar 30, 2005 at 01:51:29PM -0500, Jeremy Kolb wrote:
> Jeremy Kolb wrote:
> >Jeremy Kolb wrote:
> >>um.... Can you check out GetBooleanv? It's on page 59 of the requests.
> >>
> >>Basically it says that if the length is one thing then this follows:
> >>
> >>1 BOOL params
> >>15 unused
> >>
> >>else this follows:
> >>
> >>16 unused
> >>n LISTofBOOL params
> >><padding>
> >>
> >>I'm assuming this is the same for all Get*v replies.
> >
> >Ok, all these Get* functions are really weird.  The reply structures 
> >change depening on if they succeed and what the length is.
> 
> Any thoughts on this?

Yes, but they're more of the unprintable variety.

This isn't very hard to encode, in simple form; it'll just be a bit
tricky to use. Using the GetBooleanv example, the description should
look something like:

BOOL param
pad 15
list of BOOL params

It's then the caller's responsibility to figure out whether to use the
'param' field or the 'params' list.

We could extend the protocol description in various ways to make this
simpler. In particular, it'd be nice if the generated GetBooleanvParams
function would decide which part to return a pointer to based on the
appropriate condition. It's worth considering, I think, but probably
you'll want to adopt the approach that actually works right now. :-)

--Jamey


More information about the xcb mailing list