Create a transparent, click-through overlay window on top of any game window and draw shapes, text, and HUD elements. Direct3D 11 backend, immediate-mode API, built-in font rendering.
Install
[]
= "1"
Quick start
Draw an ESP box and health bar over a game window:
use ;
Usage
Creating an overlay
Find the target window by title, class name, HWND, or process ID:
// by window title (substring match)
let overlay = new?;
// by window class
let overlay = new?;
// by process ID
let overlay = new?;
// by raw HWND
let overlay = new?;
Drawing shapes
All drawing happens between begin_frame and end_frame:
overlay.begin_frame?;
// filled and outlined rectangles
overlay.rect_filled;
overlay.rect;
// lines
overlay.line;
// circles
overlay.circle_filled;
overlay.circle;
overlay.end_frame?;
Drawing text
Text rendering uses an embedded font with configurable size:
overlay.text;
overlay.text;
// measure text bounds before drawing
let = overlay.text_bounds;
overlay.text;
Convenience methods
Built-in methods for common game overlay patterns:
// crosshair
overlay.crosshair;
// health bar with foreground, background, and border
overlay.health_bar;
// ESP box with optional label
overlay.esp_box;
overlay.esp_box;
Platform support
| Platform | Backend | Status |
|---|---|---|
| Windows | Direct3D 11 | Supported |
| Linux | - | Planned |
| macOS | - | Planned |
The crate compiles on all platforms but only exports the overlay API on Windows.
How it works
The overlay creates a transparent, always-on-top window (WS_EX_LAYERED | WS_EX_TRANSPARENT) positioned over the target game window. All mouse and keyboard input passes through to the game. The overlay tracks the target window's position and resizes automatically.
Rendering uses Direct3D 11 with alpha blending. Shapes are batched into vertex/index buffers and drawn in minimal draw calls. Text is rasterized into a glyph atlas at startup and rendered as textured quads.
License
MIT