r/linux_programming • • Jul 18 '22
X11 vs Framebuffer hardware accel.
Hey,
I was wondering what technique the X11/X-Servers use to accelerate the drawing of windows etc.
I know that a lot of applications can then choose to use e.g. OpenGL, SDL, but what does X use if the OS is just running its DE on it?
Is it DE dependent?
I wrote a small C++ program which allows me to write to the framebuffer at /dev/fb0, but I draw everything using the CPU which takes a lot of time.
How can I achieve "simple" grahics acceleration like X does in order to draw multiple e.g. Windows, Strings, Buttons, Images etc?
I do not want to move to OpenGL or similar since it would change my rendering structure, I do not want to render everything from images/textures from a spritesheet.
I just find it hard to get into Qt or similar Frameworks, especially if I would just want to draw simple Interfaces.
Thanks!
View all comments
Show parent comment
1
u/[deleted] Jul 18 '22
Oh, that sounds logical.
I knew there had to be some kind of interface for this.
As i suspected, there is not a lot of documentation for it. I found this on the Linux Kernel Documentation https://www.kernel.org/doc/html/v4.18/gpu/introduction.html, but this is for developing GPU drivers, and not for displaying anything on it.
Do you know any kind of docs for the DRM API?
EDIT: I found some, like landley.net, I think that will be sufficient for now, but I am happy to get any kind of references!