Some more 3D
- Hidden Surface Removal
- This is the process whereby objects further away are obscured by closer objects.
- This is principally done with the Z-buffer
- To do this we need to do the following
- ASK for a Z-buffer
- glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
- Enable depth testing
- We need to draw a 3d object as well.
- And for anything real, we need to be able to move it about.
- glTranslatef(x,y,z) will translate an object in space
- glRotatef(angle, x,y,z) will rotate about the given axis by the given angle.
- Much more on all of this later.