v->winWidth = width;
v->winHeight = height;
+ v->update_fov = true;
// Inform gl of our view window size (now handled elsewhere)
// xglViewport(0, 0, (GLint)width, (GLint)height);
// set default log levels
fglog().setLogLevels( FG_ALL, FG_INFO );
- FG_LOG( FG_GENERAL, FG_INFO, "Flight Gear: Version" << VERSION << endl );
+ FG_LOG( FG_GENERAL, FG_INFO, "Flight Gear: Version " << VERSION << endl );
+
+ string root;
+ int i;
+
+ FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
+ FG_LOG( FG_GENERAL, FG_INFO, "======= ==============" );
+
+ // pull some basic driver info
+ general.glVendor = (char *)glGetString ( GL_VENDOR );
+ general.glRenderer = (char *)glGetString ( GL_RENDERER );
+ general.glVersion = (char *)glGetString ( GL_VERSION );
+
+ // try to determine if we should adjust the default display
+ // resolution. The options class defaults (is initialized) to
+ // 640x480.
+ string renderer = general.glRenderer;
+
+ // currently we only know how to deal with Mesa/Glide/Voodoo cards
+ if ( renderer.find( "Glide" ) != string::npos ) {
+ if ( renderer.find( "FB/8" ) != string::npos ) {
+ // probably a voodoo-2
+ if ( renderer.find( "TMU/SLI" ) != string::npos ) {
+ // probably two SLI'd Voodoo-2's
+ current_options.set_xsize( 1024 );
+ current_options.set_ysize( 768 );
+ } else {
+ // probably a single non-SLI'd Voodoo-2
+ current_options.set_xsize( 800 );
+ current_options.set_ysize( 600 );
+ }
+ } else if ( renderer.find( "FB/2" ) != string::npos ) {
+ // probably a voodoo-1, stick with the default
+ }
+ } else {
+ // we have no special knowledge of this card, stick with the default
+ }
// Attempt to locate and parse a config file
// First check fg_root
// $Log$
+// Revision 1.68 1998/11/20 01:02:35 curt
+// Try to detect Mesa/Glide/Voodoo and chose the appropriate resolution.
+//
// Revision 1.67 1998/11/16 13:59:58 curt
// Added pow() macro bug work around.
// Added support for starting FGFS at various resolutions.
// General house keeping initializations
int fgInitGeneral( void ) {
- fgGENERAL *g;
string root;
int i;
- g = &general;
-
FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
FG_LOG( FG_GENERAL, FG_INFO, "======= ==============" );
- g->glVendor = (char *)glGetString ( GL_VENDOR );
- g->glRenderer = (char *)glGetString ( GL_RENDERER );
- g->glVersion = (char *)glGetString ( GL_VERSION );
-
root = current_options.get_fg_root();
if ( ! root.length() ) {
// No root path set? Then bail ...
// prime the frame rate counter pump
for ( i = 0; i < FG_FRAME_RATE_HISTORY; i++ ) {
- g->frames[i] = 0.0;
+ general.frames[i] = 0.0;
}
return ( 1 );
// $Log$
+// Revision 1.51 1998/11/20 01:02:37 curt
+// Try to detect Mesa/Glide/Voodoo and chose the appropriate resolution.
+//
// Revision 1.50 1998/11/16 14:00:01 curt
// Added pow() macro bug work around.
// Added support for starting FGFS at various resolutions.
xglHint ( GL_FOG_HINT, GL_FASTEST );
}
}
+ inline void set_xsize( int x ) { xsize= x; }
+ inline void set_ysize( int y ) { xsize= y; }
private:
// $Log$
+// Revision 1.22 1998/11/20 01:02:38 curt
+// Try to detect Mesa/Glide/Voodoo and chose the appropriate resolution.
+//
// Revision 1.21 1998/11/16 14:00:04 curt
// Added pow() macro bug work around.
// Added support for starting FGFS at various resolutions.