mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Expose Raw Window and Display Handles (#3073)
* Expose raw window and display handles in eframe * Ensure that no one implements `Clone` in the future * Cleanup --------- Co-authored-by: Matti Virkkunen <mvirkkunen@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
use std::time::Instant;
|
||||
|
||||
use raw_window_handle::{HasRawDisplayHandle as _, HasRawWindowHandle as _};
|
||||
use winit::event_loop::{
|
||||
ControlFlow, EventLoop, EventLoopBuilder, EventLoopProxy, EventLoopWindowTarget,
|
||||
};
|
||||
@@ -345,7 +346,6 @@ mod glow_integration {
|
||||
prelude::{GlDisplay, NotCurrentGlContextSurfaceAccessor, PossiblyCurrentGlContext},
|
||||
surface::GlSurface,
|
||||
};
|
||||
use raw_window_handle::HasRawWindowHandle;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -756,6 +756,8 @@ mod glow_integration {
|
||||
gl: Some(gl.clone()),
|
||||
#[cfg(feature = "wgpu")]
|
||||
wgpu_render_state: None,
|
||||
raw_display_handle: gl_window.window().raw_display_handle(),
|
||||
raw_window_handle: gl_window.window().raw_window_handle(),
|
||||
});
|
||||
|
||||
if app.warm_up_enabled() {
|
||||
@@ -1215,6 +1217,8 @@ mod wgpu_integration {
|
||||
#[cfg(feature = "glow")]
|
||||
gl: None,
|
||||
wgpu_render_state,
|
||||
raw_display_handle: window.raw_display_handle(),
|
||||
raw_window_handle: window.raw_window_handle(),
|
||||
});
|
||||
|
||||
if app.warm_up_enabled() {
|
||||
|
||||
Reference in New Issue
Block a user