-
Notifications
You must be signed in to change notification settings - Fork 1
/
RenderFinalState.h
83 lines (63 loc) · 1.63 KB
/
RenderFinalState.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "GameState.h"
#include "Point3.h"
#include "MeshList.h"
#include "RenderTarget.h"
#include "DynamicTexture.h"
#include "BoundBox.h"
#include "scatteroctree.h"
#include "MeshList.h"
class Game2D;
class C3DSModel;
class CRenderFinalState: public CGameState
{
private:
float m_counter;
CDynamicTexture m_target;
CDynamicTexture m_normalMap;
CDynamicTexture m_posMap;
CDynamicTexture m_phong;
size_t m_curBlock;
size_t m_blockWidth;
size_t m_blockHeight;
BoundBox m_worldBound;
UINT m_width;
UINT m_height;
ScatterOctree* m_octree;
Point3 m_eyePos;
D3DXMATRIX m_worldMat;
bool m_bFinished;
DWORD m_startTime;
DWORD m_usedTime;
MeshList& m_meshes;
Bssrdf m_bssrdf;
LPD3DXEFFECT m_effectNormalmap;
LPD3DXEFFECT m_effectPosmap;
LPD3DXEFFECT m_effectPhong;
CRenderTarget m_targetNormalMap;
CRenderTarget m_targetPosMap;
CRenderTarget m_targetPhong;
void CreateRenderTargets();
void ReleaseRenderTargets();
void RenderToTexture();
void ShowSaveImageDialog();
void UpdateBssrdf();
public:
CRenderFinalState(
LPD3DXEFFECT effectNormalMap,
LPD3DXEFFECT effectPosMap,
LPD3DXEFFECT effectPhongMap,
UINT imageWidth,
UINT imageHeight,
VERTEX_XYZNORM *samples,
size_t sampledCount,
MeshList& meshes);
~CRenderFinalState(void);
void Start(CGameState * prior);
void Draw2D(CGame2D * g2d);
void PreRender();
void Draw3D();
void Animate(float elapsedTime);
void Update(float elapsedTime);
void DeviceLost();
void DeviceReset();
};