- unsigned j2 = (j==0 ? 0 : j==x.size()-2 ? 2 : 1);
- bld.texcoord(u[j2], v[i2]);
- bld.vertex(x[j], y[i]);
- bld.texcoord(u[j2+1], v[i2]);
- bld.vertex(x[j+1], y[i]);
+ size_t j2 = (j==0 ? 0 : j==x.size()-2 ? 2 : 1);
+ if(j==xmin || (j>1 && j<x.size()-2))
+ {
+ if(j>xmin)
+ bld.end();
+ bld.begin(GL::TRIANGLE_STRIP);
+ bld.texcoord(u[j2], v[i2+1]);
+ bld.vertex(x[j], y[i+1]);
+ bld.texcoord(u[j2], v[i2]);
+ bld.vertex(x[j], y[i]);
+ }