Commit Graph

714 Commits

Author SHA1 Message Date
ocornut dfe6f9ebca Backends: WebGPU: added SetSamplerLinear/Nearest draw callbacks. (#9378) 2026-04-23 21:50:50 +02:00
ocornut 37952fb3b8 Backends: Vulkan, SDLGPU3: remove samplers from RenderState. (#9378)
Revert part of ac261203a5, 9ee3d731b5 (#8866, #8163, #7998, #7988) since we have a better solution.
2026-04-23 21:50:47 +02:00
omar 0a811e8ea1 Backends: DX9, DX10, DX11, DX12, Allegro5, OpenGL2, OpenGL3, SDLRenderer2, SDLRenderer3, SDLGPU3, Vulkan: added standard draw callbacks when possible. (#9378) 2026-04-23 21:50:45 +02:00
ocornut a6a16cf8a2 Backends: WebGPU: protect better against zero tex id. 2026-04-23 20:50:34 +02:00
ocornut e887098740 Backends: WebGPU: always use SPIR-V shader on WGVK, as it cannot be detected at runtime. (#9316, #9246, #9257)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-23 19:42:29 +02:00
ocornut ce3fe4078a Backends: WGPU: fixed build.
Incorrect line from a WIP branch slipped in ac06ad7
2026-04-23 17:31:14 +02:00
ocornut f2f843c113 Fixed some extremely zealous warnings (GCC -Wconversion, -Wdouble-promotion)
(amend a1e0552)
2026-04-23 17:23:43 +02:00
ocornut adc0027912 Backends: Vulkan: remove unused artefacts (mistakenly commited in 0453ae9). 2026-04-23 16:08:11 +02:00
ocornut ac06ad7b48 ImDrawList: made AddCallback() user data default to NULL + minor amends/comments. 2026-04-23 15:58:44 +02:00
ocornut b065713cec Backends: OpenGL2/3, SDLRenderer2/3, DirectX9, Metal: moved Init/Shutdown code lower in the file.
Allows to point to local functions without forward declaring them.
2026-04-23 15:53:28 +02:00
ocornut ac261203a5 (Breaking) Backends: Vulkan: redesigned to use separate ImageView + Sampler instead of Combined Image Sampler. (fixes, amends) (#914) 2026-04-22 14:43:44 +02:00
yaz0r 0453ae96e8 (Breaking) Backends: Vulkan: redesigned to use separate ImageView + Sampler instead of Combined Image Sampler. (WIP) (#914) 2026-04-22 14:43:44 +02:00
ocornut a5fd597be3 Backends: Vulkan: minor changes. 2026-04-22 14:23:42 +02:00
ocornut 2d131ef5b7 Backends: Vulkan: renaming and moving code around to reduce diff in upcoming change. Should be no-op.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-21 22:22:06 +02:00
ocornut a1e05521e9 Backends: GLFW: added a Win32-specific implementation of ImGui_ImplGlfw_GetContentScaleXXXX functions for legacy GLFW 3.2. (#9003)
Since we ship GLFW 3.2 binaries for Windows this makes our examples a little better behaving by default.
Ideally we'd use ImGui_ImplWin32_GetDpiScaleForHwnd() and ImGui_ImplWin32_GetDpiScaleForMonitor() but they are too much code to copy.
2026-04-21 17:24:41 +02:00
ocornut 0e318a5182 Backends: SDL2: Made ImGui_ImplSDL2_GetContentScaleXXX helpers return a minimum of 1.0f, as some Linux setup seems to report <1.0f value and this breaks scaling border size. (#9369) 2026-04-16 11:32:07 +02:00
Andy Grundman 4b80d409e7 Backends: Metal: use a dedicated bufferCacheLock to avoid crashing when bufferCache is replaced by a new object while being used for synchronize(). (#9367)
This also removes the dispatch onto main when adding the finished buffers back into the cache. This operation should be fine to run on any thread as long as it's inside the sync block.
2026-04-14 17:14:08 +02:00
hunam 49df3116bc Backends: Metal: avoid redundant vertex buffer bind in SetupRenderState. (#9343)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-03 19:14:23 +02:00
JoshBot-Debug b003a85143 Backends: Vulkan: use a single call to vkCmdPushConstants(). (#9183, #9327) 2026-03-31 16:07:46 +02:00
ocornut 59183cf782 Backends, Examples: WebGPU: added support for WGVK. Remaining amends. (#9316, #9246, #9257) 2026-03-25 15:31:39 +01:00
r-lyeh 59780020f6 Backends, Examples: WebGPU: added support for WGVK. (#9316, #9246, #9257)
Squashed: minified SPIRV binaries by stripping strings + emitting in binary_to_compressed_c.
2026-03-25 15:31:35 +01:00
ocornut 51f590a2a8 Backends: GLFW: mouse cursor is properly restored if changed by user app/code while using glfwSetInputMode(..., GLFW_CURSOR_DISABLED) or ImGuiConfigFlags_NoMouseCursorChange. (#9322)
Amend 9a4fd69f6
2026-03-25 14:17:29 +01:00
ocornut 79411a0405 Backends, Examples: WebGPU: fixed warnings + scale initial surface height for native.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-03-23 16:21:50 +01:00
ocornut 386ce49c58 Backends: DirectX9: fixed build typo in 0500e54.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-03-19 18:17:35 +01:00
ocornut 358d3912c9 Backends: SDLRenderer2/3: fixed build, typo in 0500e54.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-03-19 12:34:11 +01:00
ocornut 0500e546b5 Backends: DX9, Metal, SDLRenderer2/3: fixed more assumptions that ImTextureID_Invald == 0 + Amend Changelogs. (#9310, #9293) 2026-03-19 11:47:01 +01:00
Starman 7fc3092870 Backends: SDLGPU3: Prevent DestroyTexture from deleting invalid textures if ImTextureID_Invalid != 0. (#9310, #9293)
Amend 0db5919
2026-03-19 11:31:48 +01:00
ocornut 6dbda97fee Backends: OpenGL2, OpenGL3, SDLRenderer3: replaced erroneous IM_ASSERT(tex->TexID == 0) calls. (#9295, #9293)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
Amend/fix 0db5919 which revealed this.
2026-03-12 19:29:39 +01:00
Michael Böhme 7546f1eb16 Backends: Vulkan: ImGui_ImplVulkan_AddTexture() skips updating descriptor_set if failing to allocate. (#8677)
Reduce error surface to the check_vk_result() call.
2026-03-11 21:22:50 +01:00
MaciejDziuban decb5cdf10 Backends: Vulkan: added ImGui_ImplVulkan_PipelineInfo::ExtraDynamicStates. (#9211)
This new setting allows an application to force the pipeline created by vulkan backend to specify more dynamic states than just default viewport and scissor.
It is useful e.g. when using draw list callbacks, e.g. adding VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT to be able to use vkCmdSetColorBlendEquationEXT inside callbacks.
2026-03-11 17:00:47 +01:00
ocornut 83fa0ae263 Backends, Examples: removed Emscripten < 4.0.10 support. Removed IMGUI_IMPL_WEBGPU_BACKEND_WGPU. Amends. (#9281, #8381) 2026-03-09 16:18:59 +01:00
Yan Pujante e92820db2a Backends, Examples: removed Emscripten < 4.0.10 support. Removed IMGUI_IMPL_WEBGPU_BACKEND_WGPU. (#9281, #8381)
- This commit removes the option of using -sUSE_WEBGPU=1 from CMake and make
- Compiling with a version of Emscripten >= 4.0.10 will work the same way as it was before
- Compiling with a version of Emscripten < 4.0.10 will print an error message and abort the build (in the case of CMake)
- Since there can only be 1 implementation for the backend in the case of Emscripten, this commit cleans the code accordingly
2026-03-09 15:45:34 +01:00
Seppo Räisänen dd5c604768 Backends: SDLGPU3: remove unnecessary call to SDL_WaitForGPUIdle when releasing vertex/index buffers. (#9262) 2026-02-25 18:08:27 +01:00
ocornut 2b415e642b Backends: WebGPU: fixed Emscripten version check. (#8381)
Amend ff673d3.
2026-02-24 17:49:08 +01:00
ocornut ff673d31df Backends: WebGPU: minor build fix for Emscripten 5.0.0 (note: our examples currently don't build with 5.0.1).
Getting 'warning: unused function 'CreateWGPUSurface' [-Wunused-function]' in some build paths.
cc #9246
2026-02-16 18:04:20 +01:00
ocornut acdaaef625 Backends: further zealous warning fixes. (#9247) 2026-02-16 16:45:08 +01:00
Laurenz Altenmüller fbe973a8d0 Cast this to (void*) in zero-clearing memset calls to fix -Wnontrivial-memcall (#9247, #8295, #8129, #8135)
Clang 20+ warns on memset(this, ...) for non-trivially copyable types via -Wnontrivial-memcall.
Should separately investigate -Wnonontrivial-memaccess vs -Wnonontrivial-memcall.
2026-02-16 16:29:00 +01:00
ocornut 9f2b3bcf7a Backends: SDL2, SDL3: systems other than X11 are back to starting mouse capture on mouse down. Only X11 requires waiting for a drag by defaultadded ImGui_ImplSDL2_SetMouseCaptureMode(), ImGui_ImplSDL3_SetMouseCaptureMode(). (#9235, #3650, #6410, #3956, #3835)
Amend aa83d5d455
2026-02-13 16:01:08 +01:00
ocornut 9f30044333 Backends: GLFW: try to set IMGUI_IMPL_GLFW_DISABLE_X11 / IMGUI_IMPL_GLFW_DISABLE_WAYLAND automatically if headers are not available. (#9225)
Amend/fix 10d0162378 for system without X11/Wayland headers. (#8921, #8920, #8969)
2026-02-10 20:50:46 +01:00
tanksdude 5fe48b6a0e Docs: fixed some typos (#9217) 2026-02-10 16:40:52 +01:00
Ahmed Samy 960aff24fc Backends: Win32: use XInput Packet to avoid resubmitting gamepad data. (#9202, #8556)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-01-28 15:30:49 +01:00
ocornut c91bcea7a8 Backends: SDLGPU3: fixed missing release of TexSamplerNearest. (#9196)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
Amend/fix 8b86c939c7
2026-01-25 13:30:28 +01:00
ocornut 8c0b410371 Docs: tweaks.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-01-20 18:25:18 +01:00
ocornut 8b86c939c7 Backends: DirectX10, DirectX11, SDLGPU3: added nearest sampler in ImGui_ImplDX10_RenderState/ImGui_ImplDX11_RenderState/ImGui_ImplSDLGPU3_RenderState struct.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
(#6969, #5834, #7468, #3590, #9173, #8926, #7230, #5118, #3590, #2973, #6969)
2026-01-19 13:02:25 +01:00
thedmd b933599f00 Backends: DirectX12: added helpers to switch to Linear sampler (yet not made public, but intended to be forward declared). (#9173) 2026-01-19 12:32:45 +01:00
ocornut 21d3299e58 Backends: fixed reappearing uses to NULL to favor nullptr.
scheduled / scheduled (push) Has been cancelled
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-01-15 16:09:01 +01:00
ocornut d7598aa84f Backends: SDL2, SDL3: changed GetClipboardText() handler to return NULL on error aka clipboard contents is not text. (#9168)
Consistent with other backends.
2026-01-15 16:08:18 +01:00
ocornut 9a6eb0ab25 Backends: Vulkan: ImGui_ImplVulkanH_DestroyWindow() oes not call vkDestroySurfaceKHR(): because surface is created by caller. (#9163)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
2026-01-14 19:37:05 +01:00
ocornut d1c5a66557 Backends: WebGPU: rework unsupported path into an assert. (#9155, #9156)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-01-12 12:11:10 +01:00
ocornut 9ce41a92c3 Misc/shallow merges from docking branch to reduce small drift. 2026-01-08 14:31:25 +01:00