Пример #1
0
        /// <summary>
        /// Set in FullScreen mode
        /// </summary>
        /// <param name="resolution">Desired resolution</param>
        void SetFullScreen(OpenTK.DisplayResolution resolution)
        {
            Trace.WriteDebugLine("[GameWindow] SetFullScreen()");

            if (resolution == null)
            {
                return;
            }

            OpenTK.DisplayDevice.Default.ChangeResolution(resolution);

            this.WindowState     = FormWindowState.Maximized;
            this.FormBorderStyle = FormBorderStyle.None;


            IsFullScreen = true;
        }
Пример #2
0
 /// <summary>
 /// Set in FullScreen mode
 /// </summary>
 /// <param name="size">Size</param>
 /// <param name="bpp">Color depth</param>
 void SetFullScreen(Size size, int bpp)
 {
     OpenTK.DisplayResolution res = OpenTK.DisplayDevice.Default.SelectResolution(size.Width, size.Height, bpp, 60);
     SetFullScreen(res);
 }
Пример #3
0
 /// <summary>
 /// Set in FullScreen mode
 /// </summary>
 public void SetFullScreen()
 {
     OpenTK.DisplayResolution res = OpenTK.DisplayDevice.Default.SelectResolution(ClientSize.Width, ClientSize.Height, 32, 60);
     SetFullScreen(res);
 }