1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Refactor how EpiIntegration::update is called

This commit is contained in:
Emil Ernerfeldt
2023-11-13 15:06:13 +01:00
parent c033483430
commit 4bee4f8cf6
4 changed files with 113 additions and 94 deletions

View File

@@ -622,6 +622,8 @@ impl Painter {
}
pub fn read_screen_rgba(&self, [w, h]: [u32; 2]) -> egui::ColorImage {
crate::profile_function!();
let mut pixels = vec![0_u8; (w * h * 4) as usize];
unsafe {
self.gl.read_pixels(
@@ -645,6 +647,8 @@ impl Painter {
}
pub fn read_screen_rgb(&self, [w, h]: [u32; 2]) -> Vec<u8> {
crate::profile_function!();
let mut pixels = vec![0_u8; (w * h * 3) as usize];
unsafe {
self.gl.read_pixels(