]> git.localhorst.tv Git - blank.git/blob - src/graphics/ArrayTexture.hpp
save a little bandwidth
[blank.git] / src / graphics / ArrayTexture.hpp
1 #ifndef BLANK_GRAPHICS_ARRAYTEXTURE_HPP_
2 #define BLANK_GRAPHICS_ARRAYTEXTURE_HPP_
3
4 #include "Format.hpp"
5 #include "TextureBase.hpp"
6
7 #include <GL/glew.h>
8
9 struct SDL_Surface;
10
11
12 namespace blank {
13
14 class ArrayTexture
15 : public TextureBase<GL_TEXTURE_2D_ARRAY> {
16
17 public:
18         ArrayTexture();
19         ~ArrayTexture();
20
21         ArrayTexture(ArrayTexture &&) noexcept;
22         ArrayTexture &operator =(ArrayTexture &&) noexcept;
23
24         ArrayTexture(const ArrayTexture &) = delete;
25         ArrayTexture &operator =(const ArrayTexture &) = delete;
26
27 public:
28         GLsizei Width() const noexcept { return width; }
29         GLsizei Height() const noexcept { return height; }
30         GLsizei Depth() const noexcept { return depth; }
31
32         void Reserve(GLsizei w, GLsizei h, GLsizei d, const Format &) noexcept;
33         void Data(GLsizei l, const SDL_Surface &);
34         void Data(GLsizei l, const Format &, GLvoid *data) noexcept;
35
36 private:
37         GLsizei width, height, depth;
38
39         Format format;
40
41 };
42
43 }
44
45 #endif