mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[renderer] Use VRect_SubRect for scrap allocation
While the results are a little surprising (tends to alternate between left side and top for allocations), there is much less wasted space in the partially allocated regions, and the main free region seems to always be quite big.
This commit is contained in:
parent
28e9a0a9ba
commit
db69f5fd23
1 changed files with 2 additions and 2 deletions
|
@ -90,8 +90,8 @@ R_ScrapAlloc (rscrap_t *scrap, int width, int height)
|
|||
return 0; // couldn't find a spot
|
||||
old = *best;
|
||||
*best = old->next;
|
||||
rect = VRect_New (old->x, old->y, width, height);
|
||||
frags = VRect_Difference (old, rect);
|
||||
rect = VRect_SubRect (old, width, height);
|
||||
frags = rect->next;
|
||||
VRect_Delete (old);
|
||||
if (frags) {
|
||||
// old was bigger than the requested size
|
||||
|
|
Loading…
Reference in a new issue