/// <summary> /// Closes the pipe and the MasterRenderer. /// </summary> /// <param name="e"></param> protected override void OnClosing(CancelEventArgs e) { IsClosing = true; MasterRenderer.Dispose(); controller.Dispose(); }
public void cleanup() { _gd.WaitForIdle(); _controller.Dispose(); _cl.Dispose(); _gd.Dispose(); }
/// <inheritdoc /> protected override void OnClosed() { Test?.Dispose(); Test = null; Global.DebugDraw.Destroy(); Global.Settings.Save(); _controller.Dispose(); _controller = null; _stopwatch.Stop(); base.OnClosed(); }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { _imGuiController.Dispose(); } _disposedValue = true; } }
private void Cleanup() { if (Updates.PendingInstallPath != null && System.IO.File.Exists(Updates.PendingInstallPath)) { Updates.PerformFileSwap(Updates.PendingInstallPath); } Exit(); // Clean up Veldrid resources _gd?.WaitForIdle(); _controller?.Dispose(); }
static void Main(string[] args) { // Create window, GraphicsDevice, and all resources necessary for the demo. //VeldridStartup.CreateWindowAndGraphicsDevice( VeldridStartup.CreateWindowAndGraphicsDevice( new WindowCreateInfo(50, 50, 1280, 720, WindowState.Normal, "ImGui.NET Sample Program"), new GraphicsDeviceOptions(true, null, true), GraphicsBackend.OpenGL, out _window, out _gd); _window.Resized += () => { _gd.MainSwapchain.Resize((uint)_window.Width, (uint)_window.Height); _controller.WindowResized(_window.Width, _window.Height); }; _cl = _gd.ResourceFactory.CreateCommandList(); _controller = new ImGuiController(_gd, _gd.MainSwapchain.Framebuffer.OutputDescription, _window.Width, _window.Height); //_memoryEditor = new MemoryEditor(); //Random random = new Random(); //_memoryEditorData = Enumerable.Range(0, 1024).Select(i => (byte)random.Next(255)).ToArray(); _state = new GlobalUIState(_window); // Main application loop while (_window.Exists) { InputSnapshot snapshot = _window.PumpEvents(); if (!_window.Exists) { break; } _controller.Update(1f / 60f, snapshot); // Feed the input events to our ImGui controller, which passes them through to ImGui. SubmitUI(); _cl.Begin(); _cl.SetFramebuffer(_gd.MainSwapchain.Framebuffer); _cl.ClearColorTarget(0, new RgbaFloat(_clearColor.X, _clearColor.Y, _clearColor.Z, 1f)); _controller.Render(_gd, _cl); _cl.End(); _gd.SubmitCommands(_cl); _gd.SwapBuffers(_gd.MainSwapchain); } // Clean up Veldrid resources _gd.WaitForIdle(); _controller.Dispose(); _cl.Dispose(); _gd.Dispose(); }
public override void OnDetach() { ImGui.SaveIniSettingsToDisk(new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"/imgui.ini"); ImGuiController?.Dispose(); }
protected override void Unload() { _imGuiController.Dispose(); base.Unload(); }
protected virtual void Unload() { _imGuiController.Dispose(); }
public void Dispose() { _imGuiController.Dispose(); glfwTerminate(); }