]> git.tdb.fi Git - libs/gl.git/blobdiff - source/primitivebuilder.cpp
Style update: add spaces around assignment operators
[libs/gl.git] / source / primitivebuilder.cpp
index 6a4d9bf0b866ccd1585a68ef05acf9b1c42df682..e032a441c00603062e750eb9367c2025c4023e1c 100644 (file)
@@ -21,8 +21,8 @@ void PrimitiveBuilder::begin(PrimitiveType t)
        if(in_batch)
                throw InvalidState("begin() already called");
 
-       type=t;
-       in_batch=true;
+       type = t;
+       in_batch = true;
 
        begin_();
 }
@@ -32,7 +32,7 @@ void PrimitiveBuilder::end()
        if(!in_batch)
                throw InvalidState("end() called without begin()");
 
-       in_batch=false;
+       in_batch = false;
 
        end_();
 }
@@ -55,9 +55,11 @@ PrimitiveType PrimitiveBuilder::get_type() const
 
 void PrimitiveBuilder::vertex_(float x, float y, float z, float w)
 {
-       vab.texcoord(ts, tt, tr,tq);
+       vab.texcoord(ts, tt, tr, tq);
        vab.color(cr, cg, cb, ca);
        vab.normal(nx, ny, nz);
+       for(std::map<unsigned, Attrib>::iterator i=av.begin(); i!=av.end(); ++i)
+               vab.attrib(i->first, i->second.x, i->second.y, i->second.z, i->second.w);
        vab.vertex(x, y, z, w);
 
        if(in_batch)