]> git.mxchange.org Git - flightgear.git/commitdiff
Patches to allow panel to display.
authorcurt <curt>
Fri, 3 Sep 1999 00:27:48 +0000 (00:27 +0000)
committercurt <curt>
Fri, 3 Sep 1999 00:27:48 +0000 (00:27 +0000)
Allow model_hz to be defined from the command line.

src/Main/keyboard.cxx
src/Main/main.cxx
src/Main/options.cxx
src/Main/views.cxx

index 7fcb9aa2c7889fd9a0c3f0742387100558c3c3da..508b5f25dedb3c7d51dc2f87dab30be83d042d39 100644 (file)
@@ -420,9 +420,15 @@ void GLUTspecialkey(int k, int x, int y) {
            return;
        case GLUT_KEY_F9: // F9 toggles textures on and off...
            if ( material_mgr.loaded() ) {
-               current_options.get_textures() ?
-                   current_options.set_textures(false) :
+               if (current_options.get_textures()) {
+                   current_options.set_textures(false);
+                   glDisable(GL_TEXTURE_2D);
+                   ssgOverrideTexture(true);
+               } else {
                    current_options.set_textures(true);
+                   glEnable(GL_TEXTURE_2D);
+                   ssgOverrideTexture(false);
+               }
                FG_LOG( FG_INPUT, FG_INFO, "Toggling texture" );
            } else {
                FG_LOG( FG_INPUT, FG_INFO, 
index fae72031ed5973aae7792c21678953a293dbd476..0317b0d776d4b5d2dd9150db2add0f95f0563f68 100644 (file)
@@ -901,13 +901,13 @@ static void fgIdleFunction ( void ) {
 // Handle new window size or exposure
 void fgReshape( int width, int height ) {
     if ( ! current_options.get_panel_status() ) {
-       // current_view.set_win_ratio( (GLfloat) width / (GLfloat) height );
-       // xglViewport(0, 0 , (GLint)(width), (GLint)(height) );
+       current_view.set_win_ratio( (GLfloat) width / (GLfloat) height );
+       xglViewport(0, 0 , (GLint)(width), (GLint)(height) );
     } else {
-       // current_view.set_win_ratio( (GLfloat) width / 
-       //                             ((GLfloat) (height)*0.4232) );
-       // xglViewport(0, (GLint)((height)*0.5768), (GLint)(width), 
-       //                             (GLint)((height)*0.4232) );
+       current_view.set_win_ratio( (GLfloat) width / 
+                                   ((GLfloat) (height)*0.4232) );
+       xglViewport(0, (GLint)((height)*0.5768), (GLint)(width), 
+                   (GLint)((height)*0.4232) );
     }
 
     current_view.set_winWidth( width );
index 13832655c4d0b94b907b6a9ce5f44c8f43cb0a0d..826dfe621862cf14d10ca4f354b5a89f09af4556 100644 (file)
@@ -642,7 +642,6 @@ int fgOPTIONS::parse_option( const string& arg ) {
        flight_model = parse_fdm( arg.substr(6) );
     } else if ( arg.find( "--model-hz=" ) != string::npos ) {
        model_hz = atoi( arg.substr(11) );
-       cout << "model hz = " << model_hz << endl;
     } else if ( arg.find( "--speed=" ) != string::npos ) {
        speed_up = atoi( arg.substr(8) );
     } else if ( arg == "--fog-disable" ) {
index c7d2114c3f73bb6011c2dd6d0d0a45106fb3c80b..542db906df8a583f0b5a2e698a63733d7401e71f 100644 (file)
@@ -153,10 +153,10 @@ void FGView::UpdateViewParams( void ) {
     }
 
     if ( ! current_options.get_panel_status() ) {
-       // xglViewport(0, 0 , (GLint)(winWidth), (GLint)(winHeight) );
+       xglViewport(0, 0 , (GLint)(winWidth), (GLint)(winHeight) );
     } else {
-       // xglViewport(0, (GLint)((winHeight)*0.5768), (GLint)(winWidth), 
-       //             (GLint)((winHeight)*0.4232) );
+       xglViewport(0, (GLint)((winHeight)*0.5768), (GLint)(winWidth), 
+                   (GLint)((winHeight)*0.4232) );
     }
 
     panel_hist = current_options.get_panel_status();