Khaotic Engine Reborn
Loading...
Searching...
No Matches
texture_class.h
1#ifndef _TEXTURECLASS_H_
2#define _TEXTURECLASS_H_
3
4
6// INCLUDES //
8#include "Logger.h"
9#include <d3d11.h>
10#include <stdio.h>
11
12
14// Class name: texture_class
17{
18private:
19 struct TargaHeader
20 {
21 unsigned char data1[12];
22 unsigned short width;
23 unsigned short height;
24 unsigned char bpp;
25 unsigned char data2;
26 };
27
28public:
32
33 bool Initialize(ID3D11Device*, ID3D11DeviceContext*, std::string);
34 void Shutdown();
35
36 ID3D11ShaderResourceView* GetTexture();
37
38 int GetWidth();
39 int GetHeight();
40
41private:
42 bool LoadTarga(std::string);
43
44private:
45 unsigned char* m_targaData;
46 ID3D11Texture2D* m_texture;
47 ID3D11ShaderResourceView* m_textureView;
48 int m_width, m_height;
49
50};
51
52#endif