From b08870dcee2f2c3bdf8b86beb888e5a78337de00 Mon Sep 17 00:00:00 2001 From: walterpie <61631991+walterpie@users.noreply.github.com> Date: Mon, 11 Jan 2021 09:35:47 +0100 Subject: [PATCH] Make `egui_glium::painter::Painter::paint_job` pub (#100) * Make `egui_glium::painter::Painter::paint_job` pub The background is: I'm working on an engine where I would like to draw the gui and the game to the same `glium::Frame`. Haven't found any other obvious, trivial solution. I could of course write my own integration, but I just think this makes sense to be public. * Make two other necessary functions public --- egui_glium/src/painter.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/egui_glium/src/painter.rs b/egui_glium/src/painter.rs index c2fbcdff..fa960c15 100644 --- a/egui_glium/src/painter.rs +++ b/egui_glium/src/painter.rs @@ -95,7 +95,7 @@ impl Painter { } } - fn upload_egui_texture( + pub fn upload_egui_texture( &mut self, facade: &dyn glium::backend::Facade, texture: &egui::Texture, @@ -154,7 +154,7 @@ impl Painter { } #[inline(never)] // Easier profiling - fn paint_job( + pub fn paint_job( &mut self, target: &mut Frame, display: &glium::Display, @@ -328,7 +328,7 @@ impl Painter { } } - fn upload_pending_user_textures(&mut self, facade: &dyn glium::backend::Facade) { + pub fn upload_pending_user_textures(&mut self, facade: &dyn glium::backend::Facade) { for user_texture in &mut self.user_textures { if let Some(user_texture) = user_texture { if user_texture.gl_texture.is_none() {