File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11## Updates
22
3+ ### 21-May-2026
4+
5+ - sokol_imgui.h: fix for removal of the deprecated ` ImDrawCallback_ResetRenderState `
6+ magic value (only an issue when building with ` IMGUI_DISABLE_OBSOLETE_FUNCTIONS ` ).
7+
8+ Original issue which introduced the magic value check: https://github.com/floooh/sokol/issues/1000
9+ New issue with the breakage report: https://github.com/floooh/sokol/issues/1514
10+ Fix PR: https://github.com/floooh/sokol/pull/1515
11+
312### 11-May-2026
413
514- A new header ` sokol_framebuffer.h ` has been added which provides a 'CPU framebuffer'
Original file line number Diff line number Diff line change @@ -2812,8 +2812,10 @@ SOKOL_API_IMPL void simgui_render(void) {
28122812 ImDrawCmd * pcmd = & cl -> CmdBuffer .Data [cmd_index ];
28132813 if (pcmd -> UserCallback != 0 ) {
28142814 // User callback, registered via ImDrawList::AddCallback()
2815- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
2816- if (pcmd -> UserCallback != ImDrawCallback_ResetRenderState ) {
2815+ // NOTE: once the deprecated ImDrawCallback_ResetRenderState define has
2816+ // been completely removed from Dear ImGui the below magic value can be removed too
2817+ const intptr_t deprecated_ImDrawCallback_ResetRenderState_magic_value = (-8 );
2818+ if ((intptr_t )pcmd -> UserCallback != deprecated_ImDrawCallback_ResetRenderState_magic_value ) {
28172819 pcmd -> UserCallback (cl , pcmd );
28182820 // need to re-apply all state after calling a user callback
28192821 sg_reset_state_cache ();
You can’t perform that action at this time.
0 commit comments