Documentation
¶
Overview ¶
Command window opens a 640x400 window (Wayland or X11) titled "Glutter dev window" and fills it with #6750A4 using OpenGL ES, drawing a new frame each time the compositor asks for one. It is the first development example (milestone 1): it uses the internal packages directly, before the public API exists.
Run it with: go run ./examples/dev/window
It needs a Wayland or X11 session. To try it without one, run it under a headless server: scripts/headless-wayland.sh -- go run ./examples/dev/window or scripts/headless-x11.sh -- go run ./examples/dev/window
Environment (read in debug builds only, as the examples promise):
GLUTTER_BACKEND=x11|wayland the windowing system (else the session's) GLUTTER_DEV_SHM=1 draw through a wl_shm buffer instead of EGL (Wayland only) GLUTTER_SCREENSHOT=<file.png> save the window content to the file and exit GLUTTER_SCREENSHOT_AFTER=<time> wait that long (such as 500ms) before saving