Patches to allow panel to display.
Allow model_hz to be defined from the command line.
This commit is contained in:
parent
8d1be9f893
commit
8d903eac1c
4 changed files with 17 additions and 12 deletions
|
@ -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,
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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" ) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue