From 307202ab67a8459f1f9e924484b25275e1057596 Mon Sep 17 00:00:00 2001 From: Grrr <163682431+x4exr@users.noreply.github.com> Date: Tue, 24 Mar 2026 08:59:05 -0400 Subject: [PATCH] egui_wgpu, added disclaimer, discourages people calling render without `update_buffer` (#7971) * Closes * [x] I have followed the instructions in the PR template Co-authored-by: Emil Ernerfeldt --- crates/egui-wgpu/src/renderer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/egui-wgpu/src/renderer.rs b/crates/egui-wgpu/src/renderer.rs index 640f33f51..e55f7581a 100644 --- a/crates/egui-wgpu/src/renderer.rs +++ b/crates/egui-wgpu/src/renderer.rs @@ -470,6 +470,9 @@ impl Renderer { /// The render pass internally keeps all referenced resources alive as long as necessary. /// The only consequence of `forget_lifetime` is that any operation on the parent encoder will cause a runtime error /// instead of a compile time error. + /// + /// # Panic + /// Always ensure that [`Renderer::update_buffers`] has been called otherwise calling [`Renderer::render`] will panic! pub fn render( &self, render_pass: &mut wgpu::RenderPass<'static>,