2019-09-17 17:03:42 +00:00
|
|
|
|
|
|
|
#ifndef __GLTEXTURE_H
|
|
|
|
#define __GLTEXTURE_H
|
|
|
|
|
|
|
|
|
|
|
|
class FHardwareTexture //: public IHardwareTexture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2019-09-18 18:44:21 +00:00
|
|
|
int mSampler = 0;
|
2019-09-17 17:03:42 +00:00
|
|
|
unsigned int glTexID = 0;
|
|
|
|
int glTextureBytes = 4;
|
|
|
|
bool mipmapped = true;
|
|
|
|
int mWidth = 0, mHeight = 0;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
~FHardwareTexture();
|
|
|
|
|
|
|
|
//bool BindOrCreate(FTexture *tex, int texunit, int clampmode, int translation, int flags);
|
|
|
|
|
|
|
|
unsigned int CreateTexture(int w, int h, bool eightbit, bool mipmapped);
|
|
|
|
unsigned int LoadTexture(unsigned char * buffer);
|
|
|
|
unsigned int GetTextureHandle();
|
2019-09-18 18:44:21 +00:00
|
|
|
int GetSampler() { return mSampler; }
|
|
|
|
void SetSampler(int sampler) { mSampler = sampler; }
|
2019-09-17 17:03:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|