| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
#include <unordered_map> |
| 8 |
|
| 9 |
#include "VideoCommon/AbstractTexture.h" |
| 10 |
#include "VideoCommon/TextureConfig.h" |
| 11 |
|
| 12 |
namespace VideoCommon |
| 13 |
{ |
| 14 |
class TexturePool |
| 15 |
{ |
| 16 |
public: |
| 17 |
void Reset(); |
| 18 |
|
| 19 |
std::unique_ptr<AbstractTexture> AllocateTexture(const TextureConfig& config); |
| 20 |
void ReleaseTexture(std::unique_ptr<AbstractTexture> texture); |
| 21 |
|
| 22 |
private: |
| 23 |
std::unordered_multimap<TextureConfig, std::unique_ptr<AbstractTexture>> m_cache; |
| 24 |
}; |
| 25 |
} |