Khaotic Engine Reborn
Loading...
Searching...
No Matches
depth_shader_class.h
1#ifndef _DEPTH_SHADER_CLASS_H_
2#define _DEPTH_SHADER_CLASS_H_
3
4
6// INCLUDES //
8#include "Logger.h"
9#include <d3d11.h>
10#include <d3dcompiler.h>
11#include <directxmath.h>
12#include <fstream>
13using namespace DirectX;
14using namespace std;
15
16
18// Class name: depth_shader_class
21{
22private:
23 struct matrix_buffer_type
24 {
25 XMMATRIX world;
26 XMMATRIX view;
27 XMMATRIX projection;
28 };
29
30public:
34
35 bool initialize(ID3D11Device*, HWND);
36 void shutdown();
37 bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
38
39private:
40 bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
41 void shutdown_shader();
42 void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
43
44 bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
45 void render_shader(ID3D11DeviceContext*, int);
46
47private:
48 ID3D11VertexShader* vertex_shader_;
49 ID3D11PixelShader* pixel_shader_;
50 ID3D11InputLayout* layout_;
51 ID3D11Buffer* matrix_buffer_;
52 ID3D11SamplerState* sample_state_;
53
54};
55
56#endif