[Xcb] Funky casts

Jeremy Kolb jkolb at brandeis.edu
Sun Mar 12 20:17:31 PST 2006


Josh Triplett wrote:
> Jamey Sharp wrote:
> 
>>Bart and I discussed the problem and decided that glx.xml needs a
>>declaration something like this (except that my grasp of the XML
>>protocol descriptions is fairly shaky):
>>
>><union name="DRAWABLE">
>>  <field type="WINDOW" name="window" />
>>  <field type="DRAWABLE" name="core" />
>></union>
>>
>>It was never correct to declare the glx DRAWABLE as an <xidtype>: it
>>isn't something you can allocate, only a union of several other
>><xidtype>s.
>>
>>Anyway, this remains a bit of a pain to use in C. You'll need to declare
>>an XCBGlxDRAWABLE somewhere, then assign your XCBWINDOW into the
>>core.window member, and finally pass that into your function. An
>>optimizing compiler will hopefully generate no code for that process:
>>it's just a hint (or a blow to the head) for the type-checker.
> 
> 
> That looks correct, except that if some of those types are intended to
> reference core types rather than GLX extension types or vice versa, you
> need to qualify them with the appropriate scope, such as glx:WINDOW or
> xcb_types:WINDOW.  Given that the core and GLX both have WINDOW and
> DRAWABLE types, be careful as to which types are allowed where.
> 
> - Josh Triplett
> 

One step ahead of you ;)

For some reason I missed that initially.  I'm going through the spec
again and doing some house cleaning.  I've tested the render and most of
the non-render commands using mesa with xcb as the transport layer.  Now
I'm trying to get a pure GL on xcb app.  I've hit a bump where calling
XCBGlxFinish kills my x server, so I need to figure out why that's
happening.

Jeremy


More information about the Xcb mailing list