#include <aurore/core/cache_helper.hpp>
◆ TextureCache()
| aurore::TextureCache::TextureCache |
( |
| ) |
|
|
inline |
◆ addCache()
| void aurore::TextureCache::addCache |
( |
const std::string & |
key, |
|
|
size_t |
texture |
|
) |
| |
|
inline |
◆ clean()
| void aurore::TextureCache::clean |
( |
| ) |
|
|
inline |
◆ debug()
| void aurore::TextureCache::debug |
( |
| ) |
|
|
inline |
◆ getCache()
| int aurore::TextureCache::getCache |
( |
const std::string & |
key | ) |
|
|
inline |
◆ getSize()
| size_t aurore::TextureCache::getSize |
( |
| ) |
const |
|
inline |
◆ getTotalBytes()
| size_t aurore::TextureCache::getTotalBytes |
( |
| ) |
const |
|
inline |
◆ markDirty()
| void aurore::TextureCache::markDirty |
( |
size_t |
texture | ) |
|
|
inline |
◆ removeCache()
| void aurore::TextureCache::removeCache |
( |
size_t |
texture | ) |
|
|
inline |
Subtract the matching texture cache counter by 1, and delete the cache if the counter returns to zero.
◆ setMemoryBudget()
| void aurore::TextureCache::setMemoryBudget |
( |
size_t |
bytes | ) |
|
|
inline |
At most bytes of textures nothing shows are kept (0: no limit, the default); the least recently used go first. A texture weighs its width × height × 4.
◆ trimUnused()
| void aurore::TextureCache::trimUnused |
( |
| ) |
|
|
inline |
Free GPU memory for all textures whose reference count has reached zero. Safe to call at any time; in-use textures (count > 0) are left untouched.
◆ updateCache()
| void aurore::TextureCache::updateCache |
( |
size_t |
old_tex, |
|
|
size_t |
new_tex |
|
) |
| |
|
inline |
◆ cache
| LRUCache<std::string, size_t> aurore::TextureCache::cache = LRUCache<std::string, size_t>(200, 0) |
The documentation for this class was generated from the following file: