Re: [ANN] LJIT2X11 - These bindings go to 11!

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 22 Aug 2015 22:57:36 -0700

On Sat, Aug 22, 2015 at 3:57 PM, Coda Highland <chighland@xxxxxxxxx> wrote:

On Sat, Aug 22, 2015 at 2:54 PM, Cosmin Apreutesei
<cosmin.apreutesei@xxxxxxxxx> wrote:
That message from your test file "X is FUN!" is such a complete lie. I
can't remember a worse coding experience.

Anyway here's my binding: https://github.com/luapower/xlib it sweeps a
lot of X under the Lua carpet (atoms, property encoding and decoding,
masked structs, some extensions etc. -- lots of ad-hoc data formats in
there). It also contains comments with random facts that I had to find
by experimenting. And it also binds GLX (see xlib_demo). Oh, and it
can loop with select() so you can poll events with a timeout so you
can implement timers with a heap -- I needed that too.

I use it for the nw backend:
https://github.com/luapower/nw/blob/master/nw_xlib.lua

Btw, good thing you didn't start off with XCB like I did. All that
plug for XCB on their website and not a single mention of the fact
that XCB is not compatible with OpenGL because of some technicality.
You have to go dig the mailing list or find out the hard way like I
did. Consortium-grade job :)


I discovered the XCB/OpenGL problem too. Such a pain.

I feel like there IS a way to hack around the issue, but I got
distracted from the project before I ever got that far.

/s/ Adam

I was right, there is:

http://xcb.freedesktop.org/opengl/

Xlib these days is built on top of XCB, so by jumping through a couple
of hoops you can get an Xlib window to pass to GLX while still using
XCB for everything else.

/s/ Adam

Other related posts: