1 #ifndef BLANK_GRAPHICS_PRIMITIVEMESH_HPP_
2 #define BLANK_GRAPHICS_PRIMITIVEMESH_HPP_
4 #include "VertexArray.hpp"
18 using Position = glm::vec3;
19 using Color = glm::tvec4<unsigned char>;
20 using Index = unsigned short;
22 using Positions = std::vector<Position>;
23 using Colors = std::vector<Color>;
24 using Indices = std::vector<Index>;
39 void Clear() noexcept {
45 void Reserve(size_t p, size_t i) {
53 const Color &color = Color(0),
54 const glm::vec2 &pivot = glm::vec2(0.0f)
59 const Color &color = Color(0)
64 using VAO = VertexArray<ATTRIB_COUNT>;
67 void Update(const Buffer &) noexcept;
69 bool Empty() const noexcept {
73 void DrawLines() const noexcept;
74 void DrawTriangles() const noexcept {
75 vao.DrawTriangleElements();