1 #ifndef GONG_GRAPHICS_PRIMITIVEMESH_HPP_
2 #define GONG_GRAPHICS_PRIMITIVEMESH_HPP_
5 #include "VertexArray.hpp"
20 using Position = glm::vec3;
21 using Color = TVEC4<unsigned char, glm::precision(0)>;
22 using Index = unsigned short;
24 using Positions = std::vector<Position>;
25 using Colors = std::vector<Color>;
26 using Indices = std::vector<Index>;
41 void Clear() noexcept {
47 void Reserve(size_t p, size_t i) {
55 const Color &color = Color(0),
56 const glm::vec2 &pivot = glm::vec2(0.0f)
60 const geometry::AABB &,
61 const Color &color = Color(0)
66 using VAO = VertexArray<ATTRIB_COUNT>;
69 void Update(const Buffer &) noexcept;
71 bool Empty() const noexcept {
75 void DrawLines() const noexcept;
76 void DrawTriangles() const noexcept {
77 vao.DrawTriangleElements();