[Xcb] GLX

Josh Triplett josh@freedesktop.org
Mon Jan 17 17:19:16 PST 2005

Jeremy Kolb wrote:
> I've decided to sit down and XCBify GLX.  What's the best way to do
> this? Just go through glxproto.h?

You need to use just the part of glxproto.h that specifies the wire
protocol (*not* the GLX API), and translate that into the XML-XCB
format.  Note that because of the way the GLX protocol works (packing
encoded gl calls into X requests), writing the GLX protocol for XCB will
not by itself make it easy to use OpenGL functions from an XCB program
(unless you want to pack them into requests yourself).

Unfortunately, I have not yet finished documenting the XML-XCB format;
you will have to rely on the examples of the existing XML protocol
descriptions for now.  Feel free to mail the list with any questions you
may have on the XML-XCB format, especially if you find something that
you can't express in that format.

> Also, I have a little bit written so
> how do I generate the source code from the xml file to check?  Thanks.

You can generate the source or header for an extension by running:

xsltproc --stringparam base-path /usr/X11R6/include/X11/XCB/ \
--stringparam extension-path /usr/X11R6/include/X11/XCB/extensions \
--stringparam mode [mode, see below] /path/to/c-client.xsl glx.xml

The mode parameter should be "source" for the source, or "header" for
the header.  (You could also set the base-path and extension-path to the
same directories within the source of xcb-proto, if you don't have
xcb-proto installed.)

If you are going to invoke these frequently, I suggest making some shell
functions to invoke these commands.

- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050117/65012df9/signature.pgp

More information about the xcb mailing list