View Full Version : How to setup Projection Matrix for resolution independent coordinates

06-29-2003, 11:54 AM
Hi, I'm quite new here so please if this has already been asked dont flame me http://www.opengl.org/discussion_boards/ubb/biggrin.gif.

Anyway I was wondering, how would I set up the OpenGL projection matrix so that I can pass a set of coordinates to it and expect them to be in roughly the same position no matter what resolution is on the screen: 640x480, 800x600, 1024x768, etc. If this is not possible please let me know, I thank you in advance.

06-29-2003, 01:06 PM
640/480 = 1.3(3)
800/600 = 1.3(3)
1024/768 = 1.3(3) =>

=> gluPerspective(45,1.33f,0.1f,250.0f) will give you the desired matrix