Open hebohang opened 1 year ago
I find the color error seems to be with the color space. I use the DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
as the D3D11_RENDER_TARGET_VIEW_DESC
format. I fine the same issue:
https://github.com/ocornut/imgui/issues/578
I still don't know how to fix the multi-view issue (When I put the imgui window next to the main window, the program will freeze) .
Hello,
Error comes from imgui_impl_dx12.cpp line 906
IDXGISwapChain1* swap_chain = nullptr; res = dxgi_factory->CreateSwapChainForHwnd(vd->CommandQueue, hwnd, &sd1, nullptr, nullptr, &swap_chain); IM_ASSERT(res == S_OK);
I guess it goes back to using DXGI_FORMAT_R8G8B8A8_UNORM_SRGB instead of DXGI_FORMAT_R8G8B8A8_UNORM
Version/Branch of Dear ImGui:
Version: 1.88 Branch: docking
Backend:
C++20, Windows10
I tried both two ways: imgui_impl_dx11 + imgui_impl_glfw imgui_impl_dx11 + imgui_impl_win32
All appear the same bug.
When I disable the Multi-Viewport, it seems only the color not right:
https://user-images.githubusercontent.com/60227429/222217711-46622290-19b9-47e6-b38f-a39b005e526c.mp4
However, when I enable Multi-Viewport with code:
It will raise a bug:
https://user-images.githubusercontent.com/60227429/222217931-2c178606-84e4-4f34-a02a-0e9a7a2a29a2.mp4
When I put the imgui window next to the main window, the program will freeze.
I used the
DXGI_SWAP_EFFECT_FLIP_DISCARD
effect to create my swapchain, I find it probably related to the swapchain. And it seems I must clear my RenderTarget when imgui draw.Some code I write:
ImguiInit Function I writed:
Hope to get your help.