mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
Viewport: Replaced UpdatePlatformWindows/RenderPlatformWindows by RenderAdditionalViewports(). The update is always called in EndFrame(). (#1542)
This commit is contained in:
@ -205,8 +205,7 @@ int main(int, char**)
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -208,8 +208,7 @@ int main(int, char**)
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -401,8 +401,7 @@ int main(int, char**)
|
||||
|
||||
g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList);
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -709,6 +709,7 @@ static void ImGui_ImplDX12_ResizeViewport(ImGuiViewport* viewport, int w, int h)
|
||||
{
|
||||
ImGuiPlatformDataDx12* data = (ImGuiPlatformDataDx12*)viewport->RendererUserData;
|
||||
IM_ASSERT(0);
|
||||
(void)data; (void)w; (void)h;
|
||||
/*
|
||||
if (data->RTView)
|
||||
{
|
||||
@ -730,6 +731,7 @@ static void ImGui_ImplDX12_RenderViewport(ImGuiViewport* viewport)
|
||||
{
|
||||
ImGuiPlatformDataDx12* data = (ImGuiPlatformDataDx12*)viewport->RendererUserData;
|
||||
IM_ASSERT(0);
|
||||
(void)data;
|
||||
/*
|
||||
ImVec4 clear_color = ImGui::GetStyle().Colors[ImGuiCol_WindowBg]; // FIXME-PLATFORM
|
||||
clear_color.w = 1.0f;
|
||||
@ -743,6 +745,7 @@ static void ImGui_ImplDX12_SwapBuffers(ImGuiViewport* viewport)
|
||||
{
|
||||
ImGuiPlatformDataDx12* data = (ImGuiPlatformDataDx12*)viewport->RendererUserData;
|
||||
IM_ASSERT(0);
|
||||
(void)data;
|
||||
/*
|
||||
data->SwapChain->Present(0, 0); // Present without vsync
|
||||
*/
|
||||
|
@ -122,9 +122,8 @@ int main(int, char**)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapBuffers(window);
|
||||
|
@ -130,9 +130,7 @@ int main(int, char**)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
ImGui::RenderAdditionalViewports();
|
||||
|
||||
SDL_GL_MakeCurrent(window, gl_context);
|
||||
SDL_GL_SwapWindow(window);
|
||||
|
@ -733,10 +733,7 @@ int main(int, char**)
|
||||
#endif
|
||||
swap_chain_has_at_least_one_image = true;
|
||||
wd->FrameIndex = (wd->FrameIndex + 1) % IMGUI_VK_QUEUED_FRAMES;
|
||||
|
||||
// FIXME-PLATFORM
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
ImGui::RenderAdditionalViewports();
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
@ -735,9 +735,7 @@ int main(int, char**)
|
||||
swap_chain_has_at_least_one_image = true;
|
||||
wd->FrameIndex = (wd->FrameIndex + 1) % IMGUI_VK_QUEUED_FRAMES;
|
||||
|
||||
// FIXME-PLATFORM
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
//ImGui::RenderAdditionalViewports();
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
Reference in New Issue
Block a user