1 #ifndef BLOBS_GRAPHICS_TEXTURE_HPP_
2 #define BLOBS_GRAPHICS_TEXTURE_HPP_
4 #include "TextureBase.hpp"
17 : public TextureBase<GL_TEXTURE_2D> {
23 Texture(Texture &&) noexcept;
24 Texture &operator =(Texture &&) noexcept;
26 Texture(const Texture &) = delete;
27 Texture &operator =(const Texture &) = delete;
30 GLsizei Width() const noexcept { return width; }
31 GLsizei Height() const noexcept { return height; }
32 glm::vec2 Size() const noexcept { return glm::vec2(width, height); }
34 void Data(const SDL_Surface &, bool pad2 = true) noexcept;
35 void Data(GLsizei w, GLsizei h, const Format &, GLvoid *data) noexcept;
37 static void UnpackAlignment(GLint) noexcept;
38 static int UnpackAlignmentFromPitch(int) noexcept;
39 static void UnpackRowLength(GLint) noexcept;
42 GLsizei width, height;