-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEffects.h
45 lines (33 loc) · 1004 Bytes
/
Effects.h
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
#ifndef __EFFECTS__
#define __EFFECTS__
#include "PreHeader.h"
struct SelfReleaseEffect
{
ID3DX11Effect *effect; //×ÅÉ«Æ÷
unordered_map<string, ID3DX11EffectTechnique*> techs; //technique±í
SelfReleaseEffect();
~SelfReleaseEffect();
BOOL Init(ID3D11Device* device, const string& filename);
void Release();
private:
SelfReleaseEffect(const SelfReleaseEffect & );
SelfReleaseEffect& operator = (const SelfReleaseEffect& );
};
class EffectMgr
{
public:
EffectMgr();
virtual ~EffectMgr();
BOOL Init(ID3D11Device* device, const string& , const vector<string>& );
void Release();
ID3DX11Effect* GetEffectByName(const string& );
ID3DX11EffectTechnique* GetTechByName(const string& );
private:
EffectMgr(const EffectMgr& );
EffectMgr& operator=(const EffectMgr& );
protected:
ID3DX11Effect *currentEffect;
ID3DX11EffectTechnique *currentTech;
unordered_map<string, shared_ptr<SelfReleaseEffect>> effects;
};
#endif