Commit Graph

20 Commits

Author SHA1 Message Date
ocornut
4deba36e83 Misc amends (8381) 2025-09-24 18:08:30 +02:00
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
571dae9664 Backends: WGPU: added ImGuiBackendFlags_RendererHasTextures support. (#8465) 2025-06-12 15:31:51 +02:00
ocornut
df068ce11e Various/misc fixes following back-and-forth dynamic_fonts->master->docking merges. Added missing API BREAKING CHANGES section. 2025-06-11 18:50:16 +02:00
ocornut
43fbd7ce84 Backends: standardized top of file comments. 2024-12-05 12:43:04 +01:00
ocornut
0bde57c25a Font, Misc: remove qualifier from most font functions.
Fixed ClearOutputData() not clearing Used4kPagesMap (mostly harmless).
2024-10-29 11:48:37 +01:00
ocornut
f890d85381 Backends: Fixed typo in comments from old wip work 'io.BackendRendererRenderState' -> 'platform_io.Renderer_RenderState'. (#6969, #5834, #7468, #3590
Amend e94f95d
2024-10-07 22:12:09 +02:00
ocornut
e94f95d82b Backends: DX11, DX12, Vulkan, WGPU: Expose some backend-specific render state usable for callbacks. (#6969, #5834, #7468, #3590) 2024-10-07 21:45:19 +02:00
Aaron C Gaudette
1ac162f2b0 Backends: WGPU: add IMGUI_IMPL_WEBGPU_BACKEND_DAWN/IMGUI_IMPL_WEBGPU_BACKEND_WGPU to support more targets. (#7977, #7969, #6602, #6188, #7523) 2024-09-16 16:26:13 +02:00
ocornut
3f9a90e2a3 Docs: added extraneous link to Getting Started section. 2024-07-25 16:59:40 +02:00
Elie Michel
8be48a44f7 Backends: WebGPU: Avoid using -1u literal (#7436) 2024-03-25 11:10:38 +09:00
ocornut
5fc0a361b2 Backends: WebGPU: added ImGui_ImplWGPU_InitInfo::PipelineMultisampleState. (#7240) 2024-01-22 14:54:45 +01:00
ocornut
831d42c1ab Backends: WebGPU: ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure instead of variety of parameters, allowing for easier further changes. (#7240) 2024-01-22 14:53:30 +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
33e13c85e1 Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601) 2023-07-13 11:27:52 +02: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
Peter Nimmervoll
00b6370848 Backends: WebGPU: fixed rendering when a depth buffer is enabled. (#5869) 2022-11-10 16:28:44 +01:00
ocornut
838c16533d Backends: Comments. 2021-05-27 13:59:35 +02:00
ocornut
dff0044d4e Backends, Examples: Added support for WebGPU and corresponding example. Amend 5853fbd (#3632) 2021-01-28 15:40:31 +01:00
Basil Fierz
5853fbd68b Backends, Examples: Added support for WebGPU and corresponding example (#3632)
(Squashed 11 commits)
2021-01-28 11:37:46 +01:00