#include <plib/pu.h>
+#include "fg_props.hxx"
#include "fg_os.hxx"
//
glutPostRedisplay();
}
-void fgOSOpenWindow(int w, int h, bool alpha)
+void fgOSOpenWindow(int w, int h, int bpp, bool alpha)
{
int mode = GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE;
if(alpha) mode |= GLUT_ALPHA;
glutInitDisplayMode(mode);
glutInitWindowSize(w, h);
- glutCreateWindow("FlightGear");
+ if(!fgGetBool("/sim/startup/game-mode")) {
+ glutCreateWindow("FlightGear");
+ } else {
+ char game_mode_str[256];
+ sprintf(game_mode_str, "width=%d height=%d bpp=%d", w, h, bpp);
+ glutGameModeString( game_mode_str );
+ glutEnterGameMode();
+ }
// Register these here. Calling them before the window is open
// crashes.
glutIdleFunc(GLUTidle);
glutDisplayFunc(GLUTdraw);
glutReshapeFunc(GLUTreshape);
+
}
//
void fgOSInit(int* argc, char** argv);
-void fgOSOpenWindow(int w, int h, bool alpha);
+void fgOSOpenWindow(int w, int h, int bpp, bool alpha);
void fgOSFullScreen();
void fgOSMainLoop();
// Clouds3D requires an alpha channel
fgOSOpenWindow( fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize"),
+ fgGetInt("/sim/rendering/bits-per-pixel"),
fgGetBool("/sim/rendering/clouds3d") );
// This seems to be the absolute earliest in the init sequence