示例#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();
            }
        }