Using glOrtho(0, 640, 0, 480, 1, -1); Creates a non-square viewport. This means that the processed output will more than likely be skewed if your window is not the same size as your viewport (or at least the same aspect ratio).
Consider the following comparison:

If your viewport is the same size as your window, it should remain square. I use JOGL , but in my resize function, I resize my viewport as the new size of my window.

glcanvas.addGLEventListener(new GLEventListener() { @Override public void reshape(GLAutoDrawable glautodrawable, int x, int y, int width, int height) { GL2 gl = glautodrawable.getGL().getGL2(); gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity();
zero298
source share