mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Render: Removed the code that disable render if style.Alpha is 0.0f, it is both incorrect (as style Alpha can be modified mid-frame), not really necessary (just tested that full Alpha = 0 will lead to empty draw lists!) and misleading (bulk of the work was already done).
This commit is contained in:
parent
945f4d1ecd
commit
cea7492bab
@ -4028,10 +4028,6 @@ void ImGui::Render()
|
||||
ImGui::EndFrame();
|
||||
g.FrameCountRendered = g.FrameCount;
|
||||
|
||||
// Skip render altogether if alpha is 0.0
|
||||
// Note that vertex buffers have been created and are wasted, so it is best practice that you don't create windows in the first place, or consistently respond to Begin() returning false.
|
||||
if (g.Style.Alpha > 0.0f)
|
||||
{
|
||||
// Gather windows to render
|
||||
g.IO.MetricsRenderVertices = g.IO.MetricsRenderIndices = g.IO.MetricsActiveWindows = 0;
|
||||
g.DrawDataBuilder.Clear();
|
||||
@ -4039,7 +4035,7 @@ void ImGui::Render()
|
||||
for (int n = 0; n != g.Windows.Size; n++)
|
||||
{
|
||||
ImGuiWindow* window = g.Windows[n];
|
||||
if (window->Active && window->HiddenFrames <= 0 && (window->Flags & (ImGuiWindowFlags_ChildWindow)) == 0 && window != window_to_render_front_most)
|
||||
if (window->Active && window->HiddenFrames <= 0 && (window->Flags & ImGuiWindowFlags_ChildWindow) == 0 && window != window_to_render_front_most)
|
||||
AddWindowToDrawDataSelectLayer(window);
|
||||
}
|
||||
if (window_to_render_front_most && window_to_render_front_most->Active && window_to_render_front_most->HiddenFrames <= 0) // NavWindowingTarget is always temporarily displayed as the front-most window
|
||||
@ -4074,7 +4070,6 @@ void ImGui::Render()
|
||||
g.IO.RenderDrawListsFn(&g.DrawData);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
const char* ImGui::FindRenderedTextEnd(const char* text, const char* text_end)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user