mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
32 lines
643 B
C++
Executable File
32 lines
643 B
C++
Executable File
#ifndef TEXTURE_H
|
|
#define TEXTURE_H
|
|
|
|
#include<string>
|
|
#include<ft2build.h>
|
|
#include FT_FREETYPE_H
|
|
|
|
namespace vb01{
|
|
class Texture{
|
|
public:
|
|
enum TextureType{TEXTURE_2D,TEXTURE_CUBEMAP};
|
|
|
|
~Texture();
|
|
Texture(int,int,bool=true);
|
|
Texture(FT_Face&,char);
|
|
Texture(std::string);
|
|
Texture(std::string[6]);
|
|
void select(int=0);
|
|
inline unsigned int* getTexture(){return &texture;}
|
|
inline std::string getPath(){return path;}
|
|
private:
|
|
TextureType type=TextureType::TEXTURE_2D;
|
|
unsigned int texture;
|
|
int width,height,numChannels;
|
|
float weight;
|
|
unsigned char *data;
|
|
std::string path="",paths[6];
|
|
};
|
|
}
|
|
|
|
#endif
|