Commit Graph

19 Commits

Author SHA1 Message Date
BrutPitt
46ca8bc16f Backends, Examples: WGPU: wip refactor. (8381)
Rebased and squashed 47 commits.
- ImGui WebGPU examples: removed swap-chain in favor of surfaceConfigure (8191)
- New SDL2 WGPU example
- Code optimization: removed the redundancies of assignment
- Changes: ImGui code style - Lambdas RequestAdapter and RequestDevice callbacks declarated as signature - Validation Layer callbacks moved from lambdas to standard functions
- Same changes of GLFW example: ImGui code style - Lambdas RequestAdapter and RequestDevice callbacks declarated as signature - Validation Layer callbacks moved from lambdas to standard functions
- Scrollbars inhibition
- Use of new direct CreateDevice function (w/o callback), added release of all resources used (not present in original example)
- If the O.S. is Linux/Unix check if Wayland is the current active session and set DAWN_USE_WAYLAND=ON option (otherwise is always OFF)
- example_glfw_wgpu: removed all workarounds
- example_sdl2_wgpu: same style and functionality as GLFW example
- sdl2wgpu tool to acquire surfaceDescriptor via SDL_syswm and to pass to wgpuInstanceCreateSurface to create WGPU Surface
- css style to avoid the scrollbar
- added `chek_surface_texture_status` function to check the `WGPUSurfaceTexture .status` and recreate the `Surface` in case of "not optimal" (bad) status.
- Changed comment reference to `emwgpudawn` an EMSCRIPTEN WGPU binding maintained by Google
- Adaptation to the last Google DAWN commit (1411699ba)
Adaptation to the last EMSCRIPTEN 4.0.10, using new "--use-port=emdawnwebgpu" compiler/linker flag
- Support for EMSCRIPTEN >= 4.0.10 (using "--use-port=emdawnwebgpu") and NEW support for WGPU-Native
- Finalized the support of WGPU-Native for MacOS and minimal code adjustment
- WebGPU examples - DAWN / WGPU native and EMSCRIPTEN - for GLFW/SDL2/SDL3 frameworks
- "index.html" no more necessary (now the common one is used), "sdl2wgpu.cpp" It has been moved and renamed (sdl2_wgpu.c), "sdl2wgpu.h" no more necessary
- added procedure for using CMake
- added procedure for using CMake
- Updated example_sdl3_wgpu build procedure for EMSCRIPTEN
- WGPU+GLFW: Helper to create a WebGPU surface for Native application. Used only with WGPU-Native SDK: DAWN-Native already has a built-in function
- WGPU+SDL2: helper to create a WebGPU surface (exclusively!) for Native/Desktop applications and available only together with WebGPU/WGPU backend
- WGPU+SDL3: helper to create a WebGPU surface (exclusively!) for Native/Desktop applications and available only together with WebGPU/WGPU backend
- WebGPU Helper functions and differentiation between the 4 compilation methods (via defines): Google DAWN (Native/Emscripten) / WGPU (Native/EMscripten)
- example_glfw_wgpu: ImGui_ImplGLFW_CreateWGPUSurface_Helper (new helper function in imgui_impl_glfw backend), check status and error callback functions in imgui_impl_wgpu backend
- example_sdl2_wgpu: ImGui_ImplSDL2_CreateWGPUSurface_Helper (new helper function in imgui_impl_sdl2 backend), check status and error callback functions in imgui_impl_wgpu backend
- example_sdl3_wgpu: ImGui_ImplSDL3_CreateWGPUSurface_Helper (new helper function in imgui_impl_sdl3 backend), check status and error callback functions in imgui_impl_wgpu backend
- Functions ImGui_ImplXXXX_CreateWGPUSurface_Helper were inserted into imgui_impl_xxxx (xxxx = GLFW / SDL2 / SDL3), and initialization has been integrated into every example: no more necessary, removed
2025-09-24 17:51:38 +02:00
ocornut
979c7d76ab Backends: SDL2, SDL3, OSX: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set. (#8508) 2025-03-21 15:42:47 +01:00
ocornut
8b0af7fddc Backends: SDL: update comments regarding API stability, regarding SDL_GPU and SDL_Renderer. 2025-01-20 14:30:40 +01:00
ocornut
596e09770d Backends: SDL3: Added ImGui_ImplSDL3_InitForSDLGPU() for consistency. (#8163, #7998, #7988) 2025-01-09 17:07:53 +01:00
ocornut
43fbd7ce84 Backends: standardized top of file comments. 2024-12-05 12:43:04 +01:00
ocornut
566558b17c Replacing NULL with nullptr in examples/backends when they creeped back. (#6313, #7071, #4537) 2024-12-05 12:25:02 +01:00
ocornut
6f287dd16d (Breaking) Removed pre-1.87 obsolete io.KeyMap[], io.KeysDown[], io.NavInputs[]. Remove IMGUI_DISABLE_OBSOLETE_KEYIO. (#4921) 2024-11-06 17:54:59 +01:00
ocornut
4832027eb6 Examples: SDL3: Update for API changes: SDL_Init() returns 0 on failure. 2024-09-03 19:11:51 +02:00
ocornut
3f9a90e2a3 Docs: added extraneous link to Getting Started section. 2024-07-25 16:59:40 +02:00
ocornut
a489585f84 Backends: SDL3: Updated comments (IME seems fixed in SDL3). Added SDL3 examples to Visual Studio solution. 2024-07-02 11:37:18 +02:00
Green Sky
fab96a6e59 Backends: SDL3: Re-enable calling SDL_StartTextInput()/SDL_StopTextInput(). (#7452, #6306, #6071, #1953)
Amend: a7703fe
2024-04-15 12:25:42 +02:00
ocornut
891b81fc5d Backends: SDL3: Fixed gamepad. Added support for disconnection. Added support for multiple gamepads. Added ImGui_ImplSDL3_SetGamepadMode(). (#7180, #3884, #6559, #6890) 2024-02-14 11:37:18 +01:00
ocornut
357f752bed Docs: add more links to the top of every examples and backends files. 2023-09-11 14:01:40 +02:00
ocornut
1e17d59965 Backends: SDL2,SDL3: added ImGui_ImplSDL2_InitForOther() / ImGui_ImplSDL3_InitForOther().
e.g. WebGPU users use a similarly named functions from GLFW backend.
2023-08-15 12:48:46 +02:00
ocornut
33e13c85e1 Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601) 2023-07-13 11:27:52 +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
fac19e1883 Backends: SDL2:+SDL3 Implement SetPlatformImeDataFn (amends). (#6071, #1953) + fix SDL3 setting PlatformHandleRaw. (#6146) 2023-02-07 19:29:44 +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