Skip to content

Commit

Permalink
Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls t…
Browse files Browse the repository at this point in the history
…o invalidate and recreate device objects in the WM_SIZE handler. (#2088)
  • Loading branch information
ocornut committed Oct 5, 2018
1 parent 084c26a commit a3b0e0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/CHANGELOG.txt
Expand Up @@ -61,6 +61,8 @@ Other Changes:
- Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)
- ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3,
in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty.
- Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects
in the WM_SIZE handler. (#2088) [@ice1000]


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


-----------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions examples/example_win32_directx10/main.cpp
Expand Up @@ -75,11 +75,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
{
ImGui_ImplDX10_InvalidateDeviceObjects();
CleanupRenderTarget();
g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
CreateRenderTarget();
ImGui_ImplDX10_CreateDeviceObjects();
}
return 0;
case WM_SYSCOMMAND:
Expand Down
2 changes: 0 additions & 2 deletions examples/example_win32_directx11/main.cpp
Expand Up @@ -78,11 +78,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
{
ImGui_ImplDX11_InvalidateDeviceObjects();
CleanupRenderTarget();
g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
CreateRenderTarget();
ImGui_ImplDX11_CreateDeviceObjects();
}
return 0;
case WM_SYSCOMMAND:
Expand Down

0 comments on commit a3b0e0a

Please sign in to comment.