From 9f6675206d4ce7af84834c1a37058e28912e2add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 5 Oct 2015 20:38:07 -0700 Subject: [PATCH 1/2] Cleanup. --- examples/common/entry/entry_windows.cpp | 29 +------------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index d31d7a07..c61450c9 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -530,7 +530,7 @@ namespace entry , msg->m_y , msg->m_width , msg->m_height - , m_hwnd[0] + , NULL , NULL , (HINSTANCE)GetModuleHandle(NULL) , 0 @@ -914,33 +914,6 @@ namespace entry top = newrect.top +(newrect.bottom-newrect.top-height)/2; } - HWND parent = GetWindow(_hwnd, GW_OWNER); - if (NULL != parent) - { - if (_windowFrame) - { - SetWindowPos(parent - , HWND_TOP - , -32000 - , -32000 - , 0 - , 0 - , SWP_SHOWWINDOW - ); - } - else - { - SetWindowPos(parent - , HWND_TOP - , newrect.left - , newrect.top - , newrect.right-newrect.left - , newrect.bottom-newrect.top - , SWP_SHOWWINDOW - ); - } - } - SetWindowPos(_hwnd , HWND_TOP , left From 1b6ef6dba36209fe3e387ec7e16458d064e74f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 5 Oct 2015 21:03:08 -0700 Subject: [PATCH 2/2] D3D11: Release frame buffer swap chain on shutdown. --- src/renderer_d3d11.cpp | 5 +++++ src/renderer_d3d11.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 897fa83b..4939039c 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1453,6 +1453,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); invalidateCache(); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) + { + m_frameBuffers[ii].destroy(); + } + for (uint32_t ii = 0; ii < BX_COUNTOF(m_indexBuffers); ++ii) { m_indexBuffers[ii].destroy(); diff --git a/src/renderer_d3d11.h b/src/renderer_d3d11.h index d6c716f7..34ee041e 100644 --- a/src/renderer_d3d11.h +++ b/src/renderer_d3d11.h @@ -248,6 +248,7 @@ namespace bgfx { namespace d3d11 { FrameBufferD3D11() : m_dsv(NULL) + , m_swapChain(NULL) , m_width(0) , m_height(0) , m_denseIdx(UINT16_MAX)