-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTextureCache.h
More file actions
48 lines (37 loc) · 1.13 KB
/
TextureCache.h
File metadata and controls
48 lines (37 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef TEXTURECACHE_H
#define TEXTURECACHE_H
#include "Config.h"
namespace P3D
{
class TextureCacheBase
{
public:
TextureCacheBase() = default;
virtual ~TextureCacheBase() = default;
virtual void AddTexture(const pixel* texture, const signed char importance = 0) = 0;
virtual void RemoveTexture(const pixel* texture) = 0;
virtual const pixel* GetTexture(const pixel* texture) const = 0;
virtual void ClearTextureCache() = 0;
};
class TextureCacheDefault final : public TextureCacheBase
{
public:
TextureCacheDefault() = default;
~TextureCacheDefault() = default;
void AddTexture(const pixel* texture, const signed char importance = 0)
{
(void)texture;
(void)importance;
}
void RemoveTexture(const pixel* texture)
{
(void)texture;
}
const pixel* GetTexture(const pixel* texture) const
{
return texture;
}
virtual void ClearTextureCache() {}
};
};
#endif // TEXTURECACHE_H