mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Polymer: fix leak of GL query objects
In cases where performing occlusion queries for multiple red walls leading to the same sector, we would sometimes leak a number of query objects. This was apparently harmless on NVIDIA drivers, but would leak tons of memory on ATI. git-svn-id: https://svn.eduke32.com/eduke32@1993 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
304a2c9feb
commit
c17818aa6e
1 changed files with 6 additions and 1 deletions
|
@ -1659,7 +1659,7 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
||||||
bglColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
bglColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
queryid[sec->wallptr + i] = 1;
|
queryid[sec->wallptr + i] = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1729,6 +1729,11 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
||||||
sectorqueue[back++] = wall[sec->wallptr + i].nextsector;
|
sectorqueue[back++] = wall[sec->wallptr + i].nextsector;
|
||||||
drawingstate[wall[sec->wallptr + i].nextsector] = 1;
|
drawingstate[wall[sec->wallptr + i].nextsector] = 1;
|
||||||
}
|
}
|
||||||
|
} else if (queryid[sec->wallptr + i] &&
|
||||||
|
queryid[sec->wallptr + i] != 0xFFFFFFFF)
|
||||||
|
{
|
||||||
|
bglDeleteQueriesARB(1, &queryid[sec->wallptr + i]);
|
||||||
|
queryid[sec->wallptr + i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (--i >= 0);
|
while (--i >= 0);
|
||||||
|
|
Loading…
Reference in a new issue