Turtle Dove
3822055e72
OpenGL2/3: Backup and restore GL_UNPACK state in UpdateTexture() ( #9473 )
...
The OpenGL2 and OpenGL3 backends set GL_UNPACK_ROW_LENGTH=0 and
GL_UNPACK_ALIGNMENT=1 during texture creation and updates, but
never restored the original values. This corrupted the calling
application's pixel store state when ImGui created or updated
textures mid-frame (e.g., dynamic font atlas updates).
Fix: Backup GL_UNPACK_ROW_LENGTH and GL_UNPACK_ALIGNMENT at the
start of UpdateTexture(), and restore them at the end.
This resolves the FIXME in ImGui_ImplOpenGL3_UpdateTexture():
'FIXME: Consider backing up and restoring'
Issues: #8802 (original UNPACK_ALIGNMENT change), #9473 (this fix)
2026-07-15 07:58:39 -05: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
Michal Šlesár
4c3eac2c10
Backends: OpenGL3: Fixed zealous warning by initializing last_pixel_unpack_buffer. ( #7614 )
2024-05-22 12:01:54 +02:00
ocornut
5e23680454
Backends: all backends + demo now call IMGUI_CHECKVERSION() to verify ABI compatibility between caller code and compiled version of dear imgui. ( #7568 )
2024-05-13 15:07:13 +02:00
ocornut
0d483a1c89
Backends: OpenGL3: Update loader for Linux to support EGL/GLVND. ( #7562 )
...
+ #6983
2024-05-07 18:23:29 +02:00
ocornut
d15574ce2a
Backends: Win32: Removed silent return when calling ImGui_ImplWin32_WndProcHandler() with no active context! ( #6275 )
...
Better standardized similar checks in other backends.
2024-05-07 16:53:03 +02:00
ocornut
9ec299ebe3
Backends: OpenGL: Detect ES3 contexts on desktop based on version string, ( #7447 )
2024-04-16 16:18:51 +02:00
ocornut
1509842107
Backends: OpenGL3: Shallow tweak of compile-time extensions detection.
...
Detect polygon mode using same method as others (not define/symbol).
IMGUI_IMPL_OPENGL_MAY_HAVE_EXTENSIONS -> IMGUI_IMPL_OPENGL_HAS_EXTENSIONS
2024-01-24 15:21:46 +01:00
Clément Gallet
1ce41f6218
Backends: OpenGL3: Backup and restore GL_PIXEL_UNPACK_BUFFER. ( #7253 )
...
Amended with (bd->GlVersion >= 210) checks.
2024-01-24 15:01:59 +01:00
ocornut
a3eea8a75a
Backends: OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" and variants, fixing regression on distros missing a symlink. ( #6983 )
...
Amend 0f50b52da
2024-01-09 23:26:05 +01:00
ocornut
ab522dd18c
Removed IM_OFFSETOF() macro in favor of using offsetof() available in C++11. Kept redirection define. ( #4537 )
2023-11-09 16:44:39 +01:00
ocornut
0f50b52da4
Backends: OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" instead of "libGL.so.1". ( #6983 )
2023-11-09 12:38:56 +01:00
Nicolas "Pixel" Noble
64b1aeebf5
Backends: OpenGL3: rename gl3w's loader symbols to allow LTO compilation with another copy of gl3w. ( #6875 , #6668 , #4445 )
2023-10-05 11:03:28 +02:00