SOLUTION: The
real problem was that you used the gluOrtho2D function incorrectly. Instead of this:
gluOrtho2D(0.0, width, height * aspect, 0.0);
You had to switch it to the correct form:
gluOrtho2D(0.0, width, 0.0, height);
, , .
:
, .
, glViewport . glMatrixMode, , , width / height gluPerspective. glFrustum gluPerspective, gluPerspective glFrustum.
- :
float aspectRatio = width / height;
glMatrixMode(GL_PROJECTION_MATRIX);
glLoadIdentity();
gluPerspective(fov, aspectRatio, near, far);