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

Allow software rendering OpenGL by default (#1693)

Follow-up to https://github.com/emilk/egui/pull/1681
This commit is contained in:
Emil Ernerfeldt
2022-05-29 20:37:19 +02:00
committed by GitHub
parent 4a7a2d6430
commit 20c8ee302c
4 changed files with 31 additions and 8 deletions

View File

@@ -15,9 +15,18 @@ fn create_display(
glow::Context,
) {
crate::profile_function!();
use crate::HardwareAcceleration;
let hardware_acceleration = match native_options.hardware_acceleration {
HardwareAcceleration::Required => Some(true),
HardwareAcceleration::Preferred => None,
HardwareAcceleration::Off => Some(false),
};
let gl_window = unsafe {
glutin::ContextBuilder::new()
.with_hardware_acceleration(native_options.hardware_acceleration)
.with_hardware_acceleration(hardware_acceleration)
.with_depth_buffer(native_options.depth_buffer)
.with_multisampling(native_options.multisampling)
.with_srgb(true)