mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 12:50:04 -04:00
Improve text redering and do all color operation in gamma space (#2071)
This commit is contained in:
@@ -338,7 +338,7 @@ mod glow_integration {
|
||||
.with_hardware_acceleration(hardware_acceleration)
|
||||
.with_depth_buffer(native_options.depth_buffer)
|
||||
.with_multisampling(native_options.multisampling)
|
||||
.with_srgb(true)
|
||||
.with_srgb(false)
|
||||
.with_stencil_buffer(native_options.stencil_buffer)
|
||||
.with_vsync(native_options.vsync)
|
||||
.build_windowed(window_builder, event_loop)
|
||||
@@ -365,7 +365,7 @@ mod glow_integration {
|
||||
let gl = Arc::new(gl);
|
||||
|
||||
let painter =
|
||||
egui_glow::Painter::new(gl.clone(), None, "", self.native_options.shader_version)
|
||||
egui_glow::Painter::new(gl.clone(), "", self.native_options.shader_version)
|
||||
.unwrap_or_else(|error| panic!("some OpenGL error occurred {}\n", error));
|
||||
|
||||
let system_theme = self.native_options.system_theme();
|
||||
|
||||
@@ -22,8 +22,7 @@ impl WebPainter {
|
||||
let (gl, shader_prefix) = init_glow_context_from_canvas(&canvas, options)?;
|
||||
let gl = std::sync::Arc::new(gl);
|
||||
|
||||
let dimension = [canvas.width() as i32, canvas.height() as i32];
|
||||
let painter = egui_glow::Painter::new(gl, Some(dimension), shader_prefix, None)
|
||||
let painter = egui_glow::Painter::new(gl, shader_prefix, None)
|
||||
.map_err(|error| format!("Error starting glow painter: {}", error))?;
|
||||
|
||||
Ok(Self {
|
||||
|
||||
Reference in New Issue
Block a user