Disabled shadow mapping for Mesa drivers fixes #103

This commit is contained in:
Robert Beckebans 2014-05-11 11:49:14 +02:00
parent 11456a231d
commit f72d98a1eb
2 changed files with 16 additions and 2 deletions

View file

@ -304,6 +304,20 @@ static void R_CheckCvars()
glDisable( GL_MULTISAMPLE_ARB );
}
}
// RB: turn off shadow mapping for OpenGL drivers that are too slow
switch( glConfig.driverType )
{
case GLDRV_OPENGL_ES2:
case GLDRV_OPENGL_ES3:
case GLDRV_OPENGL_MESA:
r_useShadowMapping.SetBool( false );
break;
default:
break;
}
// RB end
}
/*

View file

@ -212,7 +212,7 @@ idCVar stereoRender_deGhost( "stereoRender_deGhost", "0.05", CVAR_FLOAT | CVAR_A
idCVar r_useVirtualScreenResolution( "r_useVirtualScreenResolution", "1", CVAR_RENDERER | CVAR_BOOL | CVAR_ARCHIVE, "do 2D rendering at 640x480 and stretch to the current resolution" );
// RB: shadow mapping parameters
idCVar r_useShadowMapping( "r_useShadowMapping", "1", CVAR_RENDERER | CVAR_BOOL, "use shadow mapping instead of stencil shadows" );
idCVar r_useShadowMapping( "r_useShadowMapping", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use shadow mapping instead of stencil shadows" );
idCVar r_shadowMapFrustumFOV( "r_shadowMapFrustumFOV", "92", CVAR_RENDERER | CVAR_FLOAT, "oversize FOV for point light side matching" );
idCVar r_shadowMapSingleSide( "r_shadowMapSingleSide", "-1", CVAR_RENDERER | CVAR_INTEGER, "only draw a single side (0-5) of point lights" );
idCVar r_shadowMapImageSize( "r_shadowMapImageSize", "1024", CVAR_RENDERER | CVAR_INTEGER, "", 128, 2048 );
@ -328,7 +328,7 @@ static void R_CheckPortableExtensions()
}
// RB: Mesa support
if( idStr::Icmpn( glConfig.renderer_string, "Mesa", 4 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "X.org", 4 ) == 0 )
//if( idStr::Icmpn( glConfig.renderer_string, "Mesa", 4 ) == 0 || idStr::Icmpn( glConfig.renderer_string, "X.org", 4 ) == 0 )
{
glConfig.driverType = GLDRV_OPENGL_MESA;
}