private void AdjustOrtho(Size size) { if (Shader == null) { return; } var aspect = (float)size.Height / size.Width; //Gl.Ortho(Ortho.Left, Ortho.Right, Ortho.Bottom * aspect, Ortho.Top * aspect, Ortho.Near, Ortho.Far); Shader.P = Matrix4x4.CreateOrthographicOffCenter((float)Ortho.Left, (float)Ortho.Right, (float)Ortho.Bottom * (float)aspect, (float)Ortho.Top * (float)aspect, (float)Ortho.Near, (float)Ortho.Far); }