示例#1
0
 /// A fairly straightforward function that pushes
 /// a projection matrix that will make object world
 /// coordinates identical to window coordinates.
 private void pushScreenCoordinateMatrix()
 {
     glView.glPushAttribTransform();
     int[] viewport = new int[4];
     glView.glGetIntegerViewport(ref viewport);
     glView.glMatrixModeProjection();
     glView.glPushMatrix();
     glView.glLoadIdentity();
     glView.glOrtho(viewport[0], viewport[2], viewport[1], viewport[3], 0, 1); // Paramters: left, right, bottom, top, near, far
     glView.glPopAttrib();
 }