private void cylinder_fill () {    
    float ds = 1.0f / slices;
    float dt = 1.0f / stacks;
    float t = 0.0f;
    float z = 0.0f;
    double r = base_radius;

    for (int j=0; j<stacks; j++, r+=dr, t+=dt, z+=dz) {
      float s = 0.0f;
      gl.begin (GL.QUAD_STRIP);

      for (int i=0; i<=slices; i++, s+=ds) {
        double theta = i == slices ? 0.0f : i*dtheta;
        double x = Math.sin (theta);
        double y = Math.cos (theta);

        float vx, vy, vz;
        
        cylinder_normal (x, y, nz);
        if (texture) gl.tex_coord2f (s, t);
        vx = (float) (x * r);
        vy = (float) (y * r);
        vz = z;
        gl.vertex3f (vx, vy, vz);

        cylinder_normal (x, y, nz);
        if (texture) gl.tex_coord2f (s, t+dt);
        vx = (float) (x * (r + dr));
        vy = (float) (y * (r + dr));
        vz = (float) (z + dz);
        gl.vertex3f (vx, vy, vz);
      }

      gl.end ();
    }
  }