]> git.tdb.fi Git - libs/gl.git/blobdiff - source/batch.h
Generalize VertexBuffer into Buffer with support for other types as well
[libs/gl.git] / source / batch.h
index 4a2e4b340501a57c222eff7c44b8fb95750fe7dc..9b2072de1f13d6f56e819a759fa3a1f6b3623491 100644 (file)
@@ -29,15 +29,20 @@ public:
                void indices(const std::vector<uint> &);
        };
 
-       Batch(PrimitiveType t);
-       Batch &append(uint);
-       void append(const std::vector<uint> &);
-       void draw() const;
 private:
        PrimitiveType type;
        std::vector<uint> indices;
        uint min_index;
        uint max_index;
+
+public:
+       Batch(PrimitiveType t);
+       Batch &append(uint);
+       void append(const std::vector<uint> &);
+       unsigned size() const { return indices.size(); }
+       const std::vector<uint> &get_indices() const { return indices; }
+       void draw() const;
+       void draw_with_buffer(unsigned) const;
 };
 
 } // namespace GL