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

Add glow::Context to epi::Frame (#1425)

This can be used, for instance, to:

* Render things to offscreen buffers.
* Read the pixel buffer from the previous frame (glow::Context::read_pixels).
* Render things behind the egui windows.
This commit is contained in:
Emil Ernerfeldt
2022-03-27 15:20:45 +02:00
committed by GitHub
parent b7ebe16cfb
commit 8f178fa4e0
10 changed files with 52 additions and 27 deletions

View File

@@ -149,6 +149,7 @@ pub struct EpiIntegration {
impl EpiIntegration {
pub fn new(
integration_name: &'static str,
gl: std::rc::Rc<glow::Context>,
max_texture_side: usize,
window: &winit::window::Window,
storage: Option<Box<dyn epi::Storage>>,
@@ -169,6 +170,7 @@ impl EpiIntegration {
},
output: Default::default(),
storage,
gl,
};
if prefer_dark_mode == Some(true) {