0

I would like to ask what makes the Linux graphics stack tick and how it all works together.

So far I have understood that it works like this - the Linux kernel exposes GPU drivers through the DRM mechanism, where you have universal and GPU/vendor-specific drivers. This is separated into two parts - computation and video output, known as KMS.

Now, when Linux boots up to VT, it uses the framebuffer driver to display graphics. Then, let’s say, you start X11 - it takes over and (according to WM) displays something through the KMS.

The OpenGL API is exposed through the ligGL library, which uses either the CPU for software rendering, or through the computational part of DRM provides hardware acceleration.

My question regards the connection between X11 and OpenGL. So far I have read that it should be done though X11 extension called GLX. But I would really like to know, how it actually works under the hood. As far as I know, OpenGL is completely independent from X11 (or for that matter, any other display server), so it should be technically possible to calculate my graphics using OpenGl (libGL) and then pass the graphics data to any display server, or, for that matter, even to the framebuffer (of course, most of the time it would actually be framebuffer of a window in X11/Wayland).

My question is how can I do so, i.e. how can I get the render/output framebuffer of OpenGL and pass it to something else, or, if that’s how it works, how can I bind some framebuffer (let’s say, for example, the framebuffer of an X11 window) to OpenGL to serve as the render/output one?

0

You must log in to answer this question.

Browse other questions tagged .