Use better names in glow::Painter
This commit is contained in:
parent
aef8a7901f
commit
32ad9c29be
|
|
@ -290,7 +290,7 @@ impl Painter {
|
||||||
|
|
||||||
pub fn paint_and_update_textures(
|
pub fn paint_and_update_textures(
|
||||||
&mut self,
|
&mut self,
|
||||||
inner_size: [u32; 2],
|
screen_size_px: [u32; 2],
|
||||||
pixels_per_point: f32,
|
pixels_per_point: f32,
|
||||||
clipped_primitives: &[egui::ClippedPrimitive],
|
clipped_primitives: &[egui::ClippedPrimitive],
|
||||||
textures_delta: &egui::TexturesDelta,
|
textures_delta: &egui::TexturesDelta,
|
||||||
|
|
@ -300,7 +300,7 @@ impl Painter {
|
||||||
self.set_texture(*id, image_delta);
|
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 {
|
for &id in &textures_delta.free {
|
||||||
self.free_texture(id);
|
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.
|
/// of the effects your program might have on this code. Look at the source if in doubt.
|
||||||
pub fn paint_primitives(
|
pub fn paint_primitives(
|
||||||
&mut self,
|
&mut self,
|
||||||
inner_size: [u32; 2],
|
screen_size_px: [u32; 2],
|
||||||
pixels_per_point: f32,
|
pixels_per_point: f32,
|
||||||
clipped_primitives: &[egui::ClippedPrimitive],
|
clipped_primitives: &[egui::ClippedPrimitive],
|
||||||
) {
|
) {
|
||||||
|
|
@ -337,11 +337,11 @@ impl Painter {
|
||||||
|
|
||||||
if let Some(ref mut post_process) = self.post_process {
|
if let Some(ref mut post_process) = self.post_process {
|
||||||
unsafe {
|
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();
|
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 {
|
for egui::ClippedPrimitive {
|
||||||
clip_rect,
|
clip_rect,
|
||||||
|
|
@ -381,7 +381,7 @@ impl Painter {
|
||||||
viewport: callback.rect,
|
viewport: callback.rect,
|
||||||
clip_rect: *clip_rect,
|
clip_rect: *clip_rect,
|
||||||
pixels_per_point,
|
pixels_per_point,
|
||||||
screen_size_px: inner_size,
|
screen_size_px,
|
||||||
};
|
};
|
||||||
|
|
||||||
callback.call(&info, self);
|
callback.call(&info, self);
|
||||||
|
|
@ -393,7 +393,7 @@ impl Painter {
|
||||||
if let Some(ref mut post_process) = self.post_process {
|
if let Some(ref mut post_process) = self.post_process {
|
||||||
post_process.bind();
|
post_process.bind();
|
||||||
}
|
}
|
||||||
self.prepare_painting(inner_size, pixels_per_point)
|
self.prepare_painting(screen_size_px, pixels_per_point)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue