Tweaks for the instrument panel.
This commit is contained in:
parent
3563de2a16
commit
4fee7f9df2
2 changed files with 24 additions and 13 deletions
|
@ -350,13 +350,10 @@ static void fgRenderFrame( void ) {
|
|||
|
||||
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
|
||||
|
||||
|
@ -747,7 +744,7 @@ static void fgReshape( int width, int height ) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -762,7 +759,7 @@ static void fgReshape( int width, int height ) {
|
|||
// the system.
|
||||
v->UpdateViewParams();
|
||||
if ( current_options.get_panel_status() ) {
|
||||
fgPanelReInit();
|
||||
fgPanelReInit(0, 0, 1024, 768);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,12 +774,7 @@ int fgGlutInit( int *argc, char **argv ) {
|
|||
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);
|
||||
|
@ -899,6 +891,9 @@ int main( int argc, char **argv ) {
|
|||
|
||||
|
||||
// $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
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#endif
|
||||
|
||||
#include <Aircraft/aircraft.hxx>
|
||||
#include <Cockpit/panel.hxx>
|
||||
#include <Debug/logstream.hxx>
|
||||
#include <Include/fg_constants.h>
|
||||
#include <Math/mat3.h>
|
||||
|
@ -192,6 +193,11 @@ void fgVIEW::UpdateViewParams( void ) {
|
|||
|
||||
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 ) ,
|
||||
|
@ -201,7 +207,12 @@ void fgVIEW::UpdateViewParams( void ) {
|
|||
// 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();
|
||||
|
@ -246,6 +257,8 @@ void fgVIEW::UpdateViewParams( void ) {
|
|||
|
||||
// set the sun position
|
||||
xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
|
||||
|
||||
panel_hist = current_options.get_panel_status();
|
||||
}
|
||||
|
||||
|
||||
|
@ -586,6 +599,9 @@ fgVIEW::~fgVIEW( void ) {
|
|||
|
||||
|
||||
// $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
|
||||
|
|
Loading…
Reference in a new issue