Пример #1
0
        protected override void OnResize(EventArgs e)
        {
            if (ClientSize.Width < 640)
            {
                ClientSize = new Size(640, ClientSize.Height);
            }
            if (ClientSize.Height < 480)
            {
                ClientSize = new Size(ClientSize.Width, 480);
            }

            GL.Viewport(ClientRectangle);
            //GL.MatrixMode(MatrixMode.Projection);
            //GL.LoadIdentity();
            //GL.Ortho(0, ClientRectangle.Width, ClientRectangle.Height, 0, Camera.NearPlane, Camera.FarPlane);

            Camera.UpdateProjectionMatrix();
        }
Пример #2
0
 public static void Viewport(OpenTK.Point location, OpenTK.Size size)
 {
     GL.Viewport(location.X, location.Y, size.Width, size.Height);
 }