You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce explicit support for selecting linear vs nearest samplers for preview and pixel-closeup textures. Adds three ImGui platform draw callbacks (ResetRenderState, SetSamplerLinear, SetSamplerNearest) and implements them in the Metal backend with dedicated sampler states; Metal rendering now tracks a current sampler state when processing draw callbacks. Adds queue_texture_sampler_callback(draw_list, linear) to enqueue sampler selection callbacks from UI code. Propagates new boolean flags (main_texture_linear, closeup_texture_linear) through renderer vtables and backend implementations (Metal, OpenGL, Vulkan) so backends can report which preview texture variant they provide. Vulkan texture types and creation code now record whether linear filtering is supported and simplified the ImGui texture registration to use view+layout, while ensuring linear_filter_supported is set. Header and API changes update function signatures accordingly. These changes enable correct nearest sampling for pixel closeups while keeping linear sampling for ordinary previews.
Signed-off-by: Vlad <shaamaan@gmail.com>
Copy file name to clipboardExpand all lines: src/imiv/external/imgui_impl_metal_imiv.mm
+60-8Lines changed: 60 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@
18
18
// CHANGELOG
19
19
// (minor and older changes stripped away, please see git history for details)
20
20
// 2026-XX-XX: Metal: Added support for multiple windows via the ImGuiPlatformIO interface.
21
+
// 2026-04-26: Metal: Added support for standard draw callbacks (in platform_io): DrawCallback_ResetRenderState, DrawCallback_SetSamplerLinear, DrawCallback_SetSamplerNearest.
21
22
// 2026-04-14: Metal: use a dedicated bufferCacheLock to avoid crashing when bufferCache is replaced by a new object while being used for @synchronize(). (#9367)
// 2026-03-19: Fixed issue in ImGui_ImplMetal_RenderDrawData() if ImTextureID_Invalid is defined to be != 0, which became the default since 2026-03-12. (#9295, #9310)
0 commit comments