+if ENABLE_XMESA_FX
+DEFS += -DXMESA -DFX
+endif
+
noinst_LIBRARIES = libGUI.a
libGUI_a_SOURCES = gui.cxx gui.h
**************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
+#include <Include/compiler.h>
+
+#include <GL/glut.h>
+#include <XGL/xgl.h>
+
+#if defined(FX) && defined(XMESA)
+# include <GL/xmesa.h>
+#endif
+
+#include STL_STRING
+
#include <stdlib.h>
#include <string.h>
#include "gui.h"
+FG_USING_STD(string);
+
puMenuBar *mainMenuBar;
puButton *hideMenuButton;
mkDialog ("This function isn't implemented yet");
}
+void helpCb (puObject *)
+{
+#if defined(FX) && !defined(WIN32)
+# if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
+ if ( global_fullscreen ) {
+ global_fullscreen = false;
+ XMesaSetFXmode( XMESA_FX_WINDOW );
+ }
+# endif
+#endif
+
+#if !defined(WIN32)
+ string url = "http://www.flightgear.org/Docs/InstallGuide/getstart.html";
+ string command;
+
+ if ( system("xwininfo -name Netscape > /dev/null 2>&1") == 0 ) {
+ command = "netscape -remote \"openURL(" + url + ")\" &";
+ } else {
+ command = "netscape " + url + " &";
+ }
+
+ system( command.c_str() );
+ string text = "Help started in netscape window.";
+#else
+ string text = "Help not yet implimented for Win32.";
+#endif
+
+ mkDialog (text.c_str());
+}
+
/* -----------------------------------------------------------------------
The menu stuff
---------------------------------------------------------------------*/
puCallback aircraftSubmenuCb [] = { notCb, notCb, notCb,notCb, NULL };
puCallback environmentSubmenuCb [] = { notCb, notCb, notCb, NULL };
puCallback optionsSubmenuCb [] = { notCb, notCb, NULL};
-puCallback helpSubmenuCb [] = { notCb, notCb, NULL };
+puCallback helpSubmenuCb [] = { notCb, helpCb, NULL };
#include <GL/glut.h>
#include <XGL/xgl.h>
+
+#if defined(FX) && defined(XMESA)
+#include <GL/xmesa.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include "options.hxx"
#include "views.hxx"
-#if defined(FX) && defined(XMESA)
-# include <GL/xmesa.h>
-static int fullscreen = 1;
-#endif
-
// Force an update of the sky and lighting parameters
static void local_update_sky_and_lighting_params( void ) {
return;
case 87: // W key
#if defined(FX) && !defined(WIN32)
- fullscreen = ( !fullscreen );
-#if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
- XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
-#endif
+ global_fullscreen = ( !global_fullscreen );
+# if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
+ XMesaSetFXmode( global_fullscreen ?
+ XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW );
+# endif
#endif
return;
case 88: // X key
// $Log$
+// Revision 1.43 1999/03/11 23:09:46 curt
+// When "Help" is selected from the menu check to see if netscape is running.
+// If so, command it to go to the flight gear user guide url. Otherwise
+// start a new version of netscape with this url.
+//
// Revision 1.42 1999/02/26 22:09:46 curt
// Added initial support for native SGI compilers.
//
#include <GL/glut.h>
#include <XGL/xgl.h>
-
/* Handle keyboard events */
void GLUTkey(unsigned char k, int x, int y);
void GLUTspecialkey(int k, int x, int y);
/* $Log$
-/* Revision 1.2 1998/04/24 00:49:18 curt
-/* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
-/* Trying out some different option parsing code.
-/* Some code reorganization.
+/* Revision 1.3 1999/03/11 23:09:47 curt
+/* When "Help" is selected from the menu check to see if netscape is running.
+/* If so, command it to go to the flight gear user guide url. Otherwise
+/* start a new version of netscape with this url.
/*
+ * Revision 1.2 1998/04/24 00:49:18 curt
+ * Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
+ * Trying out some different option parsing code.
+ * Some code reorganization.
+ *
* Revision 1.1 1998/04/22 13:25:41 curt
* C++ - ifing the code.
* Starting a bit of reorganization of lighting code.
# include <config.h>
#endif
+#include <GL/glut.h>
+#include <XGL/xgl.h>
+
#include <stdio.h>
#include <stdlib.h>
#include STL_STRING
-#include <Include/fg_constants.h>
-
#include <Debug/logstream.hxx>
#include <Aircraft/aircraft.hxx>
#include <Airports/simple.hxx>
#include <Astro/solarsystem.hxx>
#include <Autopilot/autopilot.hxx>
#include <Cockpit/cockpit.hxx>
+#include <Include/fg_constants.h>
+#include <Include/general.hxx>
#include <Joystick/joystick.hxx>
#include <Math/fg_geodesy.hxx>
#include <Math/point3d.hxx>
#include "views.hxx"
#include "fg_serial.hxx"
+#if defined(FX) && defined(XMESA)
+#include <GL/xmesa.h>
+#endif
+
FG_USING_STD(string);
extern const char *default_root;
// General house keeping initializations
int fgInitGeneral( void ) {
string root;
- // int i;
+ char *mesa_win_state;
FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
FG_LOG( FG_GENERAL, FG_INFO, "======= ==============" );
}
FG_LOG( FG_GENERAL, FG_INFO, "FG_ROOT = " << root << endl );
- // prime the frame rate counter pump
- // for ( i = 0; i < FG_FRAME_RATE_HISTORY; i++ ) {
- // general.frames[i] = 0.0;
- // }
+#if defined(FX) && defined(XMESA)
+ // initialize full screen flag
+ global_fullscreen = false;
+ if ( strstr ( general.get_glRenderer(), "Glide" ) ) {
+ // Test for the MESA_GLX_FX env variable
+ if ( (mesa_win_state = getenv( "MESA_GLX_FX" )) != NULL) {
+ // test if we are fullscreen mesa/glide
+ if ( (mesa_win_state[0] == 'f') ||
+ (mesa_win_state[0] == 'F') ) {
+ global_fullscreen = true;
+ }
+ }
+ }
+#endif
return ( 1 );
}
// $Log$
+// Revision 1.70 1999/03/11 23:09:49 curt
+// When "Help" is selected from the menu check to see if netscape is running.
+// If so, command it to go to the flight gear user guide url. Otherwise
+// start a new version of netscape with this url.
+//
// Revision 1.69 1999/03/08 21:56:39 curt
// Added panel changes sent in by Friedemann.
// Added a splash screen randomization since we have several nice splash screens.
# include <config.h>
#endif
+#if defined(FX) && defined(XMESA)
+bool global_fullscreen = true;
+#endif
+
#include <Include/compiler.h>
#include <math.h> // rint()
// $Log$
+// Revision 1.42 1999/03/11 23:09:50 curt
+// When "Help" is selected from the menu check to see if netscape is running.
+// If so, command it to go to the flight gear user guide url. Otherwise
+// start a new version of netscape with this url.
+//
// Revision 1.41 1999/03/02 01:03:17 curt
// Tweaks for building with native SGI compilers.
//
#include <GL/glut.h>
#include <XGL/xgl.h>
+#if defined(FX) && defined(XMESA)
+extern bool global_fullscreen;
+#endif
+
#include STL_STRING
#include <vector>
// $Log$
+// Revision 1.30 1999/03/11 23:09:51 curt
+// When "Help" is selected from the menu check to see if netscape is running.
+// If so, command it to go to the flight gear user guide url. Otherwise
+// start a new version of netscape with this url.
+//
// Revision 1.29 1999/03/02 01:03:19 curt
// Tweaks for building with native SGI compilers.
//