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); }
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); }
public void StartSync(MyGameTimer timer, IMyRenderWindow window, MyRenderDeviceSettings?settings, MyRenderQualityEnum renderQuality, float maxFrameRate) { RenderThread = MyRenderThread.StartSync(timer, window, settings, renderQuality, maxFrameRate); }
/// <summary> /// Stops and clears render thread /// </summary> public void Stop() { RenderThread.Exit(); RenderThread = null; }
/// <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); }