mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
* Fix example hello_world_par
* Added warning for glow eframe when creating `Context::create_viewport_sync` in other thread, or cannot be rendered! * Fix clippy warning
This commit is contained in:
@@ -1034,6 +1034,11 @@ mod glow_integration {
|
||||
);
|
||||
let glutin = &mut *glutin.write();
|
||||
|
||||
let screen_size_in_pixels: [u32; 2] =
|
||||
win.inner_size().into();
|
||||
|
||||
let clipped_primitives = egui_ctx.tessellate(output.shapes);
|
||||
|
||||
glutin.current_gl_context = Some(
|
||||
glutin
|
||||
.current_gl_context
|
||||
@@ -1045,8 +1050,14 @@ mod glow_integration {
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
let screen_size_in_pixels: [u32; 2] =
|
||||
win.inner_size().into();
|
||||
if !window
|
||||
.gl_surface
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.is_current(glutin.current_gl_context.as_ref().unwrap())
|
||||
{
|
||||
log::error!("egui::create_viewport_sync with title: `{}` is not created in main thread, try to use wgpu!", window.builder.title);
|
||||
}
|
||||
|
||||
egui_glow::painter::clear(
|
||||
&_gl,
|
||||
@@ -1054,8 +1065,6 @@ mod glow_integration {
|
||||
[0.0, 0.0, 0.0, 0.0],
|
||||
);
|
||||
|
||||
let clipped_primitives = egui_ctx.tessellate(output.shapes);
|
||||
|
||||
_painter.write().paint_and_update_textures(
|
||||
screen_size_in_pixels,
|
||||
egui_ctx.pixels_per_point(),
|
||||
|
||||
Reference in New Issue
Block a user