diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-06-29 15:02:05 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-06-29 15:02:05 +0200 |
| commit | 7100d06c1de5d3d96ce5400d1e33b162c04ce08f (patch) | |
| tree | 7cc0226cd7fdf7079282d9f4c72e9ba79b1bb9d3 | |
| parent | acdb9f626bacdf577ef6fb24d85ec07da45b84f0 (diff) | |
update changelog (https://github.com/floooh/sokol/pull/1294)
| -rw-r--r-- | CHANGELOG.md | 47 | ||||
| -rw-r--r-- | README.md | 2 |
2 files changed, 48 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5764699f..7c9cd322 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ ## Updates +### 29-Jun-2025 + +The Dear ImGui backend in sokol_imgui.h has been updated for Dear ImGui 1.92.0. + +This may be a breaking change if: + +- you are attaching your own fonts to Dear ImGui +- you use the C bindings and render images in the UI +- you were calling the sokol_imgui.h functions `simgui_create_fonts_texture()` + and `simgui_destroy_fonts_texture()` (those are no longer necessary and have + been removed) + +If you had been attaching your own fonts to Dear ImGui, remove any code which +explicitly creates a sokol-gfx font texture image object. Specifically: + +- do not call the Dear ImGui `GetTexDataAsRGBA32()` method +- do not call `sg_make_image()` with the receiced data +- do not set `Fonts->TexID` on the Dear ImGui IO object + +If you are using Dear ImGui C bindings, you'll need to fix the places where +the `igImage()` function is called. This now takes an `ImTextureRef` struct +instead of an `ImTextureID` (in C++ this is not a problem since the ImTextureRef +is automatically constructed on the fly from the ImTextureID, but in C you'll +need to do this by hand, e.g. change: + +```c +igImage(my_tex_id, ...); +``` +...to: +```c +igImage((ImTextureRef){ ._TexID=my_tex_id}, ...); +``` +Dear Bindings is currently missing a helper function for this conversion, also +see: https://github.com/dearimgui/dear_bindings/issues/99 + +...and a drive-by update in `sokol_gfx_imgui.h`: when used from C, the function +prefix of the C bindings can now be configured via the macro `SOKOL_GFX_IMGUI_CPREFIX`. +The default prefix is `ig` which makes it compatible with the bindings from +https://github.com/floooh/dcimgui (which are the recommended C bindings for use +with the sokol headers). + +Related PRs: + +- the actual changes: https://github.com/floooh/sokol/pull/1294 +- fixes in the v6502r project (custom fonts): https://github.com/floooh/v6502r/pull/33 +- various fixes in the sokol-samples: https://github.com/floooh/sokol-samples/pull/173 + ### 28-Jun-2025 sokol_gfx.h d3d11: `#include` statements are now supported when directly passing HLSL @@ -6,7 +6,7 @@ # Sokol -[**See what's new**](https://github.com/floooh/sokol/blob/master/CHANGELOG.md) (**24-May-2025** sokol_gfx.h: the Compute Milestone 2 update +[**See what's new**](https://github.com/floooh/sokol/blob/master/CHANGELOG.md) (**29-Jun-2025** sokol_imgui.h: updated for Dear ImGui 1.92.0 (some breaking changes!) [](/../../actions/workflows/main.yml) [](/../../actions/workflows/gen_bindings.yml) [](https://github.com/floooh/sokol-zig/actions/workflows/main.yml) [](https://github.com/floooh/sokol-nim/actions/workflows/main.yml) [](https://github.com/floooh/sokol-odin/actions/workflows/main.yml)[](https://github.com/floooh/sokol-rust/actions/workflows/main.yml)[](https://github.com/kassane/sokol-d/actions/workflows/build.yml)[](https://github.com/floooh/sokol-c3/actions/workflows/build.yml) |