| 290 | } |
| 291 | |
| 292 | bool TextBankGL33::ReserveMemory(GL33MipCacheRoot& root, int limit) |
| 293 | { |
| 294 | bool someReleased = false; |
| 295 | while (_freeTextures.Size() > 0 && _totalAllocated > limit) |
| 296 | { |
| 297 | DeleteLastReleased(); |
| 298 | someReleased = true; |
| 299 | } |
| 300 | HMipCacheGL33* last = root.Last(); |
| 301 | while (_totalAllocated > limit) |
| 302 | { |
| 303 | if (!last) |
| 304 | break; |
| 305 | |
| 306 | TextureGL33* texture = last->texture; |
| 307 | if (texture->_inUse) |
| 308 | { |
| 309 | last = root.Prev(last); |
| 310 | continue; |
| 311 | } |
| 312 | |
| 313 | PoseidonAssert(texture->_cache == last); |
| 314 | someReleased = true; |
| 315 | texture->ReleaseMemory(false); |
| 316 | last = root.Last(); |
| 317 | } |
| 318 | return someReleased; |
| 319 | } |
| 320 | |
| 321 | void TextBankGL33::ReportTextures(const char* name) {} |
| 322 |
no test coverage detected