When I write glOrtho(0.0, 800.0, 0.0, 600.0, 1.0, 1.0) I get an invalid value exception. And I only get it when I assign near and far the same value. However I've done this before and never noticed any errors :/ However I've been doing OpenGL in both C/C++ and Java, so it's possible I have totally missed this error because I have mostly used C/C++ and been bad at checking for errors. But still it's kind of odd, since my OpenGL reference says that gluOrtho2D is the same as glOrtho with near and far plane set to 1. So it should work right?