MCPcopy Index your code
hub / github.com/coderedart/egui_overlay

github.com/coderedart/egui_overlay @v0.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.0 ↗ · + Follow
94 symbols 145 edges 10 files 20 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Egui Overlay

In this context, Overlay simply means a gui application where 1. It has a transparent window surface 2. It can toggle the borders/decorations like title bar. 3. can let the input like mouse clicks to passthrough its window surface.

Here, we will let input passthrough when egui doesn't need input.

The egui_overlay crate just combines the functionality from egui_window_glfw_passthrough for windowing functionality. For rendering, we use egui_render_three_d, as three-d will allow you to draw a bunch of things easily. But, as apple doesn't support opengl, we use egui_render_wgpu on macos.

For advanced usecases, i recommend directly using egui_window_glfw_passthrough crate directly with either wgpu or three-d or glow backend crates. As you can see in lib.rs, its barely 150 lines of code to set up. It will allow you more control over event loop, as well as drawing.

Look at the basic example for a rough idea of how to use this crate for normal usecase. Look at the triangle example (only for linux/windows users, as i use three-d), to see how you can draw custom stuff too.

https://github.com/coderedart/egui_overlay/assets/24411704/9f7bab7b-26ec-47d1-b51e-74006dfa7b0d

Platforms

  1. Windows
  2. Linux (both X11 and Wayland). But support might vary between different window managers.
  3. Mac

Bugs

  1. On Mac, when passthrough is enabled, the window titlebar can only be clicked in the bottom half. The top half becomes passthrough too for some reason.

Extension points exported contracts — how you extend this code

EguiOverlay (Interface)
Implement this trait for your struct containing data you need. Then, call [`start`] fn with that data [2 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

glfw_to_egui_action
called by 5
crates/egui_window_glfw_passthrough/src/lib.rs
set_passthrough
called by 4
crates/egui_window_glfw_passthrough/src/lib.rs
start
called by 2
src/lib.rs
is_opengl
called by 2
crates/egui_window_glfw_passthrough/src/lib.rs
set_window_size
called by 2
crates/egui_window_glfw_passthrough/src/lib.rs
layout_independent_glfw_to_egui_key
called by 2
crates/egui_window_glfw_passthrough/src/lib.rs
glfw_to_egui_modifers
called by 2
crates/egui_window_glfw_passthrough/src/lib.rs
scissor_from_clip_rect
called by 2
crates/egui_render_wgpu/src/lib.rs

Shape

Method 51
Function 23
Class 18
Enum 1
Interface 1

Languages

Rust100%

Modules by API surface

crates/egui_window_glfw_passthrough/src/lib.rs23 symbols
crates/egui_render_glow/src/lib.rs14 symbols
crates/egui_render_wgpu/src/lib.rs13 symbols
crates/egui_render_wgpu/src/painter.rs11 symbols
crates/egui_render_glow/src/helpers.rs8 symbols
crates/egui_render_wgpu/src/surface.rs7 symbols
crates/egui_render_three_d/src/lib.rs6 symbols
src/lib.rs5 symbols
examples/triangle.rs4 symbols
examples/basic.rs3 symbols

For agents

$ claude mcp add egui_overlay \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page