mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
Viewport: Renamed RenderPlatformWindows() to RenderPlatformWindowsDefault(), tweaked examples and emphasis optional Viewport code path. (#1542)
This commit is contained in:
@ -208,9 +208,12 @@ int main(int, char**)
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -226,9 +226,12 @@ int main(int, char**)
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -401,9 +401,12 @@ int main(int, char**)
|
||||
|
||||
g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList);
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
//g_pSwapChain->Present(0, 0); // Present without vsync
|
||||
|
@ -117,9 +117,12 @@ int main(int, char**)
|
||||
//glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
|
||||
ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapBuffers(window);
|
||||
|
@ -124,9 +124,12 @@ int main(int, char**)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapBuffers(window);
|
||||
|
@ -132,9 +132,12 @@ int main(int, char**)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
SDL_GL_MakeCurrent(window, gl_context);
|
||||
SDL_GL_SwapWindow(window);
|
||||
|
@ -469,9 +469,12 @@ int main(int, char**)
|
||||
memcpy(&wd->ClearValue.color.float32[0], &clear_color, 4 * sizeof(float));
|
||||
FrameRender(wd);
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
FramePresent(wd);
|
||||
}
|
||||
|
@ -479,9 +479,12 @@ int main(int, char**)
|
||||
memcpy(&wd->ClearValue.color.float32[0], &clear_color, 4 * sizeof(float));
|
||||
FrameRender(wd);
|
||||
|
||||
// Update and Render additional Platform Windows (when ImGuiConfigFlags_EnableViewports is enabled)
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows(NULL, NULL);
|
||||
// Update and Render additional Platform Windows
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_EnableViewports)
|
||||
{
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindowsDefault();
|
||||
}
|
||||
|
||||
FramePresent(wd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user