-
Notifications
You must be signed in to change notification settings - Fork 0
/
D3DClass.h
54 lines (42 loc) · 1.41 KB
/
D3DClass.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
#pragma once
class D3DClass : public AlignedAllocationPolicy<16>
{
public:
D3DClass();
D3DClass(const D3DClass&);
~D3DClass();
bool Initialize(int, int, bool, HWND, bool, float, float);
void Shutdown();
void BeginScene(float, float, float, float);
void EndScene();
ID3D11Device* GetDevice();
ID3D11DeviceContext* GetDeviceContext();
void GetProjectionMatrix(XMMATRIX&);
void GetWorldMatrix(XMMATRIX&);
void GetOrthoMatrix(XMMATRIX&);
void GetVideoCardInfo(char*, int&);
void TurnZBufferOn();
void TurnZBufferOff();
void TurnOnAlphaBlending();
void TurnOffAlphaBlending();
ID3D11DepthStencilView* GetDepthStencilView();
void SetBackBufferRenderTarget();
private:
bool m_vsync_enabled = false;
int m_videoCardMemory = 0;
char m_videoCardDescription[128] = { 0, };
IDXGISwapChain* m_swapChain = nullptr;
ID3D11Device* m_device = nullptr;
ID3D11DeviceContext* m_deviceContext = nullptr;
ID3D11RenderTargetView* m_renderTargetView = nullptr;
ID3D11Texture2D* m_depthStencilBuffer = nullptr;
ID3D11DepthStencilState* m_depthStencilState = nullptr;
ID3D11DepthStencilView* m_depthStencilView = nullptr;
ID3D11RasterizerState* m_rasterState = nullptr;
XMMATRIX m_projectionMatrix;
XMMATRIX m_worldMatrix;
XMMATRIX m_orthoMatrix;
ID3D11DepthStencilState* m_depthDisabledStencilState = nullptr;
ID3D11BlendState* m_alphaEnableBlendingState = nullptr;
ID3D11BlendState* m_alphaDisableBlendingState = nullptr;
};