   gluUnProject (...)  help needed!!
  Hy guys, I'm developing a c# app, and I've spent a lot of time serching for correct way to map 2d coord of mouse to 3d world coords of the ogl scene, particullary I want to select some point in my scene. I have used this code snippet:  public static Point3d GetOGLCoords(int x, int y)   {  int[] viewport = new int[4];  double[] modelview = new double[16];  double[] projection = new double[16];  float winX, winY, winZ;  double posX, posY, posZ;  GL.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelview);  GL.glGetDoublev(GL.GL_PROJECTION_MATRIX, projection);  GL.glGetIntegerv(GL.GL_VIEWPORT, viewport);  winX = (float)x;  winY = (float)viewport[3] - (float)y;  GL.glReadPixels(x, (int)winY, 1, 1, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, out winZ);  GLU.gluUnProject(winX, winY, winZ, modelview, projection, viewport, out posX, out posY, out posZ);  return new Point3d(posX, posY, posZ);   }(from NeHe article #13)where "GL" and "GLU" are related glu and opengl wrapping classes.In my code also I have implemented a simple camera based upon translate and rotate func and gluLookAt(...).my draw func are:  protected override void OnPaint(PaintEventArgs e)   {  if (DC == 0 || RC == 0) return;  WGL.wglMakeCurrent(DC, RC);  GL.glLoadIdentity();  GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);  GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);  GL.glMatrixMode(GL.GL_PROJECTION);  GL.glLoadIdentity();  GL.glOrtho(...);  GL.glMatrixMode(GL.GL_MODELVIEW);  GL.glLoadIdentity();  GLU.gluLookAt(...);}I have also drawed the point result of the GetOpenGLCoords this is the result:The code seems to work except that the mouse arrow is not at the same position of drawed pointsWhere is my mistake?Thankyou a lot in advance.Mirko (buzzy84)   