   Draw created sphere without GLUT
  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?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.The problem as I see it is that the calculated values can range from 0.0 to value abover 5.0 or more. The screen uses range values from 0.0f to 1.0f.please helpThanks[Edited by - Hachaso on May 24, 2009 4:09:30 PM]