emilk / emilk/egui

eframe does not expose &mut egui_glow::Painter

Open
#3,320 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Is your feature request related to a problem? Please describe.**
`eframe::Frame` under wgpu provides `wgpu_render_state()`, which allows us to mutably access the underlying `egui_wgpu::Renderer` and call e.g. `register_native_texture`. However, under glow, the `egui_glow::Painter` can only be accessed by way of a paint callback, and only immutably behind a `&Painter`.

**Describe the solution you'd like**
`eframe::Frame` should expose a `glow_render_state` that allows mutable access to the `Painter` in addition to the `gl` context.

**Describe alternatives you've considered**
I considered hacking my way around a paint callback until I realized that I still couldn't call `register_native_texture`.

Contributor guide

Open the contributing guide

Research direction

Start by locating eframe::Frame's existing wgpu_render_state() API and the glow paint-callback path described in the issue. Trace how the egui_glow::Painter and gl context are stored and exposed, then determine the API and lifecycle changes needed for mutable access. Done means Frame exposes a glow_render_state with mutable Painter access alongside the gl context, with coverage for registering native textures.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.