Viewport: When enabled we assert against using RenderDrawListFn to make user more aware of rendering order. (#1542)

This commit is contained in:
omar 2018-03-02 22:22:14 +01:00
parent 7113fc7dee
commit b807347e94

View File

@ -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