Commit Graph

413 Commits

Author SHA1 Message Date
ocornut cbdac1e150 Backends: WebGPU: Reorganized to store data in io.BackendRendererUserData like other backends.
In theory supporting multiple contexts (untested).
2023-04-11 15:25:21 +02:00
Michael Martz 506f7e0074 Using nullptr in locations where warning disable is not convenient. (#6313, #4537) 2023-04-11 11:33:50 +02:00
ocornut 9203883bbe Comments + Metal using SetTexID(0) for consistency. 2023-04-11 11:22:42 +02:00
David Maas e92b29ad53 Backends: OSX: Added support for io.AddMouseSourceEvent(). (#6314)
Also marked "mouse" input in example_apple_metal's UIKit micro-backend as being touch input.

# Conflicts:
#	docs/CHANGELOG.txt
2023-04-11 10:14:53 +02:00
David db4c4e3321
Backends: Android: Added support for io.AddMouseSourceEvent(). (#6315, #6318, #2702, #4921) 2023-04-11 10:01:53 +02:00
ocornut a7703fe6f7 Backends: SDL2/SDL3: Avoid callng SDL_StartTextInput()/SDL_StopTextInput(). (#6306, #6071, #1953)
Amend 734c6af187
2023-04-06 19:12:10 +02:00
ocornut f070497cbd Backends: Win32/SDL2/SDL3/GLFW: Added support for io.AddMouseSourceEvent(). (#2334, #2702)
SDL doesn't distinguish Pen yet, but we don't need it as much as TouchScreen which will alter trickling.
2023-04-04 20:19:01 +02:00
ocornut 8a6911b894 Backends: Fixes zealous warnings (#5760) 2023-03-23 18:18:52 +01:00
ocornut 7dcf129b3b Backends: OpenGL3: Properly restoring "no shader program bound". (#6267, #6220, #6224) 2023-03-23 13:27:55 +01:00
Aiekick 91577c7f51 Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) 2023-03-16 11:59:45 +01:00
ocornut 0d606968d8 Backend: OpenGL3: Amend b0c18166 fix cases where glGetString(GL_VERSION) returns NULL. (#6154, #4445, #3530) 2023-03-15 12:25:34 +01:00
ocornut e39c2552ac Backends: GLFW: Avoid using glfwGetError() and glfwGetGamepadState() on Emscripten. (#6240) 2023-03-14 16:00:29 +01:00
Cyphall 66b762577c Backends: OpenGL3: Fixed restoration of a potentially deleted OpenGL program. (#6220, #6224) 2023-03-06 11:55:55 +01:00
Adam Kewley 2496b973f9 Backends: SDL2,SDL3: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644) 2023-02-23 15:07:15 +01:00
ocornut 5d74891285 Backends: Win32: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse positions over non-client area (OS decorations) when app is not focused. (#6045, #6162) 2023-02-15 18:11:41 +01:00
Laurens Holst b0c1816664 Backends: OpenGL3: Fixed loader compatibility with GL_VERSION for GL 2.x (#6154, #4445, #3530)
GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x
Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries
Regressed since 459de65477
See https://github.com/ocornut/imgui/pull/3530
2023-02-14 15:39:49 +01:00
ocornut 85395b76b0 CI: Update versions.
Backends: GLFW: Warning fix under Linux.
2023-02-07 20:17:18 +01:00
ocornut fac19e1883 Backends: SDL2:+SDL3 Implement SetPlatformImeDataFn (amends). (#6071, #1953) + fix SDL3 setting PlatformHandleRaw. (#6146) 2023-02-07 19:29:44 +01:00
imkzh 734c6af187 Backends: SDL2: Implement SetPlatformImeDataFn. (#6071, #1953) 2023-02-07 18:50:12 +01:00
ocornut 13fbd99491 Backends: SDL3: update to run with SDL3. Examples: Add SDL3+Gl example. Remove some version checks. (#6146)
More update upcoming in docking branch.
2023-02-07 16:07:53 +01:00
ocornut d9bf80f655 Backends: SDL3: copied imgui_impl_sdl2 into imgui_impl_sdl3 and ONLY replaced strings (1/2). (#6146)
NO OTHER CHANGES. This WILL NOT compile with SDL3.
This intermediate commit designed to make it easier to visualize the meaningful channges commit in the next commit.
2023-02-07 13:32:38 +01:00
ocornut e816bc6723 Merge misc changes from docking branch to reduce small drift.
In particular:
- imgui.cpp : move UpdateInputEvents() higher in NewFrame() to match docking + update RenderMouseCursor() to match.
- imgui_draw.cpp: ImDrawList::_ResetForNewFrame() change from c807192ab
- Backends: SDL2. Add MouseWindowID + change SDL_CaptureMouse() test to match docking branch. Not strictly necessary but aimed at reducing drift because we go on and fork this file.
+ moved responsability of checking valid names to TabBarGetTabName() to simplify both branches.
2023-02-07 13:22:23 +01:00
ocornut 1b27ac982f Backends+Examples: SDL2: renamed imgui_impl_sdl.cpp/.h to imgui_impl_sdl2.cpp/.h. (#6146)
+ CI: Update Windows CI to update SDL 2.26.3 instead of 2.0.10
2023-02-07 12:04:38 +01:00
ocornut a085581057 Backends: GLFW: added ImGui_ImplGlfw_SetCallbacksChainForAllWindows(). (#6142) 2023-02-03 17:53:53 +01:00
ocornut 265b88273e Backends: Fixed pragma warning with old GCC. 2023-02-03 16:14:49 +01:00
ocornut d0b1aaa076 Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
Namely, GLFW JS emulation seems to quantize values to a min of -1/+1 which breaks modern OSX/Windows emulating smoothness with stepping wheels (slow steps are sending sub-1.0 values)
+ Massage changelog.
2023-02-03 15:05:39 +01:00
ocornut 6584de4a78 Backends: SDL: Avoid calling SDL_SetCursor() when cursor has not changed. (#6113) 2023-02-02 21:28:28 +01:00
ocornut 1f1861dae6 Backends: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling + scaling for Emscripten. (#4019, #6096)
+ Missing changelog entries.
2023-02-02 19:18:58 +01:00
ocornut 624c057ae1 Backends: GLFW: revert flipping mouse-wheel axis for Emscripten. (#4019)
Latest version seems ok.
2023-02-02 18:09:20 +01:00
ocornut 0370856d78 Backends: GLFW: Removed mouse-wheel value scaling for Emscripten. (#4019, #6096, #6081) 2023-02-02 15:27:14 +01:00
ocornut f822e07d76 Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
+ Fix warnings.
2023-02-02 15:27:14 +01:00
ocornut 3617a96372 Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. (#4019, #6096, #1463)
Documented assumptions.
2023-02-01 21:29:08 +01:00
ocornut 8d29665ae1 Backends: OSX: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
Ref #4019 for details provided in .XLS sheet, although not strictly related to main issue topic.
+ Rename Emscripten demo titles to make SDL visible.
2023-02-01 19:43:03 +01:00
Basil Fierz d73e3285de Backends: WebGU: Revert the implicit render pipeline layout generation as introduced in 83bdfef (#6117, #4116, #3632)
The feature was removed from WebGPU (https://github.com/gpuweb/gpuweb/issues/2470)
2023-01-25 21:55:17 +01:00
ocornut 1f6e62a4ae Backends: GLFW: Fixed mods state on Linux with Alt-GR text input (e.g. German keyboard layout), (#6034)
Amend 07557674, 1ad8ad62
Ref maybe https://github.com/glfw/glfw/issues/1630
2023-01-04 15:43:41 +01:00
Martin Ejdestig e5d51866c6 Backends; Vulkan: do not set VkDescriptorSetLayoutBinding::pImmutableSamplers, allow changing sampler. (#6001, #5502, #914)
Follow up to c9aef16 which removec three funtions worth of duplicate code.
2023-01-02 16:30:10 +01:00
Martin Ejdestig c9aef16066 Backends: Vulkan: Remove duplicated and dead code in Vulkan backend (#6001)
Sampler, descriptor set layout and pipeline layout are created in exact
same way directly in ImGui_ImplVulkan_CreateDeviceObjects(). The removed
functions are local and only has call chain that starts in
ImGui_ImplVulkan_CreateDeviceObjects(), so will always do early return.
2023-01-02 16:25:34 +01:00
ITotalJustice da832532c0 Backends: SDL: fix build on WinRT (#6019, #5974) 2023-01-02 15:02:43 +01:00
ocornut 713e034d95 Backends: OpenGL3: Fix for zealous warning. (#5947)
Consider moving to imgui_impl_opengl3_loader.h ?
2022-12-03 15:12:20 +01:00
ocornut a5f3596e6c Backends: Allegro5: use al_draw_indexed_prim() or al_draw_prim() depending on version. (#5937)
+ OSX comments (#5938)
Amend 185b4dde + 50aeeff
2022-11-30 14:46:45 +01:00
Espyo 50aeeff96c Backends: Allegro5: Brough back al_draw_indexed_prim when available. (#5937)
Amend 185b4dde
2022-11-30 14:44:46 +01:00
ocornut 1a497c2499 Inputs, IO: reworked ImGuiMod_Shortcut to redirect to Ctrl/Super at runtime instead of compile-time. (#5923, #456) 2022-11-29 19:07:50 +01:00
kdchambers 233d7ad3f2 Backends: WebGPU: fixed validation error with default depth buffer settings. (#5869, #5914)
(initialize WGPUCompareFunction params to valid values)
2022-11-24 12:52:38 +01:00
ocornut 16476f99fd Backends: GLFW: cancel out errors emitted by glfwGetKeyName() when a name is missing. (#5908) 2022-11-22 18:08:25 +01:00
Peter Nimmervoll 00b6370848 Backends: WebGPU: fixed rendering when a depth buffer is enabled. (#5869) 2022-11-10 16:28:44 +01:00
ocornut b8b0f9d02e Backends: OpenGL3: Reverted use of glBufferSubData(). (#4468, #4504, #3381, #2981, #4825, #4832, #5127) 2022-11-09 15:57:54 +01:00
Akira Maezawa 86f2af2bc7 Backends: OSX: Fixed mouse coordinate before clicking on the host window. (#5842) 2022-11-02 12:02:39 +01:00
Teselka 9db6b1a0d9 Backends: Win32: minor tidying up. (#5819) 2022-10-25 16:02:53 +02:00
David de1593d5c0
Backends: DX12: Fixed stale comments. (#5798) 2022-10-20 08:25:00 +02:00
ocornut ab6e48b833 Backends: GLFW: Perform a dummy glfwGetError() read to cancel missing mouse cursors errors. (#5785) 2022-10-18 12:21:31 +02:00
ocornut c54230d14e Backends: Using nullptr instead of NULL. (#5760, #4537) + fix additional warnings. 2022-10-11 12:35:41 +02:00
ocornut dfa1bb0ac7 Backends: OSX: Fixed mouse inputs on flipped views. (#5756) 2022-10-06 14:28:14 +02:00
ocornut 282b2b5afb Backends: Vulkan: Fix building with VK_NO_PROTOTYPES. (#914, #5738).
Amend a588f00
2022-10-04 12:30:45 +02:00
ocornut a588f00f7b Backends: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symetry. (#914, #5738). 2022-10-04 12:02:48 +02:00
ocornut 0a7054c7e4 Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode). (#5725, #1807, #471, #2815, #1060) 2022-09-28 17:04:42 +02:00
ocornut 73efcec564 Examples: disable GL related warnings on Mac + amend to ignore list. 2022-09-27 22:25:45 +02:00
ocornut 325299f942 Backends: OpenGL: Add ability to #define IMGUI_IMPL_OPENGL_DEBUG. (#4468, #4825, #4832, #5127, #5655, #5709) 2022-09-27 14:38:40 +02:00
ocornut 51bbc70652 Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows, and don't capture mouse when drag and dropping. (#5710) 2022-09-26 14:49:02 +02:00
ocornut 7a9045dd77 Backends: WGPU: removed Emscripten version check (currently failing on CI, ensure why, and tbh its redundant/unnecessary with changes of wgpu api nowadays) 2022-09-26 11:55:07 +02:00
ocornut fd408c9790 Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (#4921, #456)
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
tocic 6c3c9cea7f Fix typos in source comments (#5675) 2022-09-13 11:09:34 +02:00
ocornut fe62927bd8 Backends: OpenGL: Update comments. (#4445, #5642, #4649) 2022-09-05 15:58:31 +02:00
scorpion-26 5867a43dc8 Backends: GLFW: Honor GLFW_CURSOR_DISABLED by not setting mouse position. (#5625) 2022-09-01 20:50:08 +02:00
David Chavez 21b5fac57a Backends: Metal: Update deprecated property 'sampleCount'->'rasterSampleCount' (#5603) 2022-08-23 12:52:45 +02:00
ocornut e99c4fc668 Nav: fixes keyboard/gamepad nav actions running without the corresponding config flags (#5504). Fixes 8b8a61b. #4921, #4858, #787, #1599, #323)
NavUpdate() can now clears ImGuiInputSource_None.
2022-07-25 17:19:45 +02:00
ocornut 90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (#2625, #4921, #3724)
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
luigifcruz 82e10f1b61 Backends: Metal: Add dispatch synchronization. (#5447) 2022-07-05 15:24:37 +02:00
Stephen H. Gerstacker 67410d53f7 Backends: Metal, OSX: Various fixes (ARC / Autorelease fixes with metal-cpp and extensions). (#5403) 2022-06-30 20:16:45 +02:00
ocornut 1d6e34f3f9 Debug: Added ShowDebugLogWindow().
Internal: renamed old IMGUI_DEBUG_LOG() to IMGUI_DEBUG_PRINT().
Amended once.
2022-06-13 19:05:55 +02:00
Jack Knobel ec2c805e48
Backends: support for unity builds for dx10/dx11/dx12 backends (#5387) 2022-06-11 12:52:27 +02:00
Warren Moore 7354009a73 Backends: Metal: Fixed null dereference inside command buffer completion handler. (#5363, #5365) 2022-06-01 00:40:22 +02:00
xiaozhuai, Weihang Ding e5b2286ca8 Backends: OpenGL3: Fix apple TARGET_OS_* not defined warning. (#5321) 2022-05-23 12:56:15 +02:00
ocornut ca222d30c8 Backends: OpenGL: Partially revert 1.86 change of using glBufferSubData(): now only done on Intel GPUs. (#4468, #3381, #2981, #4825, #4832, #5127)
Essentially reverts 389982eb for non-Intel GPUs + update imgui_impl_opengl3_loader.h
Amended once (force-pushed).
2022-05-23 12:47:40 +02:00
ocornut 60bea052a9 Backends: OpenGL3: Fix state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING and vertex attribute states. (amends) 2022-05-13 18:06:24 +02:00
Rokas Kupstys b7686a88e9 Backends: OpenGL3: Fix state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING and vertex attribute states.
This change partially reverts 9770c8b21d.
2022-05-13 18:03:18 +02:00
rokups d768b8c812 Backends: Metal: Align code more closely with other backends. OSX: Add missing return for mouse pos events.
'#if __has_feature(objc_arc)' was removed as callback gets required reference via ImGui_ImplMetal_GetBackendData() so that weakref is not really needed.
2022-05-04 16:40:35 +02:00
ocornut 55f8989392 Docs update, binaries link + Backend: Allegro: fix warning (#5281) 2022-05-04 15:16:05 +02:00
stuartcarnie e66fc22057 Backends: OSX: Removed ImGui_ImplOSX_HandleEvent() from backend API. Move event tracking (desktop only) to OSX backend. (#4821)
Fix using NSKeyUp (#5268).
2022-05-03 14:35:08 +02:00
ocornut 26f817807c Backends: Vulkan: Don't use VK_PRESENT_MODE_MAX_ENUM_KHR as specs state it isn't part of the API. (#5254) 2022-05-03 12:51:51 +02:00
stuartcarnie d58b8414b9 Backends: OSX, Metal: Tweaks. Use preferred method of obtaining a timestamp. (#4821)
+ Rename ImGuiFocusObserver. Docking branch will use it for more than focus.
2022-05-03 12:12:03 +02:00
cpichard 709bc03d6f Backends: GLFW: fixed ImGui_ImplGlfw_TranslateUntranslatedKey() for lower case letters on OSX (#5260, #5261) 2022-04-30 15:34:40 +02:00
noisewuwei e54db4ee70 Backends: OSX, Metal: Store backend data in a per-context struct, allowing to use these backends with multiple contexts. (#5203, #5221, #4141)
# Conflicts:
#	docs/CHANGELOG.txt
2022-04-27 15:17:32 +02:00
Andrea Palmatè 14ca75d4e7 Backends: SDL, OpenGL3: Small fixes for AmigaOS4. (#5190) + Allow redefining IM_COL32_XXX layout macros. (#5190, #767, #844) 2022-04-13 20:43:35 +02:00
ocornut f7f30476d5 Added comments about requirement for bilinear filtering. (#5156, #3245) + Backends: SDL_Renderer: Explicitely call SDL_SetTextureScaleMode(). (#4927) 2022-04-07 14:28:08 +02:00
whale02 2d76b09d2e
Backends: Metal: Conditional check, amend 7602277 (#5122, #5123)
Co-authored-by: Wvader <34067397+wvader@users.noreply.github.com>
2022-03-28 10:58:27 +02:00
Rokas Kupstys 1ad8ad623e Backends: GLFW: Fixed keyboard modifiers events being reported incorrectly on Linux/X11. 2022-03-23 16:09:42 +01:00
thedmd 3c07879504 Backends: OSX: Inputs: Monitor NSKeyUp events to catch missing keyUp for key when user press Cmd + key (#5128) 2022-03-22 18:48:52 +01:00
Rokas Kupstys c5f67218bf Backends: SDL: Fix multi-viewport dragging issue with SDL on some systems. (v2 for master, using bd->MouseButtonsDown == 0) (#5012, #5082)
# Conflicts:
#	backends/imgui_impl_sdl.cpp
#	docs/CHANGELOG.txt
2022-03-22 18:08:39 +01:00
Wvader 7602277c86 Backends: Metal: Remove weak ref (#5122, #5123) 2022-03-22 17:24:51 +01:00
Sergiu Giurgiu 31e77eacdb Backends: SDL: Add extra mouse buttons handling (#5125) 2022-03-22 16:59:46 +01:00
ocornut fd06ed833b Misc: tweaks + fix warnings on backends withtout -wno-memaccess (#4995, #5104) 2022-03-13 17:57:32 +07:00
Rokas Kupstys 6315716f23 Backends: Glut: Fix comparison operator precedence. 2022-03-01 15:20:40 +01:00
ocornut 1e18da5c38 Backends, Examples: Add comments about using WndProc handler and WantCaptureXXX flags. (#5061)
+ update README.
2022-02-28 20:51:50 +01:00
Jan Sikorski a61ca097a7
Backends: OSX: Fix typo in scrolling event handler. (#5036) 2022-02-19 18:57:41 +01:00
ocornut e52bb147a7 Backends: GLFW: Added ImGui_ImplGlfw_InstallCallbacks()/ImGui_ImplGlfw_RestoreCallbacks(). (#4981) 2022-02-07 16:11:05 +01:00
ocornut 732bc2058e Backends: GLFW: Handle spurious leave/enter sequences apparently submitted by X11/GLFW combo. (#4984) 2022-02-07 15:59:49 +01:00
Rokas Kupstys 40fd163a3b Backends: OpenGL3: Fix OpenGL ES2 includes on Apple systems.
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
2022-02-07 12:26:19 +01:00
ocornut 2554b512c0 Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui. 2022-02-07 11:55:24 +01:00
Clownacy c6cab1f352 Backends: SDL: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(). Use SDL_GetRendererOutputSize() instead of SDL_GL_GetDrawableSize() when bound to a SDL_Renderer. (#4927)
This is (kind of) an OpenGL-only function, which should be avoided when SDL2 isn't using OpenGL.
The only alternative that is recommended is SDL_GetRendererOutputSize, which limits this fix to the SDL_Renderer backend. Still, I think it's better than nothing.
I say that SDL_GL_GetDrawableSize is "kind of" OpenGL-only because it does technically work even when SDL2 isn't using OpenGL.
It's just that it becomes a shim to SDL_GetWindowSize, which is not suitable for high-DPI usage because it reflects the size of the window in screen coordinates, not actual pixels, so it really should be avoided when not using OpenGL.
2022-02-04 16:51:29 +01:00
Clownacy c39192ba64 Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927)
SDL_PIXELFORMAT_RGBA32 is intended for byte arrays where the channels
are specifically in the RGBA order. However, this is not what
GetTexDataAsRGBA32 does: rather, it constructs an array where each
pixel is an unsigned int in ABGR order. On little-endian platforms,
this does indeed result in an RGBA byte order, however, on big-endian
platforms, this results in an ABGR byte order, which does not match
the PIXELFORMAT enum.

What should be used is the SDL_PIXELFORMAT_ABGR8888 enum, which
specifies that the pixels are in native-endian ABGR, which they are.
2022-02-04 16:43:05 +01:00
ocornut 43177324c0 Backends: GLFW: Fixed miss untranslation of keypad keys. (#4921, #452) 2022-02-01 15:29:10 +01:00
rokups 551ab84c2d Backends: OSX: Fix building with old Xcode versions.
Builds have failed on Xcode versions that do not yet support `@available` or do not have new APIs (that are unavailable on target OS version) defined at all. Using true build time version checks fixes these issues.
2022-01-31 14:41:56 +01:00
thedmd 5429f0f6b5 Backends: OSX, Android: Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. (#4921, #4858) 2022-01-27 17:46:48 +01:00
ocornut c906c65cac (BREAKING) Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. Backends: update most. (#4921, #4858)
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut 4caf1e9b59 Backends: GLFW: fix ImGui_ImplGlfw_TranslateUntranslatedKey() for grave accents. (#456, #2625) + fix preceeding commit.
Amend 100ede57 + amend b17b2fb
2022-01-24 13:49:57 +01:00
ocornut cda3db1449 Backends: SDL: Fixed key mapping for ImGuiKey_Menu (#4921) + misc typos (#4928) 2022-01-24 12:19:51 +01:00
ocornut 62d6be3747 IO: Removed ImGuiInputSource from public api for now, unnecessary. (#4858, #787) 2022-01-20 17:39:25 +01:00
thedmd 5ea47d9560 Backends: OSX: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:49 +01:00
ocornut 39c3412f91 Backends: SDL: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:31 +01:00
ocornut 3d85433748 Backends: GLFW: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:15 +01:00
ocornut 9f8c599ca7 Backends: Win32: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:04 +01:00
ocornut 6e63fcaca3 Backends: Vulkan: Amends, fix miscast on 32-bit systems with the right ImTextureID=ImU64. (#914) 2022-01-20 16:56:29 +01:00
ocornut ceb26bac48 Backends: Vulkan: Added support for ImTextureID as VkDescriptorSet, amends. (#914) 2022-01-20 15:53:28 +01:00
Marcell Kiss 29f104319e Backends: Vulkan: Added support for ImTextureID as VkDescriptorSet, add ImGui_ImplVulkan_AddTexture(). (#914) 2022-01-20 15:53:11 +01:00
thedmd b8e56dce83 IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. (#4858) (input queue code will be next commit)
Details: note that SDL, OSX and GLFW backends removed recording of MouseJustPressed[] which will be unnecessary with input queue (which is the NEXT commit). (#2787, #1992, #3383, #2525, #1320)
2022-01-17 17:35:37 +01:00
ocornut b6582a471a Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759) 2022-01-17 16:22:32 +01:00
ocornut 92c4ff1c2f Rename ImGuiKey_LeftControl to ImGuiKey_LeftCtrl, ImGuiKey_RightControl to ImGuiKey_RightCtrl + made key order match mods order. (#4858) 2022-01-17 15:42:04 +01:00
ocornut 0755767440 Backends: move io.AddKeyModsEvent() next to io.AddKeyEvent() submission, rely on mods from platform/source. (#4858) + fix #2622 again broken by 746c9f7
Amended to submit modifiers before.
2022-01-17 15:21:17 +01:00
RandomErrorMessage 45c4365ec3 Backends: GLFW: glfwGetKeyName is not implemented in emscripten (#4907, #4858) 2022-01-14 11:54:35 +01:00
ocornut 6188e94108 Examples: Vulkan: fill Subpass and MSAASamples to increase discoverability (#4886) + IO docs update (#4858)
https://github.com/mosra/magnum-integration/pull/89
2022-01-14 11:51:59 +01:00
ocornut 553b04883e Backends: SDL: Fix for Emscriptem. Amend 98ce013. 2022-01-13 18:52:19 +01:00
ocornut 200a8f1ea2 Backends: GLFW: Update mouse inputs using glfwSetCursorPosCallback() (breaking) + fallback to provide it when focused but not hovered/captured + update MousePos before MouseButtons.
+ Allegro5 remove unnecessary clear.
2022-01-12 17:48:47 +01:00
ocornut 98ce013242 Backends: SDL: Update mouse inputs using SDL_MOUSEMOTION/SDL_WINDOWEVENT_LEAVE + fallback to provide it when focused but not hovered/captured + update MousePos before MouseButtons. 2022-01-12 17:48:47 +01:00
ocornut bf4de2a46b Backends: Win32: Update mouse inputs using WM_MOUSEMOVE/WM_MOUSELEAVE + fallback to provide it when focused but not hovered/captured + update MousePos before Key Modifiers. 2022-01-12 17:48:46 +01:00
ocornut 7f8a89c25c Backends: Win32, SDL: maintain MouseButtonsDown instead of using IsAnyMouseDown(). Internals: added GetInputSourceName(). 2022-01-12 16:12:10 +01:00
Liu Liu 457d4b7b72 Backends: OSX: Adedd basic IME support for macOS. (#3108, #2598) 2022-01-12 14:37:05 +01:00
Théo Monnom 0818a42396 Backend: WebGPU: Fixed incorrect size parameters in WGPU backend (#4891)
+ squash SDL alignment bits.
2022-01-12 14:16:55 +01:00
ocornut 956e03009a Backends: OSX: Build fIx. Made GetKeyName() input tolerant. Internals: added GetNavInputName(). 2022-01-11 18:48:16 +01:00
ocornut e8172fdfbc Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. (#2625, #4858)
Amend 790132a (breaking)
2022-01-10 17:00:32 +01:00
ocornut b2e2cc44c2 Backends: OSX: Fixed typo. 2022-01-10 15:47:37 +01:00
ocornut 790132a672 Added io.AddKeyModEvent() and updated backends accordingly. (#2625, #4858) 2022-01-10 15:17:00 +01:00
thedmd 1797135db5 Backends: Android: Update to use io.AddEventKey() will full key map (#2625, #4858) 2022-01-10 15:15:24 +01:00
thedmd ee436aa803 Backends: OSX: Update to use io.AddEventKey() will full key map (#2625, #1873, #4858) 2022-01-10 15:14:52 +01:00
thedmd da1864d79e Backends: GLUT: Update to use io.AddEventKey() will full key map (#2625, #4858) 2022-01-10 15:14:01 +01:00
thedmd 1bfe4a75be Backends: Allegro5: Update to use io.AddEventKey() will full key map (#2625, #4858) 2022-01-10 15:13:36 +01:00
thedmd fe646ea591 Backends: SDL2: Update to use io.AddEventKey() will full key map (#2625, #4858) + created localized key (using keycode instead of scancode) (#456)
Legacy indexing stills uses Scancode
2022-01-10 15:12:58 +01:00
thedmd ecd212c01d Backends: GLFW: Update to use io.AddEventKey() will full key map (#2625, #4858) 2022-01-10 15:12:23 +01:00
thedmd 746c9f76e4 Backends: Win32: Update to use io.AddEventKey() will full key map (#2625, #4858) 2022-01-10 15:11:54 +01:00
ocornut afffcd5810 Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter (#2625) 2022-01-06 14:25:56 +01:00
ocornut 100ede5764 Backends: GLFW: Fix CTRL+A, CTRL+Y, CTRL+Z to match keyboard layout. Converting GLFW untranslated keycodes back to translated keycodes. (#456, #2625) 2022-01-05 16:57:50 +01:00
ocornut 3a90dc3893 Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.
Ref #2589, #2598, #3108, #3113, #3653, #4642
2022-01-05 13:47:20 +01:00
ocornut efa50f72a7 Backends: Metal: Ignore ImDrawCmd where ElemCount == 0. (#4857) 2022-01-03 22:14:19 +01:00
luigifcruz 41e39ea6e1 Backends: Metal: Add Metal C++ bindings support. (#4824, #4746) 2021-12-30 15:04:03 +01:00
ocornut dbeea7220f Backends: Silence overzealous warnings. (#4834) Add comments about SetDragDropPayload() return value. (#4835) 2021-12-29 12:44:12 +01:00
ocornut 89a28209e8 Version 1.87 WIP + Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init, added in 1.86 (#4468, #4830) 2021-12-26 20:02:02 +01:00
Sean Ridenour 4bad852a78 Backends: SDL_Renderer: Handle change to SDL_RenderGeometryRaw() function signature in SDL 2.0.19 (#4819) 2021-12-21 14:32:41 +01:00
ocornut d9bc1e44af Backends: Marmalade: Removed obsolete Marmalade backend (imgui_impl_marmalade.cpp) + example. (#368, #375) 2021-12-20 19:29:41 +01:00
thedmd 0cdc4a9565 Backends: Win32: Store left/right variants of Ctrl/Shift/Alt mods in KeysDown[] array. (#2625)
Technically not much required yet but will be by extra-keys work. fix miscleared GLFW field for consistency (no effect)
2021-12-16 18:16:35 +01:00
ocornut 389982eb5a Backends: OpenGL3: Using buffer orphaning + glBufferSubData(), seems to fix leaks with multi-viewports with some Intel HD drivers.. (#4468, #4504, #2981, #3381) 2021-12-15 11:50:00 +01:00
Stuart Carnie 1b6b8602c1 Backends: OSX: Fix keyboard support. Handle scroll cancel. Don't set mouse cursor shape unconditionally. (#4759, #4253, #1873)
Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.
2021-12-13 11:56:43 +01:00
Stuart Carnie b720f1f03c Backends: OSX: Add Game Controller support. (#4759) 2021-12-13 11:25:59 +01:00
ocornut a19815dc6b Backends: Allegro5: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:34:57 +01:00
ocornut c80e8b964c Backends: OpenGL2, Marmalade: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:26:52 +01:00
Rokas Kupstys 5c388c39f4 Backends: SDL_Renderer: Added support for large meshes (64k+ vertices) with 16-bit indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in this backend. (#3926) 2021-12-03 12:28:03 +01:00
ocornut 440824d431 Backends: Fixed early out on empty clip rect. In particular, DX12 backend would warn about it (others not so much). (#4775, #4464)
Amend/fix 2b0bd40b
2021-11-30 21:48:29 +01:00
ocornut 5ccb66794b Backends: WebGPU: Passing explicit buffer sizes as validation layers appears to not do what the in-flux specs says. (#4766 2021-11-29 12:18:25 +01:00
ocornut 19c3773cc0 Backends: Vulkan: Call vkCmdSetScissor() with a full-viewport at end of render. (#4644) 2021-10-15 12:11:11 +02:00
ocornut bbd5119a26 Backends: Vulkan: comments about user using VK_DYNAMIC_STATE_VIEWPORT / VK_DYNAMIC_STATE_SCISSOR and not calling vkCmdSetViewport() / vkCmdSetScissor(). (#4644) 2021-10-15 12:01:35 +02:00
ocornut dde31030e9 Backends: SDL_Renderer: use SDL_RenderIsClipEnabled() to pass NULL to SDL_RenderSetClipRect (#3926, #4582, #4633) 2021-10-07 15:07:58 +02:00
Basil Fierz 30a6873a44
Backends: WebGPU: Fix missing initialization of local variable (#4634) 2021-10-07 14:58:09 +02:00
Basil Fierz 25332fa5ac Backends: Emscripten: Update the webgpu API to be compatible with chrome 4633 (#4512) 2021-10-06 17:51:00 +02:00
ocornut e443ea139d Backends: SDL_Renderer: Backup and restore modified ClipRect/Viewport. (#3926, #4582) 2021-10-06 13:41:39 +02:00
ocornut 677fe33990 Backends: DX12: use dxgiformat.h to fix using forward declared DXGI_FORMAT (#4594) 2021-09-30 11:53:20 +02:00
ocornut fba756176d Backends: SDL_Renderer: Amend 1d2d246, various tweaks, fixes, sync to latest. (#3926) 2021-09-21 19:29:48 +02:00
Sylvain 62b17f928e Backends: SDL_Renderer: Added renderer backend for SDL 2.0.17+ (#3926)
(Squashed 20 commits)
2021-09-21 19:29:48 +02:00
James McCartney bc3d267c51 Backends: OSX: Use mach_absolute_time as CFAbsoluteTimeGetCurrent can jump backwards. (#4557, #4563) 2021-09-21 12:36:37 +02:00
ocornut c6ca327fb2 Backends: Added more implicit asserts to detect invalid/redundant calls to Shutdown functions. (#4562) 2021-09-20 18:43:05 +02:00
ocornut 755bf985d2 Backends: OpenGL3: Made our custom GL loader a bit more tolerant of use of another loader in same compilation unit. (#4445, #4514) 2021-09-07 14:48:26 +02:00
Jackamilio 03ce17f0a5 Backends: Allegro: Fixed clipping rectangles (#4498) broken by 2b0bd40b (#4464) 2021-08-31 12:52:54 +02:00
Cort 80ed4eba87
Backends: Vulkan: non-dispatchable handles should compare to VK_NULL_HANDLE, not NULL (#4475) 2021-08-24 21:53:54 +02:00
Rokas Kupstys 2b0bd40b99 Backends: Metal: Fixed a crash when clipping rect larger than framebuffer is submitted. (#4464)
Backends: Normalize clipping rect handling across backends.
+ Squashed amends.
2021-08-24 18:23:13 +02:00
Siarhei Fiedartsou f8bad7e1e3 Backends: OpenGL3: Add TargetConditionals.h (#4473) + standardize include 2021-08-24 15:36:44 +02:00
Corentin Wallez e652527313 Backends: WebGPU: Update impl_wgpu for an emscripten change 2021-08-24 14:55:43 +02:00
Rokas Kupstys 4c22b3e5d9 Backends: OpenGL3: Fix gl3wProcs colliding with gl3w. (#4445) 2021-08-24 14:33:04 +02:00
Nicolas Noble e3e1fbcf02 Backends: OpenGL3: OpenGL: Fixed ES 3.0 shader ("#version 300 es") to use normal precision floats. (#4463) 2021-08-23 15:03:27 +02:00
ocornut d2ffbd9b86 Version 1.84
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
2021-08-20 18:03:55 +02:00
Rokas Kupstys fc062e6028 Backends: OpenGL3: Update loader to include APIs used by test framework. 2021-08-20 17:22:27 +02:00
ocornut e3988a84db Backends: OpenGL3: Embed our own minimal GL loader (amends). (#4445) 2021-08-19 16:24:59 +02:00
Rokas Kupstys 459de65477 Backends: OpenGL3: Embed our own minimal GL loader based on gl3w and use it in SDL/GLFW examples. (#4445)
Loader repository at https://github.com/dearimgui/gl3w_stripped
Removed support for using custom loaders in examples/opengl3 backend
2021-08-19 16:24:58 +02:00
ocornut f24abbc47d Fix various warnings (#4442) 2021-08-18 12:38:24 +02:00
thedmd 2f40be638f IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus (#3532)
Amend/fix #2445, #2696, #3751, #4377
2021-08-17 20:10:45 +02:00
ocornut b380d3abe3 Backends: OpenGL3: Clarify use of GL_POLYGON_MODE. 2021-08-17 15:16:29 +02:00
ocornut f99fe72c42 Backends: Win32: Fixed keyboard modifiers being reported when host window doesn't have focus. (#2622) 2021-08-02 17:22:33 +02:00
ocornut 2ad912bb85 Backends: Win32, SDL, GLFW: only honor io.WantSetMousePos when focused + fix GLFW uninstalling handler + tweaks to reduce branch drift with docking. (#787, #2445, #2696, #3751, #4377) 2021-08-02 16:19:50 +02:00
ocornut db686ad522 Backends: Win32: Mouse position is correctly reported when the host platform window is hovered but not focused. (#2445, #2696, #3751, #4377) 2021-07-29 19:38:33 +02:00
ocornut 044fd0cd2d Backends: GLFW: Mouse position is correctly reported when the host platform window is hovered but not focused. (#3751, #4377, #2445) 2021-07-29 19:37:18 +02:00
ocornut 1cdd110eb4 Backends: SDL2: Mouse position is correctly reported when the host platform window is hovered but not focused. (#2445, #3751, #4377)
(requires SDL 2.0.5 because SDL_GetMouseFocus() is only usable with SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH).
2021-07-29 18:47:43 +02:00
ocornut baa4caf9e3 Backends: GLFW: Installing and exposed ImGui_ImplGlfw_MonitorCallback() for forward compatibility with docking branch.
+ Comments (#3934)
2021-07-07 14:12:48 +02:00
ocornut 327a5d8253 Fix warning + apply trailing whitespaces in stb_ libs (as applied on nothings/stb on 2020/02/02, facilitating further diffs) 2021-07-05 17:52:44 +02:00
ocornut cf2daf353e Backends: Cleanup, removed unnecessary create/destroy wrappers. Fix allegro5 backend + use same code as other backend.
+ Update gallery links (#4280)
2021-06-30 15:50:15 +02:00
Giovanni Funchal 6792e1a3e0 Backends: SDL2: Remove unnecessary ImGui_ImplSDL2_NewFrame() parameter. (#3244) 2021-06-30 15:04:40 +02:00
ocornut 23a15834fa Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend. 2021-06-29 18:16:47 +02:00
ocornut 4cec3a0467 Backends: support for multiple imgui context with little testing (#586, #1851, #2004, #3012, #3934, #4141)
I believe more renderer backends should work. GLFW/Win32/SDL/Vulkan probably have many issues.
2021-06-29 16:42:13 +02:00
ocornut b5a2bd1a5b Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
2021-06-29 15:25:19 +02:00
ocornut 70c603854e Backends: moved global to a data structure to facilitate support for multi-contexts. (#586, #1851, #2004, #3012, #3934, #4141)
This is NOT enable multi-contexts for any backends
- in order to make this commit as harmless as possible, while containing all the cruft/renaming
-
2021-06-29 14:37:58 +02:00
ocornut 95db098477 ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend. 2021-06-25 17:27:17 +02:00
Chaoya Li 2ab7f96f21 Backends: OpenGL3: Enable OES_vertex_array_object extension for emscripten/wasm build (#4266, #4267) 2021-06-25 16:19:55 +02:00
Anthony 8ced41570e Backends: DX9: explicitely disable texture state stages after >= 1. (#4268)
imgui only uses texture stage state for stage 0
But any state set in stages >= 1 will affect rendering
Set stage 1 COLOROP to DISABLED, to deactivate stages >= 1
2021-06-25 12:33:38 +02:00
ocornut 20d415e939 FIx static analysers warnings and disable false positives. 2021-06-24 17:15:14 +02:00
Rokas Kupstys 0b8a247074 Backends: OSX: Added a fix for shortcuts using CTRL key instead of CMD key. (#4253) 2021-06-23 15:25:10 +02:00