Hi everyone,
I’m trying to set up a custom GUI panel in Minecraft that uses egui (Rust) for rendering buttons and other widgets. My setup is a hybrid:
Java side (Forge/Fabric) handles the mod lifecycle and passes the OpenGL context pointer down to Rust via JNI.
Rust side uses egui_glow with glow::Context::from_loader_function to render.
So far:
I can successfully get the GL context address from Java and pass it into Rust.
No errors are thrown on either side.
But nothing actually shows up on screen.
I’ve tried two approaches:
Custom Screen class – overriding render and calling into Rust.
Subscribing to RenderGuiEvent.Post (Forge) – lazy‑initializing egui and then calling renderEgui(dtSeconds) each frame.
In both cases, the Rust code runs, but the panel doesn’t appear. I suspect drawing at the wrong stage in the render pipeline, so Minecraft clears or overwrites my output., i tried simple clear color but nothings