Khaotic Engine Reborn
Loading...
Searching...
No Matches
bitmap_class.h
1#ifndef _BITMAPCLASS_H_
2#define _BITMAPCLASS_H_
3
4
6// INCLUDES //
8#include <directxmath.h>
9using namespace DirectX;
10
11
13// MY CLASS INCLUDES //
15#include "texture_class.h"
16
17
19// Class name: bitmap_class
22{
23private:
24 struct vertex_type
25 {
26 XMFLOAT3 position;
27 XMFLOAT2 texture;
28 };
29
30public:
34
35 bool initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, char*, int, int);
36 void shutdown();
37 bool render(ID3D11DeviceContext*);
38
39 int get_index_count();
40 ID3D11ShaderResourceView* get_texture();
41
42 void set_render_location(int, int);
43
44private:
45 bool initialize_buffers(ID3D11Device*);
46 void shutdown_buffers();
47 bool update_buffers(ID3D11DeviceContext*);
48 void render_buffers(ID3D11DeviceContext*);
49
50 bool load_texture(ID3D11Device*, ID3D11DeviceContext*, char*);
51 void release_texture();
52private:
53 ID3D11Buffer* vertex_buffer_, * index_buffer_;
54 int vertex_count_, index_count_, screen_width_, screen_height_, bitmap_width_, bitmap_height_, render_x_, render_y_, prev_pos_x_, prev_pos_y_;
55 texture_class* texture_;
56
57};
58
59#endif