]> git.mxchange.org Git - flightgear.git/commitdiff
Revert "make clearcolor black, so that space is dark instead of gray."
authorThorstenB <brehmt@gmail.com>
Sat, 21 May 2011 07:16:21 +0000 (09:16 +0200)
committerThorstenB <brehmt@gmail.com>
Sat, 21 May 2011 07:16:21 +0000 (09:16 +0200)
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

index fe713ab623984fb917862e9263b7683e85f7d8dd..dfa3bb45b7859b52e6b017f451dcf3d0d3360ab9 100644 (file)
@@ -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