From c585acd9694ddfe39310353bfb34dc54be1063bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 24 Aug 2013 18:17:48 +0200 Subject: [PATCH] Use non-default initial clear color in Renderer. Set it to some non-trivial value to achieve these two things: * Some "corporate identity", I find very dark gray nicer than pure black. * Easier "black screen" debugging. Native Client, for example, by default clears to pure white, which caused me painful hours figuring out what the hell is going on. --- src/Renderer.cpp | 3 +++ src/Renderer.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 77db22f6c..88eb14fbd 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -205,6 +205,9 @@ void Renderer::initializeContextBasedFunctionality(Context& context) { #else static_cast(context); #endif + + /* Set some "corporate identity" */ + setClearColor(Color3(0.125f)); } #ifndef MAGNUM_TARGET_GLES diff --git a/src/Renderer.h b/src/Renderer.h index 1e345f3ea..53e547f6a 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -234,7 +234,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Set clear color * - * Initial value is fully opaque black. + * Initial value is {0.125f, 0.125f, 0.125f, 1.0f}. * @see @fn_gl{ClearColor} */ static void setClearColor(const Color4& color);