X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbatch.h;h=6950af894898b93bc576df783a7c9cb857635ac4;hb=c6c4fc39952e372eba1f44f2bc504428140f3d0e;hp=aace6528e2cfe2a386338f098ea0dff75f880430;hpb=f71aee8c20ff85e4857e4dfad0c20ce606ea3717;p=libs%2Fgl.git diff --git a/source/batch.h b/source/batch.h index aace6528..6950af89 100644 --- a/source/batch.h +++ b/source/batch.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2007, 2009-2010 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -9,7 +9,6 @@ Distributed under the LGPL #define MSP_GL_BATCH_H_ #include -#include #include #include "primitivetype.h" #include "types.h" @@ -30,15 +29,21 @@ public: void indices(const std::vector &); }; - Batch(PrimitiveType t); - void append(uint); - void append(const std::vector &); - void draw() const; private: PrimitiveType type; std::vector indices; uint min_index; uint max_index; + +public: + Batch(PrimitiveType t); + Batch &append(uint); + void append(const std::vector &); + PrimitiveType get_type() const { return type; } + unsigned size() const { return indices.size(); } + const std::vector &get_indices() const { return indices; } + void draw() const; + void draw_with_buffer(unsigned) const; }; } // namespace GL