Viewports: Renamed UpdatePlatformWindows > PlatformWindowsUpdate, RenderPlatformWindowsDefault -> PlatformWindowsRender, DestroyPlatformWindows > PlatformWindowsDestroy (#1542)

This commit is contained in:
ocornut
2020-03-06 17:28:32 +01:00
parent 1b579a110d
commit f2c7f3b200
24 changed files with 71 additions and 71 deletions

View File

@ -160,8 +160,8 @@ int main(int, char**)
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
glfwMakeContextCurrent(backup_current_context);
}

View File

@ -205,8 +205,8 @@ int main(int, char**)
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
glfwMakeContextCurrent(backup_current_context);
}

View File

@ -525,8 +525,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
FramePresent(wd);

View File

@ -166,8 +166,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
g_pSwapChain->Present(1, 0); // Present with vsync

View File

@ -158,8 +158,8 @@ int main(int, char**)
{
SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
}

View File

@ -207,8 +207,8 @@ int main(int, char**)
{
SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
}

View File

@ -522,8 +522,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
FramePresent(wd);

View File

@ -159,8 +159,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
g_pSwapChain->Present(1, 0); // Present with vsync

View File

@ -166,8 +166,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
g_pSwapChain->Present(1, 0); // Present with vsync

View File

@ -210,8 +210,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault(NULL, (void*)g_pd3dCommandList);
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender(NULL, (void*)g_pd3dCommandList);
}
g_pSwapChain->Present(1, 0); // Present with vsync

View File

@ -165,8 +165,8 @@ int main(int, char**)
// Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
ImGui::PlatformWindowsUpdate();
ImGui::PlatformWindowsRender();
}
HRESULT result = g_pd3dDevice->Present(NULL, NULL, NULL, NULL);

View File

@ -655,6 +655,6 @@ void ImGui_ImplDX10_InitPlatformInterface()
void ImGui_ImplDX10_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -671,5 +671,5 @@ static void ImGui_ImplDX11_InitPlatformInterface()
static void ImGui_ImplDX11_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -947,5 +947,5 @@ void ImGui_ImplDX12_InitPlatformInterface()
void ImGui_ImplDX12_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -423,7 +423,7 @@ static void ImGui_ImplDX9_InitPlatformInterface()
static void ImGui_ImplDX9_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}
static void ImGui_ImplDX9_CreateDeviceObjectsForPlatformWindows()

View File

@ -598,7 +598,7 @@ static LRESULT CALLBACK WndProcNoInputs(HWND hWnd, UINT msg, WPARAM wParam, LPAR
// Let mouse pass-through the window. This will allow the back-end to set io.MouseHoveredViewport properly (which is OPTIONAL).
// The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging.
// If you cannot easily access those viewport flags from your windowing/event code: you may manually synchronize its state e.g. in
// your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system.
// your main loop after calling PlatformWindowsUpdate(). Iterate all viewports/platform windows and pass the flag to your windowing system.
ImGuiViewport* viewport = (ImGuiViewport*)::GetPropA(hWnd, "IMGUI_VIEWPORT");
if (viewport->Flags & ImGuiViewportFlags_NoInputs)
return HTTRANSPARENT;

View File

@ -283,5 +283,5 @@ static void ImGui_ImplOpenGL2_InitPlatformInterface()
static void ImGui_ImplOpenGL2_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -712,5 +712,5 @@ static void ImGui_ImplOpenGL3_InitPlatformInterface()
static void ImGui_ImplOpenGL3_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -1445,5 +1445,5 @@ void ImGui_ImplVulkan_InitPlatformInterface()
void ImGui_ImplVulkan_ShutdownPlatformInterface()
{
ImGui::DestroyPlatformWindows();
ImGui::PlatformWindowsDestroy();
}

View File

@ -798,7 +798,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
// Let mouse pass-through the window. This will allow the back-end to set io.MouseHoveredViewport properly (which is OPTIONAL).
// The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging.
// If you cannot easily access those viewport flags from your windowing/event code: you may manually synchronize its state e.g. in
// your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system.
// your main loop after calling PlatformWindowsUpdate(). Iterate all viewports/platform windows and pass the flag to your windowing system.
if (viewport->Flags & ImGuiViewportFlags_NoInputs)
return HTTRANSPARENT;
break;