Hey guys I wanted to make a taskbar, kinda like polybar.

Is it possible to draw it directly on the screen using your library on Windows, Linux (x.org display server) and on Linux (Wayland display server)?
Furthermore does it use retained graphics or immediate graphics?