int a; /* current angle around cylinder */
int angle, norm;
float z1, y1, z2, y2,ex;
- int step;
int nsegs;
glPushMatrix();
if (nsegs % 2)
nsegs += 1;
angle = (half) ? (180 - 90/nsegs) : 374;
- step = angle/nsegs;
z1 = radius; y1 = 0;
glBegin(GL_QUADS);
for (a = 0 ; a <= angle ; a+= angle/nsegs) {
{
int polys = 0;
int n; /* band number */
- int p = 0; /* prev number + 1; */
GLfloat col[] = {0,0,0,0};
col[0] = r; col[1] = g; col[2] = bl;
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, col);
polys += createCylinder(ci, b[n]->len*l, radius*1.05, 0, 0); /* band */
glPopMatrix();
- p = n+1;
}
return polys;
}