From 7d0379d815833feab93cf81e8f37efa71cdaf953 Mon Sep 17 00:00:00 2001 From: blaiz Date: Thu, 16 Jan 2025 21:20:49 +0100 Subject: [PATCH] change clear_color's default value to grey --- lib/config/src/config.rs | 2 +- lib/graphics/src/handles/backend.rs | 2 -- misc | 2 +- src/client/client.rs | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/config/src/config.rs b/lib/config/src/config.rs index 02e38c3..30e5827 100644 --- a/lib/config/src/config.rs +++ b/lib/config/src/config.rs @@ -190,7 +190,7 @@ pub struct ConfigBackend { #[default = false] pub vsync: bool, /// Default clear color - #[default = ConfRgb::black()] + #[default = ConfRgb::grey()] pub clear_color: ConfRgb, #[default = "auto"] pub gpu: String, diff --git a/lib/graphics/src/handles/backend.rs b/lib/graphics/src/handles/backend.rs index b26d0ad..c406491 100644 --- a/lib/graphics/src/handles/backend.rs +++ b/lib/graphics/src/handles/backend.rs @@ -70,7 +70,6 @@ pub mod backend { pub fn consumble_multi_samples(&self) { self.add_cmd(AllCommands::Misc(CommandsMisc::ConsumeMultiSamplingTargets)); } - /// Updates the clear color of the backend pub fn update_clear_color(&self, clear_color: ColorRgba) { self.add_cmd(AllCommands::Render(CommandsRender::Clear(CommandClear { @@ -78,7 +77,6 @@ pub mod backend { force_clear: false, }))); } - pub fn indices_for_quads_required_notify(&self, quad_count_required: u64) { let cmd = CommandIndicesForQuadsRequiredNotify { quad_count_required, diff --git a/misc b/misc index 4906058..31c39b9 160000 --- a/misc +++ b/misc @@ -1 +1 @@ -Subproject commit 49060580c6ccba55e39620a283bc257ab61973e8 +Subproject commit 31c39b978117f12fa75f94578d6011afca1b505b diff --git a/src/client/client.rs b/src/client/client.rs index 50378bf..b1500bf 100644 --- a/src/client/client.rs +++ b/src/client/client.rs @@ -2284,10 +2284,10 @@ impl ClientNativeImpl { match name.as_str() { "gl.vsync" => { + // update vsync val in backend self.on_vsync_change(); } "gl.clear_color" => { - // update vsync val in backend self.graphics.backend_handle.update_clear_color(ColorRgba { r: self.config.engine.gl.clear_color.r as f32 / 255.0, g: self.config.engine.gl.clear_color.g as f32 / 255.0,