diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cd539577..f3694304e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ ## Updates +### 22-Oct-2024 + +- sokol_imgui.h: Fixed for latest Dear ImGui version 1.91.4 (Dear ImGui has + changed the ImTextureID handle from `void*` to `uint64_t` which requires some + minor fixes, also in the public API (so technically it's a breaking change + but it's unlikely that most code will be affected). + + Many thanks to @DctrNoob for the PR (https://github.com/floooh/sokol/pull/1134). + + Also related change if you're using fips: the following ImGui wrapper repos + have been updated to 1.91.4: + + - https://github.com/fips-libs/fips-imgui + - https://github.com/fips-libs/fips-cimgui + - https://github.com/fips-libs/fips-imgui-dock + ### 14-Oct-2024 - sokol_gfx.h: The pixel format RG11B10F is now marked as renderable in the GL diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index 3e76353a4..f8f1a7ba7 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -530,8 +530,8 @@ SOKOL_IMGUI_API_DECL void simgui_render(void); SOKOL_IMGUI_API_DECL simgui_image_t simgui_make_image(const simgui_image_desc_t* desc); SOKOL_IMGUI_API_DECL void simgui_destroy_image(simgui_image_t img); SOKOL_IMGUI_API_DECL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img); -SOKOL_IMGUI_API_DECL void* simgui_imtextureid(simgui_image_t img); -SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id); +SOKOL_IMGUI_API_DECL uint64_t simgui_imtextureid(simgui_image_t img); +SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id); SOKOL_IMGUI_API_DECL void simgui_add_focus_event(bool focus); SOKOL_IMGUI_API_DECL void simgui_add_mouse_pos_event(float x, float y); SOKOL_IMGUI_API_DECL void simgui_add_touch_pos_event(float x, float y); @@ -2505,14 +2505,14 @@ SOKOL_API_IMPL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img_id return desc; } -SOKOL_API_IMPL void* simgui_imtextureid(simgui_image_t img) { +SOKOL_API_IMPL uint64_t simgui_imtextureid(simgui_image_t img) { SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie); - return (void*)(uintptr_t)img.id; + return (uint64_t)(uintptr_t)img.id; } -SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id) { +SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id) { SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie); - simgui_image_t img = { (uint32_t)(uintptr_t) im_texture_id }; + simgui_image_t img = { (uint32_t)im_texture_id }; return img; }