X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexarraybuilder.cpp;h=44b677f07061af87aaf1bf62779f709f4a73d9cc;hb=5172d32d67595ea0b70184fadcfcb8e023cccbc8;hp=5c0a019605f08938ce630fe77d2148cbbdd81ce0;hpb=4443707c752ab8ee288f1c22be08cf82f27439d7;p=libs%2Fgl.git diff --git a/source/vertexarraybuilder.cpp b/source/vertexarraybuilder.cpp index 5c0a0196..44b677f0 100644 --- a/source/vertexarraybuilder.cpp +++ b/source/vertexarraybuilder.cpp @@ -15,12 +15,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 +25,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;