]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix compile errors caused by faulty regex application in previous revision
authorMikko Rasa <tdb@tdb.fi>
Tue, 8 Jun 2010 17:18:08 +0000 (17:18 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 8 Jun 2010 17:18:08 +0000 (17:18 +0000)
source/vertexarraybuilder.cpp

index 87b290152b6eae6d047512c088c85cfe765b7d5b..70d1ee58a1145252e97cec8307e32eb970b9d12c 100644 (file)
@@ -30,21 +30,21 @@ void VertexArrayBuilder::vertex_(float x, float y, float z, float w)
                switch(type)
                {
                case 0:
-                       *ptr+ += x;
-                       *ptr+ += y;
-                       if(size>=3) *ptr+ += z;
-                       if(size>=4) *ptr+ += w;
+                       *ptr+= x;
+                       *ptr+= y;
+                       if(size>=3) *ptr+= z;
+                       if(size>=4) *ptr+= w;
                        break;
                case 1:
-                       *ptr+ += nx;
-                       *ptr+ += ny;
-                       *ptr+ += nz;
+                       *ptr+= nx;
+                       *ptr+= ny;
+                       *ptr+= nz;
                        break;
                case 2:
-                       *ptr+ += ts;
-                       if(size>=2) *ptr+ += tt;
-                       if(size>=3) *ptr+ += tr;
-                       if(size>=4) *ptr+ += tq;
+                       *ptr+= ts;
+                       if(size>=2) *ptr+= tt;
+                       if(size>=3) *ptr+= tr;
+                       if(size>=4) *ptr+= tq;
                        break;
                case 3:
                        if(size==1)
@@ -54,22 +54,22 @@ void VertexArrayBuilder::vertex_(float x, float y, float z, float w)
                                u.c[1] = static_cast<unsigned char>(cg*255);
                                u.c[2] = static_cast<unsigned char>(cb*255);
                                u.c[3] = static_cast<unsigned char>(ca*255);
-                               *ptr+ += u.f;
+                               *ptr+= u.f;
                        }
                        else
                        {
-                               *ptr+ += cr;
-                               *ptr+ += cg;
-                               *ptr+ += cb;
-                               if(size>=4) *+ptr+ += ca;
+                               *ptr+= cr;
+                               *ptr+= cg;
+                               *ptr+= cb;
+                               if(size>=4) *ptr++ = ca;
                        }
                        break;
                default:
                        const Attrib &a = av[type-4];
-                       *ptr+ += a.x;
-                       if(size>=2) *ptr+ += a.y;
-                       if(size>=3) *ptr+ += a.z;
-                       if(size>=4) *ptr+ += a.w;
+                       *ptr+= a.x;
+                       if(size>=2) *ptr+= a.y;
+                       if(size>=3) *ptr+= a.z;
+                       if(size>=4) *ptr+= a.w;
                        break;
                }
        }