On Windows

ztk has a native backend for Windows 10 and 11. It uses Win32 for the windows and the input, and Direct3D 12 for the drawing, with no layer between ztk and Windows.

Build and run

Install Zig 0.17.0. The build needs no other tool: the shaders compile at run time with the shader compiler that Windows has.

git clone https://github.com/beetlebugorg/ztk
cd ztk
zig build -Doptimize=ReleaseFast        # makes zig-out\bin\ztk.exe
zig-out\bin\ztk.exe examples\demo.tcl   # opens a window

ztk --headless works as on the other systems, with no window.

The variable ZTK_RENDERER picks the output of the window:

Value Output
(not set) Direct3D 12, and the CPU renderer when the machine has no Direct3D 12 device
d3d12 Direct3D 12 only. The program stops when no device exists.
warp Direct3D 12 on WARP, the software rasterizer of Windows
cpu The CPU renderer, with SetDIBitsToDevice

What works

Limits

The design and the plan are in docs/dev/windows.md.