Ejemplo n.º 1
0
        public static MyRenderThread Start(MyGameTimer timer, InitHandler initHandler, MyRenderDeviceSettings?settingsToTry, MyRenderQualityEnum renderQuality)
        {
            var result = new MyRenderThread(timer, true);

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

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

            result.m_currentQuality = renderQuality;
            result.m_form           = Control.FromHandle(renderWindow.Handle);

            result.LoadContent();
            result.UpdateSize();
            return(result);
        }
Ejemplo n.º 3
0
 public static MyRenderDeviceSettings CreateDevice(MyRenderThread renderThread, IntPtr windowHandle, MyRenderDeviceSettings? settingsToTry)
 {
     Debug.Assert(RenderThread == null, "Render thread already set, it shouldn't be!");
     RenderThread = renderThread;
     return m_render.CreateDevice(windowHandle, settingsToTry);
 }
Ejemplo n.º 4
0
 public void StartSync(MyGameTimer timer, IMyRenderWindow window, MyRenderDeviceSettings?settings, MyRenderQualityEnum renderQuality, float maxFrameRate)
 {
     RenderThread = MyRenderThread.StartSync(timer, window, settings, renderQuality, maxFrameRate);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Stops and clears render thread
 /// </summary>
 public void Stop()
 {
     RenderThread.Exit();
     RenderThread = null;
 }
Ejemplo n.º 7
0
        public static MyRenderThread StartSync(MyGameTimer timer, IMyRenderWindow renderWindow, MyRenderDeviceSettings? settingsToTry, MyRenderQualityEnum renderQuality)
        {
            var result = new MyRenderThread(timer, false);
            result.m_renderWindow = renderWindow;
            result.m_settings = MyRenderProxy.CreateDevice(result, renderWindow.Handle, settingsToTry);
            MyRenderProxy.SendCreatedDeviceSettings(result.m_settings);

            result.m_currentQuality = renderQuality;
            result.m_form = System.Windows.Forms.Control.FromHandle(renderWindow.Handle);

            result.LoadContent();
            result.UpdateSize();
            return result;
        }
Ejemplo n.º 8
0
 public static MyRenderThread Start(MyGameTimer timer, InitHandler initHandler, MyRenderDeviceSettings? settingsToTry, MyRenderQualityEnum renderQuality)
 {
     var result = new MyRenderThread(timer, true);
     result.SystemThread.Start(new StartParams() { InitHandler = initHandler, SettingsToTry = settingsToTry, RenderQuality = renderQuality });
     return result;
 }
Ejemplo n.º 9
0
 public void StartSync(MyGameTimer timer, IMyRenderWindow window, MyRenderDeviceSettings? settings, MyRenderQualityEnum renderQuality)
 {
     RenderThread = MyRenderThread.StartSync(timer, window, settings, renderQuality);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Stops and clears render thread
 /// </summary>
 public void Stop()
 {
     RenderThread.Exit();
     RenderThread = null;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Creates and starts render thread
 /// </summary>
 public void Start(MyGameTimer timer, InitHandler windowInitializer, MyRenderDeviceSettings? settingsToTry, MyRenderQualityEnum renderQuality)
 {
     RenderThread = MyRenderThread.Start(timer, windowInitializer, settingsToTry, renderQuality);
 }