You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dcimgui/backends/dcimgui_impl_glfw.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ typedef unsigned short ImDrawIdx; // Default: 16-bit (for maximum compatibility
17
17
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen (Windows only).
18
18
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy GLFW_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
19
19
// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
20
-
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Resizing cursors requires GLFW 3.4+! Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
20
+
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors) with GLFW 3.1+. Resizing cursors requires GLFW 3.4+! Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
21
21
// [X] Multiple Dear ImGui contexts support.
22
22
// Missing features or Issues:
23
23
// [ ] Touch events are only correctly identified as Touch on Windows. This create issues with some interactions. GLFW doesn't provide a way to identify touch inputs from mouse inputs, we cannot call io.AddMouseSourceEvent() to identify the source. We provide a Windows-specific workaround.
// and must contain a pool size large enough to hold a small number of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors.
104
113
// - As an convenience, by setting DescriptorPoolSize > 0 the backend will create one for you.
105
114
// - About dynamic rendering:
106
-
// - When using dynamic rendering, set UseDynamicRendering=true and fill PipelineRenderingCreateInfo structure.
115
+
// - When using dynamic rendering, set UseDynamicRendering=true + fill PipelineInfoMain.PipelineRenderingCreateInfo structure.
107
116
structImGui_ImplVulkan_InitInfo_t
108
117
{
109
118
uint32_tApiVersion; // Fill with API version of Instance, e.g. VK_API_VERSION_1_3 or your value of VkApplicationInfo::apiVersion. May be lower than header version (VK_HEADER_VERSION_COMPLETE)
// - To use 16-bit indices + allow large meshes: backend need to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset (recommended).
11
12
// - To use 32-bit indices: override with '#define ImDrawIdx unsigned int' in your imconfig.h file.
12
13
#ifndefImDrawIdx
13
14
typedefunsigned shortImDrawIdx; // Default: 16-bit (for maximum compatibility with renderer backends)
14
15
#endif// #ifndef ImDrawIdx
15
-
// This needs to be used along with a Platform Binding (e.g. GLFW)
16
-
// (Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.)
16
+
// This needs to be used along with a Platform Binding (e.g. GLFW, SDL2, SDL3)
17
+
// (Please note that WebGPU is a recent API, may not be supported by all browser, and its ecosystem is generally a mess)
17
18
18
-
// Important note to dawn and/or wgpu users: when targeting native platforms (i.e. NOT emscripten),
19
-
// one of IMGUI_IMPL_WEBGPU_BACKEND_DAWN or IMGUI_IMPL_WEBGPU_BACKEND_WGPU must be provided.
19
+
// When targeting native platforms:
20
+
// - One of IMGUI_IMPL_WEBGPU_BACKEND_DAWN or IMGUI_IMPL_WEBGPU_BACKEND_WGPU *must* be provided.
21
+
// When targeting Emscripten:
22
+
// - We now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN is Emscripten version is 4.0.10+, which correspond to using Emscripten '--use-port=emdawnwebgpu'.
23
+
// - We can still define IMGUI_IMPL_WEBGPU_BACKEND_WGPU to use Emscripten '-s USE_WEBGPU=1' which is marked as obsolete by Emscripten.
20
24
// Add #define to your imconfig.h file, or as a compilation flag in your build system.
21
-
// This requirement will be removed once WebGPU stabilizes and backends converge on a unified interface.
25
+
// This requirement may be removed once WebGPU stabilizes and backends converge on a unified interface.
22
26
//#define IMGUI_IMPL_WEBGPU_BACKEND_DAWN
23
27
//#define IMGUI_IMPL_WEBGPU_BACKEND_WGPU
24
28
@@ -44,8 +48,21 @@ extern "C"
44
48
#endif
45
49
#include"dcimgui.h"
46
50
#ifndefIMGUI_DISABLE
47
-
#include<webgpu/webgpu.h>// Initialization data, for ImGui_ImplWGPU_Init()
CIMGUI_IMPL_APIboolcImGui_ImplWGPU_IsSurfaceStatusSubOptimal(WGPUSurfaceGetCurrentTextureStatusstatus); // Return whether the texture is suboptimal and may need to be recreated.
0 commit comments