From 4aad7272bc3b1bbc6c94114c873f969b6ba3c4c8 Mon Sep 17 00:00:00 2001 From: ewasylishen Date: Thu, 16 Apr 2015 23:57:39 +0000 Subject: [PATCH] R_DrawParticles: exit early if there is nothing to draw, avoid a useless glBegin() glEnd() pair. This fixes a weird bug on Windows/AMD, where under some conditions, the world would be drawn totally corrupted. Conditions for the bug were: - gl_clear 0 - gamma 1 - glsl alias code in use - status bar hidden, or, scr_sbaralpha 1 - map e1m1, look around the start position git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1202 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/r_part.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quakespasm/Quake/r_part.c b/quakespasm/Quake/r_part.c index 1ac2aed2..3f474b2f 100644 --- a/quakespasm/Quake/r_part.c +++ b/quakespasm/Quake/r_part.c @@ -835,6 +835,10 @@ void R_DrawParticles (void) if (!r_particles.value) return; + //ericw -- avoid empty glBegin(),glEnd() pair below; causes issues on AMD + if (!active_particles) + return; + VectorScale (vup, 1.5, up); VectorScale (vright, 1.5, right);