From: ehofman Date: Mon, 22 Mar 2004 20:03:53 +0000 (+0000) Subject: These test should not be needed when properly using OpnGL colors. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2089a2a95611ff41ef729a6fccaff64d3d5a1a3b;p=simgear.git These test should not be needed when properly using OpnGL colors. --- diff --git a/simgear/screen/colors.hxx b/simgear/screen/colors.hxx index 40ce19e6..aa0d4145 100644 --- a/simgear/screen/colors.hxx +++ b/simgear/screen/colors.hxx @@ -47,13 +47,6 @@ inline void gamma_correct_rgb(float *color, color[0] = pow(color[0], tmp); color[1] = pow(color[1], tmp); color[2] = pow(color[2], tmp); - - if ( color[0] < 0.0 ) { color[0] = 0.0; } - if ( color[1] < 0.0 ) { color[1] = 0.0; } - if ( color[2] < 0.0 ) { color[2] = 0.0; } - if ( color[0] > 1.0 ) { color[0] = 1.0; } - if ( color[1] > 1.0 ) { color[1] = 1.0; } - if ( color[2] > 1.0 ) { color[2] = 1.0; } }; inline void gamma_correct_c(float *color, @@ -63,8 +56,6 @@ inline void gamma_correct_c(float *color, return; *color = pow(*color, reff/system); - if ( *color < 0.0 ) { *color = 0.0; } - if ( *color > 1.0 ) { *color = 1.0; } }; inline void gamma_restore_rgb(float *color, @@ -77,13 +68,6 @@ inline void gamma_restore_rgb(float *color, color[0] = pow(color[0], tmp); color[1] = pow(color[1], tmp); color[2] = pow(color[2], tmp); - - if ( color[0] < 0.0 ) { color[0] = 0.0; } - if ( color[1] < 0.0 ) { color[1] = 0.0; } - if ( color[2] < 0.0 ) { color[2] = 0.0; } - if ( color[0] > 1.0 ) { color[0] = 1.0; } - if ( color[1] > 1.0 ) { color[1] = 1.0; } - if ( color[2] > 1.0 ) { color[2] = 1.0; } }; inline void gamma_restore_c(float *color, @@ -93,8 +77,6 @@ inline void gamma_restore_c(float *color, return; *color = pow(*color, system/reff); - if ( *color < 0.0 ) { *color = 0.0; } - if ( *color > 1.0 ) { *color = 1.0; } };