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