   Camera positioning in OpenGL
  I''m having a little trouble in OpenGL.  Is there a way like in DirectX to aim a camera?  Like from one point looking at another point?  Because the glRotatef function is very confusing to me.  Any help would be great. 
  NAME  gluLookAt - define a viewing transformationC SPECIFICATION  void gluLookAt( GLdouble eyeX,   GLdouble eyeY,   GLdouble eyeZ,   GLdouble centerX,   GLdouble centerY,   GLdouble centerZ,   GLdouble upX,   GLdouble upY,   GLdouble upZ )PARAMETERS  eyeX, eyeY, eyeZ   Specifies the position of the eye point.  centerX, centerY, centerZ   Specifies the position of the reference point.  upX, upY, upZ   Specifies the direction of the up vector.DESCRIPTION  gluLookAt  creates  a viewing matrix derived from an eye point, a reference point indicating the center  of the scene, and an UP vector.   ;  Try gluLookAt.  You can probably find more information about it by googling.Enigma ;  Thanks,  but one more question.What is the default coordinate system in OpenGL?  Like X + is to the right, X - is to the left.  But how do the y''s and x''s work?  Is Y defaulted as up and down or is z the up and down? ;OpenGL uses this coordinate system:x = left/right on monitor screeny = up/down on monitor screenz = in/out of the monitor screen ;  that means that 0,0,0 is the center of the screen.Its a bit confusing if you worked with SDL first which has another coordinate system.Lazzar ;quote:Original post by Lazzar  that means that 0,0,0 is the center of the screen.0,0,0 is the center of the scene and the position of the initial viewpoint. its not the center of the screen and its not even visible as the nearplane cant be 0.this difference has nothing to do with sdl but with 2d and 3d.;  OpenGL 3D:x+ grows to the righty+ grows upwardz- into the screen (z axis point outside the screen) because z-axis is defined by the cross-product of x and y.The origin in camera space is aligned with the center of the screen.OpenGL 2D:the x and y direction are like in 3Dthe origin is in the bottom left corner of the screenSDL 2D:the x+ axis grows to the rightthe y+ axis grows downward the origin is set at the top left corner of the screenIf you use SDL surfaces with OpenGL (for example want to copy a SDL_Surface to the screen) and use SDL rects to manage regions (clipping/copying) beware to convert these coordinate sistem one into the other.Ciao ;  when working in 2d its common to have the top left corner being 0,0. also, opengl doesnt have any "rule" in which direction y should be growing. its also common to set the ortho projection in the same way, so y is going from top to bottom.you could as well say in 3d that y is going down and z is coming out of the screen if you define the identity as looking down from above. no rule that says "y is always up/down", in fact, export models from some tools like max and it wont be. 