-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathD3D11Renderer.h
44 lines (38 loc) · 1.62 KB
/
D3D11Renderer.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
//-----------------------------------------------------------------
// D3D11 Renderer Class Header
//-----------------------------------------------------------------
#pragma once
//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include <wrl.h>
#include <wrl/client.h>
#include <d3d11_4.h>
#include <cassert>
#include "pch.h"
//-----------------------------------------------------------------
// Macros Definition
//-----------------------------------------------------------------
namespace Emerald
{
class D3D11Renderer
{
public:
D3D11Renderer();
virtual ~D3D11Renderer();
BOOL Initialise(HWND hWindow, int winWidth, int winHeight);
void OnWindowResize(int winWidth, int winHeight);
ID3D11Device* GetDevice() { return m_pD3D11Device; };
ID3D11DeviceContext* GetDeviceContext() { return m_pD3D11ImmediateContext; }
IDXGISwapChain* GetSwapChain() { return m_pSwapChain; }
ID3D11RenderTargetView* GetRenderTargetView() { return m_pRenderTargetView; }
ID3D11DepthStencilView* GetDepthStencilView() { return m_pDepthStencilView; }
private:
ID3D11Device* m_pD3D11Device;
ID3D11DeviceContext* m_pD3D11ImmediateContext;
IDXGISwapChain* m_pSwapChain;
ID3D11RenderTargetView* m_pRenderTargetView;
ID3D11DepthStencilView* m_pDepthStencilView;
D3D11_VIEWPORT m_screenViewport;
};
}