예제 #1
0
 public static void DisplayScreenAsync(ScreenSettings settings)
 {
     Settings      = settings;
     DisplayThread = new Thread(() => DisplayScreen(settings))
     {
         Name = "Display Thread"
     };
     //DisplayThread.Priority = ThreadPriority.Highest;
     DisplayThread.Start();
 }
예제 #2
0
 public ScreenSettings(ScreenSettings orginal)
 {
     if (orginal == null)
     {
         return;
     }
     WindowTitle      = orginal.WindowTitle;
     LogicTickRate    = orginal.LogicTickRate;
     MaxSkippedFrames = orginal.MaxSkippedFrames;
     GameSize         = orginal.GameSize;
     WindowSize       = orginal.GameSize;
     Fullscreen       = orginal.Fullscreen;
     VSync            = orginal.VSync;
     MaxFPS           = orginal.MaxFPS;
 }
예제 #3
0
        public static void DisplayScreen(ScreenSettings settings)
        {
            if (DisplayThread == null)
            {
                DisplayThread = Thread.CurrentThread;
            }
            Settings = settings;

            IsRunning   = true;
            _curProcess = Process.GetCurrentProcess();
            _prepare();
            if (!Settings.UseOpenTKLoop)
            {
                _gameLoop();
            }
            else
            {
                _openTKStart();
            }
        }