From 8debb996a1e77403417f7d2e107c253dc10349d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 24 Aug 2013 18:16:47 +0200 Subject: [PATCH 1/2] Blame the right Windows header for these insane defines. Everyone is fired. --- src/Math/Matrix4.h | 2 +- src/SceneGraph/Camera3D.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index be00c05f3..3653f480f 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -31,7 +31,7 @@ #include "Math/Matrix.h" #include "Math/Vector4.h" -#ifdef _WIN32 /* I so HATE windows.h */ +#ifdef _WIN32 /* I so HATE windef.h */ #undef near #undef far #endif diff --git a/src/SceneGraph/Camera3D.h b/src/SceneGraph/Camera3D.h index 2b1c430e1..ac18cd66f 100644 --- a/src/SceneGraph/Camera3D.h +++ b/src/SceneGraph/Camera3D.h @@ -30,7 +30,7 @@ #include "AbstractCamera.h" -#ifdef _WIN32 /* I so HATE windows.h */ +#ifdef _WIN32 /* I so HATE windef.h */ #undef near #undef far #endif 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 2/2] 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);