diff --git a/panda/src/display/config_display.cxx b/panda/src/display/config_display.cxx index 6ac254d4aa..48d33b4efa 100644 --- a/panda/src/display/config_display.cxx +++ b/panda/src/display/config_display.cxx @@ -66,6 +66,10 @@ const bool pipe_spec_is_remote = config_display.Defined("pipe-machine") || config_display.GetBool("pipe-remote", false); +const float gsg_clear_r = config_display.GetFloat("gsg-clear-r", 0.0); +const float gsg_clear_g = config_display.GetFloat("gsg-clear-g", 0.0); +const float gsg_clear_b = config_display.GetFloat("gsg-clear-b", 0.0); + Config::ConfigTable::Symbol::iterator pipe_modules_begin(void) { return disp->begin(); diff --git a/panda/src/display/config_display.h b/panda/src/display/config_display.h index a7b08e2f55..211222522d 100644 --- a/panda/src/display/config_display.h +++ b/panda/src/display/config_display.h @@ -22,6 +22,10 @@ extern const int pipe_spec_pipe_number; extern const bool pipe_spec_is_file; extern const bool pipe_spec_is_remote; +extern const float gsg_clear_r; +extern const float gsg_clear_g; +extern const float gsg_clear_b; + extern Config::ConfigTable::Symbol::iterator pipe_modules_begin(void); extern Config::ConfigTable::Symbol::iterator pipe_modules_end(void); extern Config::ConfigTable::Symbol::iterator gsg_modules_begin(void); diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index eaea0211b8..f032aee1b8 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -89,7 +89,7 @@ reset() { _state.clear(); _buffer_mask = 0; - _color_clear_value.set(0.0, 0.0, 0.0, 0.0); + _color_clear_value.set(gsg_clear_r, gsg_clear_g, gsg_clear_b, 0.0); _depth_clear_value = 1.0; _stencil_clear_value = 0.0; _accum_clear_value.set(0.0, 0.0, 0.0, 0.0);