]> git.localhorst.tv Git - blank.git/blobdiff - src/graphics/PrimitiveMesh.hpp
avoid zero vertex draw calls
[blank.git] / src / graphics / PrimitiveMesh.hpp
index 6a8b6967df6606a081ff2b5be69c428bc62ec454..577321a73e8204e281a265c8402d193900445cbe 100644 (file)
@@ -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;