X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FPrimitiveMesh.hpp;h=247cc6a0b3b52ca90ca835d5a69194c061cbcdd3;hb=831183e2cbab7ebf42bf4cace86f7bf9db482ed1;hp=6a8b6967df6606a081ff2b5be69c428bc62ec454;hpb=f071bb512a09cece895e65ca48eba2a7155d6593;p=blank.git diff --git a/src/graphics/PrimitiveMesh.hpp b/src/graphics/PrimitiveMesh.hpp index 6a8b696..247cc6a 100644 --- a/src/graphics/PrimitiveMesh.hpp +++ b/src/graphics/PrimitiveMesh.hpp @@ -1,11 +1,11 @@ #ifndef BLANK_GRAPHICS_PRIMITIVEMESH_HPP_ #define BLANK_GRAPHICS_PRIMITIVEMESH_HPP_ +#include "glm.hpp" #include "VertexArray.hpp" #include #include -#include namespace blank { @@ -16,7 +16,7 @@ class PrimitiveMesh { public: using Position = glm::vec3; - using Color = glm::tvec4; + using Color = TVEC4; using Index = unsigned short; using Positions = std::vector; @@ -66,8 +66,14 @@ public: public: void Update(const Buffer &) noexcept; - void DrawLines() noexcept; - void DrawTriangles() noexcept; + bool Empty() const noexcept { + return vao.Empty(); + } + + void DrawLines() const noexcept; + void DrawTriangles() const noexcept { + vao.DrawTriangleElements(); + } private: VAO vao;