示例#1
0
        public static MyRenderThread Start(MyGameTimer timer, InitHandler initHandler, MyRenderDeviceSettings?settingsToTry, MyRenderQualityEnum renderQuality, float maxFrameRate)
        {
            var result = new MyRenderThread(timer, true, maxFrameRate);

            result.SystemThread.Start(new StartParams()
            {
                InitHandler = initHandler, SettingsToTry = settingsToTry, RenderQuality = renderQuality
            });
            return(result);
        }
示例#2
0
        public static MyRenderThread StartSync(MyGameTimer timer, IMyRenderWindow renderWindow, MyRenderDeviceSettings?settingsToTry, MyRenderQualityEnum renderQuality, float maxFrameRate)
        {
            var result = new MyRenderThread(timer, false, maxFrameRate);

            result.m_renderWindow = renderWindow;
            result.m_settings     = MyRenderProxy.CreateDevice(result, renderWindow.Handle, settingsToTry);
            MyRenderProxy.SendCreatedDeviceSettings(result.m_settings);

            result.m_currentQuality = renderQuality;
#if XB1
            Debug.Assert(false);
#else
            result.m_form = Control.FromHandle(renderWindow.Handle);
#endif

            result.LoadContent();
            result.UpdateSize();
            return(result);
        }
示例#3
0
 public void StartSync(MyGameTimer timer, IMyRenderWindow window, MyRenderDeviceSettings?settings, MyRenderQualityEnum renderQuality, float maxFrameRate)
 {
     RenderThread = MyRenderThread.StartSync(timer, window, settings, renderQuality, maxFrameRate);
 }
示例#4
0
 /// <summary>
 /// Stops and clears render thread
 /// </summary>
 public void Stop()
 {
     RenderThread.Exit();
     RenderThread = null;
 }
示例#5
0
 /// <summary>
 /// Creates and starts render thread
 /// </summary>
 public void Start(MyGameTimer timer, InitHandler windowInitializer, MyRenderDeviceSettings?settingsToTry, MyRenderQualityEnum renderQuality, float maxFrameRate)
 {
     RenderThread = MyRenderThread.Start(timer, windowInitializer, settingsToTry, renderQuality, maxFrameRate);
 }