On a Linux system, I assume it will be GTK -> X Server - (OpenGL) -> graphics card. Is it correct?
Not. GTK + on Linux goes
/-[ if direct context ]---\ /--> OpenGL >-+---------/ \ / \-> GLX -+--------------\ \ / \ \ \ GTK+ -+-> cairo >-+---> XRender >--------+----+-> Xlib/xcb >-+-> X server >-+-> Kernel Module >-> GPU \ \–-> pixmap buffer >–/ \ / \―---------------------------/
I read that some GUIs directly draw OpenGL (like Blender3D), so how do other applications draw their GUIs?
It's just a Blender (no 3D trailing). The Blender GUI tool uses OpenGL as the only backend, yes. But the GUI is not directly drawn using OpenGL, which will be simply burdensome to work with (draw each button using OpenGL calls. The blender has its own toolkit. GTK + is another toolkit but not tied to Blender (in fact, one of my home projects extracts the Blender GUI toolkit so that it can be used in independent projects).
Tool kits such as GTK + and Qt are designed for maximum portability. A blender has the luxury of knowing that OpenGL will be available. Applications developed for GTK + or Qt can work on systems that do not support 3D, so the design of GTK + and Qt allows you to work on multiple servers. GTK + now in version 3 uses the Cairo graphics engine as a graphics server. Cairo again has its own servers, namely a software rasterizer, drawing in pixel images (pixel images) or proxy drawing commands in a basic graphics architecture. In the case of Cairo on Linux, it can be either OpenGL or X11 (kernel extensions and XRender protocols).
If only Direct3D and OpenGL APIs (which I know) are available for graphics cards, what is the difference between software rendering and hardware acceleration?
Neither OpenGL nor Direct3D talk to the graphics card. They are talking to the drivers of the video card. Thus, you would have the choice of talking to the drivers themselves, bypassing OpenGL and Direct3D. But why do you have to do this? This is tiring.
On Windows, you also have GDI and / or WPF (Windows Presentation Foundation) for drawing files and Direct2D.
On Linux, you get the X11 protocol and the XRender extension protocol for drawing beautiful images.
Another growing API is OpenVG, which aims to standardize all of these 2D drawing APIs. And, at least on Linux, OpenGL and OpenVG were chosen to be the only long-term abstract drawing APIs available, with some window system for managing the framebuffer and user input. There Wayland in development (which I don’t like at all) and X11, which, in my opinion, has the best design (this is a network system that allows distributed execution, which I consider very important in the future), but needs a complete review of which “X12” - cleans up obsolete toughness, includes it in the contact color space, switches connections (so that you can transfer clients between X servers, which would allow a much more elegant way to block X sessions by moving all connections to some shadow Server X, instead of trying to block access using a screen saver).
Can software that performs “software rendering” write directly to the framebuffer of the video card so that OpenGL is not affected?
Not in a modern operating system. However, the OS can provide you with abstract access to the graphics card through some framebuffer API (/ dev / fb0 on Linux). However, the framebuffer is unmanageable, so if there is an X server or Wayland, any of them are in the task of managing the FB, and then it's not your business.