Класс 3D текстуры

This commit is contained in:
2023-10-31 13:19:47 +03:00
parent 9f02ec2daf
commit e4b280d9eb
2 changed files with 73 additions and 0 deletions

View File

@@ -44,4 +44,18 @@ class Texture : public BaseTexture
virtual void use(); // Привязка текстуры
};
// Класс 3D текстуры
class TextureArray : public BaseTexture
{
public:
TextureArray(GLuint levels, GLuint width, GLuint height, GLuint attachment, GLuint texType = TEX_DIFFUSE, GLint internalformat = GL_RGBA, GLint format = GL_RGBA, GLenum dataType = GL_FLOAT); // Конструктор текстуры заданного размера для использования в буфере
TextureArray(const TextureArray& other); // Конструктор копирования
TextureArray& operator=(const TextureArray& other); // Оператор присваивания
void reallocate(GLuint levels, GLuint width, GLuint height, GLuint texType = TEX_DIFFUSE, GLint internalformat = GL_RGBA, GLint format = GL_RGBA, GLenum dataType = GL_FLOAT); // Пересоздает текстуру для имеющегося дескриптора
virtual void use(); // Привязка текстуры
};
#endif // TEXTURE_H