
So, I decided to move to 3D after fooling around in 2D for a while with OpenGL.
I start up the camera with gluPerspective; worked perfect as you can see above.
Now I'm wondering, how do I convert the matrix coordinate system into a Cartesian coordinate system? I messed with using glOrtho along with gluPerspective, but it was to no avail. Is there another command for it? I've googled this many times, and I find long papers that supposedly teaches me how, but instead explain vanishing point and philosophical questions on what the third dimension actually is, instead of a command to do what I need to do. Hahah.
Anyway, any insight is great. Thanks!
(Just in case it's relevant, here's gluPerspectives initialization)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public static void main(String args[]){ try{ Display.setTitle("I'm not an idiot!"); Display.setDisplayMode(new DisplayMode(800, 600)); Display.setResizable(true); Display.create(); }catch(LWJGLException ex){ ex.printStackTrace(); } glMatrixMode(GL_PROJECTION); glLoadIdentity(); Project.gluPerspective(45, (float)Display.getWidth()/(float)Display.getHeight(), 0.1f, 100f); Main2 m = new Main2(); m.loop(); } |