if ( (iteration == 0) && (current_options.get_panel_status()) ) {
// Did we run this loop before ?? ...and do we need the panel ??
- fgPanelReInit();
+ fgPanelReInit(0, 0, 1024, 768);
}
// display HUD && Panel
- if ( current_options.get_panel_status() ) {
- xglViewport(0, 0, v->winWidth, v->winHeight);
- }
fgCockpitUpdate();
iteration = 1; // don't ReInit the panel in the future
if ( ! current_options.get_panel_status() ) {
v->win_ratio = (GLfloat) width / (GLfloat) height;
} else {
- v->win_ratio = (GLfloat) width / ((GLfloat) (height)*0.67);
+ v->win_ratio = (GLfloat) width / ((GLfloat) (height)*0.4232);
}
}
// the system.
v->UpdateViewParams();
if ( current_options.get_panel_status() ) {
- fgPanelReInit();
+ fgPanelReInit(0, 0, 1024, 768);
}
}
xglutInit(argc, argv);
// Define Display Parameters
- if ( ! current_options.get_panel_status() ) {
- xglutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
- } else {
- xglutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE |
- GLUT_STENCIL);
- }
+ xglutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
// Define initial window size
xglutInitWindowSize(640, 480);
// $Log$
+// Revision 1.65 1998/11/09 23:39:22 curt
+// Tweaks for the instrument panel.
+//
// Revision 1.64 1998/11/07 19:07:09 curt
// Enable release builds using the --without-logging option to the configure
// script. Also a couple log message cleanups, plus some C to C++ comment
#endif
#include <Aircraft/aircraft.hxx>
+#include <Cockpit/panel.hxx>
#include <Debug/logstream.hxx>
#include <Include/fg_constants.h>
#include <Math/mat3.h>
UpdateViewMath(f);
UpdateWorldToEye(f);
+
+ if ((current_options.get_panel_status() != panel_hist) && (current_options.get_panel_status()))
+ {
+ fgPanelReInit( 0, 0, 1024, 768);
+ }
// if (!o->panel_status) {
// xglViewport( 0, (GLint)((winHeight) / 2 ) ,
// xglLoadIdentity();
// gluPerspective(o->fov, win_ratio / 2.0, 1.0, 100000.0);
// } else {
- xglViewport(0, 0 , (GLint)(winWidth), (GLint)(winHeight) );
+ if ( ! current_options.get_panel_status() ) {
+ xglViewport(0, 0 , (GLint)(winWidth), (GLint)(winHeight) );
+ } else {
+ xglViewport(0, (GLint)((winHeight)*0.5768), (GLint)(winWidth),
+ (GLint)((winHeight)*0.4232) );
+ }
// Tell GL we are about to modify the projection parameters
xglMatrixMode(GL_PROJECTION);
xglLoadIdentity();
// set the sun position
xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
+
+ panel_hist = current_options.get_panel_status();
}
// $Log$
+// Revision 1.26 1998/11/09 23:39:25 curt
+// Tweaks for the instrument panel.
+//
// Revision 1.25 1998/11/06 21:18:15 curt
// Converted to new logstream debugging facility. This allows release
// builds with no messages at all (and no performance impact) by using