# Khaotic Engine Reborn: enginecustom/src/inc/system/texture_class.h Source File

Loading...
Searching...
No Matches
texture_class.h
#ifndef _TEXTURECLASS_H_
#define _TEXTURECLASS_H_
// INCLUDES //
#include "Logger.h"
#include <d3d11.h>
#include <stdio.h>
// Class name: texture_class
class texture_class
{
private:
struct TargaHeader
{
unsigned char data1[12];
unsigned short width;
unsigned short height;
unsigned char bpp;
unsigned char data2;
};
public:
texture_class();
texture_class(const texture_class&);
~texture_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, std::string);
void Shutdown();
ID3D11ShaderResourceView* GetTexture();
int GetWidth();
int GetHeight();
private:
bool LoadTarga(std::string);
private:
unsigned char* m_targaData;
ID3D11Texture2D* m_texture;
ID3D11ShaderResourceView* m_textureView;
int m_width, m_height;
};
#endif
texture_class
Definition texture_class.h:17