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.
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