forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorMapManager.h
More file actions
40 lines (28 loc) · 756 Bytes
/
ColorMapManager.h
File metadata and controls
40 lines (28 loc) · 756 Bytes
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
#ifndef ColorMapManager_included
#define ColorMapManager_included
#pragma once
// Reduces amount of work if the texture was not changed.
// Stores used textures in a separate map to avoid removal of
// of color map textures from memory.
class ColorMapManager
{
public:
ColorMapManager();
void SetTextures(const shared_str& tex0, const shared_str& tex1);
private:
void UpdateTexture(const shared_str& strTexName, int iTex);
private:
struct str_pred
{
IC bool operator()(const shared_str& x, const shared_str& y) const
{
return x < y;
}
};
DEFINE_MAP_PRED(shared_str, ref_texture, map_Tex, map_TexIt, str_pred);
private:
ref_texture m_CMap[2];
shared_str m_strCMap[2];
map_Tex m_TexCache;
};
#endif // ColorMapManager_included