Skip to content

Commit fa308c6

Browse files
authored
v1.92.5 from #378
Bot: Update dependencies
2 parents a23a716 + d40a371 commit fa308c6

29 files changed

+1601
-880
lines changed

.references/imgui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.92.4
1+
v1.92.5

dcimgui/backends/dcimgui_impl_glfw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef unsigned short ImDrawIdx; // Default: 16-bit (for maximum compatibility
1717
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen (Windows only).
1818
// [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]
1919
// [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'.
2121
// [X] Multiple Dear ImGui contexts support.
2222
// Missing features or Issues:
2323
// [ ] 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.

dcimgui/backends/dcimgui_impl_vulkan.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,14 @@ extern "C"
6262
// If you have no idea what this is, leave it alone!
6363
//#define IMGUI_IMPL_VULKAN_NO_PROTOTYPES
6464

65-
// Convenience support for Volk
65+
// [Configuration] Convenience support for Volk
6666
// (you can also technically use IMGUI_IMPL_VULKAN_NO_PROTOTYPES + wrap Volk via ImGui_ImplVulkan_LoadFunctions().)
67+
// (When using Volk from directory outside your include directories list you can specify full path to the volk.h header,
68+
// for example when using Volk from VulkanSDK and using include_directories(${Vulkan_INCLUDE_DIRS})' from 'find_package(Vulkan REQUIRED)')
6769
//#define IMGUI_IMPL_VULKAN_USE_VOLK
70+
//#define IMGUI_IMPL_VULKAN_VOLK_FILENAME <Volk/volk.h>
71+
//#define IMGUI_IMPL_VULKAN_VOLK_FILENAME <volk.h> // Default
72+
// Reminder: make those changes in your imconfig.h file, not here!
6873

6974
#if defined(IMGUI_IMPL_VULKAN_NO_PROTOTYPES)&&!defined(VK_NO_PROTOTYPES)
7075
#define VK_NO_PROTOTYPES
@@ -74,7 +79,11 @@ extern "C"
7479
#endif // #if defined(VK_USE_PLATFORM_WIN32_KHR)&&!defined(NOMINMAX)
7580
// Vulkan includes
7681
#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
82+
#ifdef IMGUI_IMPL_VULKAN_VOLK_FILENAME
83+
#include IMGUI_IMPL_VULKAN_VOLK_FILENAME
84+
#else
7785
#include <volk.h>
86+
#endif // #ifdef IMGUI_IMPL_VULKAN_VOLK_FILENAME
7887
#else
7988
#include <vulkan/vulkan.h>
8089
#endif // #ifdef IMGUI_IMPL_VULKAN_USE_VOLK
@@ -103,7 +112,7 @@ struct ImGui_ImplVulkan_PipelineInfo_t
103112
// and must contain a pool size large enough to hold a small number of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors.
104113
// - As an convenience, by setting DescriptorPoolSize > 0 the backend will create one for you.
105114
// - 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.
107116
struct ImGui_ImplVulkan_InitInfo_t
108117
{
109118
uint32_t ApiVersion; // 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)

dcimgui/backends/dcimgui_impl_wgpu.cpp

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,62 @@ CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_UpdateTexture(cimgui::ImTextureData
126126
::ImGui_ImplWGPU_UpdateTexture(reinterpret_cast<::ImTextureData*>(tex));
127127
}
128128

129+
CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_IsSurfaceStatusError(WGPUSurfaceGetCurrentTextureStatus status)
130+
{
131+
return ::ImGui_ImplWGPU_IsSurfaceStatusError(status);
132+
}
133+
134+
CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_IsSurfaceStatusSubOptimal(WGPUSurfaceGetCurrentTextureStatus status)
135+
{
136+
return ::ImGui_ImplWGPU_IsSurfaceStatusSubOptimal(status);
137+
}
138+
139+
CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_DebugPrintAdapterInfo(WGPUAdapter adapter)
140+
{
141+
::ImGui_ImplWGPU_DebugPrintAdapterInfo(reinterpret_cast<const ::WGPUAdapter&>(adapter));
142+
}
143+
144+
CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetBackendTypeName(WGPUBackendType type)
145+
{
146+
return ::ImGui_ImplWGPU_GetBackendTypeName(type);
147+
}
148+
149+
CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetAdapterTypeName(WGPUAdapterType type)
150+
{
151+
return ::ImGui_ImplWGPU_GetAdapterTypeName(type);
152+
}
153+
154+
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)
155+
156+
CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetDeviceLostReasonName(WGPUDeviceLostReason type)
157+
{
158+
return ::ImGui_ImplWGPU_GetDeviceLostReasonName(type);
159+
}
160+
161+
CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetErrorTypeName(WGPUErrorType type)
162+
{
163+
return ::ImGui_ImplWGPU_GetErrorTypeName(type);
164+
}
165+
166+
#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)
167+
168+
#if !(defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN))
169+
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
170+
171+
CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetLogLevelName(WGPULogLevel level)
172+
{
173+
return ::ImGui_ImplWGPU_GetLogLevelName(level);
174+
}
175+
176+
#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
177+
#endif // #if !(defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN))
178+
179+
#ifndef __EMSCRIPTEN__
180+
181+
CIMGUI_IMPL_API WGPUSurface cimgui::cImGui_ImplWGPU_CreateWGPUSurfaceHelper(cimgui::ImGui_ImplWGPU_CreateSurfaceInfo* info)
182+
{
183+
return ::ImGui_ImplWGPU_CreateWGPUSurfaceHelper(reinterpret_cast<::ImGui_ImplWGPU_CreateSurfaceInfo*>(info));
184+
}
185+
186+
#endif // #ifndef __EMSCRIPTEN__
129187
#endif // #ifndef IMGUI_DISABLE

dcimgui/backends/dcimgui_impl_wgpu.h

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@
66
// Auto-generated forward declarations for C header
77
typedef struct ImGui_ImplWGPU_InitInfo_t ImGui_ImplWGPU_InitInfo;
88
typedef struct ImGui_ImplWGPU_RenderState_t ImGui_ImplWGPU_RenderState;
9+
typedef struct ImGui_ImplWGPU_CreateSurfaceInfo_t ImGui_ImplWGPU_CreateSurfaceInfo;
910
// ImDrawIdx: vertex index. [Compile-time configurable type]
1011
// - To use 16-bit indices + allow large meshes: backend need to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset (recommended).
1112
// - To use 32-bit indices: override with '#define ImDrawIdx unsigned int' in your imconfig.h file.
1213
#ifndef ImDrawIdx
1314
typedef unsigned short ImDrawIdx; // Default: 16-bit (for maximum compatibility with renderer backends)
1415
#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)
1718

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.
2024
// 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.
2226
//#define IMGUI_IMPL_WEBGPU_BACKEND_DAWN
2327
//#define IMGUI_IMPL_WEBGPU_BACKEND_WGPU
2428

@@ -44,8 +48,21 @@ extern "C"
4448
#endif
4549
#include "dcimgui.h"
4650
#ifndef IMGUI_DISABLE
47-
#include <webgpu/webgpu.h> // Initialization data, for ImGui_ImplWGPU_Init()
51+
// Setup Emscripten default if not specified.
52+
#if defined(__EMSCRIPTEN__)&&!defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)&&!defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
53+
#include <emscripten/version.h>
54+
#if (__EMSCRIPTEN_major__ >= 4)&&(__EMSCRIPTEN_minor__ >= 0)&&(__EMSCRIPTEN_tiny__ >= 10)
55+
#define IMGUI_IMPL_WEBGPU_BACKEND_DAWN
56+
#else
57+
#define IMGUI_IMPL_WEBGPU_BACKEND_WGPU
58+
#endif // #if (__EMSCRIPTEN_major__ >= 4)&&(__EMSCRIPTEN_minor__ >= 0)&&(__EMSCRIPTEN_tiny__ >= 10)
59+
#endif // #if defined(__EMSCRIPTEN__)&&!defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)&&!defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
60+
#include <webgpu/webgpu.h>
61+
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
62+
#include <webgpu/wgpu.h>
63+
#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
4864
typedef struct ImGui_ImplWGPU_InitInfo_ImDrawData_t ImGui_ImplWGPU_InitInfo_ImDrawData;
65+
// Initialization data, for ImGui_ImplWGPU_Init()
4966
struct ImGui_ImplWGPU_InitInfo_t
5067
{
5168
WGPUDevice Device /* = nullptr */;
@@ -76,6 +93,41 @@ struct ImGui_ImplWGPU_RenderState_t
7693
WGPUDevice Device;
7794
WGPURenderPassEncoder RenderPassEncoder;
7895
};
96+
97+
//-------------------------------------------------------------------------
98+
// Internal Helpers
99+
// Those are currently used by our example applications.
100+
//-------------------------------------------------------------------------
101+
102+
// (Optional) Helper to wrap some of the Dawn/WGPU/Emscripten quirks
103+
CIMGUI_IMPL_API bool cImGui_ImplWGPU_IsSurfaceStatusError(WGPUSurfaceGetCurrentTextureStatus status);
104+
CIMGUI_IMPL_API bool cImGui_ImplWGPU_IsSurfaceStatusSubOptimal(WGPUSurfaceGetCurrentTextureStatus status); // Return whether the texture is suboptimal and may need to be recreated.
105+
106+
// (Optional) Helper for debugging/logging
107+
CIMGUI_IMPL_API void cImGui_ImplWGPU_DebugPrintAdapterInfo(WGPUAdapter adapter);
108+
CIMGUI_IMPL_API const char* cImGui_ImplWGPU_GetBackendTypeName(WGPUBackendType type);
109+
CIMGUI_IMPL_API const char* cImGui_ImplWGPU_GetAdapterTypeName(WGPUAdapterType type);
110+
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)
111+
CIMGUI_IMPL_API const char* cImGui_ImplWGPU_GetDeviceLostReasonName(WGPUDeviceLostReason type);
112+
CIMGUI_IMPL_API const char* cImGui_ImplWGPU_GetErrorTypeName(WGPUErrorType type);
113+
#else
114+
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
115+
CIMGUI_IMPL_API const char* cImGui_ImplWGPU_GetLogLevelName(WGPULogLevel level);
116+
#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)&&!defined(__EMSCRIPTEN__)
117+
#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)
118+
// (Optional) Helper to create a surface on macOS/Wayland/X11/Window
119+
#ifndef __EMSCRIPTEN__
120+
struct ImGui_ImplWGPU_CreateSurfaceInfo_t
121+
{
122+
WGPUInstance Instance;
123+
const char* System; // "cocoa" | "wayland" | "x11" | "win32"
124+
void* RawWindow; // NSWindow* | 0 | Window | HWND
125+
void* RawDisplay; // 0 | wl_display* | Display* | 0
126+
void* RawSurface; // | wl_surface* | 0 | 0
127+
void* RawInstance; // 0 | 0 | 0 | HINSTANCE
128+
};
129+
CIMGUI_IMPL_API WGPUSurface cImGui_ImplWGPU_CreateWGPUSurfaceHelper(ImGui_ImplWGPU_CreateSurfaceInfo* info);
130+
#endif// #ifndef __EMSCRIPTEN__
79131
#endif// #ifndef IMGUI_DISABLE
80132
#ifdef __cplusplus
81133
} // End of extern "C" block

dcimgui/backends/imgui_impl_dx12.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct ImGui_ImplDX12_InitInfo
4444
D3D12_GPU_DESCRIPTOR_HANDLE LegacySingleSrvGpuDescriptor;
4545
#endif
4646

47-
ImGui_ImplDX12_InitInfo() { memset((void*)this, 0, sizeof(*this)); }
47+
ImGui_ImplDX12_InitInfo() { memset(this, 0, sizeof(*this)); }
4848
};
4949

5050
// Follow "Getting Started" link and check examples/ folder to learn about using backends!

0 commit comments

Comments
 (0)