@ -5011,8 +5011,6 @@ static void AddWindowToDrawData(ImGuiWindow* window, int layer)
ImGuiViewportP * viewport = window - > Viewport ;
ImGuiViewportP * viewport = window - > Viewport ;
IM_ASSERT ( viewport ! = NULL ) ;
IM_ASSERT ( viewport ! = NULL ) ;
g . IO . MetricsRenderWindows + + ;
g . IO . MetricsRenderWindows + + ;
if ( window - > Flags & ImGuiWindowFlags_DockNodeHost )
window - > DrawList - > ChannelsMerge ( ) ;
ImGui : : AddDrawListToDrawDataEx ( & viewport - > DrawDataP , viewport - > DrawDataBuilder . Layers [ layer ] , window - > DrawList ) ;
ImGui : : AddDrawListToDrawDataEx ( & viewport - > DrawDataP , viewport - > DrawDataBuilder . Layers [ layer ] , window - > DrawList ) ;
for ( int i = 0 ; i < window - > DC . ChildWindows . Size ; i + + )
for ( int i = 0 ; i < window - > DC . ChildWindows . Size ; i + + )
{
{
@ -5349,6 +5347,17 @@ void ImGui::Render()
AddDrawListToDrawDataEx ( & viewport - > DrawDataP , viewport - > DrawDataBuilder . Layers [ 0 ] , GetBackgroundDrawList ( viewport ) ) ;
AddDrawListToDrawDataEx ( & viewport - > DrawDataP , viewport - > DrawDataBuilder . Layers [ 0 ] , GetBackgroundDrawList ( viewport ) ) ;
}
}
for ( int n = 0 ; n ! = g . WindowsFocusOrder . Size ; n + + )
{
ImGuiWindow * window = g . Windows [ n ] ;
if ( window - > Flags & ImGuiWindowFlags_DockNodeHost )
window - > DrawList - > ChannelsMerge ( ) ;
}
// Draw modal/window whitening backgrounds
if ( first_render_of_frame )
RenderDimmedBackgrounds ( ) ;
// Add ImDrawList to render
// Add ImDrawList to render
ImGuiWindow * windows_to_render_top_most [ 2 ] ;
ImGuiWindow * windows_to_render_top_most [ 2 ] ;
windows_to_render_top_most [ 0 ] = ( g . NavWindowingTarget & & ! ( g . NavWindowingTarget - > Flags & ImGuiWindowFlags_NoBringToFrontOnFocus ) ) ? g . NavWindowingTarget - > RootWindowDockTree : NULL ;
windows_to_render_top_most [ 0 ] = ( g . NavWindowingTarget & & ! ( g . NavWindowingTarget - > Flags & ImGuiWindowFlags_NoBringToFrontOnFocus ) ) ? g . NavWindowingTarget - > RootWindowDockTree : NULL ;
@ -5364,10 +5373,6 @@ void ImGui::Render()
if ( windows_to_render_top_most [ n ] & & IsWindowActiveAndVisible ( windows_to_render_top_most [ n ] ) ) // NavWindowingTarget is always temporarily displayed as the top-most window
if ( windows_to_render_top_most [ n ] & & IsWindowActiveAndVisible ( windows_to_render_top_most [ n ] ) ) // NavWindowingTarget is always temporarily displayed as the top-most window
AddRootWindowToDrawData ( windows_to_render_top_most [ n ] ) ;
AddRootWindowToDrawData ( windows_to_render_top_most [ n ] ) ;
// Draw modal/window whitening backgrounds
if ( first_render_of_frame )
RenderDimmedBackgrounds ( ) ;
// 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 & & first_render_of_frame & & 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 ) ) ;