Sharadh Rajaraman
08fbbd9624
backends: prepare for inclusion in a C++20 module purview
...
Each backend becomes its own module that imports 'imgui' and includes
its header and source in the purview. Do the same preparation as for
the core:
- Skip system, platform and graphics API includes under
IMGUI_CXX_MODULE, because the module includes them in its global
module fragment.
- Skip the forward declarations of platform types (GLFWwindow,
SDL_Window, ID3D11Device...). Declared in the purview, they would be
new types attached to the backend module instead of the real ones.
For the same reason, sdl2 drops the elaborated
'struct _SDL_GameController'.
- Wrap each header's API in IMGUI_EXPORT_BEGIN/END.
- win32: export ImGui_ImplWin32_WndProcHandler() under IMGUI_CXX_MODULE.
The header keeps it commented out to avoid pulling in <windows.h>,
but a module user can't forward-declare it themselves.
- glfw: skip the local GetIO(ImGuiContext*) declaration, because
'imgui' exports it.
2026-09-28 16:11:53 +00:00
ocornut
420f179341
Backends: fixed Clang -Wold-style-cast warnings.
...
Amend 8e17468
2026-09-18 22:31:58 +02:00
ocornut
eabff0fd08
Backends: OpenGL2/OpenGL3: Added support for platform_io.DrawCallback_SetSamplerFromTex. ( #9378 )
2026-09-17 20:36:02 +02:00
ocornut
25e16fd8b6
Backends: OpenGL3: minor refactor for both sampler callback to share more code + comments. ( #9378 )
2026-09-17 20:36:02 +02:00
ocornut
333f5186e3
Backends: OpenGL2, OpenGL3: fixed DrawCallback_ResetRenderState handler not reseting all states in the glTexParameter() path. ( #9378 )
...
+ made OpenGL3 SetSamplerLinear/SetSamplerNearest check UseBindSampler for consistency.
2026-09-17 20:36:02 +02:00
ocornut
09b7ff9385
Backends: rework header comments about ImGui_ImplXXX_GetRenderState() functions.
...
Amend 8e17468
2026-09-17 19:08:18 +02:00
ocornut
4898533613
Backends: DX10, DX11, DX12, Metal/4, OpenGL2/3, SDLGPU3, Vulkan: round framebuffer dimensions instead of truncating. ( #9538 , #9515 , #8628 )
2026-09-07 12:47:03 +02:00
ocornut
730f099239
Backends: OpenGL3: fixed unused variable warning. ( #9507 )
2026-08-06 19:01:49 +02:00
ocornut
9b7699f325
Backends: amend comments to state that bilinear filtering is required ahead of 1.93.
2026-07-31 22:07:01 +02:00
Brenton Bostick
61a093635c
Backends: OpenGL3: fixed updating textures. ( #9478 , #9477 , #9473 , #8802 )
...
Fixed 0ff4a8a.
2026-07-17 13:49:02 +02:00
ocornut
0ff4a8a900
Backends: OpenGL2/3: Backup and restore GL_UNPACK state in UpdateTexture(). Amends. ( #9473 , #8802 )
...
Fix setting GL_UNPACK_ROW_LENGTH twice.
2026-07-15 18:20:05 +02:00
Turtle Dove
e3927dc004
Backends: OpenGL2/3: Backup and restore GL_UNPACK state in UpdateTexture() ( #9473 , #8802 )
2026-07-15 18:16:57 +02:00
ocornut
73a6610e81
Backends: OpenGL3: Expose selected render state in ImGui_ImplOpenGL3_RenderState, allowing to dynamically select between use of glBindSampler() and glTexParameter(). ( #9378 )
2026-06-17 15:02:51 +02:00
ocornut
2064059a7f
Docs, Backends: OpenGL3, Vulkan: added comments about custom sampler. ( #9378 )
2026-06-17 12:53:36 +02:00
Vladimir Perminov
7950c96f0e
Backends: OpenGL3: GLSL version detection assume GLSL 410 when GL context is 4.1. Fixes an issue running on macOS with Wine. ( #9427 , #6577 )
...
Amend fc737d23339
2026-06-03 15:48:52 +02:00
ocornut
bda49826cf
Backends: OpenGL3: build fix for WebGL/ES2/Emscripten. ( #9378 )
...
Amend 6b05f71 which was incorrectly labelled.
2026-04-24 12:26:21 +02:00
ocornut
6b05f711fd
Backends: WebGPU: build fix for WebGL/ES2.
2026-04-23 22:06:42 +02:00
ocornut
86ebb3bc11
Backends: removed samplers from ImGui_ImplDX10_RenderState, ImGui_ImplDX11_RenderState + fixed all Changelogs. ( #9378 )
2026-04-23 22:03:11 +02:00
ocornut
7e7f3adb80
Removed DrawCallback_SetSamplerCustom feature for now. Too unreliable to get working everywhere. ( #9378 )
2026-04-23 21:50:52 +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
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
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
ocornut
6dbda97fee
Backends: OpenGL2, OpenGL3, SDLRenderer3: replaced erroneous IM_ASSERT(tex->TexID == 0) calls. ( #9295 , #9293 )
...
Amend/fix 0db5919 which revealed this.
2026-03-12 19:29:39 +01:00
ocornut
21d3299e58
Backends: fixed reappearing uses to NULL to favor nullptr.
2026-01-15 16:09:01 +01:00
ocornut
69a501df6e
Backends: OpenGL3: call ImGui_ImplOpenGL3_InitLoader() in ImGui_ImplOpenGL3_CreateDeviceObjects() / ImGui_ImplOpenGL3_DestroyDeviceObjects(). ( #9112 )
2026-01-05 16:46:56 +01:00
ocornut
4e7c05504a
Renamed IM_ARRAYSIZE() -> IM_COUNTOF(). Kept legacy name for now.
2025-12-17 14:30:01 +01:00
ocornut
bd6f48fe20
Backends: OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. ( #8792 , #9112 )
2025-12-11 18:28:23 +01:00
ocornut
d4f722d5b2
IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers(). Backends: call those on Shutdown(). ( #8945 , #2769 )
2025-09-18 16:58:50 +02:00
ocornut
bf52f4a83c
Backends: OpenGL3: added HasBindSampler storage for readability and consistency.
2025-09-08 17:23:48 +02:00
Tim-Rex
4a51295c9e
Backends: OpenGL3: add and call embedded loader shutdown in ImGui_ImplOpenGL3_Shutdown(). ( #8792 )
...
Include update of imgui_impl_opengl3_loader.h as submitted to gl3w_stripped repository, which adds imgl3wShutdown().
2025-07-22 16:46:35 +09:00
ocornut
643f0e3abf
Backends: OpenGL3: restore update path on non-WebGL non-ES targets that doesn't require a CPU copy. ( #8802 , #8465 )
...
Amend/fix dbb91a5
2025-07-15 14:34:40 +02:00
ocornut
8744d10235
Backends: OpenGL2, OpenGL3: set GL_UNPACK_ALIGNMENT to 1 before updating textures. ( #8802 )
2025-07-15 14:30:50 +02:00
ocornut
336d9212fc
Backends: using range-for to iterate draw_data->CmdLists[].
2025-07-11 17:41:52 +02:00
ocornut
8d6e66d38c
Backends: DX10, DX11, DX12, OpenGL3, Vulkan, WGPU: Assert when CreateDeviceObjects() calls return false.
2025-06-20 09:49:53 +02:00
ocornut
dbb91a574f
Backends: OpenGL3: added ImGuiBackendFlags_RendererHasTextures support.
...
+ Removed ImGui_ImplOpenGL3_CreateFontsTexture() and ImGui_ImplOpenGL3_DestroyFontsTexture().
2025-06-11 15:29:14 +02:00
Dylam De La Torre
201899b611
Backends: OpenGL3: Fixed using non-existing features on GLES 3.20 which would push a GL error. ( #8664 )
...
* GL_PRIMITIVE_RESTART is not a valid enum for glEnable&co on GLES 3.20
* GL_CONTEXT_PROFILE_MASK is not a valid enum for glGetIntegerv on GLES 3.20
2025-06-04 23:48:56 +02:00
fdsa
3c3d943fb1
Docs: Fix some typos ( #8473 )
2025-03-09 16:42:16 +01:00
ocornut
1aab00da85
Misc shallow tweaks/tidying up. ( #8446 )
2025-02-27 21:58:02 +01:00
ocornut
8f0411ff03
Backends: OpenGL3: Lazily reinitialize embedded GL loader for when calling backend from e.g. other DLL boundaries. ( #8406 )
2025-02-18 18:19:10 +01:00
ocornut
88cda0cab6
Fixed minor warning. Added comment.
2025-02-10 12:39:54 +01:00
ocornut
457fae24e7
Silence more zealous GCC warning. ( #8241 )
2024-12-18 18:13:55 +01:00
ocornut
f3147f446a
Backends: OpenGL3: call glGetString(GL_VERSION) even in GS ES 2.0 path. ( #8197 )
...
Apparently as per specs works. I reckon the best way to confirm it is to try.
2024-12-09 12:58:32 +01:00
ocornut
43fbd7ce84
Backends: standardized top of file comments.
2024-12-05 12:43:04 +01:00
Thomas Hope
923ca4765a
Backends: OpenGL3: Fix compile error with IMGUI_IMPL_OPENGL_ES2 and IMGUI_IMPL_OPENGL_DEBUG ( #8197 )
2024-12-02 13:38:47 +01:00
ocornut
20360e00ce
Merge miscellaneous small changes to reduce drift with texture update branch.
...
- ImGuiDebugLogFlags_EventFont is yet unused.
2024-11-20 21:46:47 +01:00
ocornut
81b689b969
Backends: OpenGL3: added additional debug GL_CALL enclosure for glCreateShader() calls. ( #8104 )
2024-10-28 15:52:37 +01:00
ocornut
42206b3d51
Backends: DX9, DX10, DX11, DX12, OpenGL, Vulkan, WGPU: Changed default texture sampler to Clamp instead of Repeat/Wrap. ( #7468 , #7511 , #5999 , #5502 )
2024-10-07 22:02:55 +02:00
ocornut
9bd5d8a240
Backends: misc renaming of locals. Use 'draw_list' instead of 'cmd_list'. Avoid using 'ctx'.
...
This is likely to trigger merging issues. If it does, best to always get "theirs" and rename in there.
2024-10-07 17:57:11 +02:00
Cyao
fe09ebbe0a
Backends: OpenGL3: Fixed unsupported option warning with apple clang ( #7810 )
2024-07-22 21:10:35 +02:00
ocornut
404af57004
Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). ( #7748 )
...
Analogous to change to Vulkan backend in 1.90.
2024-06-28 15:08:54 +02:00