1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Make paint function accept anything implementing Surface trait (#681)

* Make paint function accept anything implementing Surface trait

* Remove unused imports
This commit is contained in:
JerzySpendel
2021-09-02 05:44:50 -07:00
committed by GitHub
parent 9def6ef6df
commit 56502fbb3c
2 changed files with 6 additions and 7 deletions

View File

@@ -631,10 +631,10 @@ impl EguiGlium {
(needs_repaint, shapes)
}
pub fn paint(
pub fn paint<T: glium::Surface>(
&mut self,
display: &glium::Display,
target: &mut glium::Frame,
target: &mut T,
shapes: Vec<egui::epaint::ClippedShape>,
) {
let clipped_meshes = self.egui_ctx.tessellate(shapes);