]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexarraybuilder.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / vertexarraybuilder.cpp
index 5c0a019605f08938ce630fe77d2148cbbdd81ce0..9b8d3b4284ce383df67c6131bb2f164d7efe53ee 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007-2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "vertexarray.h"
 #include "vertexarraybuilder.h"
 
@@ -15,12 +8,7 @@ VertexArrayBuilder::VertexArrayBuilder(VertexArray &a):
        array(a)
 { }
 
-VertexArrayBuilder::~VertexArrayBuilder()
-{
-       array.update_data();
-}
-
-void VertexArrayBuilder::vertex_(float x, float y, float z, float w)
+void VertexArrayBuilder::vertex_(const Vector4 &v)
 {
        float *ptr = array.append();
        for(const unsigned char *c=array.get_format().begin(); c!=array.get_format().end(); ++c)
@@ -30,10 +18,10 @@ void VertexArrayBuilder::vertex_(float x, float y, float z, float w)
                switch(t)
                {
                case 0:
-                       *ptr++ = x;
-                       *ptr++ = y;
-                       if(sz>=3) *ptr++ = z;
-                       if(sz>=4) *ptr++ = w;
+                       *ptr++ = v.x;
+                       *ptr++ = v.y;
+                       if(sz>=3) *ptr++ = v.z;
+                       if(sz>=4) *ptr++ = v.w;
                        break;
                case 1:
                        *ptr++ = nor.x;