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