Field of view question

I’m using a field of view of 45 degrees with an aspect ratio of 2 i.e.

gluPerspective(45, 2, 1, 500);

with a window size of 1600x800.

If I change to an aspect ratio of 1 i.e.

gluPerspective(45, 1, 1, 500);

and a window size of 800x800 I thought that anything that was at the very edge of the left or right screen edges (with aspect = 2) would still visible (with aspect = 1).

e.g. if there were two trees; one 22.5 degrees to my left, the other 22.5 degrees to my right. Then these would be at the left and right edges of the screen regardless of the aspect ratio (since my field of view is 45 degrees in both cases).

Instead I find that something at the edge of the screen with aspect = 2 isn’t visible with aspect = 1.

Do I just have a bug or is my understanding wrong?



The first param of gluPerspective() is the vertical field of view (y-direction), not horizontal.