-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sponza.h
62 lines (57 loc) · 1.57 KB
/
Sponza.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
/**
* ┏┓ ┏┓+ +
* ┏┛┻━━━┛┻┓ + +
* ┃ ┃
* ┃ ━ ┃ ++ + + +
* ████━████ ┃+
* ┃ ┃ +
* ┃ ┻ ┃
* ┃ ┃ + +
* ┗━┓ ┏━┛
* ┃ ┃
* ┃ ┃ + + + +
* ┃ ┃ Code is far away from bug with the animal protecting
* ┃ ┃ + 神兽保佑,代码无bug
* ┃ ┃
* ┃ ┃ +
* ┃ ┗━━━┓ + +
* ┃ ┣┓
* ┃ ┏┛
* ┗┓┓┏━┳┓┏┛ + + + +
* ┃┫┫ ┃┫┫
* ┗┻┛
*/
#pragma once
#include"DirectXDemo.h"
#include"Camera.h"
#include"D3DMesh.h"
namespace jmxRCore
{
class SponzaDemo :public DirectXDemo
{
public:
SponzaDemo(u32 width, u32 height) :DirectXDemo(width, height){}
~SponzaDemo()
{
ReleaseCom(mVS);
ReleaseCom(mPS);
ReleaseCom(mLayout);
ReleaseCom(mCBWVP);
delete mSponza;
}
virtual void init();
virtual void update(f32 dt);
virtual void run();
private:
D3DMesh* mSponza;
Camera mCamera;
ID3D11VertexShader* mVS;
ID3D11PixelShader* mPS;
ID3D11PixelShader* mPSN;
ID3D11InputLayout* mLayout;
ID3D11SamplerState* mSampler;
ID3D11Buffer* mCBWVP;
ID3D11Buffer* mCBCamera;
SRVMgr mgr;
};
}