1 #ifndef MSP_GL_PRIMITIVEBUILDER_H_
2 #define MSP_GL_PRIMITIVEBUILDER_H_
4 #include "primitivetype.h"
5 #include "vertexarray.h"
6 #include "vertexbuilder.h"
12 class VertexArrayBuilder;
15 Base class for primitive builders. This is derived from VertexBuilder and adds
16 begin() and end() functions for specifying batches of primitives instead of
19 class PrimitiveBuilder: public VertexBuilder
23 VertexArrayBuilder vab;
28 PrimitiveBuilder(VertexArray &);
30 void begin(PrimitiveType);
32 void offset(unsigned);
33 void element(unsigned);
34 PrimitiveType get_type() const;
36 virtual void vertex_(const Vector4 &);
37 virtual void begin_() =0;
38 virtual void end_() =0;
39 virtual void element_(unsigned) =0;