#include <Include/general.hxx>
#include <Aircraft/aircraft.hxx>
+#include <Aircraft/controls.hxx>
#include <Airports/simple.hxx>
#include <Autopilot/auto_gui.hxx>
#include <Cockpit/panel.hxx>
-#include <Controls/controls.hxx>
#include <FDM/flight.hxx>
#include <Main/main.hxx>
#include <Main/fg_init.hxx>
SG_USING_STD(string);
SG_USING_STD(cout);
-extern void fgHUDalphaAdjust( puObject * );
-
// from cockpit.cxx
extern void fgLatLonFormatToggle( puObject *);
//View
{"guiTogglePanel", guiTogglePanel},
- {"fgHUDalphaAdjust", fgHUDalphaAdjust},
{"prop_pickerView", prop_pickerView},
// Environment
void mkDialog (const char *txt)
{
NewGUI *gui = (NewGUI *)globals->get_subsystem("gui");
+ if (!gui)
+ return;
SGPropertyNode_ptr dlg = gui->getDialog("message");
if (!dlg)
return;
# ifdef __CYGWIN__
cygwin32_conv_to_full_win32_path(path.c_str(),win32_name);
# else
- strcpy(win32_name,path.c_str());
+ strncpy(win32_name,path.c_str(), 1024);
# endif
Dummy[0] = 0;
FindExecutable(win32_name, Dummy, ExecName);
- sprintf(browserParameter, "file:///%s", win32_name);
+ snprintf(browserParameter, 1024, "file:///%s", win32_name);
ShellExecute ( NULL, "open", ExecName, browserParameter, Dummy,
SW_SHOWNORMAL ) ;
FILE *f;
string message;
bool show_pu_cursor = false;
+ bool menu_status = fgGetBool("/sim/menubar/visibility");
char *filename = new char [24];
static int count = 1;
fgSetBool("/sim/freeze/master", true);
}
+ fgSetBool("/sim/menubar/visibility", false);
TurnCursorOff();
if ( !puCursorIsHidden() ) {
show_pu_cursor = true;
// we need two render frames here to clear the menu and cursor
// ... not sure why but doing an extra fgRenderFrame() shouldn't
// hurt anything
- renderer->update( true );
- renderer->update( true );
+ //renderer->update( true );
+ //renderer->update( true );
// This ImageSize stuff is a temporary hack
// should probably use 128x128 tile size and
bool do_panel = fgPanelVisible();
GLfloat panel_col_step = globals->get_current_panel()->getWidth() / ncols;
GLfloat panel_row_step = globals->get_current_panel()->getHeight() / nrows;
+
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+ glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
+ glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+ glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+ glHint(GL_FOG_HINT, GL_NICEST);
/* Draw tiles */
int more = 1;
trBeginTile(tr);
int curColumn = trGet(tr, TR_CURRENT_COLUMN);
int curRow = trGet(tr, TR_CURRENT_ROW);
+
renderer->update( false );
if ( do_hud )
fgUpdateHUD( curColumn*hud_col_step, curRow*hud_row_step,
trDelete(tr);
+ glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
+ glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
+ glHint(GL_POINT_SMOOTH_HINT, GL_DONT_CARE);
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE);
+ if ( (!strcmp(fgGetString("/sim/rendering/fog"), "disabled")) ||
+ (!fgGetBool("/sim/rendering/shading"))) {
+ // if fastest fog requested, or if flat shading force fastest
+ glHint ( GL_FOG_HINT, GL_FASTEST );
+ } else if ( !strcmp(fgGetString("/sim/rendering/fog"), "nicest") ) {
+ glHint ( GL_FOG_HINT, GL_DONT_CARE );
+ }
+
fclose(f);
message = "Snapshot saved to \"";
message += filename;
- message += '".';
+ message += "\".";
mkDialog (message.c_str());
free(tile);
}
TurnCursorOn();
+ fgSetBool("/sim/menubar/visibility", menu_status);
if ( !freeze ) {
fgSetBool("/sim/freeze/master", false);