Viewport: Fixed mouse hover flicker on mouse button release frame after moving a window. (#1542)

Platform: Clarifying some comments in back-ends.
This commit is contained in:
omar
2018-04-24 17:09:50 +02:00
parent 679f4882a5
commit e3e4b7bdf5
11 changed files with 38 additions and 22 deletions

View File

@ -512,7 +512,9 @@ void ImGui_ImplDX11_NewFrame()
}
//--------------------------------------------------------------------------------------------------------
// Platform Interface (Optional, for multi-viewport support)
// MULTI-VIEWPORT / PLATFORM INTERFACE SUPPORT
// This is an _advanced_ and _optional_ feature, allowing the back-end to create and handle multiple viewports simultaneously.
// If you are new to dear imgui or creating a new binding for dear imgui, it is recommended that you completely ignore this section first..
//--------------------------------------------------------------------------------------------------------
struct ImGuiViewportDataDx11
@ -589,11 +591,7 @@ static void ImGui_ImplDX11_SetWindowSize(ImGuiViewport* viewport, ImVec2 size)
ID3D11Texture2D* pBackBuffer = NULL;
data->SwapChain->ResizeBuffers(0, (UINT)size.x, (UINT)size.y, DXGI_FORMAT_UNKNOWN, 0);
data->SwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
if (pBackBuffer == NULL)
{
fprintf(stderr, "ImGui_ImplDX11_SetWindowSize() can't created buffers.\n");
return;
}
if (pBackBuffer == NULL) { fprintf(stderr, "ImGui_ImplDX11_SetWindowSize() failed creating buffers.\n"); return; }
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, &data->RTView);
pBackBuffer->Release();
}