2022-04-05 14:33:54 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
enum TEXTURETYPE
|
|
|
|
{
|
|
|
|
TEXTURE_INVALID, // Invalid
|
|
|
|
TEXTURE_RGBA, // 4 channels
|
|
|
|
TEXTURE_RGBX, // discard A
|
|
|
|
TEXTURE_EXTERNAL, // EGLImage
|
2022-04-05 14:33:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class CTexture {
|
2022-12-16 18:17:31 +01:00
|
|
|
public:
|
2022-04-05 14:33:54 +02:00
|
|
|
CTexture();
|
|
|
|
CTexture(wlr_texture*);
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
void destroyTexture();
|
|
|
|
void allocate();
|
2022-04-08 21:40:41 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
TEXTURETYPE m_iType = TEXTURE_RGBA;
|
|
|
|
GLenum m_iTarget = GL_TEXTURE_2D;
|
|
|
|
GLuint m_iTexID = 0;
|
|
|
|
Vector2D m_vSize;
|
2022-04-05 14:33:54 +02:00
|
|
|
};
|