|
|
@ -290,7 +290,7 @@ impl Painter { |
|
|
|
|
|
|
|
pub fn paint_and_update_textures( |
|
|
|
&mut self, |
|
|
|
inner_size: [u32; 2], |
|
|
|
screen_size_px: [u32; 2], |
|
|
|
pixels_per_point: f32, |
|
|
|
clipped_primitives: &[egui::ClippedPrimitive], |
|
|
|
textures_delta: &egui::TexturesDelta, |
|
|
@ -300,7 +300,7 @@ impl Painter { |
|
|
|
self.set_texture(*id, image_delta); |
|
|
|
} |
|
|
|
|
|
|
|
self.paint_primitives(inner_size, pixels_per_point, clipped_primitives); |
|
|
|
self.paint_primitives(screen_size_px, pixels_per_point, clipped_primitives); |
|
|
|
|
|
|
|
for &id in &textures_delta.free { |
|
|
|
self.free_texture(id); |
|
|
@ -328,7 +328,7 @@ impl Painter { |
|
|
|
/// of the effects your program might have on this code. Look at the source if in doubt.
|
|
|
|
pub fn paint_primitives( |
|
|
|
&mut self, |
|
|
|
inner_size: [u32; 2], |
|
|
|
screen_size_px: [u32; 2], |
|
|
|
pixels_per_point: f32, |
|
|
|
clipped_primitives: &[egui::ClippedPrimitive], |
|
|
|
) { |
|
|
@ -337,11 +337,11 @@ impl Painter { |
|
|
|
|
|
|
|
if let Some(ref mut post_process) = self.post_process { |
|
|
|
unsafe { |
|
|
|
post_process.begin(inner_size[0] as i32, inner_size[1] as i32); |
|
|
|
post_process.begin(screen_size_px[0] as i32, screen_size_px[1] as i32); |
|
|
|
post_process.bind(); |
|
|
|
} |
|
|
|
} |
|
|
|
let size_in_pixels = unsafe { self.prepare_painting(inner_size, pixels_per_point) }; |
|
|
|
let size_in_pixels = unsafe { self.prepare_painting(screen_size_px, pixels_per_point) }; |
|
|
|
|
|
|
|
for egui::ClippedPrimitive { |
|
|
|
clip_rect, |
|
|
@ -381,7 +381,7 @@ impl Painter { |
|
|
|
viewport: callback.rect, |
|
|
|
clip_rect: *clip_rect, |
|
|
|
pixels_per_point, |
|
|
|
screen_size_px: inner_size, |
|
|
|
screen_size_px, |
|
|
|
}; |
|
|
|
|
|
|
|
callback.call(&info, self); |
|
|
@ -393,7 +393,7 @@ impl Painter { |
|
|
|
if let Some(ref mut post_process) = self.post_process { |
|
|
|
post_process.bind(); |
|
|
|
} |
|
|
|
self.prepare_painting(inner_size, pixels_per_point) |
|
|
|
self.prepare_painting(screen_size_px, pixels_per_point) |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|