Try to detect Mesa/Glide/Voodoo and chose the appropriate resolution.
This commit is contained in:
parent
31e8d42ceb
commit
732282a357
3 changed files with 50 additions and 9 deletions
|
@ -807,6 +807,7 @@ static void fgReshape( int width, int height ) {
|
||||||
|
|
||||||
v->winWidth = width;
|
v->winWidth = width;
|
||||||
v->winHeight = height;
|
v->winHeight = height;
|
||||||
|
v->update_fov = true;
|
||||||
|
|
||||||
// Inform gl of our view window size (now handled elsewhere)
|
// Inform gl of our view window size (now handled elsewhere)
|
||||||
// xglViewport(0, 0, (GLint)width, (GLint)height);
|
// xglViewport(0, 0, (GLint)width, (GLint)height);
|
||||||
|
@ -899,7 +900,43 @@ int main( int argc, char **argv ) {
|
||||||
// set default log levels
|
// set default log levels
|
||||||
fglog().setLogLevels( FG_ALL, FG_INFO );
|
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
|
// Attempt to locate and parse a config file
|
||||||
// First check fg_root
|
// First check fg_root
|
||||||
|
@ -960,6 +997,9 @@ int main( int argc, char **argv ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.67 1998/11/16 13:59:58 curt
|
||||||
// Added pow() macro bug work around.
|
// Added pow() macro bug work around.
|
||||||
// Added support for starting FGFS at various resolutions.
|
// Added support for starting FGFS at various resolutions.
|
||||||
|
|
|
@ -123,19 +123,12 @@ int fgInitPosition( void ) {
|
||||||
|
|
||||||
// General house keeping initializations
|
// General house keeping initializations
|
||||||
int fgInitGeneral( void ) {
|
int fgInitGeneral( void ) {
|
||||||
fgGENERAL *g;
|
|
||||||
string root;
|
string root;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
g = &general;
|
|
||||||
|
|
||||||
FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
|
FG_LOG( FG_GENERAL, FG_INFO, "General Initialization" );
|
||||||
FG_LOG( FG_GENERAL, FG_INFO, "======= ==============" );
|
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();
|
root = current_options.get_fg_root();
|
||||||
if ( ! root.length() ) {
|
if ( ! root.length() ) {
|
||||||
// No root path set? Then bail ...
|
// No root path set? Then bail ...
|
||||||
|
@ -148,7 +141,7 @@ int fgInitGeneral( void ) {
|
||||||
|
|
||||||
// prime the frame rate counter pump
|
// prime the frame rate counter pump
|
||||||
for ( i = 0; i < FG_FRAME_RATE_HISTORY; i++ ) {
|
for ( i = 0; i < FG_FRAME_RATE_HISTORY; i++ ) {
|
||||||
g->frames[i] = 0.0;
|
general.frames[i] = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ( 1 );
|
return ( 1 );
|
||||||
|
@ -381,6 +374,9 @@ int fgInitSubsystems( void )
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.50 1998/11/16 14:00:01 curt
|
||||||
// Added pow() macro bug work around.
|
// Added pow() macro bug work around.
|
||||||
// Added support for starting FGFS at various resolutions.
|
// Added support for starting FGFS at various resolutions.
|
||||||
|
|
|
@ -221,6 +221,8 @@ public:
|
||||||
xglHint ( GL_FOG_HINT, GL_FASTEST );
|
xglHint ( GL_FOG_HINT, GL_FASTEST );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
inline void set_xsize( int x ) { xsize= x; }
|
||||||
|
inline void set_ysize( int y ) { xsize= y; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -241,6 +243,9 @@ extern fgOPTIONS current_options;
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.21 1998/11/16 14:00:04 curt
|
||||||
// Added pow() macro bug work around.
|
// Added pow() macro bug work around.
|
||||||
// Added support for starting FGFS at various resolutions.
|
// Added support for starting FGFS at various resolutions.
|
||||||
|
|
Loading…
Add table
Reference in a new issue