Skip to content

Commit a3b0e0a

Browse files
committed
Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects in the WM_SIZE handler. (ocornut#2088)
1 parent 084c26a commit a3b0e0a

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

docs/CHANGELOG.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Other Changes:
6161
- Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)
6262
- ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3,
6363
in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty.
64+
- Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects
65+
in the WM_SIZE handler. (#2088) [@ice1000]
6466

6567

6668
-----------------------------------------------------------------------
@@ -84,7 +86,7 @@ Other Changes:
8486
Although it is not perfect and will keep being improved, it is fairly functional and used by many. (#787)
8587
- Fixed a build issue with non-Cygwin GCC under Windows.
8688
- Demo: Added a "Configuration" block to make io.ConfigFlags/io.BackendFlags more prominent.
87-
- Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002). [@jiri]
89+
- Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002) [@jiri]
8890

8991

9092
-----------------------------------------------------------------------

examples/example_win32_directx10/main.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
7575
case WM_SIZE:
7676
if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
7777
{
78-
ImGui_ImplDX10_InvalidateDeviceObjects();
7978
CleanupRenderTarget();
8079
g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
8180
CreateRenderTarget();
82-
ImGui_ImplDX10_CreateDeviceObjects();
8381
}
8482
return 0;
8583
case WM_SYSCOMMAND:

examples/example_win32_directx11/main.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
7878
case WM_SIZE:
7979
if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
8080
{
81-
ImGui_ImplDX11_InvalidateDeviceObjects();
8281
CleanupRenderTarget();
8382
g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
8483
CreateRenderTarget();
85-
ImGui_ImplDX11_CreateDeviceObjects();
8684
}
8785
return 0;
8886
case WM_SYSCOMMAND:

0 commit comments

Comments
 (0)