From b807347e94b9d69d7782f8c2f8c490542cd20d5a Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 2 Mar 2018 22:22:14 +0100 Subject: [PATCH] Viewport: When enabled we assert against using RenderDrawListFn to make user more aware of rendering order. (#1542) --- imgui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index e9f644b2..4f1a3d81 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3548,6 +3548,9 @@ void ImGui::NewFrame() if (g.IO.ConfigFlags & ImGuiConfigFlags_MultiViewports) { +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + IM_ASSERT(g.IO.RenderDrawListsFn == NULL); // Call ImGui::Render() then pass ImGui::GetDrawData() yourself to your render function! +#endif IM_ASSERT(g.IO.PlatformInterface.CreateViewport != NULL); IM_ASSERT(g.IO.PlatformInterface.DestroyViewport != NULL); //IM_ASSERT(g.IO.PlatformInterface.RenderViewport != NULL || g.IO.RendererInterface.RenderViewport != NULL); // Missing rendering function