XXX (please provide as much context as possible)
My issue is in imgui_impl_dx11.cpp which is I chopped the original example to 5 types of file, [ui.cpp, ui.h, panel.cpp, panel.h, and main.h] in DX11 the VSync is not working, I found out what code the DX11 reading for the multi-ports windows which is this
ImGui_ImplDX11_SwapBuffers(ImGuiViewport* viewport, void*) not the actual g_pSwapChain->Present from the Render() but I found the fix that IF I change the sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD to sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD the g_pSwapChain->Present(VSync, 0) will be the active vsync code BUT in imgui_impl_dx12.cpp and the chopped example is WORKING fine
Version/Branch of Dear ImGui:
Version: 1.89.8 (18980) Branch: docking Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp & imgui_impl_win32.cpp + imgui_impl_dx12.cpp Operating System: Windows 11 Pro (Windows Version: 22621.1992)
I'm making my own standalone for school projects.
My Issue:
XXX (please provide as much context as possible) My issue is in imgui_impl_dx11.cpp which is I chopped the original example to 5 types of file, [ui.cpp, ui.h, panel.cpp, panel.h, and main.h] in DX11 the VSync is not working, I found out what code the DX11 reading for the multi-ports windows which is this
ImGui_ImplDX11_SwapBuffers(ImGuiViewport* viewport, void*)
not the actualg_pSwapChain->Present
from the Render() but I found the fix that IF I change thesd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD
tosd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD
theg_pSwapChain->Present(VSync, 0)
will be the active vsync code BUT in imgui_impl_dx12.cpp and the chopped example is WORKING fineimgui_impl_dx11.cpp:
ui.cpp void update in dx11:
ui.cpp void update in dx12:
Screenshots/Video
The Video is too large so had to post it in youtube Please open the subtitle https://youtu.be/mauulXQ9Jhg