1 #ifndef GONG_GRPAHICS_SPRITEMESH_HPP_
2 #define GONG_GRPAHICS_SPRITEMESH_HPP_
5 #include "VertexArray.hpp"
17 using Position = glm::vec3;
18 using TexCoord = glm::vec2;
19 using Index = unsigned short;
21 using Positions = std::vector<Position>;
22 using TexCoords = std::vector<TexCoord>;
23 using Indices = std::vector<Index>;
38 void Clear() noexcept {
44 void Reserve(size_t p, size_t i) {
52 const glm::vec2 &pivot = glm::vec2(0.0f),
53 const glm::vec2 &tex_begin = glm::vec2(0.0f),
54 const glm::vec2 &tex_end = glm::vec2(1.0f, 1.0f)
59 using VAO = VertexArray<ATTRIB_COUNT>;
62 void Update(const Buffer &) noexcept;
64 bool Empty() const noexcept {
68 void Draw() const noexcept {
69 vao.DrawTriangleElements();