mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -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:
@@ -25,8 +25,8 @@ fn main() -> Result<(), eframe::Error> {
|
||||
struct MyApp {}
|
||||
|
||||
impl eframe::App for MyApp {
|
||||
fn clear_color(&self, _visuals: &egui::Visuals) -> egui::Rgba {
|
||||
egui::Rgba::TRANSPARENT // Make sure we don't paint anything behind the rounded corners
|
||||
fn clear_color(&self, _visuals: &egui::Visuals) -> [f32; 4] {
|
||||
egui::Rgba::TRANSPARENT.to_array() // Make sure we don't paint anything behind the rounded corners
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
|
||||
|
||||
Reference in New Issue
Block a user