1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-27 17:10:57 +01:00

Examples: Win32+DX12: Fixed resizing main window, enabled debug layer. (#3087, #3115)

This commit is contained in:
SergeyN 2020-03-30 21:43:21 +02:00 committed by omar
parent f7852fa8e8
commit 977ac53dd8
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,7 @@ Other Changes:
- Backends: SDL: Added ImGui_ImplSDL2_InitForMetal() for API consistency (even though the function
currently does nothing).
- Backends: SDL: Fixed mapping for ImGuiKey_KeyPadEnter. (#3031) [@Davido71]
- Examples: Win32+DX12: Fixed resizing main window, enabled debug layer. (#3087, #3115) [@sergeyn]
- Examples: SDL+DX11: Fixed resizing main window. (#3057) [@joeslay]
- Examples: Added SDL+Metal example application. (#3017) [@coding-jackalope]

View File

@ -9,7 +9,9 @@
#include <dxgi1_4.h>
#include <tchar.h>
//#define DX12_ENABLE_DEBUG_LAYER
#ifdef _DEBUG
#define DX12_ENABLE_DEBUG_LAYER
#endif
#ifdef DX12_ENABLE_DEBUG_LAYER
#include <dxgidebug.h>
@ -441,6 +443,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
{
WaitForLastSubmittedFrame();
ImGui_ImplDX12_InvalidateDeviceObjects();
CleanupRenderTarget();
ResizeSwapChain(hWnd, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam));