From 9f14ec92bd8c5816aa169459f32cce8634e72c53 Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 13 Apr 2008 00:29:13 +0000 Subject: [PATCH] Oops. git-svn-id: https://svn.eduke32.com/eduke32@706 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymer.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/polymer/build/src/polymer.c b/polymer/build/src/polymer.c index 2a8cce481..6100a1bc6 100644 --- a/polymer/build/src/polymer.c +++ b/polymer/build/src/polymer.c @@ -572,24 +572,27 @@ static void polymer_displayrooms(short dacursectnum) while (front != back) { - if ((front >= firstback) && (pr_occlusionculling) && (querydelay[sectorqueue[front]] > 0)) + if ((front >= firstback) && (pr_occlusionculling)) { - bglGetQueryObjectivARB(queryid[sectorqueue[front]], - GL_QUERY_RESULT_ARB, - &result); - bglDeleteQueriesARB(1, &queryid[sectorqueue[front]]); - if (!result) + if (querydelay[sectorqueue[front]] == 0) { - front++; - continue; + bglGetQueryObjectivARB(queryid[sectorqueue[front]], + GL_QUERY_RESULT_ARB, + &result); + bglDeleteQueriesARB(1, &queryid[sectorqueue[front]]); + if (!result) + { + front++; + continue; + } + else + querydelay[sectorqueue[front]] = pr_occlusionculling-1; } - else + else if (querydelay[sectorqueue[front]] == -1) querydelay[sectorqueue[front]] = pr_occlusionculling-1; + else if (querydelay[sectorqueue[front]]) + querydelay[sectorqueue[front]]--; } - else if (querydelay[sectorqueue[front]] == -1) - querydelay[sectorqueue[front]] = pr_occlusionculling-1; - else if ((front >= firstback) && (pr_occlusionculling) && (querydelay[sectorqueue[front]])) - querydelay[sectorqueue[front]]--; polymer_pokesector(sectorqueue[front]); polymer_drawsector(sectorqueue[front]);