A month ago I asked how hard it is to build a cross-platform GUI framework without Qt, SDL, or GLFW — hand-written Win32/X11 window layers, and hand-written D3D12 / Vulkan / OpenGL backends.
I finished it. Zekit is now open source.
GitHub: https://github.com/Z-ze489/Zekit
Gitee: https://gitee.com/z-ze489/Zekit
Pure C++20. Windows / Linux / Android. The window layer talks directly to Win32 and X11. The render layer has three backends: D3D12, Vulkan, and OpenGL. No Qt, no SDL, no GLFW.
This post is not “look, it’s easy.” It’s the bill: what was actually hard, what was just learning an API, and what cost real debugging time.
The numbers first
Own code, excluding vendored FreeType and third-party headers:
Win32 window layer (IMM32, DPI, drag-and-drop): 2,146 lines
X11 window layer (EWMH, XIM, cursors, multi-monitor): 3,370 lines
OpenGL renderer (WGL + EGL + GLProgram + renderer): 1,221 lines
Vulkan renderer (context + renderer + runtime loader): 2,113 lines
D3D12 renderer (context + renderer): 1,489…