int vncount, vtcount;
int n1 = 0, n2 = 0, n3 = 0, n4 = 0;
int tex;
- int last1 = 0, last2 = 0, odd = 0;
+ int last1 = 0, last2 = 0;
+ bool odd = false;
point_list nodes;
Point3D node;
Point3D center;
// xglBegin(GL_TRIANGLE_STRIP);
// printf("xglBegin(tristrip) %d %d %d\n", n1, n2, n3);
- odd = 1;
+ odd = true;
// scale = 1.0;
if ( shading ) {
}
// printf("some normals, texcoords, and vertices\n");
- odd = 1 - odd;
+ odd = !odd;
last1 = n2;
last2 = n3;
// xglTexCoord2f(pp.lon(), pp.lat());
// xglVertex3dv(nodes[n4].get_n());
- odd = 1 - odd;
+ odd = !odd;
last1 = n3;
last2 = n4;
// printf("a normal, texcoord, and vertex (4th)\n");
fan_vertices.clear();
fan_tex_coords.clear();
+ odd = true;
// xglBegin(GL_TRIANGLE_FAN);
// xglTexCoord2f(pp.x(), pp.y());
// xglVertex3dv(nodes[n3].get_n());
- fragment.add_face(n1, n2, n3);
+ if ( odd ) {
+ fragment.add_face(n1, n2, n3);
+ } else {
+ fragment.add_face(n2, n1, n3);
+ }
+
+ odd = !odd;
+ n1 = n2;
n2 = n3;
}
// xglVertex3dv(nodes[n1].get_n());
// printf("a normal, texcoord, and vertex (4th)\n");
- odd = 1 - odd;
+ odd = !odd;
last1 = last2;
last2 = n1;
// xglVertex3dv(nodes[n2].get_n());
// printf("a normal, texcoord, and vertex (4th)\n");
- odd = 1 -odd;
+ odd = !odd;
last1 = last2;
last2 = n2;
}