Although it may look finished, I need to add normals to the objects to make the lighting work properly. I also think that I haven’t done the sphere correct to the specification. We are asked to make the objects either by Vertex Buffer Objects or Vertex Arrays and I think that the sphere is neither.
Here is the code that I have done to draw the sphere from vertices which I have also used to draw the cube and pyramid:
glVertexPointer(3, GL_FLOAT, 0, &sphereVertices);
glRotatef(angle, 0.2, 0.1, 0);
glDrawElements(GL_TRIANGLE_STRIP, ((sphereStacks * sphereSlices)*2), GL_UNSIGNED_BYTE, &sphereIndices);
Even though I have declared the EnableClientState(GL_VERTEX_ARRAY) does this count as creating the Sphere using Vertex Arrays?