I did this once. Sphere (planet) is volumetric and due to perspective its projection to the screen is not always a circle. You need to make your planet flat too. This most easily can be done by a vertex shader. But you can flattern it while drawing since you are using glBegin/glEnd, not VBO.
In other words, for each vertice of the planet you do the following:
Code:
DirP := DotProduct(Vertices[i], Direction);
DrawVertices[i] := SubVector(Vertices[i], ScaleVector(Direction, DirP);
Direction is normalised direction vector from camera to center of the planet.
Bookmarks