Cannot reload fonts on DX12 #8174
nr-jpg
started this conversation in
Build/Link/Run/Fonts issues ONLY!
Replies: 1 comment 3 replies
-
(I’ll try to look but FYI i am in parallel rewriting the system to facilitate more dynamic use of fonts and incremental texture updates, so hopefully there will be a much better version of this in a month or two) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Howdy, I'm trying to do some basic DPI awareness on a DX12 app by reloading the fonts as starters. My code logic in a nutshell is to wait for the GPU to be idle if there is a pending DPI awareness change (from WM_DPICHANGED message) and then clear the fonts and reload them with the new scale
I call the above code after the present, I use the same logic for resizing, fullscreen, etc, no issues there.
I call the same code during initialization for the initial font load and for the starting window imgui works just fine. However, attempting to move to a monitor with different DPI causes the following assert:
Looking at the code the assert message is misleading/wrong, new frame for DX12 does nothing if the device objects exist, so I tried adding a "ImGui_ImplDX12_InvalidateDeviceObjects()" call as well when reloading fonts. This results in another assert during the "ImGui_ImplDX12_NewFrame()" or "create device objects" call:
Any ideas what I'm missing here?
I was looking at this post + FAQ, but did not see anything about the issues I'm having.
#3925
Using imgui-1.91.5.
Beta Was this translation helpful? Give feedback.
All reactions