o
odinpkg.dev
packages / library / glaze

glaze

33bfae4library

Wayland Overlay Framework

MIT ยท updated 2 months ago

glaze โ€” a Wayland overlay framework ๐Ÿ–ฅ๏ธ

A GPU-rendered transparent overlay framework for Wayland, built in Odin. Uses wlr-layer-shell + EGL/OpenGL 3.3 to render fullscreen click-through overlays on any compatible compositor.

Designed for Niri, but works on any compositor supporting wlr-layer-shell-unstable-v1 (Sway, Hyprland, etc).

Apps

neko ๐Ÿฑ

A desktop cat that wanders around your screen. Walks, sleeps, idles โ€” all with direction-aware sprites and a simple state machine.

./build.sh neko run

Dependencies

sudo pacman -S odin mesa wayland wlr-protocols

Build & Run

chmod +x build.sh
./build.sh neko run        # build and run the cat
./build.sh neko build      # just build
./build.sh neko debug      # build with debug symbols

The build script auto-discovers apps. Any directory with a main.odin is a valid target.

Project Structure

overlay/     โ€” shared framework (Wayland + EGL + layer-shell + frame loop)
neko/        โ€” desktop cat app
protocols/   โ€” hand-written wlr-layer-shell Odin bindings
deps/        โ€” vendored odin-wayland (git submodule)
assets/      โ€” sprite PNGs
bin/         โ€” build output (gitignored)

Writing a New App

Create a directory with a main.odin:

package myapp

import ov "../overlay"
import gl "vendor:OpenGL"

main :: proc() {
    ov.run({
        title      = "myapp",
        tick_ms    = 16,         // update every 16ms (~60fps)
        on_init    = my_init,    // GL context ready โ€” load textures, compile shaders
        on_update  = my_update,  // called every tick_ms
        on_draw    = my_draw,    // called every frame
        on_cleanup = my_cleanup, // free GL resources
    })
}

Then build with ./build.sh myapp run.

Status

Work in progress โ€” learning project for Wayland, EGL, and Odin.