So I'm very new to using OpenGL and LWJGL, although I am proficient in Java itself. One of the first things I read in the documentation of the Display class was that it maps the origin to the bottom left as opposed to how most other programs map it to the top left.
I was ready to take this into account until I discovered that the OpenGL libraries in LWJGL still map everything to the top left. It would also appear that the two spaces (window coordinates and game/OpenGL space) do not correspond to each other. ie. if I set a quads position to 10 x 10 via a mouse click in the lower left corner of the screen, it will move to what looks more like (windowWidth - 100, windowHeight - 100) or (100,100) using a standard top left origin.
I am attempting to write a 2D game using quads to draw my sprites, and I was wondering if there was a way to get the screen and game space to correspond.
Any help would be greatly appreciated, Thanks! Peter
Just in case it helps, here's how I'm creating a window and initializing OpenGL Display
Display.setResizable(true);
Display.setDisplayMode(new DisplayMode(WIDTH,HEIGHT));
Display.setVSyncEnabled(VSYNC);
Display.setFullscreen(FULLSCREEN);
Display.create();
OpenGL
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,Display.getWidth(),Display.getHeight(),0,1,-1);
glMatrixMode(GL_MODELVIEW);
glClearColor(0,0,0,1);
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);