From a011822e5c7618cd1a7613e8e38fffd3733825ca Mon Sep 17 00:00:00 2001 From: eihrul Date: Thu, 8 Oct 2009 13:40:14 +0000 Subject: [PATCH] only honor r_shadow_shadowmapping cvar if both GLSL & FBO support are available git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9324 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index aed531d5..7c4e9917 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -368,7 +368,7 @@ void R_Shadow_SetShadowMode(void) r_shadow_shadowmapsampler = false; r_shadow_shadowmappcf = 0; r_shadow_shadowmode = 0; - if(r_shadow_shadowmapping.integer && gl_support_fragment_shader) + if(r_shadow_shadowmapping.integer && r_glsl.integer && gl_support_fragment_shader && gl_support_ext_framebuffer_object) { if(r_shadow_shadowmapfilterquality < 0) { @@ -4133,7 +4133,7 @@ void R_DrawRTLight(rtlight_t *rtlight, qboolean visible) lodlinear = (int)(r_shadow_shadowmapping_lod_bias.value + r_shadow_shadowmapping_lod_scale.value * rtlight->radius / max(1.0f, distance)); lodlinear = bound(r_shadow_shadowmapping_minsize.integer, lodlinear, r_shadow_shadowmapping_maxsize.integer); - if (castshadows && r_shadow_shadowmode >= 1 && r_shadow_shadowmode <= 3 && r_glsl.integer && gl_support_fragment_shader) + if (castshadows && r_shadow_shadowmode >= 1 && r_shadow_shadowmode <= 3) { float borderbias; int side; @@ -4296,7 +4296,7 @@ void R_ShadowVolumeLighting(qboolean visible) size_t range; if (r_shadow_shadowmapmaxsize != bound(1, r_shadow_shadowmapping_maxsize.integer, 2048) || - (r_shadow_shadowmode != 0) != (r_shadow_shadowmapping.integer != 0) || + (r_shadow_shadowmode != 0) != (r_shadow_shadowmapping.integer != 0 && r_glsl.integer && gl_support_fragment_shader && gl_support_ext_framebuffer_object) || r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0) || r_shadow_shadowmaptexturetype != r_shadow_shadowmapping_texturetype.integer || r_shadow_shadowmapfilterquality != r_shadow_shadowmapping_filterquality.integer || -- 2.39.2