Fixed ImGui being distorted after window resize or move

This commit is contained in:
Simon Lübeß
2020-11-16 21:17:04 +01:00
parent 6bfeffa49d
commit ebd56e54b1
@@ -6,7 +6,6 @@ using DirectX.Windows.Kernel32;
using DirectX.Windows.WindowMessages; using DirectX.Windows.WindowMessages;
using GlitchyEngine.Events; using GlitchyEngine.Events;
using System.Diagnostics; using System.Diagnostics;
using imgui_beef;
using GlitchyEngine.Platform.DX11; using GlitchyEngine.Platform.DX11;
using GlitchyEngine.Math; using GlitchyEngine.Math;
using static System.Windows; using static System.Windows;
@@ -283,8 +282,6 @@ namespace GlitchyEngine.Platform.Windows
{ {
window._isResizingOrMoving = false; window._isResizingOrMoving = false;
DirectX.UpdateSwapchain((.)window._clientRect.Width, (.)window._clientRect.Width);
var resEvent = scope WindowResizeEvent(window._clientRect.Width, window._clientRect.Height, false); var resEvent = scope WindowResizeEvent(window._clientRect.Width, window._clientRect.Height, false);
window._eventCallback(resEvent); window._eventCallback(resEvent);
var moveEvent = scope WindowMoveEvent(window._clientRect.X, window._clientRect.Y, false); var moveEvent = scope WindowMoveEvent(window._clientRect.X, window._clientRect.Y, false);