From: david Date: Mon, 25 Mar 2002 19:56:48 +0000 (+0000) Subject: Patch from Melchior Franz: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be5d3653488521e050f9b2eb9b380304b413cf46;p=simgear.git Patch from Melchior Franz: Here is a patch that fixes a little problem in dome.cxx: The fog_color is created in a sgVec3 (227) but then handed over to ::repaint(), which expects a sgVec4 (282). Then (343) center_color (although defined as sgVec4) is only initialized with 3 values, but later (441) assigned to 'slot' via sgCopyVec4. --- diff --git a/simgear/sky/dome.cxx b/simgear/sky/dome.cxx index 22897294..2e14289b 100644 --- a/simgear/sky/dome.cxx +++ b/simgear/sky/dome.cxx @@ -224,8 +224,8 @@ ssgBranch * SGSkyDome::build( ) { lower_ring_cl->add( color ); // force a repaint of the sky colors with ugly defaults - sgVec3 fog_color; - sgSetVec3( fog_color, 1.0, 1.0, 1.0 ); + sgVec4 fog_color; + sgSetVec4( fog_color, 1.0, 1.0, 1.0, 1.0 ); repaint( color, fog_color, 0.0, 5000.0 ); // build the ssg scene graph sub tree for the sky and connected @@ -342,6 +342,7 @@ bool SGSkyDome::repaint( sgVec4 sky_color, sgVec4 fog_color, double sun_angle, diff = sky_color[j] - fog_color[j]; center_color[j] = sky_color[j] - diff * ( 1.0 - vis_factor ); } + center_color[3] = 1.0; for ( i = 0; i < 6; i++ ) { for ( j = 0; j < 3; j++ ) {