-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeferredShaderClass.hpp
57 lines (43 loc) · 1.18 KB
/
DeferredShaderClass.hpp
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
#ifndef DEFERREDSHADERCLASS_HPP
#define DEFERREDSHADERCLASS_HPP
#include <d3d11.h>
#include <d3dcompiler.h>
#include "ConstantBufferClass.hpp" // Needs MatrixBufferStored
class DeferredShaderClass {
private:
ID3D11InputLayout* VertexLayout;
ID3D11VertexShader* VertexShader;
ID3D11GeometryShader* GeometryShader;
ID3D11PixelShader* PixelShader;
ID3D11SamplerState* SamplerStateWrap; // Wraps Address.X
public:
DeferredShaderClass();
~DeferredShaderClass();
void ReleaseAll();
/* ------------- COMMENTS -------------
Creates internal Vertex/Pixel shaders.
Creates internal SamplerState.
Creates internal MatrixBuffer.
*/
void InitialiseShaders(ID3D11Device* *Device);
/* ------------- COMMENTS -------------
Sets these to the pipeline:
VertexLayout.
VertexShader.
GeometryShader.
PixelShader.
SamplerState.
*/
void SetShadingContext(ID3D11DeviceContext* *DeviceContext);
/* ------------- COMMENTS -------------
Sets the VertexBuffer parameter to the Input Assembly then
calls Draw().
*/
void RenderObject(
ID3D11DeviceContext* *DeviceContext,
ID3D11Buffer* *VertexBuffer,
ID3D11ShaderResourceView* *TextureResourceView,
int VerticeCount
);
};
#endif