From 2088a61f2fc93b2f37c90d4b4ed37520b905d14f Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 21 May 2011 09:16:21 +0200 Subject: [PATCH] Revert "make clearcolor black, so that space is dark instead of gray." This reverts commit b36b33f716031ef5933d41a1e5c17c6be3e54c28. See #316: Caused issues with sky becoming black in dense fog. Also: when the fog issue is solved, we could configure the constant (black) clear color once only (during init), no need to do it in every loop. Also, entire "if (skyblend) { ... } else {..}" was redundant, since "if" and "else" clauses were all identical - and the "clearColor" variables were unused. => Once the fog issue is solved, we can easily improve the clearColor configuration here. --- src/Main/renderer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index fe713ab62..dfa3bb45b 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -611,11 +611,11 @@ FGRenderer::update( bool refresh_camera_settings ) { if ( fgGetBool("/sim/rendering/textures") ) { SGVec4f clearColor(l->adj_fog_color()); - camera->setClearColor(osg::Vec4(0.0, 0.0, 0.0, 1.0)); + camera->setClearColor(toOsg(clearColor)); } } else { SGVec4f clearColor(l->sky_color()); - camera->setClearColor(osg::Vec4(0.0, 0.0, 0.0, 1.0)); + camera->setClearColor(toOsg(clearColor)); } // update fog params if visibility has changed