diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-08-03 15:48:30 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-08-03 15:48:30 +0200 |
| commit | 01601be8ae3eeeb1468f592327d8aaddf6f60f9e (patch) | |
| tree | a1cf9f6389733b5c3d13aa333555f572f1d0a8fc /util/sokol_imgui.h | |
| parent | fd5fc4455928b9822bad59e55346e9e1887a9b47 (diff) | |
| parent | 4012bd599827c9721502a90eaa661249b156d09e (diff) | |
Merge branch 'master' into issue1252/resource_views
Diffstat (limited to 'util/sokol_imgui.h')
| -rw-r--r-- | util/sokol_imgui.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index 9a8f07a1..935e7708 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -231,19 +231,22 @@ ON ATTACHING YOUR OWN FONTS =========================== - Since Dear ImGui 1.92.0, using using non-default fonts has been greatly simplified: + Since Dear ImGui 1.92.0 using non-default fonts has been greatly simplified: First, call `simgui_setup()` with the `.no_default_font` so that sokol_imgui.h skips adding the default font. ...then simply call `AddFontDefault()` or `AddFontFromMemoryTTF()` on - the Dear ImGui IO object. + the Dear ImGui IO object, everything else is taken care of automatically. - Do *NOT*: + Specifically, do *NOT*: - call the deprecated `GetTexDataAsRGBA32()` function - - create a sokol-gfx image object for the font + - create a sokol-gfx image object for the font atlas - set the `Font->TexID` on the ImGui IO object + All those things are now handled inside sokol_imgui.h via a new 'texture update' + callback which is called by Dear ImGui whenever the state of the font atlas + texture changes. ON USER-PROVIDED IMAGES AND SAMPLERS ==================================== @@ -284,7 +287,7 @@ sg_image img = sg_query_view_image(tex_view); - NOTE on C bindings since 1.92.0: + NOTE on C bindings since Dear ImGui 1.92.0: Since Dear ImGui v1.92.0 the ImGui::Image function takes an ImTextureRef object instead of ImTextureID. In C++ this doesn't |