[HN Gopher] Hands-On Graphics Without X11
___________________________________________________________________
Hands-On Graphics Without X11
Author : ingve
Score : 47 points
Date : 2025-01-17 17:54 UTC (5 hours ago)
(HTM) web link (blogsystem5.substack.com)
(TXT) w3m dump (blogsystem5.substack.com)
| pjmlp wrote:
| On a parallel note, this brought memories of SVGALib.
|
| https://en.m.wikipedia.org/wiki/SVGALib
| ykonstant wrote:
| Very nice, I am very interested in raw framebuffer graphics and
| applications.
| arghwhat wrote:
| These interfaces can be cute to play with, but there's a reason
| that fbdev is deprecated on Linux - it's not a good interface
| outside toy examples. wscons may be more powerful, but I don't
| think it can be used to fully enable modern accelerated display
| devices, although do correct me if I'm wrong.
|
| Despite some confusion in terminology, modern interfaces also
| operate on frame buffers, but with an API for switching them out
| atomically. Likewise, your display server (at least modern ones)
| just take your client window as a completed frame buffer, and
| mainly serve to let multiple applications all show their frame
| buffers without having to worry about what other applications are
| doing. Frame buffers all the way down, just with support for DMA,
| atomicity, fancy formats and color spaces, etc.
|
| You can use the appropriate modern APIs to make a single,
| exclusive graphical application with all the benefits of modern
| display hardware easily enough. That is, after all, what your
| display server is. You just don't gain much - just a little bit
| of saved sideband IPC.
|
| X11 makes it seem like a display server is a complicated thing
| that has to support drawing and what not, but with alternatives
| like Wayland, a full screen client buffer is handed off zero-copy
| from the client application tot he hardware without being looked
| at.
| jmmv wrote:
| > wscons may be more powerful, but I don't think it can be used
| to fully enable modern accelerated display devices, although do
| correct me if I'm wrong.
|
| As I mentioned in the text, I _think_ that 's the difference
| between WSDISPLAYIO_MODE_MAPPED and WSDISPLAYIO_MODE_DUMBFB.
| The former allows access to the hardware registers whereas the
| latter does not. Obviously, if you choose to use the former,
| then you are tied to a specific graphics driver. (But I'm not
| sure of this.)
|
| And yes, agree, what I described is not great for performant
| results, but there is a lot you gain from the simplicity of
| this approach if all you want is toy around. I feel we lost a
| lot of this simplicity over the years, but it's "still there"
| if you don't care about optimal performance.
| taeric wrote:
| Completely agreed on the feeling that we lost a lot by moving
| away from some of the simpler interface options. Particularly
| for introductory and play purposes. Specifically, even.
| segasaturn wrote:
| I remember Links, the text-based browser that runs in your
| terminal, had a framebuffer mode that you could use to get
| rudimentary graphical web browsing on a system with no X11
| installed.
| LtWorf wrote:
| Yeah, also mpv has a framebuffer driver. AFAIK Qt has one as
| well, so any Qt program could run without X/wayland.
| prmoustache wrote:
| I think netsurf can still be compiled for fb.
___________________________________________________________________
(page generated 2025-01-17 23:00 UTC)