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