You can draw graphics on CPU (Software rendering) and on GPU (Shaders):
- CPU is often used to render UI elems (text, buttons, etc.)
- GPU is used to render complex visual scenes, so games are usually GPU-rendered
Shaders is a direct program on a GPU (it is not a «visual effect», it is just a math program).
Graphical libs can be roughly split into 3 levels: low, mid, high.
Low Level
Here you write shaders by hand.
OpenGL and Vulkan (crossplatform)
OpenGL is smth like «assembly for GPU» (and only GPU). It uses special language GLSL as Shaders.
Vulkan is a modern evolution of OpenGL.
DirectX (Windows)
Unlike OpenGL, it is all-encompassing media suite (not just graphics).
Mid level
Here you usually don’t write shaders by hand.
SDL — wrapper on top of OpenGL (with regards to graphics), but also smth like DirectX with regard to other media. Also adds event loop, canvas/window, etc.
Mostly used in games.
Cairo — CPU-based renderer used by GTK.
High level
All the hardware details are abstracted away. You just draw buttons and UI elements.
GTK — high-level UI toolkit, uses Cairo as a renderer. Modern version can also use OpenGL for complex UI elements.
Qt — high-level UI toolkit. Mixes it’s own CPU-renderer (like for buttons and such) with OpenGL renderer (for complex scenes like used in CAD programs).
WPF — Windows UI toolkit, uses DirectX under the hood (or falls back to CPU-rendering if no GPU found).