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

Add custom shader_version on glow renderer (#1993)

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Adia Robbie
2022-09-06 15:08:16 +07:00
committed by GitHub
parent 7fae634dc3
commit b43a8626cf
9 changed files with 30 additions and 17 deletions

View File

@@ -311,6 +311,13 @@ pub struct NativeOptions {
///
/// Note: A [`NativeOptions`] clone will not include any `event_loop_builder` hook.
pub event_loop_builder: Option<EventLoopBuilderHook>,
#[cfg(feature = "glow")]
/// Needed for cross compiling for VirtualBox VMSVGA driver with OpenGL ES 2.0 and OpenGL 2.1 which doesn't support SRGB texture.
/// See <https://github.com/emilk/egui/pull/1993>.
///
/// For OpenGL ES 2.0: set this to [`egui_glow::ShaderVersion::Es100`] to solve blank texture problem (by using the "fallback shader").
pub shader_version: Option<egui_glow::ShaderVersion>,
}
#[cfg(not(target_arch = "wasm32"))]
@@ -350,6 +357,8 @@ impl Default for NativeOptions {
default_theme: Theme::Dark,
run_and_return: true,
event_loop_builder: None,
#[cfg(feature = "glow")]
shader_version: None,
}
}
}