-
Notifications
You must be signed in to change notification settings - Fork 9
/
CEffectList.h
59 lines (42 loc) · 1.7 KB
/
CEffectList.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//--------------------------------------------------------------------------------------
// File: CEffectList.h
//
// A list of all effects defined using this class is kept
// in order to handle cleanup, and OnResetDevice, OnDestroyDevice, and
// OnLostDevice events with single function calls.
//
//--------------------------------------------------------------------------------------
// (C) 2005 ATI Research, Inc., All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
#ifndef CEFFECT_LIST_H
#define CEFFECT_LIST_H
#include "CGeom.h"
#include "LocalDXUT\\dxstdafx.h"
#include "types.h"
#define MAX_NUM_EFFECTS 1000
#define MAX_ERROR_MSG 16384
class CEffect
{
public:
IDirect3DDevice9 *m_pDevice;
int32 m_EffectListIdx; //index of effect in effect list
ID3DXEffect *m_pEffect;
WCHAR m_ErrorMsg[MAX_ERROR_MSG]; //shader error message
CEffect(void);
virtual ~CEffect(void);
HRESULT LoadShader(WCHAR *a_Filename, IDirect3DDevice9 *a_pDevice);
HRESULT LoadShaderFromResource(uint32 a_ResourceID, IDirect3DDevice9 *a_pDevice);
HRESULT DrawGeom(char *a_TechniqueName, CGeom *a_Geom);
HRESULT DrawGeomOutline(char *a_TechniqueName, CGeom *a_Geom);
//in base class
//void OnResetDevice(void);
//void OnLostDevice(void);
//effect class does not contain an on destroy device, just adding an empty function for
// completeness
void OnDestroyDevice(void);
};
void EffectListOnResetDevice(void);
void EffectListOnDestroyDevice(void);
void EffectListOnLostDevice(void);
#endif //CEFFECT_LIST_H