mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-25 09:06:35 +00:00
Viewports: Fix setting of ImGuiViewportFlags_NoRendererClear. (#3213)
This commit is contained in:
parent
a4e4f57cb0
commit
3ec14186cb
@ -6404,9 +6404,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
if (window->WindowClass.ViewportFlagsOverrideClear)
|
if (window->WindowClass.ViewportFlagsOverrideClear)
|
||||||
viewport_flags &= ~window->WindowClass.ViewportFlagsOverrideClear;
|
viewport_flags &= ~window->WindowClass.ViewportFlagsOverrideClear;
|
||||||
|
|
||||||
// We also tell the backend that clearing the platform window won't be necessary, as our window is filling the viewport and we have disabled BgAlpha
|
// We can also tell the backend that clearing the platform window won't be necessary,
|
||||||
|
// as our window background is filling the viewport and we have disabled BgAlpha.
|
||||||
|
// FIXME: Work on support for per-viewport transparency (#2766)
|
||||||
if (!(flags & ImGuiWindowFlags_NoBackground))
|
if (!(flags & ImGuiWindowFlags_NoBackground))
|
||||||
viewport_flags &= ~ImGuiViewportFlags_NoRendererClear;
|
viewport_flags |= ImGuiViewportFlags_NoRendererClear;
|
||||||
|
|
||||||
window->Viewport->Flags = viewport_flags;
|
window->Viewport->Flags = viewport_flags;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user