You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At some point within last year or so behavior of library changed, and now ImGui_ImplSDL2_UpdateMonitors() (and respective functions of other backends) are first called during NewFrame(). This means monitor information is not available during initial setup. I have a HDPI support patch, which involves baking font atlases for each DPI. This is done each time font is added, which happens during initial setup as well. To fix my patch i had to modify SDL2 backend, to make ImGui_ImplSDL2_UpdateMonitors() non-static and call it early enough so i can work with monitor information. I probably should fix my patch, however i think it would be useful to have monitor information earlier. Maybe ImGui_ImplSDL2_UpdateMonitors could also be called from ImGui_ImplSDL2_Init*?
Thanks for considering it
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered:
I will work something out.
Btw it is likely that in following semester we will head toward making examples on master DPI aware which will probably involve moving some of this into master and adding missing functions (e.g. dpiscale from window/hwnd, dpiscale from monitor).
Version/Branch of Dear ImGui:
Version 1.91, Branch: docking
Back-ends:
imgui_impl_sdl2.cpp
Compiler, OS:
Not applicable
Full config/build information:
No response
Details:
At some point within last year or so behavior of library changed, and now
ImGui_ImplSDL2_UpdateMonitors()
(and respective functions of other backends) are first called duringNewFrame()
. This means monitor information is not available during initial setup. I have a HDPI support patch, which involves baking font atlases for each DPI. This is done each time font is added, which happens during initial setup as well. To fix my patch i had to modify SDL2 backend, to makeImGui_ImplSDL2_UpdateMonitors()
non-static and call it early enough so i can work with monitor information. I probably should fix my patch, however i think it would be useful to have monitor information earlier. MaybeImGui_ImplSDL2_UpdateMonitors
could also be called fromImGui_ImplSDL2_Init*
?Thanks for considering it
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: