-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set docked window color transparent #5634
Comments
Also see #2700 and #2766 It's confusing what part of your issue are related to Docking and which part are related to Viewports. Mentioning |
(255,255,255,0) - or should it be (1,1,1,0) - I tried both - all result exactly the same. |
By not enabling |
I don't enable This may already be covered by the issues you pointed to - thanks, I will check them in more detail. Meanwhile, I did make the following observation, comparing ImGui draw commands with RenderDoc:
In the case 1) this covering of the whole viewport appears to be the root cause why I cannot achieve the effect of having one window transparent if all windows are docked. In other words: The operation of pushing transparent window background color to transparent black works fine. The issue is that by the time the window is rendered with opaque background color, ImGui viewport is already filled with opaque color. |
I made a several edits to my previous comment, but I let it be now, promise. One further info: I am using Related: #3924 |
In Why why would we need to draw the background there? That feels backwards how I understand 'passthru'. |
Notice it is calling |
How is the central node related to the ImGui windows I have docked? I have one or more of these scene viewport windows, and all of them should be rendered without any extra background. User may dock and undock them anywhere. |
(Sorry no time to look at this carefully now but will eventually!) |
Hello @ocornut , i want to work on this |
FYI I'm using this simple change to achieve transparent background: transparency.patch |
Inspired by the patch by @tvoeroes above, I'm using this similar change to allow just one of my windows to remain transparent while docked. If the window has the NoBackground flag it'll remain transparent while docked, while other windows keep their background. I'm not all that familiar with imgui code and the intricacies of rendering docked windows but it works for my purposes at least, and may be useful for someone. "&& (host_window->Flags & ImGuiWindowFlags_NoBackground) == 0" is the new bit.
|
Version/Branch of Dear ImGui:
Version: 1.89 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: custom/erhe
Operating System: Windows 10
My Issue/Question:
It appears that
ImGui::PushStyleColor(ImGuiCol_WindowBg)
is ignored if window is docker.Background:
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
)Screenshots
🟢 Not docked, rendering as expected:
🔴 Docked, pushed ImGuiCol_WindowBg appears to be ignored
The text was updated successfully, but these errors were encountered: