   Some simple question
  I am getting confused with the Opengl screen coordinates...I am playing around the opengl in win32 and i know to setup the scene requires the glPerspective and gluLookAt for the camera although gluLookAt isn't necessarily.Does the (0,0,0) coordinates start at the center of the screen or at the top left?what does the angle used for in the glPerspective and the far and near part?Please give me some clear explanation. thanks   
Quote:Original post by kbundyI am getting confused with the Opengl screen coordinates...I am playing around the opengl in win32 and i know to setup the scene requires the glPerspective and gluLookAt for the camera although gluLookAt isn't necessarily.Does the (0,0,0) coordinates start at the center of the screen or at the top left?what does the angle used for in the glPerspective and the far and near part?Please give me some clear explanation. thanks(0,0,0) is the origin point of a virtual 3D space. It has nothing to do with screen coordinates. To find the screen coordinates of this point, one have to project this point into the 2D screen space. You do this by applying a serie of tranformation which are defined by 4D matrices (in homogeneous coordinate systems). The last transformation is the projection - and its goal is to map a 3D point which is in the view space to a 2D point on the screen.To learn more about 3D to 2D projection, check this wikipedia entry. HTH,   ;  The arguments in gluPerspective are, in order:1. field of view angle, the larger this number the wider the horizontal angle of the scene the camera can see. Making this number smaller has the effect of appearing to "zoom in" on the center of the view.2. the aspect ratio, what your screen dimensions are relative to each other3. near plane, the closest an object can be to the camera without being clipped. This prevents the system from trying to render things behind the camera, or so close that they produce artifacts (why it's usually not 0).4. far plane, the farthest away an object can be. This is to limit the rendered scene so you don't bog down the card with stuff that is so far away it doesn't matter anyway.   ;  With a gluPerspective call, you always get a projection matrix that maps all 3D points (0,0,z) to the center of the screen. If you need something else, you can either a) transform the projection matrix afterwards, b) call glFrustum, or c) load a custom projection matrix with glLoadMatrix.   