static void Main() { using (window = new EditorWindow()) { window.Show(); window.createFrame(); // While the form is still valid, render and process messages. while (window.Created) { window.Render(); Application.DoEvents(); } } }
public EditorBase() { PlatformManager = new PlatformManager(CreateWxPlatformManager()); Engine = new Engine(PlatformManager); Engine.Init(); // Search for the location of the main assets folder. string assetsPath; if (!SearchForAssetsDirectory(out assetsPath)) throw new Exception("Editor assets were not found"); Archive = new ArchiveVirtual(); Archive.MountDirectories(assetsPath, Allocator.GetHeap()); ResourceManager = Engine.ResourceManager; ResourceManager.Archive = Archive; EditorWindow = new EditorWindow(); WindowManager = Engine.WindowManager; MainWindow = CreateWindow(); var context = MainWindow.CreateContext(new RenderContextSettings()); MainView = MainWindow.CreateView(); MainView.ClearColor = Color.Red; MainWindow.Idle += Update; MainWindow.Render += Render; MainWindow.TargetResize += Resize; MainWindow.Show(true); MainWindow.MakeCurrent(); context.Init(); RenderDevice = Engine.RenderDevice; }