From 6e3e978789b8d76be70bf3e00585991381d5aab4 Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 7 Apr 2003 06:40:44 +0000 Subject: [PATCH] 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 --- r_shadow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2