diff options
Diffstat (limited to 'src/unix/sdl_glimp.c')
-rw-r--r-- | src/unix/sdl_glimp.c | 62 |
1 files changed, 1 insertions, 61 deletions
diff --git a/src/unix/sdl_glimp.c b/src/unix/sdl_glimp.c index a42fbe8e..c286bf72 100644 --- a/src/unix/sdl_glimp.c +++ b/src/unix/sdl_glimp.c @@ -869,8 +869,6 @@ void GLimp_Init( void ) qboolean attemptedlibGL = qfalse; qboolean attempted3Dfx = qfalse; qboolean success = qfalse; - char buf[1024]; - cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE ); r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); @@ -949,63 +947,7 @@ void GLimp_Init( void ) Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); - // - // chipset specific configuration - // - strcpy( buf, glConfig.renderer_string ); - strlwr( buf ); - - // - // NOTE: if changing cvars, do it within this block. This allows them - // to be overridden when testing driver fixes, etc. but only sets - // them to their default state when the hardware is first installed/run. - // - if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) - { - glConfig.hardwareType = GLHW_GENERIC; - - ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - - // VOODOO GRAPHICS w/ 2MB - if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) ) - { - ri.Cvar_Set( "r_picmip", "2" ); - ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); - } else - { - ri.Cvar_Set( "r_picmip", "1" ); - - if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) ) - { - ri.Cvar_Set( "r_finish", "0" ); - } - // Savage3D and Savage4 should always have trilinear enabled - else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) ) - { - ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); - } - } - } - - // - // this is where hardware specific workarounds that should be - // detected/initialized every startup should go. - // - if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) ) - { - glConfig.hardwareType = GLHW_3DFX_2D3D; - } else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) ) - { - glConfig.hardwareType = GLHW_RAGEPRO; - } else if ( Q_stristr( buf, "permedia2" ) ) - { - glConfig.hardwareType = GLHW_PERMEDIA2; - } else if ( Q_stristr( buf, "riva 128" ) ) - { - glConfig.hardwareType = GLHW_RIVA128; - } else if ( Q_stristr( buf, "riva tnt " ) ) - { - } + GL_ResolveHardwareType( ); ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); @@ -1014,8 +956,6 @@ void GLimp_Init( void ) GLW_InitGamma(); InitSig(); // not clear why this is at begin & end of function - - return; } |