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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user