I was indeed trying to avoid the big libraries, since this is just for personal use I don't care about cross platform which allows me to escape these potentially - I may well end up back at the SDL + OpenGL level later when features or performance are a concern.
My current goal is to find a balance of least dependencies and least boilerplate to draw a pixel buffer so i can play with C, nothing more. Once I can do that without lots of fluf then i may be attracted to more advanced or complex methods later on when performance is desirable.
I have done some visual things with the console and printf alone in the past which gave me a taste of C, but now I want some real pixels :)
You may want to try raylib. It's written by a teacher who uses it in the classroom and geared for this kind of "let me code games in C but with only one dependency" goal. It does more than you need but that's a common theme of useful libraries.
Have you tried A
allegro5? Any take on which is better? I've tried both, but I'm too much of a newbie to have a reasonable opinion. Thinking of getting back on to one of the two.
My 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?
I'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
Yes, 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.
I 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.
XCB 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.
My current goal is to find a balance of least dependencies and least boilerplate to draw a pixel buffer so i can play with C, nothing more. Once I can do that without lots of fluf then i may be attracted to more advanced or complex methods later on when performance is desirable.
I have done some visual things with the console and printf alone in the past which gave me a taste of C, but now I want some real pixels :)