* call the LWJGL Sphere class to draw sphere geometry
* with texture coordinates and normals
* @param facets number of divisions around longitude and latitude
*/
public static void renderSphere(int facets) {
Sphere s = new Sphere(); // an LWJGL class
s.setOrientation(GLU.GLU_OUTSIDE); // normals point outwards
s.setTextureFlag(true); // generate texture coords
GL11.glPushMatrix();
{
GL11.glRotatef(-90f, 1,0,0); // rotate the sphere to align the axis vertically
s.draw(1, facets, facets); // run GL commands to draw sphere
}
GL11.glPopMatrix();
}