   Draw a created sphere
  Hi!I found some tutorial code how to create a sphere using Opengl API's.typedef struct{int X;int Y;int Z;double U;double V;}VERTICES;void CreateSphere (double R, double H, double K, double Z) {int n;double a;double b;n = 0;for( b = 0; b <= 90 - space; b+=space){for( a = 0; a <= 360 - space; a+=space){VERTEX[n].X = R * sin((a) / 180 * PI) * sin((b) / 180 * PI) - H;VERTEX[n].Y = R * cos((a) / 180 * PI) * sin((b) / 180 * PI) + K;VERTEX[n].Z = R * cos((b) / 180 * PI) - Z;VERTEX[n].V = (2 * b) / 360;VERTEX[n].U = (a) / 360;n++;VERTEX[n].X = R * sin((a) / 180 * PI) * sin((b + space) / 180 * PI) - H;VERTEX[n].Y = R * cos((a) / 180 * PI) * sin((b + space) / 180 * PI) + K;VERTEX[n].Z = R * cos((b + space) / 180 * PI) - Z;VERTEX[n].V = (2 * (b + space)) / 360;VERTEX[n].U = (a) / 360;n++;VERTEX[n].X = R * sin((a + space) / 180 * PI) * sin((b) / 180 * PI) - H;VERTEX[n].Y = R * cos((a + space) / 180 * PI) * sin((b) / 180 * PI) + K;VERTEX[n].Z = R * cos((b) / 180 * PI) - Z;VERTEX[n].V = (2 * b) / 360;VERTEX[n].U = (a + space) / 360;n++;VERTEX[n].X = R * sin((a + space) / 180 * PI) * sin((b + space) / 180 * PI) - H;VERTEX[n].Y = R * cos((a + space) / 180 * PI) * sin((b + space) / 180 * PI) + K;VERTEX[n].Z = R * cos((b + space) / 180 * PI) - Z;VERTEX[n].V = (2 * (b + space)) / 360;VERTEX[n].U = (a + space) / 360;n++;}}}The problem is that the calculated values of X, Y and Z are integers.I would like to use glVertexPointer to be able do draw this sphere.Could someone please help me here.Do I need to do something with the calculated values to be able to use glVertexPointer and glDrawElements?Thanks   
  Uhm, just use floats in your struct? You calculate your vertex positions as doubles anyway (the get cast to int when you asign them to X, Y, Z).Other than that glVertexPointer should actually allow you to use integers. Just pass GL_INT as the type parameter.   ;  I tried to just use a float array, send it to glVertexPointer with GL_FLOAT but I don't see anything on the screen.would be helpful if someone has a running example or could show me some code to look at.please help   