Open kudaba opened 2 years ago
Thanks for reporting this.
I wonder if we could come up with a way to allow the application to specify details for creating windows. In this backend it would be e.g. a DXGI_SWAP_CHAIN_DESC template (mostly for sd.BufferDesc.Format
and sd.SwapEffect
.. maybe others).
Vulkan has some of that via some of the fields in ImGui_ImplVulkan_InitInfo
, maybe that can be standardized a little better.
Adding to the above: it would be tempting to "query" info about the main viewport, but we are explicitly trying to steer toward allowing to make the concept of a "main viewport" completely optional so I think it is preferable we find a way to let user configure things.
Version/Branch of Dear ImGui:
Version: 1.85 (Custom) Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp Compiler: MSVC Operating System: Windows 10
This is more of a PSA than an issue. I've been tracking an issue for months where the application would freeze when users drag a window out into it's own viewport. Sometimes it would happen right away, or it could take a while. When looking into the frozen application you would see this callstack:
To make matters worse this only happened on certain hardware configurations. The root cause of this was that we were creating our main application swap chain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL if support for HDR in windowed mode was detected. ImGui uses DXGI_SWAP_EFFECT_DISCARD. It seems that some hardware doesn't like having mixed swap chain effects. I tried changing the ImGui viewport swap effect to discard but DirectX didn't seem to like that so I just made it that our application reverts to discard if ImGui viewport support is enabled.