Skip to content

Commit 3ef1e5c

Browse files
committed
Merge tag 'v1.92.5-docking' of github.com:ocornut/imgui into HEAD
2 parents c21de00 + 3912b3d commit 3ef1e5c

93 files changed

Lines changed: 6556 additions & 1675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
1. PLEASE CAREFULLY READ: [Contributing Guidelines](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md)
44

5-
2. Make sure you're using a special branch just for this pull request. (Sometimes people unknowingly use a default branch, then later update that branch, which updates the pull request with the other changes if it hasn't been merged yet.)
5+
2. **Make sure you're using a special branch just for this pull request**. (In git, 1 PR = 1 branch. If you update the branch the PR will be updated.)
66

7-
3. Clear this template before submitting your PR.
7+
3. Consider running the [imgui_test_suite](https://github.com/ocornut/imgui_test_engine) or adding new tests to test for expected behaviors.
8+
9+
4. Clear this template before submitting your PR.
810

.github/workflows/build.yml

Lines changed: 183 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,24 @@ on:
1616
- requested
1717

1818
jobs:
19-
Windows:
19+
Build-Windows:
2020
runs-on: windows-2025
21+
name: Build - Windows
22+
23+
defaults:
24+
run:
25+
working-directory: ${{ github.workspace }}/imgui
26+
2127
env:
2228
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
2329
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
2430
steps:
25-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v5
32+
with:
33+
path: ${{ github.workspace }}/imgui
2634

35+
# The VulkanSDK libs for Windows is manually generated using build_windows_vulkan_libs.ps1 + attached to issue #8925.
36+
# (we have a .yml workflow in commit history if it becomes ever useful to create this on CI too)
2737
- name: Install Dependencies
2838
shell: powershell
2939
run: |
@@ -35,20 +45,9 @@ jobs:
3545
Expand-Archive -Path SDL3-devel-3.2.18-VC.zip
3646
echo "SDL3_DIR=$(pwd)\SDL3-devel-3.2.18-VC\SDL3-3.2.18\" >>${env:GITHUB_ENV}
3747
38-
# VulkanSDK (retrieve minimal bits of the SDK from git)
39-
$vulkanVersion = "1.4.326"
40-
# 1. Get the vulkan headers, we will treat that folder as the sdk folder to avoid having to copy headers around
41-
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$($vulkanVersion).zip" -OutFile Vulkan-Headers-$($vulkanVersion).zip
42-
Expand-Archive -Path Vulkan-Headers-$($vulkanVersion).zip
43-
echo "VULKAN_SDK=$(pwd)\Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)" >>${env:GITHUB_ENV}
44-
# 2. Get and build the vulkan loader source code (UPDATE_DEPS=On will make it automatically fetch its dependencies)
45-
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$($vulkanVersion).zip" -OutFile Vulkan-Loader-$($vulkanVersion).zip
46-
Expand-Archive -Path Vulkan-Loader-$($vulkanVersion).zip
47-
cmake -S Vulkan-Loader-$($vulkanVersion)\Vulkan-Loader-$($vulkanVersion) -B VulkanLoader-build -D UPDATE_DEPS=On
48-
cmake --build VulkanLoader-build
49-
# 3. Copy the built lib/dll to the expected place
50-
mkdir Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)\Lib
51-
copy VulkanLoader-build\loader\Debug\vulkan-1.* Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)\Lib\
48+
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
49+
Expand-Archive -Path vulkan_windows_libs_1.4.326.zip
50+
echo "VULKAN_SDK=$(pwd)\vulkan_windows_libs_1.4.326\" >>${env:GITHUB_ENV}
5251
5352
- name: Fix Projects
5453
shell: powershell
@@ -70,7 +69,7 @@ jobs:
7069
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
7170
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
7271
g++ -I. -Wall -Wformat -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32
73-
g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -o example_null.exe examples/example_null/main.cpp -L. -limgui
72+
g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -DIMGUI_IMPL_API= -o example_null.exe examples/example_null/main.cpp -L. -limgui
7473
rm -f example_null.exe libimgui.* example_single_file.*
7574
7675
- name: Build example_null (extra warnings, msvc 64-bit)
@@ -115,7 +114,7 @@ jobs:
115114
echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp
116115
117116
cl.exe /D_USRDLL /D_WINDLL /I. example_single_file.cpp /LD /FeImGui.dll /link
118-
cl.exe /DIMGUI_API=__declspec(dllimport) /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
117+
cl.exe /DIMGUI_API=__declspec(dllimport) -DIMGUI_IMPL_API= /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
119118
120119
# Win64 examples are more frequently compilted than the Win32 examples.
121120
# More of the Win32 examples requires 'workflow_run' to reduce waste.
@@ -266,10 +265,18 @@ jobs:
266265
shell: cmd
267266
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
268267

269-
Linux:
268+
Build-Linux:
270269
runs-on: ubuntu-latest
270+
name: Build - Linux
271+
272+
defaults:
273+
run:
274+
working-directory: ${{ github.workspace }}/imgui
275+
271276
steps:
272-
- uses: actions/checkout@v4
277+
- uses: actions/checkout@v5
278+
with:
279+
path: ${{ github.workspace }}/imgui
273280

274281
- name: Install Dependencies
275282
run: |
@@ -483,10 +490,18 @@ jobs:
483490
- name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES
484491
run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp
485492

486-
MacOS:
493+
Build-MacOS:
487494
runs-on: macos-latest
495+
name: Build - MacOS
496+
497+
defaults:
498+
run:
499+
working-directory: ${{ github.workspace }}/imgui
500+
488501
steps:
489-
- uses: actions/checkout@v4
502+
- uses: actions/checkout@v5
503+
with:
504+
path: ${{ github.workspace }}/imgui
490505

491506
- name: Install Dependencies
492507
run: |
@@ -557,20 +572,24 @@ jobs:
557572
- name: Build example_apple_opengl2
558573
run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2
559574

560-
iOS:
575+
Build-iOS:
561576
runs-on: macos-14
577+
name: Build - iOS
578+
562579
steps:
563-
- uses: actions/checkout@v4
580+
- uses: actions/checkout@v5
564581

565582
- name: Build example_apple_metal
566583
run: |
567584
# Code signing is required, but we disable it because it is irrelevant for CI builds.
568585
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
569586
570-
Emscripten:
587+
Build-Emscripten:
571588
runs-on: ubuntu-latest
589+
name: Build - Emscripten
590+
572591
steps:
573-
- uses: actions/checkout@v4
592+
- uses: actions/checkout@v5
574593

575594
- name: Install Dependencies
576595
run: |
@@ -608,12 +627,148 @@ jobs:
608627
emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu
609628
cmake --build build
610629
611-
Android:
630+
Build-Android:
612631
runs-on: ubuntu-latest
632+
name: Build - Android
633+
613634
steps:
614-
- uses: actions/checkout@v4
635+
- uses: actions/checkout@v5
615636

616637
- name: Build example_android_opengl3
617638
run: |
618639
cd examples/example_android_opengl3/android
619640
gradle assembleDebug --stacktrace
641+
642+
Test-Windows:
643+
runs-on: windows-2025
644+
name: Test - Windows
645+
646+
defaults:
647+
run:
648+
working-directory: ${{ github.workspace }}/imgui
649+
650+
env:
651+
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
652+
653+
steps:
654+
- uses: actions/checkout@v5
655+
with:
656+
path: ${{ github.workspace }}/imgui
657+
658+
- uses: actions/checkout@v5
659+
continue-on-error: true
660+
with:
661+
fetch-depth: 1
662+
repository: ocornut/imgui_test_engine
663+
path: ${{ github.workspace }}/imgui_test_engine
664+
submodules: true
665+
666+
- name: Fix Tests Projects
667+
shell: powershell
668+
working-directory: ${{ github.workspace }}/imgui_test_engine
669+
run: |
670+
# WARNING: This will need updating if toolset/sdk change in project files!
671+
gci -recurse -filter "*.vcxproj" | ForEach-Object {
672+
# Fix SDK and toolset for most samples.
673+
(Get-Content $_.FullName) -Replace "<PlatformToolset>v110</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
674+
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
675+
# Fix SDK and toolset for samples that require newer SDK/toolset. At the moment it is only dx12.
676+
(Get-Content $_.FullName) -Replace "<PlatformToolset>v140</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
677+
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
678+
}
679+
680+
- name: Build Tests
681+
shell: cmd
682+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
683+
run: '"%MSBUILD_PATH%\MSBuild.exe" imgui_test_suite.vcxproj /p:Platform=x64 /p:Configuration=Release /p:ClFlags=/WX -maxcpucount:%NUMBER_OF_PROCESSORS%'
684+
685+
- name: Run Tests
686+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
687+
run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 tests
688+
689+
- name: Check for Docking
690+
id: check_docking
691+
shell: bash
692+
working-directory: ${{ github.workspace }}/imgui
693+
run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
694+
695+
- name: Run Viewport Tests
696+
if: steps.check_docking.outputs.has_dock == 'true'
697+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
698+
run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 -viewport-mock viewport
699+
700+
Test-Linux:
701+
runs-on: ubuntu-latest
702+
name: Test - Linux
703+
704+
defaults:
705+
run:
706+
working-directory: ${{ github.workspace }}/imgui
707+
708+
steps:
709+
- uses: actions/checkout@v5
710+
with:
711+
path: ${{ github.workspace }}/imgui
712+
713+
- uses: actions/checkout@v5
714+
with:
715+
fetch-depth: 1
716+
repository: ocornut/imgui_test_engine
717+
path: ${{ github.workspace }}/imgui_test_engine
718+
submodules: true
719+
720+
- name: Build Tests
721+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
722+
run: make -j$(nproc)
723+
724+
- name: Run Tests
725+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
726+
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests
727+
728+
- name: Check for Docking
729+
id: check_docking
730+
working-directory: ${{ github.workspace }}/imgui
731+
run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
732+
733+
- name: Run Viewport Tests
734+
if: steps.check_docking.outputs.has_dock == 'true'
735+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
736+
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport
737+
738+
Test-MacOS:
739+
runs-on: macos-latest
740+
name: Test - MacOS
741+
742+
defaults:
743+
run:
744+
working-directory: ${{ github.workspace }}/imgui
745+
746+
steps:
747+
- uses: actions/checkout@v5
748+
with:
749+
path: ${{ github.workspace }}/imgui
750+
751+
- uses: actions/checkout@v5
752+
with:
753+
fetch-depth: 1
754+
repository: ocornut/imgui_test_engine
755+
path: ${{ github.workspace }}/imgui_test_engine
756+
submodules: true
757+
758+
- name: Build Tests
759+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
760+
run: make -j$(nproc)
761+
762+
- name: Run Tests
763+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
764+
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests
765+
766+
- name: Check for Docking
767+
id: check_docking
768+
working-directory: ${{ github.workspace }}/imgui
769+
run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT
770+
771+
- name: Run Viewport Tests
772+
if: steps.check_docking.outputs.has_dock == 'true'
773+
working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite
774+
run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This is current meant to be run manually, occasionally:
2+
# - Run then zip the contents of vulkanArtifact/ into e.g. vulkan_windows_libs_1.4.326
3+
# - Upload as an attachment to https://github.com/ocornut/imgui/pull/8925 then change filename in build.yml
4+
# - 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.
5+
6+
# Set default vulkan version if none provided
7+
if (-not $env:VULKAN_TAG) { $env:VULKAN_TAG = "1.4.326" }
8+
9+
# Create output folder
10+
mkdir vulkanArtifact
11+
12+
# Download Vulkan Headers
13+
14+
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$($env:VULKAN_TAG).zip" -OutFile Vulkan-Headers-$($env:VULKAN_TAG).zip
15+
Expand-Archive -Path Vulkan-Headers-$($env:VULKAN_TAG).zip
16+
17+
# Copy Vulkan Headers to artifact folder
18+
19+
cp -R Vulkan-Headers-$($env:VULKAN_TAG)\Vulkan-Headers-$($env:VULKAN_TAG)\include vulkanArtifact\Include
20+
21+
# Download Vulkan Loader
22+
23+
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$($env:VULKAN_TAG).zip" -OutFile Vulkan-Loader-$($env:VULKAN_TAG).zip
24+
Expand-Archive -Path Vulkan-Loader-$($env:VULKAN_TAG).zip
25+
26+
# Build Vulkan Loader x64
27+
28+
cmake -S Vulkan-Loader-$($env:VULKAN_TAG)\Vulkan-Loader-$($env:VULKAN_TAG) -B VulkanLoader-build64 -D UPDATE_DEPS=On -A x64
29+
cmake --build VulkanLoader-build64
30+
mkdir vulkanArtifact\Lib
31+
copy VulkanLoader-build64\loader\Debug\vulkan-1.lib vulkanArtifact\Lib
32+
33+
# Build Vulkan Loader win32
34+
35+
cmake -S Vulkan-Loader-$($env:VULKAN_TAG)\Vulkan-Loader-$($env:VULKAN_TAG) -B VulkanLoader-build32 -D UPDATE_DEPS=On -A Win32
36+
cmake --build VulkanLoader-build32
37+
mkdir vulkanArtifact\Lib32
38+
copy VulkanLoader-build32\loader\Debug\vulkan-1.lib vulkanArtifact\Lib32

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ jobs:
4242
fi
4343
cd examples/example_null
4444
pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1
45-
pvs-studio-analyzer analyze --disableLicenseExpirationCheck -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log
45+
pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log
4646
plog-converter -a 'GA:1,2;OP:1' -d V1071 -t errorfile -w pvs-studio.log

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ imgui*.ini
1212
examples/*/Debug/*
1313
examples/*/Release/*
1414
examples/*/x64/*
15+
examples/*.tmp
1516

1617
## Visual Studio artifacts
1718
.vs
@@ -46,6 +47,9 @@ examples/example_glfw_opengl3/web/*
4647
examples/example_glfw_wgpu/web/*
4748
examples/example_glfw_wgpu/external/*
4849
examples/example_sdl2_opengl3/web/*
50+
examples/example_sdl2_wgpu/web/*
51+
examples/example_sdl3_opengl3/web/*
52+
examples/example_sdl3_wgpu/web/*
4953

5054
## JetBrains IDE artifacts
5155
.idea

0 commit comments

Comments
 (0)