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

@ -504,7 +504,9 @@ void ImGui_ImplDX10_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 ImGuiViewportDataDx10
@ -581,11 +583,7 @@ static void ImGui_ImplDX10_SetWindowSize(ImGuiViewport* viewport, ImVec2 size)
ID3D10Texture2D* 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_ImplDX10_SetWindowSize() can't created buffers.\n");
return;
}
if (pBackBuffer == NULL) { fprintf(stderr, "ImGui_ImplDX10_SetWindowSize() failed creating buffers.\n"); return; }
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, &data->RTView);
pBackBuffer->Release();
}

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();
}

View File

@ -637,7 +637,9 @@ void ImGui_ImplDX12_NewFrame(ID3D12GraphicsCommandList* command_list)
}
//--------------------------------------------------------------------------------------------------------
// 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 ImGuiViewportDataDx12

View File

@ -317,9 +317,11 @@ void ImGui_ImplGlfw_NewFrame()
ImGui::NewFrame();
}
// --------------------------------------------------------------------------------------------------------
// Platform Windows
// --------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------
// 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 ImGuiViewportDataGlfw
{

View File

@ -211,7 +211,9 @@ void ImGui_ImplOpenGL2_DestroyDeviceObjects()
}
//--------------------------------------------------------------------------------------------------------
// 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..
//--------------------------------------------------------------------------------------------------------
static void ImGui_ImplOpenGL2_RenderWindow(ImGuiViewport* viewport, void*)

View File

@ -330,7 +330,9 @@ void ImGui_ImplOpenGL3_DestroyDeviceObjects()
}
//--------------------------------------------------------------------------------------------------------
// 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..
//--------------------------------------------------------------------------------------------------------
static void ImGui_ImplOpenGL3_RenderWindow(ImGuiViewport* viewport, void*)

View File

@ -276,7 +276,9 @@ void ImGui_ImplSDL2_NewFrame(SDL_Window* window)
}
//--------------------------------------------------------------------------------------------------------
// 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 ImGuiViewportDataSDL2

View File

@ -1059,7 +1059,10 @@ void ImGui_ImplVulkanH_DestroyWindowData(VkInstance instance, VkDevice device, I
}
//--------------------------------------------------------------------------------------------------------
// 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..
//--------------------------------------------------------------------------------------------------------
// FIXME-PLATFORM: Vulkan support unfinished
//--------------------------------------------------------------------------------------------------------

View File

@ -390,7 +390,9 @@ static void ImGui_ImplWin32_SetImeInputPos(ImGuiViewport* viewport, ImVec2 pos)
#endif
//--------------------------------------------------------------------------------------------------------
// Platform Windows
// 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 ImGuiViewportDataWin32