X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprimitivebuilder.h;h=0ffd170cd3e82659cef26528b0bfaf341f2d634e;hp=cfe0a02c8bbea18cf04ba114d8999c3514f70009;hb=975162f86071985913b59a835d38046e1c271594;hpb=d1800d7ea80290f4913d0203241cef1409656522 diff --git a/source/primitivebuilder.h b/source/primitivebuilder.h index cfe0a02c..0ffd170c 100644 --- a/source/primitivebuilder.h +++ b/source/primitivebuilder.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GL_PRIMITIVEBUILDER_H_ #define MSP_GL_PRIMITIVEBUILDER_H_ @@ -27,19 +20,23 @@ class PrimitiveBuilder: public VertexBuilder { protected: VertexArray &array; - RefPtr builder; + VertexArrayBuilder vab; PrimitiveType type; bool in_batch; + unsigned offs; PrimitiveBuilder(VertexArray &); public: void begin(PrimitiveType); void end(); + void offset(unsigned); + void element(unsigned); PrimitiveType get_type() const; protected: - virtual void vertex_(float, float, float, float); - virtual void begin_() =0; - virtual void end_() =0; + virtual void vertex_(const Vector4 &); + virtual void begin_() = 0; + virtual void end_() = 0; + virtual void element_(unsigned) = 0; }; } // namespace GL