News for hackers. Stuff that matters.
Re:On Go, Portability, and System Interfaces by tedunangst on Tuesday September 22, 2015 @07:57PM (#10262550)
There are C binding equivalents for many of the macros in Xlib (having played this game before and recently). This may be slower than a macro, but you can usually cache the result. But really, shouldn't you be using (XML/)XCB? :)
Re:On Go, Portability, and System Interfaces by pcwalton on Tuesday September 22, 2015 @07:59PM (#10262556)
Last I looked into it GLX didn't work well with XCB. You can use XCB for some stuff, but you can't drop Xlib.

It doesn't look like this has changed, unless this page is out of date: http://xcb.freedesktop.org/opengl/#index5h1

Re:On Go, Portability, and System Interfaces by geofft on Tuesday September 22, 2015 @10:36PM (#10263041)
Fascinating! I was wondering why nobody had done an XCB-based set of X bindings for Rust, given that XCB was basically designed for this purpose (well-typed, high-level metadata to generate good bindings from).

If I'm reading that page correctly, the problem is that GLX is specified as an API + implied ABI, not a wire protocol, and part of that API/ABI contract is "I was compiled with <X11/X11.h> and -lX11, and you'd better give me structures compatible with those"? And half of the GLX implementations are closed-source? Sigh.