]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/cockpit.cxx
Set the format default to float instead of int.
[flightgear.git] / src / Cockpit / cockpit.cxx
index c6cb01eec41c618900c770da77221647ea7a576d..70366cf407401c2bae53d359b4443efb24e8536e 100644 (file)
@@ -29,6 +29,8 @@
 #  include <windows.h>
 #endif
 
+#include <GL/glu.h>
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -721,15 +723,9 @@ void fgCockpitUpdate( void ) {
         fgUpdateHUD();
     }
 
-#define DISPLAY_COUNTER
-#ifdef DISPLAY_COUNTER
-    else
-    {
+    if ( fgGetBool( "/sim/hud/draw-fps", false ) ) {
         char buf[64];
-        float fps    =       get_frame_rate();
-//      float tris   = fps * get_vfc_tris_drawn();
-//      float culled = fps * get_vfc_tris_culled();
-//      sprintf(buf,"%-4.1f  %7.0f  %7.0f", fps, tris, culled);
+        float fps = get_frame_rate();
         sprintf(buf,"%-5.1f", fps);
 
         glMatrixMode( GL_PROJECTION );
@@ -755,7 +751,6 @@ void fgCockpitUpdate( void ) {
         glMatrixMode( GL_MODELVIEW );
         glPopMatrix();
     }
-#endif // #ifdef DISPLAY_COUNTER
     
     glViewport( 0, 0, iwidth, iheight );
 }