| 410 | } |
| 411 | |
| 412 | void TextBankGL33::Reuse(SurfaceInfoGL33& surf, const TextureDescGL33& desc, PacFormat format) |
| 413 | { |
| 414 | int w = desc.w; |
| 415 | int h = desc.h; |
| 416 | int nMipmaps = desc.nMipmaps; |
| 417 | for (HMipCacheGL33* last = _previousUsed.Last(); last; last = _previousUsed.Prev(last)) |
| 418 | { |
| 419 | TextureGL33* texture = last->texture; |
| 420 | if (texture->_inUse) |
| 421 | continue; |
| 422 | |
| 423 | const SurfaceInfoGL33& surface = texture->_surface; |
| 424 | if (nMipmaps != surface._nMipmaps) |
| 425 | continue; |
| 426 | if (surface._w != w) |
| 427 | continue; |
| 428 | if (surface._h != h) |
| 429 | continue; |
| 430 | if (surface._format != format) |
| 431 | continue; |
| 432 | |
| 433 | texture->ReuseMemory(surf); |
| 434 | return; |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | int TextBankGL33::CreateGPUSurface(SurfaceInfoGL33& surface, const TextureDescGL33& desc, PacFormat format, |
| 439 | int totalSize) |
no test coverage detected