From: havoc Date: Mon, 7 Apr 2003 06:40:44 +0000 (+0000) Subject: disable use of scissor when stencil is not available (sure seems like a driver bug... X-Git-Tag: xonotic-v0.1.0preview~6672 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6e3e978789b8d76be70bf3e00585991381d5aab4;p=xonotic%2Fdarkplaces.git disable use of scissor when stencil is not available (sure seems like a driver bug, scissor should work) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2929 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 84a1484c..058d5589 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -542,6 +542,7 @@ void R_Shadow_Stage_Begin(void) m.blendfunc2 = GL_ZERO; R_Mesh_State(&m); GL_Color(0, 0, 0, 1); + qglDisable(GL_SCISSOR_TEST); r_shadowstage = SHADOWSTAGE_NONE; c_rt_lights = c_rt_clears = c_rt_scissored = 0; @@ -816,7 +817,9 @@ int R_Shadow_ScissorForBBox(const float *mins, const float *maxs) if (!r_shadow_scissor.integer) return false; // if view is inside the box, just say yes it's visible - if (BoxesOverlap(r_origin, r_origin, mins, maxs)) + // LordHavoc: for some odd reason scissor seems broken without stencil + // (?!? seems like a driver bug) so abort if gl_stencil is false + if (!gl_stencil || BoxesOverlap(r_origin, r_origin, mins, maxs)) { qglDisable(GL_SCISSOR_TEST); return false;