Browse Source

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.
pull/23/head
Vladimír Vondruš 13 years ago
parent
commit
c585acd969
  1. 3
      src/Renderer.cpp
  2. 2
      src/Renderer.h

3
src/Renderer.cpp

@ -205,6 +205,9 @@ void Renderer::initializeContextBasedFunctionality(Context& context) {
#else
static_cast<void>(context);
#endif
/* Set some "corporate identity" */
setClearColor(Color3(0.125f));
}
#ifndef MAGNUM_TARGET_GLES

2
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);

Loading…
Cancel
Save