]> git.mxchange.org Git - flightgear.git/commitdiff
move GL_TEXTURE_LOD_BIAS_EXT one section up and document what it does
authormfranz <mfranz>
Mon, 7 Aug 2006 15:11:46 +0000 (15:11 +0000)
committermfranz <mfranz>
Mon, 7 Aug 2006 15:11:46 +0000 (15:11 +0000)
(this was the reason why the first two text lines on the splash screen
looked more blurry than the others). BTW: I played with other values
than -0.5, but this turned out to be the best already. It makes textures
sharper than 0, but not too sharp (and thus flickering).

src/Main/main.cxx

index 74e30dff8b443ce0569f7a1fafd23cd3e49bba3d..c9e7f3f81c3aad8bb42079831068297ac38b2575 100644 (file)
@@ -617,6 +617,11 @@ static void fgMainLoop( void ) {
 static void fgIdleFunction ( void ) {
     if ( idle_state == 0 ) {
         idle_state++;
+
+#ifdef GL_EXT_texture_lod_bias
+        // negative values sharpen, positive values blur mipmapped textures
+        glTexEnvf( GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, -0.5 ) ;
+#endif
         fgSplashProgress("setting up scenegraph & user interface");
 
 
@@ -655,10 +660,6 @@ static void fgIdleFunction ( void ) {
         // Read the list of available aircrafts
         fgReadAircraft();
 
-#ifdef GL_EXT_texture_lod_bias
-        glTexEnvf( GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, -0.5 ) ;
-#endif
-
         // get the address of our OpenGL extensions
         if (SGIsOpenGLExtensionSupported("GL_EXT_point_parameters") ) {
             glPointParameterIsSupported = true;