title: OpenGL Ortho Coordinates
body: <p>I have an OpenGL view overlaid on top of an MKMapView.  My goal is to have the coordinates of the glView to have the same values of the MKMapPoints on the map.  To do this I found the values for the MKMapPoint on the top left and the bottom right of the map.</p>
  
  <pre><code>CLLocationCoordinate2D coordinateTopLeft = [mapView convertPoint:CGPointMake(0, 0) toCoordinateFromView:mapView];
  MKMapPoint pointTopLeft = MKMapPointForCoordinate(coordinateTopLeft);
  
  CLLocationCoordinate2D coordinateBottomRight = [mapView convertPoint:CGPointMake(mapView.frame.size.width, mapView.frame.size.width) toCoordinateFromView:mapView];
  MKMapPoint pointBottomRight = MKMapPointForCoordinate(coordinateBottomRight);
  </code></pre>
  
  <p>Then I set the right, left, bottom, and top coordinates of the glView to match these points accordingly.</p>
  
  <pre><code>glOrthof(pointTopLeft.x, pointBottomRight.x, pointBottomRight.y, pointTopLeft.y, -1, 1);
  </code></pre>
  
  <p>Unfortunately, this did not work.  The triangles that I tried to draw did not work.  I tested and the points that I was trying to draw <strong>were</strong> located in the correct domain.</p>
  
  <p>Am I just misunderstanding how the glOrthof method works?</p>