Graphic toolkits are complicated, but they all start by drawing a pixel, I need to repeat this basic action. Suppose there is a running Xorg, in it a program that in any way creates itself a Xorg-window, in this window you need to draw pixels.
Condition:
Only standard Linux kernel libraries. No GTK / Qt / OpenGL / Cairo and Xorg embedded methods.
Questions:
- What, actually, to draw? (I would like to hear a specific answer.)
- How to draw? (Examples / references to examples are desirable, the topic is rather unpopular, there is little information.)
- The advantages of one way or another.
UPD: In response to the comment by @KoVadim, everything did not fit, I will write to the main question as a general explanation.
If this is a Xorg window, then it should draw
using XDrawPoint
I want to say that most of the graph. tulkit does not draw a picture through the features of the graphic server. Qt draws with his bike, GTK does it with Cairo, and rightly so. In the same Wayland, which came to replace X, there is no such functionality at all. Wayland simply makes the window leaving the entire drawing in the window to the toolkit.
Let us dwell on Cairo, he probably uses something low-level, I want to know what. (not enough experience to dig)
I tried framebuffer, I know everything about him. Firstly it is better to use DRM. Secondly, this is all wrong. (And maybe DRM is quite suitable, but I did not find how to use it, I did not find Xorg, there is no documentation and that's it.)