mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Clear color values are now explicitely sent to the rendering backend as-is. (#2666)
* Clear color values are not explicitely sent to the rendering backend as-is. Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!). * fill in pr numbers in changelog * Epi comment fix Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * Color32 comment fix Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * move changelog line * rename fix * use backticks in doc --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use egui::Rgba;
|
||||
use wasm_bindgen::JsValue;
|
||||
|
||||
/// Renderer for a browser canvas.
|
||||
@@ -19,7 +18,7 @@ pub(crate) trait WebPainter {
|
||||
/// Update all internal textures and paint gui.
|
||||
fn paint_and_update_textures(
|
||||
&mut self,
|
||||
clear_color: Rgba,
|
||||
clear_color: [f32; 4],
|
||||
clipped_primitives: &[egui::ClippedPrimitive],
|
||||
pixels_per_point: f32,
|
||||
textures_delta: &egui::TexturesDelta,
|
||||
|
||||
Reference in New Issue
Block a user