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

Improve text redering and do all color operation in gamma space (#2071)

This commit is contained in:
Emil Ernerfeldt
2022-09-24 17:53:11 +02:00
committed by GitHub
parent 29fa63317e
commit 4ac1e28eae
36 changed files with 468 additions and 733 deletions

View File

@@ -115,7 +115,7 @@ fn create_display(event_loop: &glutin::event_loop::EventLoop<()>) -> glium::Disp
let context_builder = glutin::ContextBuilder::new()
.with_depth_buffer(0)
.with_srgb(true)
.with_srgb(false)
.with_stencil_buffer(0)
.with_vsync(true);

View File

@@ -10,6 +10,8 @@ fn main() {
let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop);
let mut color_test = egui_demo_lib::ColorTest::default();
event_loop.run(move |event, _, control_flow| {
let mut redraw = || {
let mut quit = false;
@@ -21,6 +23,12 @@ fn main() {
quit = true;
}
});
egui::CentralPanel::default().show(egui_ctx, |ui| {
egui::ScrollArea::vertical().show(ui, |ui| {
color_test.ui(ui);
});
});
});
*control_flow = if quit {
@@ -93,7 +101,7 @@ fn create_display(event_loop: &glutin::event_loop::EventLoop<()>) -> glium::Disp
let context_builder = glutin::ContextBuilder::new()
.with_depth_buffer(0)
.with_srgb(true)
.with_srgb(false)
.with_stencil_buffer(0)
.with_vsync(true);