4 ms·
Then you should be using X11 directly!
by jfkebwjsbx 7y ago
Then you should be using X11 directly!
- tomxor 7y agoMy goal is to attain a balance of least dependencies and boilerplate. From what I've read so far it seems that implementing xclient protocols directly would require considerably more boilerplate than using XCB, (and my understanding is that XCB is just that: a generic xclient implementation and nothing more). Please do elaborate if I'm wrong though! I would be delighted if it's possible to implement a simple subset minimally purely for displaying a pixel buffer without XCB?
- CmdrKrool 7y agoI'm not necessarily recommending you go this route in general, but this is a fantastically actionable article for going deep on various Linux graphics APIs including X11 right on the socket: http://betteros.org/tut/graphics1.php http://betteros.org/tut/graphics1.php
- tomxor 7y agoYes, I really like this article, I used it to get going with fbdev before I moved on to XCB, but only skimmed the remainder since it was avoiding libraries completely it was getting a little verbose (although on second thought DRM doesn't look too bad, and also I missed libdrm should probably see how much that can do). Just realized now revisiting this that the author also showed how to directly implement xclient! the example is rather large confirming my suspicions RE parent comments.
- jfkebwjsbx 7y agoI meant using Xlib, the client library for X11, which is going to always be available if you are using X! You can of course implement the library parts yourself, but that is more boilerplate.
- tomxor 7y agoXCB is actually lower level than xlib, in that sense it is more directly using X11 because unlike xlib it only really implements the client protocol and wraps it up into an interface. I was however planning on trying out Xlib anyway on my path of exploration from simplest/lowest level to complex/higher level libraries: fbdev, DRM < DirectFB, libdrm < XCB < Xlib < SDL et al.