]> git.localhorst.tv Git - blank.git/blobdiff - src/graphics/BlockMesh.hpp
avoid zero vertex draw calls
[blank.git] / src / graphics / BlockMesh.hpp
index 399ff320ddd8e06bf19387b171ed6b8684d79123..534299233a2cc5d6eae9f5aa47b117246acc3d4c 100644 (file)
@@ -69,7 +69,13 @@ public:
 public:
        void Update(const Buffer &) noexcept;
 
-       void Draw() const noexcept;
+       bool Empty() const noexcept {
+               return vao.Empty();
+       }
+
+       void Draw() const noexcept {
+               vao.DrawTriangleElements();
+       }
 
 private:
        VAO vao;