-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenderModels.h
More file actions
59 lines (36 loc) · 1.24 KB
/
RenderModels.h
File metadata and controls
59 lines (36 loc) · 1.24 KB
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
#pragma once
#pragma once
#include "Model.h"
#include "DxHandler.h"
#include "Shaders.h"
#include "Lighting.h"
class RenderModels
{
private:
const unsigned int stride = sizeof(Vertex);
const unsigned int offset = 0;
std::string byteCode;
//Deferred
const std::string psPath = "x64/Debug/DeferredPS.cso";
ID3D11PixelShader* pixelShader;
const std::string vsPath = "x64/Debug/DeferredVS.cso";
ID3D11VertexShader* vertexShader;
ID3D11Buffer* lightingBuffer;
ID3D11Buffer* cubeBuffer;
ID3D11Buffer* matrixBuffer;
ID3D11PixelShader* cubeMapPS;
const std::string cubePSPath = "x64/Debug/DynamicCubePS.cso";
struct Matrix
{
XMFLOAT4X4 wvp;
XMFLOAT4X4 worldSpace;
}matrix;
public:
RenderModels(ID3D11Device* device);
void Render(ID3D11Device* device, ID3D11DeviceContext* context, Model* model, bool rotation);
void RenderOnCubeMap(ID3D11Device* device, ID3D11DeviceContext* context, Model* model, bool rotation, Camera cubeCamera);
void RenderDynamicCubeMapSphere(ID3D11Device* device, ID3D11DeviceContext* context, Model* model, bool rotation, ID3D11ShaderResourceView* cubeSRV, Camera camera);
std::string GetByteCode() const;
void ShutDown();
int modelsRendered;
};