]> git.mxchange.org Git - flightgear.git/commitdiff
Replaced "extern displayInstruments" with a entry in fgOPTIONS.
authorcurt <curt>
Sat, 27 Jun 1998 16:54:32 +0000 (16:54 +0000)
committercurt <curt>
Sat, 27 Jun 1998 16:54:32 +0000 (16:54 +0000)
Don't change the view port when displaying the panel.

Main/GLUTkey.cxx
Main/GLUTmain.cxx
Main/fg_init.cxx
Main/options.cxx
Main/options.hxx

index 410222b4bd1163ee0818f38dca3cd55d67289b9b..3d7214ea3a49145e8cd699b8109b74d6699c931f 100644 (file)
@@ -50,9 +50,6 @@
 #include "views.hxx"
 
 
-extern int displayInstruments;
-
-
 /* Handle keyboard events */
 void GLUTkey(unsigned char k, int x, int y) {
     fgCONTROLS *c;
@@ -108,7 +105,7 @@ void GLUTkey(unsigned char k, int x, int y) {
            t->warp_delta -= 30;
            return;
        case 87: /* W key */
-           displayInstruments = !displayInstruments;
+           o->panel_status = !(o->panel_status);
            return;
        case 88: /* X key */
            o->fov *= 1.05;
@@ -290,9 +287,13 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 /* $Log$
-/* Revision 1.12  1998/06/12 14:27:26  curt
-/* Pui -> PUI, Gui -> GUI.
+/* Revision 1.13  1998/06/27 16:54:32  curt
+/* Replaced "extern displayInstruments" with a entry in fgOPTIONS.
+/* Don't change the view port when displaying the panel.
 /*
+ * Revision 1.12  1998/06/12 14:27:26  curt
+ * Pui -> PUI, Gui -> GUI.
+ *
  * Revision 1.11  1998/06/12 00:57:38  curt
  * Added support for Pui/Gui.
  * Converted fog to GL_FOG_EXP2.
index c85e8f15afac365e8ab5d776533843ef57189a85..1d5dbce5f37b4997a47582eac64af6e1a8b23f1a 100644 (file)
@@ -85,9 +85,6 @@ fgGENERAL general;
 // Another hack
 int use_signals = 0;
 
-// Yet another other hack. Used for my prototype instrument code. (Durk)
-int displayInstruments; 
-
 // Global structures for the Audio library
 #ifdef HAVE_AUDIO_SUPPORT
 slScheduler audio_sched ( 8000 ) ;
@@ -176,20 +173,20 @@ static void fgUpdateViewParams( void ) {
     v->Update(f);
     v->UpdateWorldToEye(f);
 
-    if (displayInstruments) {
-       xglViewport( 0, (GLint)((v->winHeight) / 2 ) , 
-                    (GLint)(v->winWidth), (GLint)(v->winHeight) / 2 );
-       // Tell GL we are about to modify the projection parameters
-       xglMatrixMode(GL_PROJECTION);
-       xglLoadIdentity();
-       gluPerspective(o->fov, v->win_ratio / 2.0, 1.0, 100000.0);
-    } else {
-       xglViewport(0, 0 , (GLint)(v->winWidth), (GLint)(v->winHeight) );
-       // Tell GL we are about to modify the projection parameters
-       xglMatrixMode(GL_PROJECTION);
-       xglLoadIdentity();
-       gluPerspective(o->fov, v->win_ratio, 10.0, 100000.0);
-    }
+    // if (!o->panel_status) {
+    // xglViewport( 0, (GLint)((v->winHeight) / 2 ) , 
+    // (GLint)(v->winWidth), (GLint)(v->winHeight) / 2 );
+    // Tell GL we are about to modify the projection parameters
+    // xglMatrixMode(GL_PROJECTION);
+    // xglLoadIdentity();
+    // gluPerspective(o->fov, v->win_ratio / 2.0, 1.0, 100000.0);
+    // } else {
+    xglViewport(0, 0 , (GLint)(v->winWidth), (GLint)(v->winHeight) );
+    // Tell GL we are about to modify the projection parameters
+    xglMatrixMode(GL_PROJECTION);
+    xglLoadIdentity();
+    gluPerspective(o->fov, v->win_ratio, 10.0, 100000.0);
+    // }
 
     xglMatrixMode(GL_MODELVIEW);
     xglLoadIdentity();
@@ -227,8 +224,12 @@ static void fgUpdateViewParams( void ) {
 }
 
 
+#ifdef 0
 // Draw a basic instrument panel
 static void fgUpdateInstrViewParams( void ) {
+
+    exit(0);
+
     fgVIEW *v;
 
     v = &current_view;
@@ -268,6 +269,7 @@ static void fgUpdateInstrViewParams( void ) {
     xglMatrixMode(GL_MODELVIEW);
     xglPopMatrix();
 }
+#endif
 
 
 // Update all Visuals (redraws anything graphics related)
@@ -380,15 +382,13 @@ static void fgRenderFrame( void ) {
 
     xglDisable( GL_TEXTURE_2D );
 
-    // display HUD
-    if( o->hud_status ) {
-       fgCockpitUpdate();
-    }
+    // display HUD && Panel
+    fgCockpitUpdate();
 
     // display instruments
-    if (displayInstruments) {
-       fgUpdateInstrViewParams();
-    }
+    // if (!o->panel_status) {
+    // fgUpdateInstrViewParams();
+    // }
     puDisplay();
     xglutSwapBuffers();
 }
@@ -745,6 +745,10 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.28  1998/06/27 16:54:32  curt
+// Replaced "extern displayInstruments" with a entry in fgOPTIONS.
+// Don't change the view port when displaying the panel.
+//
 // Revision 1.27  1998/06/17 21:35:10  curt
 // Refined conditional audio support compilation.
 // Moved texture parameter setup calls to ../Scenery/materials.cxx
index 5978b3c0eb20febfbe33d94baddb4dbb819f22fc..dd0890bd8096053664c9f712ae8385409ab57ffe 100644 (file)
@@ -59,8 +59,7 @@
 #include "options.hxx"
 #include "views.hxx"
 
-// extern int show_hud;             // HUD state
-extern int displayInstruments;
+
 extern const char *default_root;
 
 
@@ -367,9 +366,6 @@ int fgInitSubsystems( void ) {
 
     fgFlightModelInit( FG_LARCSIM, f, 1.0 / DEFAULT_MODEL_HZ );
 
-    // Let's not show the instrument panel
-    displayInstruments = 0;
-
     // Joystick support
     if (fgJoystickInit(0) ) {
        // Joystick initialized ok.
@@ -387,6 +383,10 @@ int fgInitSubsystems( void ) {
 
 
 // $Log$
+// Revision 1.21  1998/06/27 16:54:33  curt
+// Replaced "extern displayInstruments" with a entry in fgOPTIONS.
+// Don't change the view port when displaying the panel.
+//
 // Revision 1.20  1998/06/17 21:35:12  curt
 // Refined conditional audio support compilation.
 // Moved texture parameter setup calls to ../Scenery/materials.cxx
index b6908d6814b54cbd3f69903f70f8dea01101e196..5efd62e1efeea4a45aed847f31cf3a859d6e1cd3 100644 (file)
@@ -69,6 +69,7 @@ fgOPTIONS::fgOPTIONS( void ) {
 
     // Features
     hud_status = 1;
+    panel_status = 1;
 
     // Rendering options
     fog = 2;    // nicest
@@ -433,6 +434,10 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.13  1998/06/27 16:54:34  curt
+// Replaced "extern displayInstruments" with a entry in fgOPTIONS.
+// Don't change the view port when displaying the panel.
+//
 // Revision 1.12  1998/06/17 21:35:13  curt
 // Refined conditional audio support compilation.
 // Moved texture parameter setup calls to ../Scenery/materials.cxx
index dc88b418cbc093f145f495829e1db7531671e780..73203f227eee4261e635037fafac1133cf402049 100644 (file)
@@ -48,6 +48,7 @@ public:
 
     // Features
     int hud_status;    // HUD on/off
+    int panel_status;  // Panel on/off
 
     // Rendering options
     int fog;           // Fog enabled/disabled
@@ -97,6 +98,10 @@ extern fgOPTIONS current_options;
 
 
 // $Log$
+// Revision 1.9  1998/06/27 16:54:34  curt
+// Replaced "extern displayInstruments" with a entry in fgOPTIONS.
+// Don't change the view port when displaying the panel.
+//
 // Revision 1.8  1998/05/16 13:08:36  curt
 // C++ - ified views.[ch]xx
 // Shuffled some additional view parameters into the fgVIEW class.