Ver código fonte

sokol_imgui.h: fix some typos in updated doc sections

Andre Weissflog 1 mês atrás
pai
commit
064b75603d
1 arquivos alterados com 8 adições e 5 exclusões
  1. 8 5
      util/sokol_imgui.h

+ 8 - 5
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
     ====================================
@@ -279,7 +282,7 @@
         sg_image img = simgui_image_from_imtextureid(imtex_id);
         sg_sampler smp = simgui_sampler_from_imtextureid(imtex_id);
 
-    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