3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_PRIMITIVEBUILDER_H_
9 #define MSP_GL_PRIMITIVEBUILDER_H_
11 #include "primitivetype.h"
12 #include "vertexarray.h"
13 #include "vertexbuilder.h"
19 class VertexArrayBuilder;
22 Base class for primitive builders. This is derived from VertexBuilder and adds
23 begin() and end() functions for specifying batches of primitives instead of
26 class PrimitiveBuilder: public VertexBuilder
30 VertexArrayBuilder vab;
34 PrimitiveBuilder(VertexArray &);
36 void begin(PrimitiveType);
38 void element(unsigned);
39 PrimitiveType get_type() const;
41 virtual void vertex_(float, float, float, float);
42 virtual void begin_() =0;
43 virtual void end_() =0;
44 virtual void element_(unsigned) =0;