Allow model_hz to be defined from the command line.
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,
// 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 );
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" ) {
}
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();