Avoid switching a built legacy font atlas to managed textures - #74
Merged
sammyfreg merged 2 commits intoSep 5, 2026
Merged
Conversation
When NetImgui connects after a legacy renderer has built the font atlas, keep RendererHasTextures disabled. Dear ImGui does not allow this setting to change after the atlas is built. Continue sending the retained atlas pixels to the server so remote rendering still receives the font texture.
Owner
|
Did you encounter an issue where you have a backend renderer that do not support the new imgui texture updates, and then connected to net imgui after the font was init by your backend, leading to issues? |
Author
|
Yes, that was exactly it. Our game renderer doesn't yet support the new texture updates (working on fixing that). So it built and uploaded our font atlas before NetImgui connected and then the already-built font atlas was switched to managed textures, which triggered this assertion in |
Owner
|
Thanks, it will repro it on my side and decides if I should take your
changes as is, or add support for font un-init when connecting and then
restore the previous atlas on disconnect.
…On Sat, Sep 5, 2026, 11:47 a.m. Martin Ecker ***@***.***> wrote:
*martinecker* left a comment (sammyfreg/netImgui#74)
<#74 (comment)>
Yes, that was exactly it. Our game renderer doesn't yet support the new
texture updates (working on fixing that). So it built and uploaded our font
atlas before NetImgui connected and then the already-built font atlas was
switched to managed textures, which triggered this assertion in
imgui_draw.cpp:
if (atlas->TexIsBuilt && atlas->Builder->PreloadedAllGlyphsRanges)
IM_ASSERT_USER_ERROR(atlas->RendererHasTextures == false, "Called ImFontAtlas::Build() before ImGuiBackendFlags_RendererHasTextures got set! With new backends: you don't need to call Build().");
—
Reply to this email directly, view it on GitHub
<#74?email_source=notifications&email_token=AESBPY5V3ZYSZU26JH6FWDL5NQYQ7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJVGI4TGNJZGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5552935953>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESBPY5QERMVOHX6FIAUYI35NQYQ7AVCNFSNUABFKJSXA33TNF2G64TZHMZDMMJXGI2TEOBRHNEXG43VMU5TKMZVGEZDGMBZHA3KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AESBPY5II7UERXPZAWVJXXD5NQYQ7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJVGI4TGNJZGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AESBPY26V5DZFKRIL5V3SC35NQYQ7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJVGI4TGNJZGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you commented.Message ID:
***@***.***>
|
Owner
|
Decided to keep this change as is (minus the fix to make it work in the dev branch). I was planning to duplicate the font atlas, but it's not worth adding complexity to handle texture support when not supported by native backend. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When NetImgui connects after a legacy renderer has built the font atlas, keep RendererHasTextures disabled. Dear ImGui does not allow this setting to change after the atlas is built. Continue sending the retained atlas pixels to the server so remote rendering still receives the font texture.