1 #ifndef BLOBS_GRAPHICS_ALPHASPRITE_HPP_
2 #define BLOBS_GRAPHICS_ALPHASPRITE_HPP_
5 #include "SimpleVAO.hpp"
23 AlphaSprite(const AlphaSprite &) = delete;
24 AlphaSprite &operator =(const AlphaSprite &) = delete;
26 AlphaSprite(AlphaSprite &&) = delete;
27 AlphaSprite &operator =(AlphaSprite &&) = delete;
30 void Activate() noexcept;
32 void SetM(const glm::mat4 &m) noexcept;
33 void SetVP(const glm::mat4 &v, const glm::mat4 &p) noexcept;
34 void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p) noexcept;
35 void SetTexture(Texture &) noexcept;
36 void SetFgColor(const glm::vec4 &) noexcept;
37 void SetBgColor(const glm::vec4 &) noexcept;
39 const glm::mat4 &M() const noexcept { return m; }
40 const glm::mat4 &V() const noexcept { return v; }
41 const glm::mat4 &P() const noexcept { return p; }
42 const glm::mat4 &MV() const noexcept { return mv; }
43 const glm::mat4 &MVP() const noexcept { return mvp; }
45 void DrawRect() const noexcept;
52 SimpleVAO<Attributes, std::uint8_t> vao;
65 GLuint sampler_handle;
66 GLuint fg_color_handle;
67 GLuint bg_color_handle;