-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCTexture.h
More file actions
42 lines (29 loc) · 843 Bytes
/
CTexture.h
File metadata and controls
42 lines (29 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef CTEXTUREBASE_H
#define CTEXTUREBASE_H
#include <cstring>
#include <iostream>
#include "ForceInline.h"
#ifdef _MSC_VER
#pragma warning(disable: 4996) // '*' was declared deprecated
#endif
using namespace std;
class CTexture{
public:
virtual void generateTexture() = 0;
const char* getTextureName();
finline unsigned int getID(){ return ID; }
void setName(const char* const name);
char* getName(){ return textureName; }
finline int getSizeX(){ return sizeX; }
finline int getSizeY(){ return sizeY; }
finline int getChannels(){ return channels; }
unsigned char *data;
protected:
void init();
int channels;
int sizeX;
int sizeY;
unsigned int ID;
char* textureName;
};
#endif