update dear imgui from 1.92.2b-docking to 1.92.6-docking

This commit is contained in:
Sven Balzer
2026-04-01 18:20:04 +02:00
parent 3b7d593f4e
commit 1daf4d79f1
127 changed files with 10702 additions and 3505 deletions
+217 -32
View File
@@ -16,28 +16,38 @@ on:
- requested
jobs:
Windows:
Build-Windows:
runs-on: windows-2025
name: Build - Windows
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
env:
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
# The VulkanSDK libs for Windows is manually generated using build_windows_vulkan_libs.ps1 + attached to issue #8925.
# (we have a .yml workflow in commit history if it becomes ever useful to create this on CI too)
- name: Install Dependencies
shell: powershell
run: |
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.32.8-VC.zip" -OutFile "SDL2-devel-2.32.8-VC.zip"
Expand-Archive -Path SDL2-devel-2.32.8-VC.zip
echo "SDL2_DIR=$(pwd)\SDL2-devel-2.32.8-VC\SDL2-2.32.8\" >>${env:GITHUB_ENV}
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL3-devel-3.2.18-VC.zip" -OutFile "SDL3-devel-3.2.18-VC.zip"
Expand-Archive -Path SDL3-devel-3.2.18-VC.zip
echo "SDL3_DIR=$(pwd)\SDL3-devel-3.2.18-VC\SDL3-3.2.18\" >>${env:GITHUB_ENV}
Invoke-WebRequest -Uri "https://github.com/ocornut/imgui/files/3789205/vulkan-sdk-1.1.121.2.zip" -OutFile vulkan-sdk-1.1.121.2.zip
Expand-Archive -Path vulkan-sdk-1.1.121.2.zip
echo "VULKAN_SDK=$(pwd)\vulkan-sdk-1.1.121.2\" >>${env:GITHUB_ENV}
Invoke-WebRequest -Uri "https://github.com/user-attachments/files/22464296/vulkan_windows_libs_1.4.326.zip" -OutFile vulkan_windows_libs_1.4.326.zip
Expand-Archive -Path vulkan_windows_libs_1.4.326.zip
echo "VULKAN_SDK=$(pwd)\vulkan_windows_libs_1.4.326\" >>${env:GITHUB_ENV}
- name: Fix Projects
shell: powershell
@@ -59,7 +69,7 @@ jobs:
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
g++ -I. -Wall -Wformat -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32
g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -o example_null.exe examples/example_null/main.cpp -L. -limgui
g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -DIMGUI_IMPL_API= -o example_null.exe examples/example_null/main.cpp -L. -limgui
rm -f example_null.exe libimgui.* example_single_file.*
- name: Build example_null (extra warnings, msvc 64-bit)
@@ -104,7 +114,7 @@ jobs:
echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp
cl.exe /D_USRDLL /D_WINDLL /I. example_single_file.cpp /LD /FeImGui.dll /link
cl.exe /DIMGUI_API=__declspec(dllimport) /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
cl.exe /DIMGUI_API=__declspec(dllimport) -DIMGUI_IMPL_API= /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
# Win64 examples are more frequently compilted than the Win32 examples.
# More of the Win32 examples requires 'workflow_run' to reduce waste.
@@ -255,10 +265,18 @@ jobs:
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
Linux:
Build-Linux:
runs-on: ubuntu-latest
name: Build - Linux
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
- name: Install Dependencies
run: |
@@ -325,7 +343,7 @@ jobs:
EOF
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
- name: Build example_null (with large ImDrawIdx + pointer ImTextureID)
- name: Build example_null (with large ImDrawIdx + custom ImTextureID)
run: |
cat > example_single_file.cpp <<'EOF'
@@ -338,6 +356,21 @@ jobs:
EOF
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
cat > example_single_file.cpp <<'EOF'
// Test build ImTextureID defined as a struct
struct SomeType { int a = 0; int b = 0; };
#define ImTextureID SomeType
#define ImTextureID_Invalid SomeType()
inline bool operator==(const SomeType& lhs, const SomeType& rhs) { return lhs.a == rhs.a && lhs.b == rhs.b; }
inline bool operator!=(const SomeType& lhs, const SomeType& rhs) { return lhs.a != rhs.a || lhs.b != rhs.b; }
#define IMGUI_IMPLEMENTATION
#include "misc/single_file/imgui_single_file.h"
#include "examples/example_null/main.cpp"
EOF
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
- name: Build example_null (with IMGUI_DISABLE_OBSOLETE_FUNCTIONS)
run: |
cat > example_single_file.cpp <<'EOF'
@@ -472,10 +505,18 @@ jobs:
- name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES
run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp
MacOS:
Build-MacOS:
runs-on: macos-latest
name: Build - MacOS
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
- name: Install Dependencies
run: |
@@ -484,7 +525,7 @@ jobs:
- name: Build example_null (extra warnings, clang 64-bit)
run: make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (single file build)
- name: Build macOS example_null (single file build)
run: |
cat > example_single_file.cpp <<'EOF'
@@ -495,7 +536,7 @@ jobs:
EOF
clang++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
- name: Build example_null (single file build, c++20)
- name: Build macOS example_null (single file build, c++20)
run: |
cat > example_single_file.cpp <<'EOF'
@@ -506,7 +547,7 @@ jobs:
EOF
clang++ -I. -std=c++20 -Wall -Wformat -o example_single_file example_single_file.cpp
- name: Build example_null (without c++ runtime)
- name: Build macOS example_null (without c++ runtime)
run: |
cat > example_single_file.cpp <<'EOF'
@@ -517,49 +558,57 @@ jobs:
EOF
clang++ -I. -std=c++11 -Wall -Wformat -nodefaultlibs -fno-rtti -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
- name: Build example_glfw_opengl2
- name: Build macOS example_glfw_opengl2
run: make -C examples/example_glfw_opengl2
if: github.event_name == 'workflow_run'
- name: Build example_glfw_opengl3
- name: Build macOS example_glfw_opengl3
run: make -C examples/example_glfw_opengl3
if: github.event_name == 'workflow_run'
- name: Build example_glfw_metal
- name: Build macOS example_glfw_metal
run: make -C examples/example_glfw_metal
- name: Build example_sdl2_metal
- name: Build macOS example_sdl2_metal
run: make -C examples/example_sdl2_metal
- name: Build example_sdl2_opengl2
- name: Build macOS example_sdl2_opengl2
run: make -C examples/example_sdl2_opengl2
if: github.event_name == 'workflow_run'
- name: Build example_sdl2_opengl3
- name: Build macOS example_sdl2_opengl3
run: make -C examples/example_sdl2_opengl3
if: github.event_name == 'workflow_run'
- name: Build example_sdl3_opengl3
- name: Build macOS example_sdl3_opengl3
run: make -C examples/example_sdl3_opengl3
- name: Build example_apple_metal
- name: Build macOS example_apple_metal
run: xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_macos
if: github.event_name == 'workflow_run'
- name: Build example_apple_opengl2
- name: Build macOS example_apple_opengl2
run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2
if: github.event_name == 'workflow_run'
Build-iOS:
runs-on: macos-14
name: Build - iOS
iOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build example_apple_metal
run: |
# Code signing is required, but we disable it because it is irrelevant for CI builds.
xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
Emscripten:
Build-Emscripten:
runs-on: ubuntu-latest
name: Build - Emscripten
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install Dependencies
run: |
@@ -597,12 +646,148 @@ jobs:
emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu
cmake --build build
Android:
Build-Android:
runs-on: ubuntu-latest
name: Build - Android
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build example_android_opengl3
run: |
cd examples/example_android_opengl3/android
gradle assembleDebug --stacktrace
Test-Windows:
runs-on: windows-2025
name: Test - Windows
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
env:
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
steps:
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
- uses: actions/checkout@v6
continue-on-error: true
with:
fetch-depth: 1
repository: ocornut/imgui_test_engine
path: ${{ github.workspace }}/imgui_test_engine
submodules: true
- name: Fix Tests Projects
shell: powershell
working-directory: ${{ github.workspace }}/imgui_test_engine
run: |
# WARNING: This will need updating if toolset/sdk change in project files!
gci -recurse -filter "*.vcxproj" | ForEach-Object {
# Fix SDK and toolset for most samples.
(Get-Content $_.FullName) -Replace "<PlatformToolset>v110</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
# Fix SDK and toolset for samples that require newer SDK/toolset. At the moment it is only dx12.
(Get-Content $_.FullName) -Replace "<PlatformToolset>v140</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
}
- name: Build Tests
shell: cmd
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: '"%MSBUILD_PATH%\MSBuild.exe" imgui_test_suite.vcxproj /p:Platform=x64 /p:Configuration=Release /p:ClFlags=/WX -maxcpucount:%NUMBER_OF_PROCESSORS%'
- name: Run Tests
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 tests
- name: Check for Docking
id: check_docking
shell: bash
working-directory: ${{ github.workspace }}/imgui
run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
- name: Run Viewport Tests
if: steps.check_docking.outputs.has_dock == 'true'
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 -viewport-mock viewport
Test-Linux:
runs-on: ubuntu-latest
name: Test - Linux
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
steps:
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
- uses: actions/checkout@v6
with:
fetch-depth: 1
repository: ocornut/imgui_test_engine
path: ${{ github.workspace }}/imgui_test_engine
submodules: true
- name: Build Tests
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: make -j$(nproc)
- name: Run Tests
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests
- name: Check for Docking
id: check_docking
working-directory: ${{ github.workspace }}/imgui
run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
- name: Run Viewport Tests
if: steps.check_docking.outputs.has_dock == 'true'
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport
# Test-MacOS:
# runs-on: macos-latest
# name: Test - MacOS
#
# defaults:
# run:
# working-directory: ${{ github.workspace }}/imgui
#
# steps:
# - uses: actions/checkout@v6
# with:
# path: ${{ github.workspace }}/imgui
#
# - uses: actions/checkout@v6
# with:
# fetch-depth: 1
# repository: ocornut/imgui_test_engine
# path: ${{ github.workspace }}/imgui_test_engine
# submodules: true
#
# - name: Build Tests
# working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
# run: make -j$(nproc)
#
# - name: Run Tests
# working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
# run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests
#
# - name: Check for Docking
# id: check_docking
# working-directory: ${{ github.workspace }}/imgui
# run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
#
# - name: Run Viewport Tests
# if: steps.check_docking.outputs.has_dock == 'true'
# working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
# run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport
@@ -0,0 +1,38 @@
# This is current meant to be run manually, occasionally:
# - Run then zip the contents of vulkanArtifact/ into e.g. vulkan_windows_libs_1.4.326
# - Upload as an attachment to https://github.com/ocornut/imgui/pull/8925 then change filename in build.yml
# - There is a build_windows_vulkan_libs.yml in commit history that we removed thinking this is run so rarely we don't need to pollute CI UI with it.
# Set default vulkan version if none provided
if (-not $env:VULKAN_TAG) { $env:VULKAN_TAG = "1.4.326" }
# Create output folder
mkdir vulkanArtifact
# Download Vulkan Headers
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$($env:VULKAN_TAG).zip" -OutFile Vulkan-Headers-$($env:VULKAN_TAG).zip
Expand-Archive -Path Vulkan-Headers-$($env:VULKAN_TAG).zip
# Copy Vulkan Headers to artifact folder
cp -R Vulkan-Headers-$($env:VULKAN_TAG)\Vulkan-Headers-$($env:VULKAN_TAG)\include vulkanArtifact\Include
# Download Vulkan Loader
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$($env:VULKAN_TAG).zip" -OutFile Vulkan-Loader-$($env:VULKAN_TAG).zip
Expand-Archive -Path Vulkan-Loader-$($env:VULKAN_TAG).zip
# Build Vulkan Loader x64
cmake -S Vulkan-Loader-$($env:VULKAN_TAG)\Vulkan-Loader-$($env:VULKAN_TAG) -B VulkanLoader-build64 -D UPDATE_DEPS=On -A x64
cmake --build VulkanLoader-build64
mkdir vulkanArtifact\Lib
copy VulkanLoader-build64\loader\Debug\vulkan-1.lib vulkanArtifact\Lib
# Build Vulkan Loader win32
cmake -S Vulkan-Loader-$($env:VULKAN_TAG)\Vulkan-Loader-$($env:VULKAN_TAG) -B VulkanLoader-build32 -D UPDATE_DEPS=On -A Win32
cmake --build VulkanLoader-build32
mkdir vulkanArtifact\Lib32
copy VulkanLoader-build32\loader\Debug\vulkan-1.lib vulkanArtifact\Lib32
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
PVS-Studio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1