ae8688974bf Merge branch 'master' into docking f7ba6453980 InputText: fixed not filling callback's SelectionEnd. (#7925) e648dbb59d2 Tables: fixed auto-width columns when using synced-instances of same table. (#7218) 6aade6912a1 Inputs: SetNextItemShortcut() with ImGuiInputFlags_Tooltip doesn't show tooltip when item is active. dad9f45e3ed Windows: fixed an issue where double-click to collapse could be triggered even while another item is active. (#7841, #7369) 71714eab536 Tables: fixed assertion related to inconsistent outer clipping when sizes are not rounded. (#7957) 11fba027e50 Tables: using table->InnerClipRect more consistently. Fixes an assertion with tables with borders when clipped by parent. (#6765, #3752, #7428) 1ab1e3c6563 Backends: SDL3: rework implementation of ImGuiViewportFlags_NoTaskBarIcon. (#7989) 6ce26ef11d5 AddFont: added assert to better detect uninitialized struct. (#7993) 08b1496b7e5 Backends: Win32: fixed an issue where a viewport destroyed while clicking would hog mouse tracking and temporary lead to incorrect update of HoveredWindow. (#7971) 8ba7efb738d Backends: Win32: fixed an issue where a viewport destroyed while clicking would hog mouse tracking and temporary lead to incorrect update of HoveredWindow. (#7971) 1ac162f2b08 Backends: WGPU: add IMGUI_IMPL_WEBGPU_BACKEND_DAWN/IMGUI_IMPL_WEBGPU_BACKEND_WGPU to support more targets. (#7977, #7969, #6602, #6188, #7523) 4925695ae88 InputText: optimize InputTextCalcTextLenAndLineCount() for inactive multiline path. (#7925) 7ac50bf77d0 InputText: more tidying up of selection search loop. aef07aea274 InputText: minor tidying up of selection search loop (no need to imply it runs in single line mode) b53d91a4c40 InputText: optimization for large text: using memchr() instead of strchr() shaves 0.2 ms on 865k multi-line text case. Approximately 20%. (#7925) 44a74509af9 Backends: Win32: fixed direct calls to platform_io.Platform_SetWindowPos()/Platform_SetWindowSize() on windows created by application (typically main viewport). 510b6adc9bb CI: disable month-long PVS Studio warning about expiring licence. 8040c02b32b Viewports: fixed an issue where a window manually constrained to the main viewport while crossing over main viewport bounds isn't translated properly. (#7985) dab63231d88 Misc: Made it accepted to call SetMouseCursor() with any out-of-bound value, as a way to allow hacking in custom cursors if desirable. git-subtree-dir: external/imgui git-subtree-split: ae8688974bf85530606c9fe9aab1e2c7b8f22719
60 lines
2.8 KiB
C
60 lines
2.8 KiB
C
// dear imgui: Renderer for WebGPU
|
|
// This needs to be used along with a Platform Binding (e.g. GLFW)
|
|
// (Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.)
|
|
|
|
// Important note to dawn and/or wgpu users: when targeting native platforms (i.e. NOT emscripten),
|
|
// one of IMGUI_IMPL_WEBGPU_BACKEND_DAWN or IMGUI_IMPL_WEBGPU_BACKEND_WGPU must be provided.
|
|
// Add #define to your imconfig.h file, or as a compilation flag in your build system.
|
|
// This requirement will be removed once WebGPU stabilizes and backends converge on a unified interface.
|
|
//#define IMGUI_IMPL_WEBGPU_BACKEND_DAWN
|
|
//#define IMGUI_IMPL_WEBGPU_BACKEND_WGPU
|
|
|
|
// Implemented features:
|
|
// [X] Renderer: User texture binding. Use 'WGPUTextureView' as ImTextureID. Read the FAQ about ImTextureID!
|
|
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
|
|
// Missing features:
|
|
// [ ] Renderer: Multi-viewport support (multiple windows). Not meaningful on the web.
|
|
|
|
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
|
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
|
|
// Learn about Dear ImGui:
|
|
// - FAQ https://dearimgui.com/faq
|
|
// - Getting Started https://dearimgui.com/getting-started
|
|
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
|
|
// - Introduction, links and more at the top of imgui.cpp
|
|
|
|
#pragma once
|
|
#include "imgui.h" // IMGUI_IMPL_API
|
|
#ifndef IMGUI_DISABLE
|
|
|
|
#include <webgpu/webgpu.h>
|
|
|
|
// Initialization data, for ImGui_ImplWGPU_Init()
|
|
struct ImGui_ImplWGPU_InitInfo
|
|
{
|
|
WGPUDevice Device;
|
|
int NumFramesInFlight = 3;
|
|
WGPUTextureFormat RenderTargetFormat = WGPUTextureFormat_Undefined;
|
|
WGPUTextureFormat DepthStencilFormat = WGPUTextureFormat_Undefined;
|
|
WGPUMultisampleState PipelineMultisampleState = {};
|
|
|
|
ImGui_ImplWGPU_InitInfo()
|
|
{
|
|
PipelineMultisampleState.count = 1;
|
|
PipelineMultisampleState.mask = UINT32_MAX;
|
|
PipelineMultisampleState.alphaToCoverageEnabled = false;
|
|
}
|
|
};
|
|
|
|
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
|
|
IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info);
|
|
IMGUI_IMPL_API void ImGui_ImplWGPU_Shutdown();
|
|
IMGUI_IMPL_API void ImGui_ImplWGPU_NewFrame();
|
|
IMGUI_IMPL_API void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder);
|
|
|
|
// Use if you want to reset your rendering device without losing Dear ImGui state.
|
|
IMGUI_IMPL_API void ImGui_ImplWGPU_InvalidateDeviceObjects();
|
|
IMGUI_IMPL_API bool ImGui_ImplWGPU_CreateDeviceObjects();
|
|
|
|
#endif // #ifndef IMGUI_DISABLE
|