|
@ -5077,15 +5077,15 @@ void ImGui::Render() |
|
|
|
|
|
|
|
|
if (g.FrameCountEnded != g.FrameCount) |
|
|
if (g.FrameCountEnded != g.FrameCount) |
|
|
EndFrame(); |
|
|
EndFrame(); |
|
|
const bool first_render_of_frame = (g.FrameCountRendered != g.FrameCount); |
|
|
if (g.FrameCountRendered == g.FrameCount) |
|
|
|
|
|
return; |
|
|
g.FrameCountRendered = g.FrameCount; |
|
|
g.FrameCountRendered = g.FrameCount; |
|
|
g.IO.MetricsRenderWindows = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g.IO.MetricsRenderWindows = 0; |
|
|
CallContextHooks(&g, ImGuiContextHookType_RenderPre); |
|
|
CallContextHooks(&g, ImGuiContextHookType_RenderPre); |
|
|
|
|
|
|
|
|
// Draw modal/window whitening backgrounds
|
|
|
// Draw modal/window whitening backgrounds
|
|
|
if (first_render_of_frame) |
|
|
RenderDimmedBackgrounds(); |
|
|
RenderDimmedBackgrounds(); |
|
|
|
|
|
|
|
|
|
|
|
// Add background ImDrawList (for each active viewport)
|
|
|
// Add background ImDrawList (for each active viewport)
|
|
|
for (int n = 0; n != g.Viewports.Size; n++) |
|
|
for (int n = 0; n != g.Viewports.Size; n++) |
|
@ -5112,7 +5112,7 @@ void ImGui::Render() |
|
|
AddRootWindowToDrawData(windows_to_render_top_most[n]); |
|
|
AddRootWindowToDrawData(windows_to_render_top_most[n]); |
|
|
|
|
|
|
|
|
// Draw software mouse cursor if requested by io.MouseDrawCursor flag
|
|
|
// Draw software mouse cursor if requested by io.MouseDrawCursor flag
|
|
|
if (g.IO.MouseDrawCursor && first_render_of_frame && g.MouseCursor != ImGuiMouseCursor_None) |
|
|
if (g.IO.MouseDrawCursor && g.MouseCursor != ImGuiMouseCursor_None) |
|
|
RenderMouseCursor(g.IO.MousePos, g.Style.MouseCursorScale, g.MouseCursor, IM_COL32_WHITE, IM_COL32_BLACK, IM_COL32(0, 0, 0, 48)); |
|
|
RenderMouseCursor(g.IO.MousePos, g.Style.MouseCursorScale, g.MouseCursor, IM_COL32_WHITE, IM_COL32_BLACK, IM_COL32(0, 0, 0, 48)); |
|
|
|
|
|
|
|
|
// Setup ImDrawData structures for end-user
|
|
|
// Setup ImDrawData structures for end-user
|
|
|