private void SetViewConfiguration(ViewConfigurations configuration) { lastViewsConfiguration = configuration; if (configuration != ViewConfigurations.NoViews) { if (MultiViewRenderingManager.Instance == null) { MultiViewRenderingManager.Init(); } MultiViewRenderingManager.Instance.RemoveAllViews(); switch (configuration) { case ViewConfigurations.SplitByScreens: if (!EngineApp.Instance.MultiMonitorMode && EngineApp.Instance.AllDisplays.Count > 1) { string text = LanguageManager.Instance.Translate("UISystem", "To run engine on multi monitor system activate video " + "mode \"Use all displays\" in the Configurator.exe."); Log.Warning(text); } else { RectI totalBounds = RectI.Cleared; foreach (DisplayInfo display in EngineApp.Instance.AllDisplays) { totalBounds.Add(display.Bounds); } foreach (DisplayInfo display in EngineApp.Instance.AllDisplays) { Rect rectangle = (display.Bounds - totalBounds.LeftTop).ToRect() / EngineApp.Instance.VideoMode.ToVec2(); MultiViewRenderingManager.Instance.AddView(rectangle); } } break; case ViewConfigurations.Three3x1: MultiViewRenderingManager.Instance.AddView(new Rect(0, 0, .331f, 1)); MultiViewRenderingManager.Instance.AddView(new Rect(.335f, 0, .664f, 1)); MultiViewRenderingManager.Instance.AddView(new Rect(.668f, 0, 1, 1)); break; case ViewConfigurations.Four2x2: MultiViewRenderingManager.Instance.AddView(new Rect(0, 0, .498f, .495f)); MultiViewRenderingManager.Instance.AddView(new Rect(.502f, 0, 1, .495f)); MultiViewRenderingManager.Instance.AddView(new Rect(0, .505f, .498f, 1)); MultiViewRenderingManager.Instance.AddView(new Rect(.502f, .505f, 1, 1)); break; } MultiViewRenderingManager.Instance.MainCameraDraw3DScene = checkBoxShowMainScene.Checked; MultiViewRenderingManager.Instance.DrawDebugInfo = checkBoxDrawDebugInfo.Checked; foreach (MultiViewRenderingManager.View view in MultiViewRenderingManager.Instance.Views) { view.Opacity = scrollBarViewsOpacity.Value; view.Render += view_Render; } } else { MultiViewRenderingManager.Shutdown(); } }