You might ant to have a look at http://www.loria.fr/~rougier/teaching/opengl/ for simpler aspect ratio techniques.

http://www.loria.fr/~rougier/teaching/opengl/#a-step-further