   OpenGL cooridnates
  Hi Im new at opengl and Im trying to set up a window to be able to handle some basic 3d drawing. The problem is with the coordinates. The origin (0, 0, 0) is in the center of the screen but I want it down at the left corner of my window.This is how I initializes openGL.const bool CRenderer::initialize(const HDC dc, const GLsizei width, const GLsizei height){bool isSuccessfull = true;mhDC = dc;setupPixelFormat();mhRC = wglCreateContext(mhDC);if(wglMakeCurrent(mhDC, mhRC) == false){isSuccessfull = false;}mWidth = width;mHeight = height;glViewport(0, 0, mWidth, mHeight);glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(55.0, static_cast<GLdouble>(mWidth / mHeight), 1.0, 100.0);glMatrixMode(GL_MODELVIEW);glLoadIdentity();glClearColor(0.0, 0.0, 0.0, 0.0);glClearDepth(1.0);glEnable(GL_DEPTH_TEST);return(isSuccessfull);}Thanks for any helpScanmaster_K   
  That doesn't really make sense if you are using a perspective viewport. Any object drawn in 0,0,0 in camera space will either be clipped or fill the entire viewport (unless its a point or a line in which case it is interminate). This is because the x and y screen coordinates (those used to actually draw the pixels) are calculated like this: xs = (x*m)/z, ys = (y*m)/z (m is a muiltiplicative factor in there to adjust for field of view)As you can see, if z is zero then xs and ys are indeterminate. This is why when drawing using a perspective viewport the near clipping plane is set to greater than 0.0.Explain what it is you are trying to draw and we can help you more easily.;  Well I just heard that 0.0 down in the left corner was openGL standard so I thought I was doing something wrong but apperently not.Thanks   ;Quote:Original post by Scanmaster_kWell I just heard that 0.0 down in the left corner was openGL standard so I thought I was doing something wrong but apperently not.ThanksTry using glOrtho2D() instead of gluPerspective(), this will put you in ortho mode, which is basically a 2-dimensional mode.   ;  IF you would have really wanted that, the key would be to not use gluPerspective but glFrustum. But using a non-symmetric frustum would probably be a bit unusual anyway.   ;Quote:Original post by Scanmaster_kWell I just heard that 0.0 down in the left corner was openGL standard so I thought I was doing something wrong but apperently not.ThanksThat sounds like texture mapping. (0,0) texture coordinates are indeed the lower left.If you are actually referring to perspective mode, then you might try rendering everything at worldspace 0,0,0 but position and point your camera using gluLookAt() so that it all appears in the lower left of the viewport. Like eveyone else, seem kind of odd though.hthF451   ;http://www.rush3d.com/reference/opengl-redbook-1.1/Read chapter 3. I also recommend Interactive Computer Graphics by Edward Angel.   