summaryrefslogtreecommitdiff
path: root/libs/imgui-1.92.1
diff options
context:
space:
mode:
Diffstat (limited to 'libs/imgui-1.92.1')
-rw-r--r--libs/imgui-1.92.1/.editorconfig28
-rw-r--r--libs/imgui-1.92.1/.gitattributes30
-rw-r--r--libs/imgui-1.92.1/.github/FUNDING.yml1
-rw-r--r--libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/config.yml1
-rw-r--r--libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/issue_template.yml92
-rw-r--r--libs/imgui-1.92.1/.github/pull_request_template.md8
-rw-r--r--libs/imgui-1.92.1/.github/workflows/build.yml559
-rw-r--r--libs/imgui-1.92.1/.github/workflows/manual.yml12
-rw-r--r--libs/imgui-1.92.1/.github/workflows/scheduled.yml15
-rw-r--r--libs/imgui-1.92.1/.github/workflows/static-analysis.yml46
-rw-r--r--libs/imgui-1.92.1/.gitignore74
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_allegro5.cpp670
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_allegro5.h43
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_android.cpp308
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_android.h37
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx10.cpp657
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx10.h48
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx11.cpp677
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx11.h51
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx12.cpp934
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx12.h79
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx9.cpp478
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_dx9.h37
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_glut.cpp309
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_glut.h47
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_metal.h78
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_metal.mm652
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_opengl3.cpp1038
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_opengl3.h68
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_opengl3_loader.h922
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_osx.h54
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_osx.mm832
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdl2.cpp894
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdl2.h50
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdl3.cpp830
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdl3.h47
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.cpp661
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.h52
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3_shaders.h372
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.cpp300
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.h53
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.cpp316
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.h53
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_vulkan.cpp1849
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_vulkan.h223
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_wgpu.cpp910
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_wgpu.h71
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_win32.cpp969
-rw-r--r--libs/imgui-1.92.1/backends/imgui_impl_win32.h53
-rw-r--r--libs/imgui-1.92.1/backends/sdlgpu3/build_instructions.txt40
-rw-r--r--libs/imgui-1.92.1/backends/sdlgpu3/shader.frag15
-rw-r--r--libs/imgui-1.92.1/backends/sdlgpu3/shader.vert24
-rw-r--r--libs/imgui-1.92.1/backends/vulkan/build_instructions.txt4
-rw-r--r--libs/imgui-1.92.1/backends/vulkan/generate_spv.sh6
-rw-r--r--libs/imgui-1.92.1/backends/vulkan/glsl_shader.frag14
-rw-r--r--libs/imgui-1.92.1/backends/vulkan/glsl_shader.vert25
-rw-r--r--libs/imgui-1.92.1/docs/BACKENDS.md378
-rw-r--r--libs/imgui-1.92.1/docs/CHANGELOG.txt7573
-rw-r--r--libs/imgui-1.92.1/docs/CONTRIBUTING.md81
-rw-r--r--libs/imgui-1.92.1/docs/EXAMPLES.md236
-rw-r--r--libs/imgui-1.92.1/docs/FAQ.md768
-rw-r--r--libs/imgui-1.92.1/docs/FONTS.md605
-rw-r--r--libs/imgui-1.92.1/docs/README.md222
-rw-r--r--libs/imgui-1.92.1/docs/TODO.txt329
-rw-r--r--libs/imgui-1.92.1/examples/README.txt9
-rw-r--r--libs/imgui-1.92.1/examples/example_allegro5/README.md36
-rw-r--r--libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj185
-rw-r--r--libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj.filters61
-rw-r--r--libs/imgui-1.92.1/examples/example_allegro5/imconfig_allegro5.h11
-rw-r--r--libs/imgui-1.92.1/examples/example_allegro5/main.cpp149
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/CMakeLists.txt40
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore12
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle46
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml24
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt40
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle24
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle1
-rw-r--r--libs/imgui-1.92.1/examples/example_android_opengl3/main.cpp382
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/Makefile21
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/README.md10
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj522
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/iOS/Info-iOS.plist49
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/iOS/LaunchScreen.storyboard27
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/macOS/Info-macOS.plist30
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/macOS/MainMenu.storyboard93
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_metal/main.mm348
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_opengl2/Makefile21
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj332
-rw-r--r--libs/imgui-1.92.1/examples/example_apple_opengl2/main.mm256
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_metal/Makefile46
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_metal/main.mm177
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl2/Makefile81
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl2/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj186
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl2/main.cpp171
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile89
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile.emscripten95
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj187
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters67
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_opengl3/main.cpp214
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/CMakeLists.txt47
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/Makefile83
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win32.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win64.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj190
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_vulkan/main.cpp534
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_wgpu/CMakeLists.txt117
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_wgpu/Makefile.emscripten92
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_wgpu/README.md24
-rw-r--r--libs/imgui-1.92.1/examples/example_glfw_wgpu/main.cpp350
-rw-r--r--libs/imgui-1.92.1/examples/example_glut_opengl2/Makefile75
-rw-r--r--libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj186
-rw-r--r--libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_glut_opengl2/main.cpp164
-rw-r--r--libs/imgui-1.92.1/examples/example_null/Makefile92
-rw-r--r--libs/imgui-1.92.1/examples/example_null/build_win32.bat3
-rw-r--r--libs/imgui-1.92.1/examples/example_null/main.cpp38
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_directx11/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj187
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters63
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_directx11/main.cpp259
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_metal/Makefile47
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_metal/main.mm189
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/Makefile79
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/README.md29
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj186
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl2/main.cpp188
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile91
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile.emscripten95
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/README.md57
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj187
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters67
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_opengl3/main.cpp238
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/Makefile79
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/README.md25
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj187
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/main.cpp189
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/Makefile80
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win32.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win64.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj190
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl2_vulkan/main.cpp555
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile85
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile.emscripten99
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/README.md40
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win32.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win64.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj187
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters67
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_opengl3/main.cpp232
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/Makefile73
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/build_win64.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj189
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj.filters60
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/main.cpp227
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/Makefile74
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj186
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/main.cpp194
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/Makefile77
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win32.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win64.bat14
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj190
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_sdl3_vulkan/main.cpp558
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx10/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj176
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters63
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx10/main.cpp279
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx11/build_win32.bat9
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj175
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters63
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx11/main.cpp282
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx12/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj180
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters65
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx12/main.cpp547
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx9/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj176
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_directx9/main.cpp272
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_opengl3/build_mingw.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_opengl3/build_win32.bat8
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj176
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters64
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_opengl3/main.cpp243
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_vulkan/build_win32.bat9
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_vulkan/build_win64.bat9
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj178
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj.filters63
-rw-r--r--libs/imgui-1.92.1/examples/example_win32_vulkan/main.cpp559
-rw-r--r--libs/imgui-1.92.1/examples/imgui_examples.sln201
-rw-r--r--libs/imgui-1.92.1/examples/libs/emscripten/emscripten_mainloop_stub.h38
-rw-r--r--libs/imgui-1.92.1/examples/libs/emscripten/shell_minimal.html65
-rw-r--r--libs/imgui-1.92.1/examples/libs/glfw/COPYING.txt22
-rw-r--r--libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3.h4227
-rw-r--r--libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3native.h456
-rw-r--r--libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-32/glfw3.libbin187376 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-64/glfw3.libbin291120 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/examples/libs/usynergy/README.txt8
-rw-r--r--libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.c636
-rw-r--r--libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.h420
-rw-r--r--libs/imgui-1.92.1/misc/fonts/Cousine-Regular.ttfbin43912 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/DroidSans.ttfbin190044 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/Karla-Regular.ttfbin16848 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/ProggyClean.ttfbin41208 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/ProggyTiny.ttfbin35656 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/Roboto-Medium.ttfbin162588 -> 0 bytes
-rw-r--r--libs/imgui-1.92.1/misc/fonts/binary_to_compressed_c.cpp424
-rw-r--r--libs/imgui-1.92.1/misc/freetype/README.md54
-rw-r--r--libs/imgui-1.92.1/misc/freetype/imgui_freetype.cpp751
-rw-r--r--libs/imgui-1.92.1/misc/freetype/imgui_freetype.h83
222 files changed, 0 insertions, 50521 deletions
diff --git a/libs/imgui-1.92.1/.editorconfig b/libs/imgui-1.92.1/.editorconfig
deleted file mode 100644
index 5adfefa..0000000
--- a/libs/imgui-1.92.1/.editorconfig
+++ /dev/null
@@ -1,28 +0,0 @@
-# See http://editorconfig.org to read about the EditorConfig format.
-# - In theory automatically supported by VS2017+ and most common IDE or text editors.
-# - In practice VS2019-VS2022 stills don't trim trailing whitespaces correctly :(
-# - Suggest installing this to trim whitespaces:
-# GitHub https://github.com/madskristensen/TrailingWhitespace
-# VS2019 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer
-# VS2022 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespace64
-# (in spite of its name doesn't only visualize but also trims)
-# - Alternative for older VS2010 to VS2015: https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig
-
-# top-most EditorConfig file
-root = true
-
-# Default settings:
-# Use 4 spaces as indentation
-[*]
-indent_style = space
-indent_size = 4
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[imstb_*]
-indent_size = 3
-trim_trailing_whitespace = false
-
-[Makefile]
-indent_style = tab
-indent_size = 4
diff --git a/libs/imgui-1.92.1/.gitattributes b/libs/imgui-1.92.1/.gitattributes
deleted file mode 100644
index d48470e..0000000
--- a/libs/imgui-1.92.1/.gitattributes
+++ /dev/null
@@ -1,30 +0,0 @@
-* text=auto
-
-*.c text
-*.cpp text
-*.h text
-*.m text
-*.mm text
-*.md text
-*.txt text
-*.html text
-*.bat text
-*.frag text
-*.vert text
-*.mkb text
-*.icf text
-
-*.sln text eol=crlf
-*.vcxproj text eol=crlf
-*.vcxproj.filters text eol=crlf
-*.natvis text eol=crlf
-
-Makefile text eol=lf
-*.sh text eol=lf
-*.pbxproj text eol=lf
-*.storyboard text eol=lf
-*.plist text eol=lf
-
-*.png binary
-*.ttf binary
-*.lib binary
diff --git a/libs/imgui-1.92.1/.github/FUNDING.yml b/libs/imgui-1.92.1/.github/FUNDING.yml
deleted file mode 100644
index df7d709..0000000
--- a/libs/imgui-1.92.1/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-custom: ['https://github.com/ocornut/imgui/wiki/Funding']
diff --git a/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/config.yml b/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index 3ba13e0..0000000
--- a/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1 +0,0 @@
-blank_issues_enabled: false
diff --git a/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/issue_template.yml b/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/issue_template.yml
deleted file mode 100644
index 6ed6249..0000000
--- a/libs/imgui-1.92.1/.github/ISSUE_TEMPLATE/issue_template.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-name: "Ask a question, report a bug, request a feature, etc."
-description: "Ask any question, discuss best practices, report a bug, request a feature."
-body:
- - type: markdown
- attributes:
- value: |
- FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions)
- For anything else: **we are happy to use 'GitHub Issues' for many types of open-ended questions**. We are encouraging 'Issues' becoming a large, centralized, tagged, cross-referenced database of Dear ImGui contents.
-
- Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users.
-
- **If you are using Dear ImGui as part of a job that you are being well-paid for** and your company is not a sponsor. Please be mindful that this is a Free Software and you might be about to ask volunteers to help you doing your job. Please put extra effort describing your issue or question properly. If your company is wealthy, please read [Funding](https://github.com/ocornut/imgui/wiki/Funding) and consider getting in touch.
- - type: markdown
- attributes:
- value: |
- **Prerequisites:**
- - I have read [Frequently Asked Questions](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md).
- - I have read [Contributing Guidelines -> General Advices](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md#getting-started--general-advice).
- - I have read [Contributing Guidelines -> How to open an Issue](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md#how-to-open-an-issue).
- - I have searched [Github Issues and PR](https://github.com/ocornut/imgui/issues?q=) for discussion of similar topics.
-
- ----
- - type: input
- id: specs_version
- attributes:
- label: "Version/Branch of Dear ImGui:"
- description: "(please specify if you have made substantial modifications to your copy)"
- value: "Version 1.XX, Branch: XXX (master/docking/etc.)"
- placeholder: "Version 1.XX, Branch: XXX (master/docking/etc.)"
- validations:
- required: true
- - type: input
- id: specs_backend
- attributes:
- label: "Back-ends:"
- description: (or specify when using custom engine/back-ends)
- value: "imgui_impl_XXX.cpp + imgui_impl_XXX.cpp"
- placeholder: "imgui_impl_XXX.cpp + imgui_impl_XXX.cpp or n/a"
- validations:
- required: true
- - type: input
- id: specs_compiler_os
- attributes:
- label: "Compiler, OS:"
- placeholder: "e.g. Windows 11 + MSVC 2022, macOS + Clang 12, Linux + GCC etc."
- validations:
- required: true
- - type: textarea
- id: specs_full
- attributes:
- label: "Full config/build information:"
- placeholder: |
- (If you can run, you may go to 'Demo->Tools->About Dear ImGui->Config/Build Info' to obtain detailed information that you can paste here)
- validations:
- required: false
- - type: textarea
- id: issue_description
- attributes:
- label: "Details:"
- description: "Try to be explicit with your goals, your expectations and what you have tried. Be mindful of [The XY Problem](https://xyproblem.info). What you have in mind or in your code is not obvious to other people. People frequently discuss problems and suggest incorrect solutions without first clarifying their goals. When requesting a new feature, please describe the usage context (how you intend to use it, why you need it, etc.). If you tried something and it failed, show us what you tried. If you are reporting a bug, explain what's the bug, how does it occur, etc. If you are reporting a crash, please include a debugger callstack."
- value: |
- **My Issue/Question:**
-
- XXX _(please provide as much context as possible)_
- validations:
- required: true
- - type: textarea
- id: screenshots
- attributes:
- label: "Screenshots/Video:"
- description: "Attach screenshots or gif/videos to clarify the context. They often convey useful information that is omitted by the description."
- placeholder: "(You can drag files here)"
- validations:
- required: false
- - type: textarea
- id: repro_code
- attributes:
- label: "Minimal, Complete and Verifiable Example code:"
- description: "Provide an [MCVE](https://stackoverflow.com/help/mcve) to demonstrate your problem. An ideal submission includes a small piece of code that anyone can paste into one of the examples applications (examples/*/main.cpp) or the demo (imgui_demo.cpp) to understand and reproduce it. Narrowing your problem to its shortest and purest form is the easiest way to understand it, explain it and fix it. Please test your shortened code to ensure it exhibits the problem. Often while creating the MCVE you will solve the problem! Many questions that are missing a standalone verifiable example are missing the actual cause of their issue in the description, which ends up wasting everyone's time."
- value: |
- ```cpp
- // Here's some code anyone can copy and paste to reproduce your issue
- ImGui::Begin("Example Bug");
- MoreCodeToExplainMyIssue();
- ImGui::End();
- ```
- validations:
- required: false
- - type: markdown
- attributes:
- value: |
- Thank you for taking the time to read prerequisites, filling this template and double-checking your message and your code!
diff --git a/libs/imgui-1.92.1/.github/pull_request_template.md b/libs/imgui-1.92.1/.github/pull_request_template.md
deleted file mode 100644
index 796ec0b..0000000
--- a/libs/imgui-1.92.1/.github/pull_request_template.md
+++ /dev/null
@@ -1,8 +0,0 @@
-(Click "Preview" to turn any http URL into a clickable link)
-
-1. PLEASE CAREFULLY READ: [Contributing Guidelines](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md)
-
-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.)
-
-3. Clear this template before submitting your PR.
-
diff --git a/libs/imgui-1.92.1/.github/workflows/build.yml b/libs/imgui-1.92.1/.github/workflows/build.yml
deleted file mode 100644
index 95bcf3e..0000000
--- a/libs/imgui-1.92.1/.github/workflows/build.yml
+++ /dev/null
@@ -1,559 +0,0 @@
-name: build
-
-on:
- push:
- pull_request:
- workflow_run:
- # Use a workflow as a trigger of scheduled builds. Forked repositories can disable scheduled builds by disabling
- # "scheduled" workflow, while maintaining ability to perform local CI builds.
- workflows:
- - scheduled
- - manual
- branches:
- - master
- - docking
- types:
- - requested
-
-jobs:
- Windows:
- runs-on: windows-2025
- 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
-
- - name: Install Dependencies
- shell: powershell
- run: |
- Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.26.3-VC.zip" -OutFile "SDL2-devel-2.26.3-VC.zip"
- Expand-Archive -Path SDL2-devel-2.26.3-VC.zip
- echo "SDL2_DIR=$(pwd)\SDL2-devel-2.26.3-VC\SDL2-2.26.3\" >>${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}
-
- - name: Fix Projects
- shell: powershell
- run: |
- # CI workers do not supporter older Visual Studio versions. Fix projects to target newer available version.
- gci -recurse -filter "*.vcxproj" | ForEach-Object {
- (Get-Content $_.FullName) -Replace "<PlatformToolset>v\d{3}</PlatformToolset>","<PlatformToolset>v143</PlatformToolset>" | Set-Content -Path $_.FullName
- (Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>[\d\.]+</WindowsTargetPlatformVersion>",'<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>' | Set-Content -Path $_.FullName
- }
-
- # Not using matrix here because it would inflate job count too much. Check out and setup is done for every job and that makes build times way too long.
- - name: Build example_null (extra warnings, mingw 64-bit)
- run: mingw32-make -C examples/example_null WITH_EXTRA_WARNINGS=1
-
- - name: Build example_null (mingw 64-bit, as DLL)
- shell: bash
- run: |
- echo '#define IMGUI_API __declspec(dllexport)' > example_single_file.cpp
- 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
- rm -f example_null.exe libimgui.* example_single_file.*
-
- - name: Build example_null (extra warnings, msvc 64-bit)
- shell: cmd
- run: |
- cd examples\example_null
- call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
- .\build_win32.bat /W4
-
- - name: Build example_null (single file build)
- shell: bash
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- EOF
- g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
-
- - name: Build example_null (with IMGUI_DISABLE_WIN32_FUNCTIONS)
- shell: bash
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_DISABLE_WIN32_FUNCTIONS
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- EOF
- g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
-
- - name: Build example_null (as DLL)
- shell: cmd
- run: |
- call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
-
- echo #define IMGUI_API __declspec(dllexport) > example_single_file.cpp
- echo #define IMGUI_IMPLEMENTATION >> example_single_file.cpp
- 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
-
- - name: Build Win32 example_glfw_opengl2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
-
- - name: Build Win32 example_glfw_opengl3
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_glfw_vulkan
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_sdl2_sdlrenderer2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_sdl2_vulkan
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_sdl2_opengl2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_sdl2_opengl3
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
-
- - name: Build Win32 example_sdl2_directx11
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build Win32 example_win32_directx9
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx9/example_win32_directx9.vcxproj /p:Platform=Win32 /p:Configuration=Release'
-
- - name: Build Win32 example_win32_directx10
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx10/example_win32_directx10.vcxproj /p:Platform=Win32 /p:Configuration=Release'
-
- - name: Build Win32 example_win32_directx11
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx11/example_win32_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_glfw_opengl2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_glfw_opengl3
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
-
- - name: Build x64 example_glfw_vulkan
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
-
- - name: Build x64 example_sdl2_sdlrenderer2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_sdl2_vulkan
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_sdl2_opengl2
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_sdl2_opengl3
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_sdl2_directx11
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
-
- - name: Build x64 example_win32_directx9
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx9/example_win32_directx9.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_win32_directx10
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx10/example_win32_directx10.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_win32_directx11
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx11/example_win32_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
- if: github.event_name == 'workflow_run'
-
- - name: Build x64 example_win32_directx12
- shell: cmd
- run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
-
- Linux:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Dependencies
- run: |
- sudo apt-get update
- sudo apt-get install -y libglfw3-dev libsdl2-dev gcc-multilib g++-multilib libfreetype6-dev libvulkan-dev
-
- - name: Build example_null (extra warnings, gcc 32-bit)
- run: |
- make -C examples/example_null clean
- CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
-
- - name: Build example_null (extra warnings, gcc 64-bit)
- run: |
- make -C examples/example_null clean
- CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
-
- - name: Build example_null (extra warnings, clang 32-bit)
- run: |
- make -C examples/example_null clean
- CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
-
- - name: Build example_null (extra warnings, clang 64-bit)
- run: |
- make -C examples/example_null clean
- CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
-
- - name: Build example_null (extra warnings, empty IM_ASSERT)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IM_ASSERT(x)
- #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 -Wextra -Werror -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros -Wno-empty-body -o example_single_file example_single_file.cpp
-
- - name: Build example_null (freetype)
- run: |
- make -C examples/example_null clean
- make -C examples/example_null WITH_FREETYPE=1
-
- - name: Build example_null (single file build)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #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 ImWchar32)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_USE_WCHAR32
- #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 large ImDrawIdx + pointer ImTextureID)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define ImTextureID void*
- #define ImDrawIdx unsigned int
- #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'
-
- #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- #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_KEYIO)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_DISABLE_OBSOLETE_KEYIO
- #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 C++20)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_DISABLE_OBSOLETE_KEYIO
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- EOF
- g++ -I. -std=c++20 -Wall -Wformat -o example_single_file example_single_file.cpp
-
- - name: Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_DEBUG_TOOLS)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_DISABLE_DEMO_WINDOWS
- #define IMGUI_DISABLE_DEBUG_TOOLS
- #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_FILE_FUNCTIONS)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_DISABLE_FILE_FUNCTIONS
- #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_USE_BGRA_PACKED_COLOR)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_USE_BGRA_PACKED_COLOR
- #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 IM_VEC2_CLASS_EXTRA and IM_VEC4_CLASS_EXTRA)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- struct MyVec2 { float x; float y; MyVec2(float x, float y) : x(x), y(y) { } };
- struct MyVec4 { float x; float y; float z; float w;
- MyVec4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { } };
- #define IM_VEC2_CLASS_EXTRA \
- ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
- operator MyVec2() const { return MyVec2(x, y); }
- #define IM_VEC4_CLASS_EXTRA \
- ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
- operator MyVec4() const { return MyVec4(x, y, z, w); }
- #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 (C++26, Clang)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #define IMGUI_DISABLE_DEMO_WINDOWS
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- EOF
- clang++ -I. -std=c++26 -Wall -Wformat -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
-
- - name: Build example_null (without c++ runtime, Clang)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #define IMGUI_DISABLE_DEMO_WINDOWS
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- 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
- run: make -C examples/example_glfw_opengl2
-
- - name: Build example_glfw_opengl3
- run: make -C examples/example_glfw_opengl3
- if: github.event_name == 'workflow_run'
-
- - name: Build example_sdl2_opengl2
- run: make -C examples/example_sdl2_opengl2
- if: github.event_name == 'workflow_run'
-
- - name: Build example_sdl2_opengl3
- run: make -C examples/example_sdl2_opengl3
-
- - 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:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Dependencies
- run: |
- brew install glfw3 sdl2
-
- - 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)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- 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)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- EOF
- clang++ -I. -std=c++20 -Wall -Wformat -o example_single_file example_single_file.cpp
-
- - name: Build example_null (without c++ runtime)
- run: |
- cat > example_single_file.cpp <<'EOF'
-
- #define IMGUI_IMPLEMENTATION
- #include "misc/single_file/imgui_single_file.h"
- #include "examples/example_null/main.cpp"
-
- 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
- run: make -C examples/example_glfw_opengl2
-
- - name: Build example_glfw_opengl3
- run: make -C examples/example_glfw_opengl3
- if: github.event_name == 'workflow_run'
-
- - name: Build example_glfw_metal
- run: make -C examples/example_glfw_metal
-
- - name: Build example_sdl2_metal
- run: make -C examples/example_sdl2_metal
-
- - name: Build example_sdl2_opengl2
- run: make -C examples/example_sdl2_opengl2
- if: github.event_name == 'workflow_run'
-
- - name: Build example_sdl2_opengl3
- run: make -C examples/example_sdl2_opengl3
-
- - name: Build example_apple_metal
- run: xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_macos
-
- - name: Build example_apple_opengl2
- run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2
-
- iOS:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
-
- - 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:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Dependencies
- run: |
- wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
- tar -xvf master.tar.gz
- emsdk-master/emsdk update
- emsdk-master/emsdk install latest
- emsdk-master/emsdk activate latest
- sudo apt-get install build-essential
-
- - name: Build example_sdl2_opengl3 with Emscripten
- run: |
- pushd emsdk-master
- source ./emsdk_env.sh
- popd
- make -C examples/example_sdl2_opengl3 -f Makefile.emscripten
-
- # This build compiles example_glfw_wgpu using Makefile.emscripten and Emscripten GLFW built-in implementation (-sUSE_GLFW=3)
- # This ensures 2 things: the make build works, and the GLFW built-in implementation is tested
- - name: Build example_glfw_wgpu with Emscripten/Makefile
- run: |
- pushd emsdk-master
- source ./emsdk_env.sh
- popd
- make -C examples/example_glfw_wgpu -f Makefile.emscripten
-
- # This build compiles example_glfw_wgpu using CMakeLists.txt and Emscripten GLFW contrib port (--use-port=contrib.glfw3)
- # This ensures 2 things: the CMake build works, and the GLFW contrib port is tested
- - name: Build example_glfw_wgpu with Emscripten/CMake
- run: |
- pushd emsdk-master
- source ./emsdk_env.sh
- popd
- emcc -v
- emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu
- cmake --build build
-
- Android:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Build example_android_opengl3
- run: |
- cd examples/example_android_opengl3/android
- gradle assembleDebug --stacktrace
diff --git a/libs/imgui-1.92.1/.github/workflows/manual.yml b/libs/imgui-1.92.1/.github/workflows/manual.yml
deleted file mode 100644
index 3c472f1..0000000
--- a/libs/imgui-1.92.1/.github/workflows/manual.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This is a dummy workflow used to trigger full builds manually.
-#
-name: manual
-
-on: workflow_dispatch
-
-jobs:
- manual:
- runs-on: ubuntu-latest
- steps:
- - run: exit 0
diff --git a/libs/imgui-1.92.1/.github/workflows/scheduled.yml b/libs/imgui-1.92.1/.github/workflows/scheduled.yml
deleted file mode 100644
index 2a08578..0000000
--- a/libs/imgui-1.92.1/.github/workflows/scheduled.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# This is a dummy workflow used to trigger scheduled builds. Forked repositories most likely should disable this
-# workflow to avoid daily builds of inactive repositories.
-#
-name: scheduled
-
-on:
- schedule:
- - cron: '0 9 * * *'
-
-jobs:
- scheduled:
- runs-on: ubuntu-latest
- steps:
- - run: exit 0
diff --git a/libs/imgui-1.92.1/.github/workflows/static-analysis.yml b/libs/imgui-1.92.1/.github/workflows/static-analysis.yml
deleted file mode 100644
index 53db047..0000000
--- a/libs/imgui-1.92.1/.github/workflows/static-analysis.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-name: static-analysis
-
-on:
- workflow_run:
- # Perform static analysis together with build workflow. Build triggers of "build" workflow do not need to be repeated here.
- workflows:
- - build
- types:
- - requested
-
-jobs:
- PVS-Studio:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 1
-
- - name: Install Dependencies
- env:
- # The Secret variable setup in GitHub must be in format: "name_or_email key", on a single line
- PVS_STUDIO_LICENSE: ${{ secrets.PVS_STUDIO_LICENSE }}
- run: |
- if [[ "$PVS_STUDIO_LICENSE" != "" ]];
- then
- wget -q https://files.viva64.com/etc/pubkey.txt
- sudo apt-key add pubkey.txt
- sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list
- sudo apt-get update
- sudo apt-get install -y pvs-studio
- pvs-studio-analyzer credentials -o pvs-studio.lic $PVS_STUDIO_LICENSE
- fi
-
- - name: PVS-Studio static analysis
- run: |
- if [[ ! -f pvs-studio.lic ]];
- then
- echo "PVS Studio license is missing. No analysis will be performed."
- echo "If you have a PVS Studio license please create a project secret named PVS_STUDIO_LICENSE with your license."
- echo "You may use a free license. More information at https://www.viva64.com/en/b/0457/"
- exit 0
- fi
- cd examples/example_null
- pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1
- pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log
- plog-converter -a 'GA:1,2;OP:1' -d V1071 -t errorfile -w pvs-studio.log
diff --git a/libs/imgui-1.92.1/.gitignore b/libs/imgui-1.92.1/.gitignore
deleted file mode 100644
index 6f6c50c..0000000
--- a/libs/imgui-1.92.1/.gitignore
+++ /dev/null
@@ -1,74 +0,0 @@
-## OSX artifacts
-.DS_Store
-
-## Dear ImGui artifacts
-imgui.ini
-imgui*.ini
-
-## General build artifacts
-*.o
-*.obj
-*.exe
-examples/*/Debug/*
-examples/*/Release/*
-examples/*/x64/*
-
-## Visual Studio artifacts
-.vs
-ipch
-*.opensdf
-*.log
-*.pdb
-*.ilk
-*.user
-*.sdf
-*.suo
-*.VC.db
-*.VC.VC.opendb
-
-## Getting files created in JSON/Schemas/Catalog/ from a VS2022 update
-JSON/
-
-## Commonly used CMake directories & CMake CPM cache
-build*/
-.cache
-
-## Xcode & macOS artifacts
-project.xcworkspace
-xcuserdata
-examples/*/*.dSYM
-
-## Emscripten artifacts
-examples/*.o.tmp
-examples/*.out.js
-examples/*.out.wasm
-examples/example_glfw_opengl3/web/*
-examples/example_glfw_wgpu/web/*
-examples/example_glfw_wgpu/external/*
-examples/example_sdl2_opengl3/web/*
-
-## JetBrains IDE artifacts
-.idea
-cmake-build-*
-
-## VS code artifacts
-.vscode
-
-## Unix executables from our example Makefiles
-examples/example_apple_metal/example_apple_metal
-examples/example_apple_opengl2/example_apple_opengl2
-examples/example_glfw_metal/example_glfw_metal
-examples/example_glfw_opengl2/example_glfw_opengl2
-examples/example_glfw_opengl3/example_glfw_opengl3
-examples/example_glfw_vulkan/example_glfw_vulkan
-examples/example_glut_opengl2/example_glut_opengl2
-examples/example_null/example_null
-examples/example_sdl2_metal/example_sdl2_metal
-examples/example_sdl2_opengl2/example_sdl2_opengl2
-examples/example_sdl2_opengl3/example_sdl2_opengl3
-examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2
-examples/example_sdl2_vulkan/example_sdl2_vulkan
-examples/example_sdl3_opengl3/example_sdl3_opengl3
-examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3
-examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3
-examples/example_sdl3_vulkan/example_sdl3_vulkan
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_allegro5.cpp b/libs/imgui-1.92.1/backends/imgui_impl_allegro5.cpp
deleted file mode 100644
index 5cbb893..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_allegro5.cpp
+++ /dev/null
@@ -1,670 +0,0 @@
-// dear imgui: Renderer + Platform Backend for Allegro 5
-// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [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 ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Clipboard support (from Allegro 5.1.12).
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// Missing features or Issues:
-// [ ] Renderer: The renderer is suboptimal as we need to convert vertices manually.
-// [ ] Platform: Missing gamepad support.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-07-07: Fixed texture update broken on some platforms where ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten.
-// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
-// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
-// 2025-01-06: Avoid calling al_set_mouse_cursor() repeatedly since it appears to leak on on X11 (#8256).
-// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
-// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
-// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
-// 2022-11-30: Renderer: Restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-17: Inputs: always calling io.AddKeyModsEvent() next and before key event (not in NewFrame) to fix input queue with very low framerates.
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2021-12-08: Renderer: Fixed mishandling of the ImDrawCmd::IdxOffset field! This is an old bug but it never had an effect until some internal rendering changes in 1.86.
-// 2021-08-17: Calling io.AddFocusEvent() on ALLEGRO_EVENT_DISPLAY_SWITCH_OUT/ALLEGRO_EVENT_DISPLAY_SWITCH_IN events.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-05-19: Renderer: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-02-18: Change blending equation to preserve alpha in output buffer.
-// 2020-08-10: Inputs: Fixed horizontal mouse wheel direction.
-// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
-// 2019-07-21: Inputs: Added mapping for ImGuiKey_KeyPadEnter.
-// 2019-05-11: Inputs: Don't filter character value from ALLEGRO_EVENT_KEY_CHAR before calling AddInputCharacter().
-// 2019-04-30: Renderer: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2018-11-30: Platform: Added touchscreen support.
-// 2018-11-30: Misc: Setting up io.BackendPlatformName/io.BackendRendererName so they can be displayed in the About Window.
-// 2018-06-13: Platform: Added clipboard support (from Allegro 5.1.12).
-// 2018-06-13: Renderer: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-06-13: Renderer: Stopped using al_draw_indexed_prim() as it is buggy in Allegro's DX9 backend.
-// 2018-06-13: Renderer: Backup/restore transform and clipping rectangle.
-// 2018-06-11: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
-// 2018-04-18: Misc: Renamed file from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
-// 2018-04-18: Misc: Added support for 32-bit vertex indices to avoid conversion at runtime. Added imconfig_allegro5.h to enforce 32-bit indices when included from imgui.h.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplAllegro5_RenderDrawData() in the .h file so you can call it yourself.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_allegro5.h"
-#include <stdint.h> // uint64_t
-#include <cstring> // memcpy
-
-// Allegro
-#include <allegro5/allegro.h>
-#include <allegro5/allegro_primitives.h>
-#ifdef _WIN32
-#include <allegro5/allegro_windows.h>
-#endif
-#define ALLEGRO_HAS_CLIPBOARD ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
-#define ALLEGRO_HAS_DRAW_INDEXED_PRIM ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (2 << 16) | ( 5 << 8))) // DX9 implementation of al_draw_indexed_prim() got fixed in Allegro 5.2.5
-
-// Visual Studio warnings
-#ifdef _MSC_VER
-#pragma warning (disable: 4127) // condition expression is constant
-#endif
-
-struct ImDrawVertAllegro
-{
- ImVec2 pos;
- ImVec2 uv;
- ALLEGRO_COLOR col;
-};
-
-// FIXME-OPT: Unfortunately Allegro doesn't support 32-bit packed colors so we have to convert them to 4 float as well..
-// FIXME-OPT: Consider inlining al_map_rgba()?
-// see https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L554
-// and https://github.com/liballeg/allegro5/blob/master/include/allegro5/internal/aintern_pixels.h
-#define DRAW_VERT_IMGUI_TO_ALLEGRO(DST, SRC) { (DST)->pos = (SRC)->pos; (DST)->uv = (SRC)->uv; unsigned char* c = (unsigned char*)&(SRC)->col; (DST)->col = al_map_rgba(c[0], c[1], c[2], c[3]); }
-
-// Allegro Data
-struct ImGui_ImplAllegro5_Data
-{
- ALLEGRO_DISPLAY* Display;
- ALLEGRO_BITMAP* Texture;
- double Time;
- ALLEGRO_MOUSE_CURSOR* MouseCursorInvisible;
- ALLEGRO_VERTEX_DECL* VertexDecl;
- char* ClipboardTextData;
- ImGuiMouseCursor LastCursor;
-
- ImVector<ImDrawVertAllegro> BufVertices;
- ImVector<int> BufIndices;
-
- ImGui_ImplAllegro5_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support is not well tested and probably dysfunctional in this backend.
-static ImGui_ImplAllegro5_Data* ImGui_ImplAllegro5_GetBackendData() { return ImGui::GetCurrentContext() ? (ImGui_ImplAllegro5_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr; }
-
-static void ImGui_ImplAllegro5_SetupRenderState(ImDrawData* draw_data)
-{
- // Setup blending
- al_set_separate_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA, ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA);
-
- // Setup orthographic projection matrix
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
- {
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- ALLEGRO_TRANSFORM transform;
- al_identity_transform(&transform);
- al_use_transform(&transform);
- al_orthographic_transform(&transform, L, T, 1.0f, R, B, -1.0f);
- al_use_projection_transform(&transform);
- }
-}
-
-// Render function.
-void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
-{
- // Avoid rendering when minimized
- if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplAllegro5_UpdateTexture(tex);
-
- // Backup Allegro state that will be modified
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- ALLEGRO_TRANSFORM last_transform = *al_get_current_transform();
- ALLEGRO_TRANSFORM last_projection_transform = *al_get_current_projection_transform();
- int last_clip_x, last_clip_y, last_clip_w, last_clip_h;
- al_get_clipping_rectangle(&last_clip_x, &last_clip_y, &last_clip_w, &last_clip_h);
- int last_blender_op, last_blender_src, last_blender_dst;
- al_get_blender(&last_blender_op, &last_blender_src, &last_blender_dst);
-
- // Setup desired render state
- ImGui_ImplAllegro5_SetupRenderState(draw_data);
-
- // Render command lists
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
-
- ImVector<ImDrawVertAllegro>& vertices = bd->BufVertices;
-#if ALLEGRO_HAS_DRAW_INDEXED_PRIM
- vertices.resize(draw_list->VtxBuffer.Size);
- for (int i = 0; i < draw_list->VtxBuffer.Size; i++)
- {
- const ImDrawVert* src_v = &draw_list->VtxBuffer[i];
- ImDrawVertAllegro* dst_v = &vertices[i];
- DRAW_VERT_IMGUI_TO_ALLEGRO(dst_v, src_v);
- }
- const int* indices = nullptr;
- if (sizeof(ImDrawIdx) == 2)
- {
- // FIXME-OPT: Allegro doesn't support 16-bit indices.
- // You can '#define ImDrawIdx int' in imconfig.h to request Dear ImGui to output 32-bit indices.
- // Otherwise, we convert them from 16-bit to 32-bit at runtime here, which works perfectly but is a little wasteful.
- bd->BufIndices.resize(draw_list->IdxBuffer.Size);
- for (int i = 0; i < draw_list->IdxBuffer.Size; ++i)
- bd->BufIndices[i] = (int)draw_list->IdxBuffer.Data[i];
- indices = bd->BufIndices.Data;
- }
- else if (sizeof(ImDrawIdx) == 4)
- {
- indices = (const int*)draw_list->IdxBuffer.Data;
- }
-#else
- // Allegro's implementation of al_draw_indexed_prim() for DX9 was broken until 5.2.5. Unindex buffers ourselves while converting vertex format.
- vertices.resize(draw_list->IdxBuffer.Size);
- for (int i = 0; i < draw_list->IdxBuffer.Size; i++)
- {
- const ImDrawVert* src_v = &draw_list->VtxBuffer[draw_list->IdxBuffer[i]];
- ImDrawVertAllegro* dst_v = &vertices[i];
- DRAW_VERT_IMGUI_TO_ALLEGRO(dst_v, src_v);
- }
-#endif
-
- // Render command lists
- ImVec2 clip_off = draw_data->DisplayPos;
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplAllegro5_SetupRenderState(draw_data);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min(pcmd->ClipRect.x - clip_off.x, pcmd->ClipRect.y - clip_off.y);
- ImVec2 clip_max(pcmd->ClipRect.z - clip_off.x, pcmd->ClipRect.w - clip_off.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle, Draw
- ALLEGRO_BITMAP* texture = (ALLEGRO_BITMAP*)pcmd->GetTexID();
- al_set_clipping_rectangle(clip_min.x, clip_min.y, clip_max.x - clip_min.x, clip_max.y - clip_min.y);
-#if ALLEGRO_HAS_DRAW_INDEXED_PRIM
- al_draw_indexed_prim(&vertices[0], bd->VertexDecl, texture, &indices[pcmd->IdxOffset], pcmd->ElemCount, ALLEGRO_PRIM_TRIANGLE_LIST);
-#else
- al_draw_prim(&vertices[0], bd->VertexDecl, texture, pcmd->IdxOffset, pcmd->IdxOffset + pcmd->ElemCount, ALLEGRO_PRIM_TRIANGLE_LIST);
-#endif
- }
- }
- }
-
- // Restore modified Allegro state
- al_set_blender(last_blender_op, last_blender_src, last_blender_dst);
- al_set_clipping_rectangle(last_clip_x, last_clip_y, last_clip_w, last_clip_h);
- al_use_transform(&last_transform);
- al_use_projection_transform(&last_projection_transform);
-}
-
-bool ImGui_ImplAllegro5_CreateDeviceObjects()
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
-
- // Create an invisible mouse cursor
- // Because al_hide_mouse_cursor() seems to mess up with the actual inputs..
- ALLEGRO_BITMAP* mouse_cursor = al_create_bitmap(8, 8);
- bd->MouseCursorInvisible = al_create_mouse_cursor(mouse_cursor, 0, 0);
- al_destroy_bitmap(mouse_cursor);
-
- return true;
-}
-
-void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex)
-{
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // Create texture
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- const int new_bitmap_flags = al_get_new_bitmap_flags();
- int new_bitmap_format = al_get_new_bitmap_format();
- al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP | ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
- al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE);
- ALLEGRO_BITMAP* cpu_bitmap = al_create_bitmap(tex->Width, tex->Height);
- al_set_new_bitmap_flags(new_bitmap_flags);
- al_set_new_bitmap_format(new_bitmap_format);
- IM_ASSERT(cpu_bitmap != nullptr && "Backend failed to create texture!");
-
- // Upload pixels
- ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap(cpu_bitmap, al_get_bitmap_format(cpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
- IM_ASSERT(locked_region != nullptr && "Backend failed to create texture!");
- memcpy(locked_region->data, tex->GetPixels(), tex->GetSizeInBytes());
- al_unlock_bitmap(cpu_bitmap);
-
- // Convert software texture to hardware texture.
- ALLEGRO_BITMAP* gpu_bitmap = al_clone_bitmap(cpu_bitmap);
- al_destroy_bitmap(cpu_bitmap);
- IM_ASSERT(gpu_bitmap != nullptr && "Backend failed to create texture!");
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)gpu_bitmap);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- ImTextureRect r = tex->UpdateRect; // Bounding box encompassing all individual updates
- ALLEGRO_BITMAP* gpu_bitmap = (ALLEGRO_BITMAP*)(intptr_t)tex->TexID;
- ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap_region(gpu_bitmap, r.x, r.y, r.w, r.h, al_get_bitmap_format(gpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
- IM_ASSERT(locked_region && "Backend failed to update texture!");
- for (int y = 0; y < r.h; y++)
- memcpy((unsigned char*)locked_region->data + locked_region->pitch * y, tex->GetPixelsAt(r.x, r.y + y), r.w * tex->BytesPerPixel); // dst, src, block pitch
- al_unlock_bitmap(gpu_bitmap);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantDestroy)
- {
- ALLEGRO_BITMAP* backend_tex = (ALLEGRO_BITMAP*)(intptr_t)tex->TexID;
- if (backend_tex)
- al_destroy_bitmap(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- }
-}
-
-void ImGui_ImplAllegro5_InvalidateDeviceObjects()
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- {
- tex->SetStatus(ImTextureStatus_WantDestroy);
- ImGui_ImplAllegro5_UpdateTexture(tex);
- }
-
- // Destroy mouse cursor
- if (bd->MouseCursorInvisible)
- {
- al_destroy_mouse_cursor(bd->MouseCursorInvisible);
- bd->MouseCursorInvisible = nullptr;
- }
-}
-
-#if ALLEGRO_HAS_CLIPBOARD
-static const char* ImGui_ImplAllegro5_GetClipboardText(ImGuiContext*)
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- if (bd->ClipboardTextData)
- al_free(bd->ClipboardTextData);
- bd->ClipboardTextData = al_get_clipboard_text(bd->Display);
- return bd->ClipboardTextData;
-}
-
-static void ImGui_ImplAllegro5_SetClipboardText(ImGuiContext*, const char* text)
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- al_set_clipboard_text(bd->Display, text);
-}
-#endif
-
-// Not static to allow third-party code to use that if they want to (but undocumented)
-ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code);
-ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code)
-{
- switch (key_code)
- {
- case ALLEGRO_KEY_TAB: return ImGuiKey_Tab;
- case ALLEGRO_KEY_LEFT: return ImGuiKey_LeftArrow;
- case ALLEGRO_KEY_RIGHT: return ImGuiKey_RightArrow;
- case ALLEGRO_KEY_UP: return ImGuiKey_UpArrow;
- case ALLEGRO_KEY_DOWN: return ImGuiKey_DownArrow;
- case ALLEGRO_KEY_PGUP: return ImGuiKey_PageUp;
- case ALLEGRO_KEY_PGDN: return ImGuiKey_PageDown;
- case ALLEGRO_KEY_HOME: return ImGuiKey_Home;
- case ALLEGRO_KEY_END: return ImGuiKey_End;
- case ALLEGRO_KEY_INSERT: return ImGuiKey_Insert;
- case ALLEGRO_KEY_DELETE: return ImGuiKey_Delete;
- case ALLEGRO_KEY_BACKSPACE: return ImGuiKey_Backspace;
- case ALLEGRO_KEY_SPACE: return ImGuiKey_Space;
- case ALLEGRO_KEY_ENTER: return ImGuiKey_Enter;
- case ALLEGRO_KEY_ESCAPE: return ImGuiKey_Escape;
- case ALLEGRO_KEY_QUOTE: return ImGuiKey_Apostrophe;
- case ALLEGRO_KEY_COMMA: return ImGuiKey_Comma;
- case ALLEGRO_KEY_MINUS: return ImGuiKey_Minus;
- case ALLEGRO_KEY_FULLSTOP: return ImGuiKey_Period;
- case ALLEGRO_KEY_SLASH: return ImGuiKey_Slash;
- case ALLEGRO_KEY_SEMICOLON: return ImGuiKey_Semicolon;
- case ALLEGRO_KEY_EQUALS: return ImGuiKey_Equal;
- case ALLEGRO_KEY_OPENBRACE: return ImGuiKey_LeftBracket;
- case ALLEGRO_KEY_BACKSLASH: return ImGuiKey_Backslash;
- case ALLEGRO_KEY_CLOSEBRACE: return ImGuiKey_RightBracket;
- case ALLEGRO_KEY_TILDE: return ImGuiKey_GraveAccent;
- case ALLEGRO_KEY_CAPSLOCK: return ImGuiKey_CapsLock;
- case ALLEGRO_KEY_SCROLLLOCK: return ImGuiKey_ScrollLock;
- case ALLEGRO_KEY_NUMLOCK: return ImGuiKey_NumLock;
- case ALLEGRO_KEY_PRINTSCREEN: return ImGuiKey_PrintScreen;
- case ALLEGRO_KEY_PAUSE: return ImGuiKey_Pause;
- case ALLEGRO_KEY_PAD_0: return ImGuiKey_Keypad0;
- case ALLEGRO_KEY_PAD_1: return ImGuiKey_Keypad1;
- case ALLEGRO_KEY_PAD_2: return ImGuiKey_Keypad2;
- case ALLEGRO_KEY_PAD_3: return ImGuiKey_Keypad3;
- case ALLEGRO_KEY_PAD_4: return ImGuiKey_Keypad4;
- case ALLEGRO_KEY_PAD_5: return ImGuiKey_Keypad5;
- case ALLEGRO_KEY_PAD_6: return ImGuiKey_Keypad6;
- case ALLEGRO_KEY_PAD_7: return ImGuiKey_Keypad7;
- case ALLEGRO_KEY_PAD_8: return ImGuiKey_Keypad8;
- case ALLEGRO_KEY_PAD_9: return ImGuiKey_Keypad9;
- case ALLEGRO_KEY_PAD_DELETE: return ImGuiKey_KeypadDecimal;
- case ALLEGRO_KEY_PAD_SLASH: return ImGuiKey_KeypadDivide;
- case ALLEGRO_KEY_PAD_ASTERISK: return ImGuiKey_KeypadMultiply;
- case ALLEGRO_KEY_PAD_MINUS: return ImGuiKey_KeypadSubtract;
- case ALLEGRO_KEY_PAD_PLUS: return ImGuiKey_KeypadAdd;
- case ALLEGRO_KEY_PAD_ENTER: return ImGuiKey_KeypadEnter;
- case ALLEGRO_KEY_PAD_EQUALS: return ImGuiKey_KeypadEqual;
- case ALLEGRO_KEY_LCTRL: return ImGuiKey_LeftCtrl;
- case ALLEGRO_KEY_LSHIFT: return ImGuiKey_LeftShift;
- case ALLEGRO_KEY_ALT: return ImGuiKey_LeftAlt;
- case ALLEGRO_KEY_LWIN: return ImGuiKey_LeftSuper;
- case ALLEGRO_KEY_RCTRL: return ImGuiKey_RightCtrl;
- case ALLEGRO_KEY_RSHIFT: return ImGuiKey_RightShift;
- case ALLEGRO_KEY_ALTGR: return ImGuiKey_RightAlt;
- case ALLEGRO_KEY_RWIN: return ImGuiKey_RightSuper;
- case ALLEGRO_KEY_MENU: return ImGuiKey_Menu;
- case ALLEGRO_KEY_0: return ImGuiKey_0;
- case ALLEGRO_KEY_1: return ImGuiKey_1;
- case ALLEGRO_KEY_2: return ImGuiKey_2;
- case ALLEGRO_KEY_3: return ImGuiKey_3;
- case ALLEGRO_KEY_4: return ImGuiKey_4;
- case ALLEGRO_KEY_5: return ImGuiKey_5;
- case ALLEGRO_KEY_6: return ImGuiKey_6;
- case ALLEGRO_KEY_7: return ImGuiKey_7;
- case ALLEGRO_KEY_8: return ImGuiKey_8;
- case ALLEGRO_KEY_9: return ImGuiKey_9;
- case ALLEGRO_KEY_A: return ImGuiKey_A;
- case ALLEGRO_KEY_B: return ImGuiKey_B;
- case ALLEGRO_KEY_C: return ImGuiKey_C;
- case ALLEGRO_KEY_D: return ImGuiKey_D;
- case ALLEGRO_KEY_E: return ImGuiKey_E;
- case ALLEGRO_KEY_F: return ImGuiKey_F;
- case ALLEGRO_KEY_G: return ImGuiKey_G;
- case ALLEGRO_KEY_H: return ImGuiKey_H;
- case ALLEGRO_KEY_I: return ImGuiKey_I;
- case ALLEGRO_KEY_J: return ImGuiKey_J;
- case ALLEGRO_KEY_K: return ImGuiKey_K;
- case ALLEGRO_KEY_L: return ImGuiKey_L;
- case ALLEGRO_KEY_M: return ImGuiKey_M;
- case ALLEGRO_KEY_N: return ImGuiKey_N;
- case ALLEGRO_KEY_O: return ImGuiKey_O;
- case ALLEGRO_KEY_P: return ImGuiKey_P;
- case ALLEGRO_KEY_Q: return ImGuiKey_Q;
- case ALLEGRO_KEY_R: return ImGuiKey_R;
- case ALLEGRO_KEY_S: return ImGuiKey_S;
- case ALLEGRO_KEY_T: return ImGuiKey_T;
- case ALLEGRO_KEY_U: return ImGuiKey_U;
- case ALLEGRO_KEY_V: return ImGuiKey_V;
- case ALLEGRO_KEY_W: return ImGuiKey_W;
- case ALLEGRO_KEY_X: return ImGuiKey_X;
- case ALLEGRO_KEY_Y: return ImGuiKey_Y;
- case ALLEGRO_KEY_Z: return ImGuiKey_Z;
- case ALLEGRO_KEY_F1: return ImGuiKey_F1;
- case ALLEGRO_KEY_F2: return ImGuiKey_F2;
- case ALLEGRO_KEY_F3: return ImGuiKey_F3;
- case ALLEGRO_KEY_F4: return ImGuiKey_F4;
- case ALLEGRO_KEY_F5: return ImGuiKey_F5;
- case ALLEGRO_KEY_F6: return ImGuiKey_F6;
- case ALLEGRO_KEY_F7: return ImGuiKey_F7;
- case ALLEGRO_KEY_F8: return ImGuiKey_F8;
- case ALLEGRO_KEY_F9: return ImGuiKey_F9;
- case ALLEGRO_KEY_F10: return ImGuiKey_F10;
- case ALLEGRO_KEY_F11: return ImGuiKey_F11;
- case ALLEGRO_KEY_F12: return ImGuiKey_F12;
- default: return ImGuiKey_None;
- }
-}
-
-bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplAllegro5_Data* bd = IM_NEW(ImGui_ImplAllegro5_Data)();
- io.BackendPlatformUserData = (void*)bd;
- io.BackendPlatformName = io.BackendRendererName = "imgui_impl_allegro5";
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- bd->Display = display;
- bd->LastCursor = ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE;
-
- // Create custom vertex declaration.
- // Unfortunately Allegro doesn't support 32-bit packed colors so we have to convert them to 4 floats.
- // We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion.
- ALLEGRO_VERTEX_ELEMENT elems[] =
- {
- { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) },
- { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) },
- { ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) },
- { 0, 0, 0 }
- };
- bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));
-
-#if ALLEGRO_HAS_CLIPBOARD
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Platform_SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
- platform_io.Platform_GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
-#endif
-
- return true;
-}
-
-void ImGui_ImplAllegro5_Shutdown()
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplAllegro5_InvalidateDeviceObjects();
- if (bd->VertexDecl)
- al_destroy_vertex_decl(bd->VertexDecl);
- if (bd->ClipboardTextData)
- al_free(bd->ClipboardTextData);
-
- io.BackendPlatformName = io.BackendRendererName = nullptr;
- io.BackendPlatformUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-// ev->keyboard.modifiers seems always zero so using that...
-static void ImGui_ImplAllegro5_UpdateKeyModifiers()
-{
- ImGuiIO& io = ImGui::GetIO();
- ALLEGRO_KEYBOARD_STATE keys;
- al_get_keyboard_state(&keys);
- io.AddKeyEvent(ImGuiMod_Ctrl, al_key_down(&keys, ALLEGRO_KEY_LCTRL) || al_key_down(&keys, ALLEGRO_KEY_RCTRL));
- io.AddKeyEvent(ImGuiMod_Shift, al_key_down(&keys, ALLEGRO_KEY_LSHIFT) || al_key_down(&keys, ALLEGRO_KEY_RSHIFT));
- io.AddKeyEvent(ImGuiMod_Alt, al_key_down(&keys, ALLEGRO_KEY_ALT) || al_key_down(&keys, ALLEGRO_KEY_ALTGR));
- io.AddKeyEvent(ImGuiMod_Super, al_key_down(&keys, ALLEGRO_KEY_LWIN) || al_key_down(&keys, ALLEGRO_KEY_RWIN));
-}
-
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* ev)
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplAllegro5_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- switch (ev->type)
- {
- case ALLEGRO_EVENT_MOUSE_AXES:
- if (ev->mouse.display == bd->Display)
- {
- io.AddMousePosEvent(ev->mouse.x, ev->mouse.y);
- io.AddMouseWheelEvent(-ev->mouse.dw, ev->mouse.dz);
- }
- return true;
- case ALLEGRO_EVENT_MOUSE_BUTTON_DOWN:
- case ALLEGRO_EVENT_MOUSE_BUTTON_UP:
- if (ev->mouse.display == bd->Display && ev->mouse.button > 0 && ev->mouse.button <= 5)
- io.AddMouseButtonEvent(ev->mouse.button - 1, ev->type == ALLEGRO_EVENT_MOUSE_BUTTON_DOWN);
- return true;
- case ALLEGRO_EVENT_TOUCH_MOVE:
- if (ev->touch.display == bd->Display)
- io.AddMousePosEvent(ev->touch.x, ev->touch.y);
- return true;
- case ALLEGRO_EVENT_TOUCH_BEGIN:
- case ALLEGRO_EVENT_TOUCH_END:
- case ALLEGRO_EVENT_TOUCH_CANCEL:
- if (ev->touch.display == bd->Display && ev->touch.primary)
- io.AddMouseButtonEvent(0, ev->type == ALLEGRO_EVENT_TOUCH_BEGIN);
- return true;
- case ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY:
- if (ev->mouse.display == bd->Display)
- io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
- return true;
- case ALLEGRO_EVENT_KEY_CHAR:
- if (ev->keyboard.display == bd->Display)
- if (ev->keyboard.unichar != 0)
- io.AddInputCharacter((unsigned int)ev->keyboard.unichar);
- return true;
- case ALLEGRO_EVENT_KEY_DOWN:
- case ALLEGRO_EVENT_KEY_UP:
- if (ev->keyboard.display == bd->Display)
- {
- ImGui_ImplAllegro5_UpdateKeyModifiers();
- ImGuiKey key = ImGui_ImplAllegro5_KeyCodeToImGuiKey(ev->keyboard.keycode);
- io.AddKeyEvent(key, (ev->type == ALLEGRO_EVENT_KEY_DOWN));
- io.SetKeyEventNativeData(key, ev->keyboard.keycode, -1); // To support legacy indexing (<1.87 user code)
- }
- return true;
- case ALLEGRO_EVENT_DISPLAY_SWITCH_OUT:
- if (ev->display.source == bd->Display)
- io.AddFocusEvent(false);
- return true;
- case ALLEGRO_EVENT_DISPLAY_SWITCH_IN:
- if (ev->display.source == bd->Display)
- {
- io.AddFocusEvent(true);
-#if defined(ALLEGRO_UNSTABLE)
- al_clear_keyboard_state(bd->Display);
-#endif
- }
- return true;
- }
- return false;
-}
-
-static void ImGui_ImplAllegro5_UpdateMouseCursor()
-{
- ImGuiIO& io = ImGui::GetIO();
- if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
- return;
-
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
-
- // Hide OS mouse cursor if imgui is drawing it
- if (io.MouseDrawCursor)
- imgui_cursor = ImGuiMouseCursor_None;
-
- if (bd->LastCursor == imgui_cursor)
- return;
- bd->LastCursor = imgui_cursor;
- if (imgui_cursor == ImGuiMouseCursor_None)
- {
- al_set_mouse_cursor(bd->Display, bd->MouseCursorInvisible);
- }
- else
- {
- ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT;
- switch (imgui_cursor)
- {
- case ImGuiMouseCursor_TextInput: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT; break;
- case ImGuiMouseCursor_ResizeAll: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE; break;
- case ImGuiMouseCursor_ResizeNS: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N; break;
- case ImGuiMouseCursor_ResizeEW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E; break;
- case ImGuiMouseCursor_ResizeNESW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE; break;
- case ImGuiMouseCursor_ResizeNWSE: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW; break;
- case ImGuiMouseCursor_Wait: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY; break;
- case ImGuiMouseCursor_Progress: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS; break;
- case ImGuiMouseCursor_NotAllowed: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE; break;
- }
- al_set_system_mouse_cursor(bd->Display, cursor_id);
- }
-}
-
-void ImGui_ImplAllegro5_NewFrame()
-{
- ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplAllegro5_Init()?");
-
- if (!bd->MouseCursorInvisible)
- ImGui_ImplAllegro5_CreateDeviceObjects();
-
- // Setup display size (every frame to accommodate for window resizing)
- ImGuiIO& io = ImGui::GetIO();
- int w, h;
- w = al_get_display_width(bd->Display);
- h = al_get_display_height(bd->Display);
- io.DisplaySize = ImVec2((float)w, (float)h);
-
- // Setup time step
- double current_time = al_get_time();
- io.DeltaTime = bd->Time > 0.0 ? (float)(current_time - bd->Time) : (float)(1.0f / 60.0f);
- bd->Time = current_time;
-
- // Setup mouse cursor shape
- ImGui_ImplAllegro5_UpdateMouseCursor();
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_allegro5.h b/libs/imgui-1.92.1/backends/imgui_impl_allegro5.h
deleted file mode 100644
index 421bbf1..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_allegro5.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// dear imgui: Renderer + Platform Backend for Allegro 5
-// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [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 ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Clipboard support (from Allegro 5.1.12).
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// Missing features or Issues:
-// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
-// [ ] Platform: Missing gamepad support.
-
-// 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
-
-struct ALLEGRO_DISPLAY;
-union ALLEGRO_EVENT;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display);
-IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data);
-IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event);
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex);
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_android.cpp b/libs/imgui-1.92.1/backends/imgui_impl_android.cpp
deleted file mode 100644
index a76de1c..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_android.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-// dear imgui: Platform Binding for Android native app
-// This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3)
-
-// Implemented features:
-// [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 AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
-// Missing features or Issues:
-// [ ] Platform: Clipboard support.
-// [ ] Platform: Gamepad support.
-// [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
-// Important:
-// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.
-// - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
-// - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2021-03-04: Initial version.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_android.h"
-#include <time.h>
-#include <android/native_window.h>
-#include <android/input.h>
-#include <android/keycodes.h>
-#include <android/log.h>
-
-// Android data
-static double g_Time = 0.0;
-static ANativeWindow* g_Window;
-static char g_LogTag[] = "ImGuiExample";
-
-static ImGuiKey ImGui_ImplAndroid_KeyCodeToImGuiKey(int32_t key_code)
-{
- switch (key_code)
- {
- case AKEYCODE_TAB: return ImGuiKey_Tab;
- case AKEYCODE_DPAD_LEFT: return ImGuiKey_LeftArrow;
- case AKEYCODE_DPAD_RIGHT: return ImGuiKey_RightArrow;
- case AKEYCODE_DPAD_UP: return ImGuiKey_UpArrow;
- case AKEYCODE_DPAD_DOWN: return ImGuiKey_DownArrow;
- case AKEYCODE_PAGE_UP: return ImGuiKey_PageUp;
- case AKEYCODE_PAGE_DOWN: return ImGuiKey_PageDown;
- case AKEYCODE_MOVE_HOME: return ImGuiKey_Home;
- case AKEYCODE_MOVE_END: return ImGuiKey_End;
- case AKEYCODE_INSERT: return ImGuiKey_Insert;
- case AKEYCODE_FORWARD_DEL: return ImGuiKey_Delete;
- case AKEYCODE_DEL: return ImGuiKey_Backspace;
- case AKEYCODE_SPACE: return ImGuiKey_Space;
- case AKEYCODE_ENTER: return ImGuiKey_Enter;
- case AKEYCODE_ESCAPE: return ImGuiKey_Escape;
- case AKEYCODE_APOSTROPHE: return ImGuiKey_Apostrophe;
- case AKEYCODE_COMMA: return ImGuiKey_Comma;
- case AKEYCODE_MINUS: return ImGuiKey_Minus;
- case AKEYCODE_PERIOD: return ImGuiKey_Period;
- case AKEYCODE_SLASH: return ImGuiKey_Slash;
- case AKEYCODE_SEMICOLON: return ImGuiKey_Semicolon;
- case AKEYCODE_EQUALS: return ImGuiKey_Equal;
- case AKEYCODE_LEFT_BRACKET: return ImGuiKey_LeftBracket;
- case AKEYCODE_BACKSLASH: return ImGuiKey_Backslash;
- case AKEYCODE_RIGHT_BRACKET: return ImGuiKey_RightBracket;
- case AKEYCODE_GRAVE: return ImGuiKey_GraveAccent;
- case AKEYCODE_CAPS_LOCK: return ImGuiKey_CapsLock;
- case AKEYCODE_SCROLL_LOCK: return ImGuiKey_ScrollLock;
- case AKEYCODE_NUM_LOCK: return ImGuiKey_NumLock;
- case AKEYCODE_SYSRQ: return ImGuiKey_PrintScreen;
- case AKEYCODE_BREAK: return ImGuiKey_Pause;
- case AKEYCODE_NUMPAD_0: return ImGuiKey_Keypad0;
- case AKEYCODE_NUMPAD_1: return ImGuiKey_Keypad1;
- case AKEYCODE_NUMPAD_2: return ImGuiKey_Keypad2;
- case AKEYCODE_NUMPAD_3: return ImGuiKey_Keypad3;
- case AKEYCODE_NUMPAD_4: return ImGuiKey_Keypad4;
- case AKEYCODE_NUMPAD_5: return ImGuiKey_Keypad5;
- case AKEYCODE_NUMPAD_6: return ImGuiKey_Keypad6;
- case AKEYCODE_NUMPAD_7: return ImGuiKey_Keypad7;
- case AKEYCODE_NUMPAD_8: return ImGuiKey_Keypad8;
- case AKEYCODE_NUMPAD_9: return ImGuiKey_Keypad9;
- case AKEYCODE_NUMPAD_DOT: return ImGuiKey_KeypadDecimal;
- case AKEYCODE_NUMPAD_DIVIDE: return ImGuiKey_KeypadDivide;
- case AKEYCODE_NUMPAD_MULTIPLY: return ImGuiKey_KeypadMultiply;
- case AKEYCODE_NUMPAD_SUBTRACT: return ImGuiKey_KeypadSubtract;
- case AKEYCODE_NUMPAD_ADD: return ImGuiKey_KeypadAdd;
- case AKEYCODE_NUMPAD_ENTER: return ImGuiKey_KeypadEnter;
- case AKEYCODE_NUMPAD_EQUALS: return ImGuiKey_KeypadEqual;
- case AKEYCODE_CTRL_LEFT: return ImGuiKey_LeftCtrl;
- case AKEYCODE_SHIFT_LEFT: return ImGuiKey_LeftShift;
- case AKEYCODE_ALT_LEFT: return ImGuiKey_LeftAlt;
- case AKEYCODE_META_LEFT: return ImGuiKey_LeftSuper;
- case AKEYCODE_CTRL_RIGHT: return ImGuiKey_RightCtrl;
- case AKEYCODE_SHIFT_RIGHT: return ImGuiKey_RightShift;
- case AKEYCODE_ALT_RIGHT: return ImGuiKey_RightAlt;
- case AKEYCODE_META_RIGHT: return ImGuiKey_RightSuper;
- case AKEYCODE_MENU: return ImGuiKey_Menu;
- case AKEYCODE_0: return ImGuiKey_0;
- case AKEYCODE_1: return ImGuiKey_1;
- case AKEYCODE_2: return ImGuiKey_2;
- case AKEYCODE_3: return ImGuiKey_3;
- case AKEYCODE_4: return ImGuiKey_4;
- case AKEYCODE_5: return ImGuiKey_5;
- case AKEYCODE_6: return ImGuiKey_6;
- case AKEYCODE_7: return ImGuiKey_7;
- case AKEYCODE_8: return ImGuiKey_8;
- case AKEYCODE_9: return ImGuiKey_9;
- case AKEYCODE_A: return ImGuiKey_A;
- case AKEYCODE_B: return ImGuiKey_B;
- case AKEYCODE_C: return ImGuiKey_C;
- case AKEYCODE_D: return ImGuiKey_D;
- case AKEYCODE_E: return ImGuiKey_E;
- case AKEYCODE_F: return ImGuiKey_F;
- case AKEYCODE_G: return ImGuiKey_G;
- case AKEYCODE_H: return ImGuiKey_H;
- case AKEYCODE_I: return ImGuiKey_I;
- case AKEYCODE_J: return ImGuiKey_J;
- case AKEYCODE_K: return ImGuiKey_K;
- case AKEYCODE_L: return ImGuiKey_L;
- case AKEYCODE_M: return ImGuiKey_M;
- case AKEYCODE_N: return ImGuiKey_N;
- case AKEYCODE_O: return ImGuiKey_O;
- case AKEYCODE_P: return ImGuiKey_P;
- case AKEYCODE_Q: return ImGuiKey_Q;
- case AKEYCODE_R: return ImGuiKey_R;
- case AKEYCODE_S: return ImGuiKey_S;
- case AKEYCODE_T: return ImGuiKey_T;
- case AKEYCODE_U: return ImGuiKey_U;
- case AKEYCODE_V: return ImGuiKey_V;
- case AKEYCODE_W: return ImGuiKey_W;
- case AKEYCODE_X: return ImGuiKey_X;
- case AKEYCODE_Y: return ImGuiKey_Y;
- case AKEYCODE_Z: return ImGuiKey_Z;
- case AKEYCODE_F1: return ImGuiKey_F1;
- case AKEYCODE_F2: return ImGuiKey_F2;
- case AKEYCODE_F3: return ImGuiKey_F3;
- case AKEYCODE_F4: return ImGuiKey_F4;
- case AKEYCODE_F5: return ImGuiKey_F5;
- case AKEYCODE_F6: return ImGuiKey_F6;
- case AKEYCODE_F7: return ImGuiKey_F7;
- case AKEYCODE_F8: return ImGuiKey_F8;
- case AKEYCODE_F9: return ImGuiKey_F9;
- case AKEYCODE_F10: return ImGuiKey_F10;
- case AKEYCODE_F11: return ImGuiKey_F11;
- case AKEYCODE_F12: return ImGuiKey_F12;
- default: return ImGuiKey_None;
- }
-}
-
-int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event)
-{
- ImGuiIO& io = ImGui::GetIO();
- int32_t event_type = AInputEvent_getType(input_event);
- switch (event_type)
- {
- case AINPUT_EVENT_TYPE_KEY:
- {
- int32_t event_key_code = AKeyEvent_getKeyCode(input_event);
- int32_t event_scan_code = AKeyEvent_getScanCode(input_event);
- int32_t event_action = AKeyEvent_getAction(input_event);
- int32_t event_meta_state = AKeyEvent_getMetaState(input_event);
-
- io.AddKeyEvent(ImGuiMod_Ctrl, (event_meta_state & AMETA_CTRL_ON) != 0);
- io.AddKeyEvent(ImGuiMod_Shift, (event_meta_state & AMETA_SHIFT_ON) != 0);
- io.AddKeyEvent(ImGuiMod_Alt, (event_meta_state & AMETA_ALT_ON) != 0);
- io.AddKeyEvent(ImGuiMod_Super, (event_meta_state & AMETA_META_ON) != 0);
-
- switch (event_action)
- {
- // FIXME: AKEY_EVENT_ACTION_DOWN and AKEY_EVENT_ACTION_UP occur at once as soon as a touch pointer
- // goes up from a key. We use a simple key event queue/ and process one event per key per frame in
- // ImGui_ImplAndroid_NewFrame()...or consider using IO queue, if suitable: https://github.com/ocornut/imgui/issues/2787
- case AKEY_EVENT_ACTION_DOWN:
- case AKEY_EVENT_ACTION_UP:
- {
- ImGuiKey key = ImGui_ImplAndroid_KeyCodeToImGuiKey(event_key_code);
- if (key != ImGuiKey_None)
- {
- io.AddKeyEvent(key, event_action == AKEY_EVENT_ACTION_DOWN);
- io.SetKeyEventNativeData(key, event_key_code, event_scan_code);
- }
-
- break;
- }
- default:
- break;
- }
- break;
- }
- case AINPUT_EVENT_TYPE_MOTION:
- {
- int32_t event_action = AMotionEvent_getAction(input_event);
- int32_t event_pointer_index = (event_action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
- event_action &= AMOTION_EVENT_ACTION_MASK;
-
- switch (AMotionEvent_getToolType(input_event, event_pointer_index))
- {
- case AMOTION_EVENT_TOOL_TYPE_MOUSE:
- io.AddMouseSourceEvent(ImGuiMouseSource_Mouse);
- break;
- case AMOTION_EVENT_TOOL_TYPE_STYLUS:
- case AMOTION_EVENT_TOOL_TYPE_ERASER:
- io.AddMouseSourceEvent(ImGuiMouseSource_Pen);
- break;
- case AMOTION_EVENT_TOOL_TYPE_FINGER:
- default:
- io.AddMouseSourceEvent(ImGuiMouseSource_TouchScreen);
- break;
- }
-
- switch (event_action)
- {
- case AMOTION_EVENT_ACTION_DOWN:
- case AMOTION_EVENT_ACTION_UP:
- {
- // Physical mouse buttons (and probably other physical devices) also invoke the actions AMOTION_EVENT_ACTION_DOWN/_UP,
- // but we have to process them separately to identify the actual button pressed. This is done below via
- // AMOTION_EVENT_ACTION_BUTTON_PRESS/_RELEASE. Here, we only process "FINGER" input (and "UNKNOWN", as a fallback).
- int tool_type = AMotionEvent_getToolType(input_event, event_pointer_index);
- if (tool_type == AMOTION_EVENT_TOOL_TYPE_FINGER || tool_type == AMOTION_EVENT_TOOL_TYPE_UNKNOWN)
- {
- io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index));
- io.AddMouseButtonEvent(0, event_action == AMOTION_EVENT_ACTION_DOWN);
- }
- break;
- }
- case AMOTION_EVENT_ACTION_BUTTON_PRESS:
- case AMOTION_EVENT_ACTION_BUTTON_RELEASE:
- {
- int32_t button_state = AMotionEvent_getButtonState(input_event);
- io.AddMouseButtonEvent(0, (button_state & AMOTION_EVENT_BUTTON_PRIMARY) != 0);
- io.AddMouseButtonEvent(1, (button_state & AMOTION_EVENT_BUTTON_SECONDARY) != 0);
- io.AddMouseButtonEvent(2, (button_state & AMOTION_EVENT_BUTTON_TERTIARY) != 0);
- break;
- }
- case AMOTION_EVENT_ACTION_HOVER_MOVE: // Hovering: Tool moves while NOT pressed (such as a physical mouse)
- case AMOTION_EVENT_ACTION_MOVE: // Touch pointer moves while DOWN
- io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index));
- break;
- case AMOTION_EVENT_ACTION_SCROLL:
- io.AddMouseWheelEvent(AMotionEvent_getAxisValue(input_event, AMOTION_EVENT_AXIS_HSCROLL, event_pointer_index), AMotionEvent_getAxisValue(input_event, AMOTION_EVENT_AXIS_VSCROLL, event_pointer_index));
- break;
- default:
- break;
- }
- }
- return 1;
- default:
- break;
- }
-
- return 0;
-}
-
-bool ImGui_ImplAndroid_Init(ANativeWindow* window)
-{
- IMGUI_CHECKVERSION();
-
- g_Window = window;
- g_Time = 0.0;
-
- // Setup backend capabilities flags
- ImGuiIO& io = ImGui::GetIO();
- io.BackendPlatformName = "imgui_impl_android";
-
- return true;
-}
-
-void ImGui_ImplAndroid_Shutdown()
-{
- ImGuiIO& io = ImGui::GetIO();
- io.BackendPlatformName = nullptr;
-}
-
-void ImGui_ImplAndroid_NewFrame()
-{
- ImGuiIO& io = ImGui::GetIO();
-
- // Setup display size (every frame to accommodate for window resizing)
- int32_t window_width = ANativeWindow_getWidth(g_Window);
- int32_t window_height = ANativeWindow_getHeight(g_Window);
- int display_width = window_width;
- int display_height = window_height;
-
- io.DisplaySize = ImVec2((float)window_width, (float)window_height);
- if (window_width > 0 && window_height > 0)
- io.DisplayFramebufferScale = ImVec2((float)display_width / window_width, (float)display_height / window_height);
-
- // Setup time step
- struct timespec current_timespec;
- clock_gettime(CLOCK_MONOTONIC, &current_timespec);
- double current_time = (double)(current_timespec.tv_sec) + (current_timespec.tv_nsec / 1000000000.0);
- io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f / 60.0f);
- g_Time = current_time;
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_android.h b/libs/imgui-1.92.1/backends/imgui_impl_android.h
deleted file mode 100644
index f6e4103..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_android.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// dear imgui: Platform Binding for Android native app
-// This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3)
-
-// Implemented features:
-// [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 AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
-// Missing features or Issues:
-// [ ] Platform: Clipboard support.
-// [ ] Platform: Gamepad support.
-// [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
-// Important:
-// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.
-// - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
-// - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
-
-// 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
-
-struct ANativeWindow;
-struct AInputEvent;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window);
-IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event);
-IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame();
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx10.cpp b/libs/imgui-1.92.1/backends/imgui_impl_dx10.cpp
deleted file mode 100644
index 6bc5215..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx10.cpp
+++ /dev/null
@@ -1,657 +0,0 @@
-// dear imgui: Renderer Backend for DirectX10
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-11: DirectX10: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
-// 2025-05-07: DirectX10: Honor draw_data->FramebufferScale to allow for custom backends and experiment using it (consistently with other renderer backends, even though in normal condition it is not set under Windows).
-// 2025-01-06: DirectX10: Expose selected render state in ImGui_ImplDX10_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-10-07: DirectX10: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-05-19: DirectX10: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-02-18: DirectX10: Change blending equation to preserve alpha in output buffer.
-// 2019-07-21: DirectX10: Backup, clear and restore Geometry Shader is any is bound when calling ImGui_ImplDX10_RenderDrawData().
-// 2019-05-29: DirectX10: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: DirectX10: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-07-13: DirectX10: Fixed unreleased resources in Init and Shutdown functions.
-// 2018-06-08: Misc: Extracted imgui_impl_dx10.cpp/.h away from the old combined DX10+Win32 example.
-// 2018-06-08: DirectX10: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-04-09: Misc: Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that was left in DX10 example but removed in 1.47 (Nov 2015) on other backends.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX10_RenderDrawData() in the .h file so you can call it yourself.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2016-05-07: DirectX10: Disabling depth-write.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_dx10.h"
-
-// DirectX
-#include <stdio.h>
-#include <d3d10_1.h>
-#include <d3d10.h>
-#include <d3dcompiler.h>
-#ifdef _MSC_VER
-#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
-#endif
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast // yes, they are more terse.
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#endif
-
-// DirectX10 data
-struct ImGui_ImplDX10_Texture
-{
- ID3D10Texture2D* pTexture;
- ID3D10ShaderResourceView* pTextureView;
-};
-
-struct ImGui_ImplDX10_Data
-{
- ID3D10Device* pd3dDevice;
- IDXGIFactory* pFactory;
- ID3D10Buffer* pVB;
- ID3D10Buffer* pIB;
- ID3D10VertexShader* pVertexShader;
- ID3D10InputLayout* pInputLayout;
- ID3D10Buffer* pVertexConstantBuffer;
- ID3D10PixelShader* pPixelShader;
- ID3D10SamplerState* pFontSampler;
- ID3D10RasterizerState* pRasterizerState;
- ID3D10BlendState* pBlendState;
- ID3D10DepthStencilState* pDepthStencilState;
- int VertexBufferSize;
- int IndexBufferSize;
-
- ImGui_ImplDX10_Data() { memset((void*)this, 0, sizeof(*this)); VertexBufferSize = 5000; IndexBufferSize = 10000; }
-};
-
-struct VERTEX_CONSTANT_BUFFER_DX10
-{
- float mvp[4][4];
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplDX10_Data* ImGui_ImplDX10_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplDX10_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Functions
-static void ImGui_ImplDX10_SetupRenderState(ImDrawData* draw_data, ID3D10Device* device)
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
-
- // Setup viewport
- D3D10_VIEWPORT vp = {};
- vp.Width = (UINT)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- vp.Height = (UINT)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- vp.MinDepth = 0.0f;
- vp.MaxDepth = 1.0f;
- vp.TopLeftX = vp.TopLeftY = 0;
- device->RSSetViewports(1, &vp);
-
- // Setup orthographic projection matrix into our constant buffer
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- void* mapped_resource;
- if (bd->pVertexConstantBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, &mapped_resource) == S_OK)
- {
- VERTEX_CONSTANT_BUFFER_DX10* constant_buffer = (VERTEX_CONSTANT_BUFFER_DX10*)mapped_resource;
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- float mvp[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, 0.5f, 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
- };
- memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
- bd->pVertexConstantBuffer->Unmap();
- }
-
- // Setup shader and vertex buffers
- unsigned int stride = sizeof(ImDrawVert);
- unsigned int offset = 0;
- device->IASetInputLayout(bd->pInputLayout);
- device->IASetVertexBuffers(0, 1, &bd->pVB, &stride, &offset);
- device->IASetIndexBuffer(bd->pIB, sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, 0);
- device->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
- device->VSSetShader(bd->pVertexShader);
- device->VSSetConstantBuffers(0, 1, &bd->pVertexConstantBuffer);
- device->PSSetShader(bd->pPixelShader);
- device->PSSetSamplers(0, 1, &bd->pFontSampler);
- device->GSSetShader(nullptr);
-
- // Setup render state
- const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
- device->OMSetBlendState(bd->pBlendState, blend_factor, 0xffffffff);
- device->OMSetDepthStencilState(bd->pDepthStencilState, 0);
- device->RSSetState(bd->pRasterizerState);
-}
-
-// Render function
-void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data)
-{
- // Avoid rendering when minimized
- if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
- return;
-
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- ID3D10Device* device = bd->pd3dDevice;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplDX10_UpdateTexture(tex);
-
- // Create and grow vertex/index buffers if needed
- if (!bd->pVB || bd->VertexBufferSize < draw_data->TotalVtxCount)
- {
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- bd->VertexBufferSize = draw_data->TotalVtxCount + 5000;
- D3D10_BUFFER_DESC desc = {};
- desc.Usage = D3D10_USAGE_DYNAMIC;
- desc.ByteWidth = bd->VertexBufferSize * sizeof(ImDrawVert);
- desc.BindFlags = D3D10_BIND_VERTEX_BUFFER;
- desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
- desc.MiscFlags = 0;
- if (device->CreateBuffer(&desc, nullptr, &bd->pVB) < 0)
- return;
- }
-
- if (!bd->pIB || bd->IndexBufferSize < draw_data->TotalIdxCount)
- {
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
- bd->IndexBufferSize = draw_data->TotalIdxCount + 10000;
- D3D10_BUFFER_DESC desc = {};
- desc.Usage = D3D10_USAGE_DYNAMIC;
- desc.ByteWidth = bd->IndexBufferSize * sizeof(ImDrawIdx);
- desc.BindFlags = D3D10_BIND_INDEX_BUFFER;
- desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
- if (device->CreateBuffer(&desc, nullptr, &bd->pIB) < 0)
- return;
- }
-
- // Copy and convert all vertices into a single contiguous buffer
- ImDrawVert* vtx_dst = nullptr;
- ImDrawIdx* idx_dst = nullptr;
- bd->pVB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&vtx_dst);
- bd->pIB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&idx_dst);
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
- bd->pVB->Unmap();
- bd->pIB->Unmap();
-
- // Backup DX state that will be modified to restore it afterwards (unfortunately this is very ugly looking and verbose. Close your eyes!)
- struct BACKUP_DX10_STATE
- {
- UINT ScissorRectsCount, ViewportsCount;
- D3D10_RECT ScissorRects[D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- D3D10_VIEWPORT Viewports[D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- ID3D10RasterizerState* RS;
- ID3D10BlendState* BlendState;
- FLOAT BlendFactor[4];
- UINT SampleMask;
- UINT StencilRef;
- ID3D10DepthStencilState* DepthStencilState;
- ID3D10ShaderResourceView* PSShaderResource;
- ID3D10SamplerState* PSSampler;
- ID3D10PixelShader* PS;
- ID3D10VertexShader* VS;
- ID3D10GeometryShader* GS;
- D3D10_PRIMITIVE_TOPOLOGY PrimitiveTopology;
- ID3D10Buffer* IndexBuffer, *VertexBuffer, *VSConstantBuffer;
- UINT IndexBufferOffset, VertexBufferStride, VertexBufferOffset;
- DXGI_FORMAT IndexBufferFormat;
- ID3D10InputLayout* InputLayout;
- };
- BACKUP_DX10_STATE old = {};
- old.ScissorRectsCount = old.ViewportsCount = D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
- device->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
- device->RSGetViewports(&old.ViewportsCount, old.Viewports);
- device->RSGetState(&old.RS);
- device->OMGetBlendState(&old.BlendState, old.BlendFactor, &old.SampleMask);
- device->OMGetDepthStencilState(&old.DepthStencilState, &old.StencilRef);
- device->PSGetShaderResources(0, 1, &old.PSShaderResource);
- device->PSGetSamplers(0, 1, &old.PSSampler);
- device->PSGetShader(&old.PS);
- device->VSGetShader(&old.VS);
- device->VSGetConstantBuffers(0, 1, &old.VSConstantBuffer);
- device->GSGetShader(&old.GS);
- device->IAGetPrimitiveTopology(&old.PrimitiveTopology);
- device->IAGetIndexBuffer(&old.IndexBuffer, &old.IndexBufferFormat, &old.IndexBufferOffset);
- device->IAGetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset);
- device->IAGetInputLayout(&old.InputLayout);
-
- // Setup desired DX state
- ImGui_ImplDX10_SetupRenderState(draw_data, device);
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplDX10_RenderState render_state;
- render_state.Device = bd->pd3dDevice;
- render_state.SamplerDefault = bd->pFontSampler;
- render_state.VertexConstantBuffer = bd->pVertexConstantBuffer;
- platform_io.Renderer_RenderState = &render_state;
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- ImVec2 clip_off = draw_data->DisplayPos;
- ImVec2 clip_scale = draw_data->FramebufferScale;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplDX10_SetupRenderState(draw_data, device);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- const D3D10_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
- device->RSSetScissorRects(1, &r);
-
- // Bind texture, Draw
- ID3D10ShaderResourceView* texture_srv = (ID3D10ShaderResourceView*)pcmd->GetTexID();
- device->PSSetShaderResources(0, 1, &texture_srv);
- device->DrawIndexed(pcmd->ElemCount, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
- platform_io.Renderer_RenderState = nullptr;
-
- // Restore modified DX state
- device->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
- device->RSSetViewports(old.ViewportsCount, old.Viewports);
- device->RSSetState(old.RS); if (old.RS) old.RS->Release();
- device->OMSetBlendState(old.BlendState, old.BlendFactor, old.SampleMask); if (old.BlendState) old.BlendState->Release();
- device->OMSetDepthStencilState(old.DepthStencilState, old.StencilRef); if (old.DepthStencilState) old.DepthStencilState->Release();
- device->PSSetShaderResources(0, 1, &old.PSShaderResource); if (old.PSShaderResource) old.PSShaderResource->Release();
- device->PSSetSamplers(0, 1, &old.PSSampler); if (old.PSSampler) old.PSSampler->Release();
- device->PSSetShader(old.PS); if (old.PS) old.PS->Release();
- device->VSSetShader(old.VS); if (old.VS) old.VS->Release();
- device->GSSetShader(old.GS); if (old.GS) old.GS->Release();
- device->VSSetConstantBuffers(0, 1, &old.VSConstantBuffer); if (old.VSConstantBuffer) old.VSConstantBuffer->Release();
- device->IASetPrimitiveTopology(old.PrimitiveTopology);
- device->IASetIndexBuffer(old.IndexBuffer, old.IndexBufferFormat, old.IndexBufferOffset); if (old.IndexBuffer) old.IndexBuffer->Release();
- device->IASetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset); if (old.VertexBuffer) old.VertexBuffer->Release();
- device->IASetInputLayout(old.InputLayout); if (old.InputLayout) old.InputLayout->Release();
-}
-
-static void ImGui_ImplDX10_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplDX10_Texture* backend_tex = (ImGui_ImplDX10_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(backend_tex->pTextureView == (ID3D10ShaderResourceView*)(intptr_t)tex->TexID);
- backend_tex->pTexture->Release();
- backend_tex->pTextureView->Release();
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplDX10_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- unsigned int* pixels = (unsigned int*)tex->GetPixels();
- ImGui_ImplDX10_Texture* backend_tex = IM_NEW(ImGui_ImplDX10_Texture)();
-
- // Create texture
- D3D10_TEXTURE2D_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Width = (UINT)tex->Width;
- desc.Height = (UINT)tex->Height;
- desc.MipLevels = 1;
- desc.ArraySize = 1;
- desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- desc.SampleDesc.Count = 1;
- desc.Usage = D3D10_USAGE_DEFAULT;
- desc.BindFlags = D3D10_BIND_SHADER_RESOURCE;
- desc.CPUAccessFlags = 0;
-
- D3D10_SUBRESOURCE_DATA subResource;
- subResource.pSysMem = pixels;
- subResource.SysMemPitch = desc.Width * 4;
- subResource.SysMemSlicePitch = 0;
- bd->pd3dDevice->CreateTexture2D(&desc, &subResource, &backend_tex->pTexture);
- IM_ASSERT(backend_tex->pTexture != nullptr && "Backend failed to create texture!");
-
- // Create texture view
- D3D10_SHADER_RESOURCE_VIEW_DESC srv_desc;
- ZeroMemory(&srv_desc, sizeof(srv_desc));
- srv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- srv_desc.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D;
- srv_desc.Texture2D.MipLevels = desc.MipLevels;
- srv_desc.Texture2D.MostDetailedMip = 0;
- bd->pd3dDevice->CreateShaderResourceView(backend_tex->pTexture, &srv_desc, &backend_tex->pTextureView);
- IM_ASSERT(backend_tex->pTextureView != nullptr && "Backend failed to create texture!");
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)backend_tex->pTextureView);
- tex->SetStatus(ImTextureStatus_OK);
- tex->BackendUserData = backend_tex;
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- ImGui_ImplDX10_Texture* backend_tex = (ImGui_ImplDX10_Texture*)tex->BackendUserData;
- IM_ASSERT(backend_tex->pTextureView == (ID3D10ShaderResourceView*)(intptr_t)tex->TexID);
- for (ImTextureRect& r : tex->Updates)
- {
- D3D10_BOX box = { (UINT)r.x, (UINT)r.y, (UINT)0, (UINT)(r.x + r.w), (UINT)(r.y + r.h), (UINT)1 };
- bd->pd3dDevice->UpdateSubresource(backend_tex->pTexture, 0, &box, tex->GetPixelsAt(r.x, r.y), (UINT)tex->GetPitch(), 0);
- }
- tex->SetStatus(ImTextureStatus_OK);
- }
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- ImGui_ImplDX10_DestroyTexture(tex);
-}
-
-bool ImGui_ImplDX10_CreateDeviceObjects()
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- if (!bd->pd3dDevice)
- return false;
- ImGui_ImplDX10_InvalidateDeviceObjects();
-
- // By using D3DCompile() from <d3dcompiler.h> / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
- // If you would like to use this DX10 sample code but remove this dependency you can:
- // 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
- // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
- // See https://github.com/ocornut/imgui/pull/638 for sources and details.
-
- // Create the vertex shader
- {
- static const char* vertexShader =
- "cbuffer vertexBuffer : register(b0) \
- {\
- float4x4 ProjectionMatrix; \
- };\
- struct VS_INPUT\
- {\
- float2 pos : POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- PS_INPUT main(VS_INPUT input)\
- {\
- PS_INPUT output;\
- output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
- output.col = input.col;\
- output.uv = input.uv;\
- return output;\
- }";
-
- ID3DBlob* vertexShaderBlob;
- if (FAILED(D3DCompile(vertexShader, strlen(vertexShader), nullptr, nullptr, nullptr, "main", "vs_4_0", 0, 0, &vertexShaderBlob, nullptr)))
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- if (bd->pd3dDevice->CreateVertexShader(vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pVertexShader) != S_OK)
- {
- vertexShaderBlob->Release();
- return false;
- }
-
- // Create the input layout
- D3D10_INPUT_ELEMENT_DESC local_layout[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D10_INPUT_PER_VERTEX_DATA, 0 },
- { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D10_INPUT_PER_VERTEX_DATA, 0 },
- { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D10_INPUT_PER_VERTEX_DATA, 0 },
- };
- if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK)
- {
- vertexShaderBlob->Release();
- return false;
- }
- vertexShaderBlob->Release();
-
- // Create the constant buffer
- {
- D3D10_BUFFER_DESC desc = {};
- desc.ByteWidth = sizeof(VERTEX_CONSTANT_BUFFER_DX10);
- desc.Usage = D3D10_USAGE_DYNAMIC;
- desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER;
- desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
- desc.MiscFlags = 0;
- bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pVertexConstantBuffer);
- }
- }
-
- // Create the pixel shader
- {
- static const char* pixelShader =
- "struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- sampler sampler0;\
- Texture2D texture0;\
- \
- float4 main(PS_INPUT input) : SV_Target\
- {\
- float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
- return out_col; \
- }";
-
- ID3DBlob* pixelShaderBlob;
- if (FAILED(D3DCompile(pixelShader, strlen(pixelShader), nullptr, nullptr, nullptr, "main", "ps_4_0", 0, 0, &pixelShaderBlob, nullptr)))
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- if (bd->pd3dDevice->CreatePixelShader(pixelShaderBlob->GetBufferPointer(), pixelShaderBlob->GetBufferSize(), &bd->pPixelShader) != S_OK)
- {
- pixelShaderBlob->Release();
- return false;
- }
- pixelShaderBlob->Release();
- }
-
- // Create the blending setup
- {
- D3D10_BLEND_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.AlphaToCoverageEnable = false;
- desc.BlendEnable[0] = true;
- desc.SrcBlend = D3D10_BLEND_SRC_ALPHA;
- desc.DestBlend = D3D10_BLEND_INV_SRC_ALPHA;
- desc.BlendOp = D3D10_BLEND_OP_ADD;
- desc.SrcBlendAlpha = D3D10_BLEND_ONE;
- desc.DestBlendAlpha = D3D10_BLEND_INV_SRC_ALPHA;
- desc.BlendOpAlpha = D3D10_BLEND_OP_ADD;
- desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL;
- bd->pd3dDevice->CreateBlendState(&desc, &bd->pBlendState);
- }
-
- // Create the rasterizer state
- {
- D3D10_RASTERIZER_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.FillMode = D3D10_FILL_SOLID;
- desc.CullMode = D3D10_CULL_NONE;
- desc.ScissorEnable = true;
- desc.DepthClipEnable = true;
- bd->pd3dDevice->CreateRasterizerState(&desc, &bd->pRasterizerState);
- }
-
- // Create depth-stencil State
- {
- D3D10_DEPTH_STENCIL_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.DepthEnable = false;
- desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL;
- desc.DepthFunc = D3D10_COMPARISON_ALWAYS;
- desc.StencilEnable = false;
- desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D10_STENCIL_OP_KEEP;
- desc.FrontFace.StencilFunc = D3D10_COMPARISON_ALWAYS;
- desc.BackFace = desc.FrontFace;
- bd->pd3dDevice->CreateDepthStencilState(&desc, &bd->pDepthStencilState);
- }
-
- // Create texture sampler
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- {
- D3D10_SAMPLER_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
- desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP;
- desc.AddressV = D3D10_TEXTURE_ADDRESS_CLAMP;
- desc.AddressW = D3D10_TEXTURE_ADDRESS_CLAMP;
- desc.MipLODBias = 0.f;
- desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS;
- desc.MinLOD = 0.f;
- desc.MaxLOD = 0.f;
- bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
- }
-
- return true;
-}
-
-void ImGui_ImplDX10_InvalidateDeviceObjects()
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- if (!bd->pd3dDevice)
- return;
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplDX10_DestroyTexture(tex);
- if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }
- if (bd->pDepthStencilState) { bd->pDepthStencilState->Release(); bd->pDepthStencilState = nullptr; }
- if (bd->pRasterizerState) { bd->pRasterizerState->Release(); bd->pRasterizerState = nullptr; }
- if (bd->pPixelShader) { bd->pPixelShader->Release(); bd->pPixelShader = nullptr; }
- if (bd->pVertexConstantBuffer) { bd->pVertexConstantBuffer->Release(); bd->pVertexConstantBuffer = nullptr; }
- if (bd->pInputLayout) { bd->pInputLayout->Release(); bd->pInputLayout = nullptr; }
- if (bd->pVertexShader) { bd->pVertexShader->Release(); bd->pVertexShader = nullptr; }
-}
-
-bool ImGui_ImplDX10_Init(ID3D10Device* device)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplDX10_Data* bd = IM_NEW(ImGui_ImplDX10_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_dx10";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Renderer_TextureMaxWidth = platform_io.Renderer_TextureMaxHeight = D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION;
-
- // Get factory from device
- IDXGIDevice* pDXGIDevice = nullptr;
- IDXGIAdapter* pDXGIAdapter = nullptr;
- IDXGIFactory* pFactory = nullptr;
- if (device->QueryInterface(IID_PPV_ARGS(&pDXGIDevice)) == S_OK)
- if (pDXGIDevice->GetParent(IID_PPV_ARGS(&pDXGIAdapter)) == S_OK)
- if (pDXGIAdapter->GetParent(IID_PPV_ARGS(&pFactory)) == S_OK)
- {
- bd->pd3dDevice = device;
- bd->pFactory = pFactory;
- }
- if (pDXGIDevice) pDXGIDevice->Release();
- if (pDXGIAdapter) pDXGIAdapter->Release();
- bd->pd3dDevice->AddRef();
-
- return true;
-}
-
-void ImGui_ImplDX10_Shutdown()
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplDX10_InvalidateDeviceObjects();
- if (bd->pFactory) { bd->pFactory->Release(); }
- if (bd->pd3dDevice) { bd->pd3dDevice->Release(); }
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplDX10_NewFrame()
-{
- ImGui_ImplDX10_Data* bd = ImGui_ImplDX10_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX10_Init()?");
-
- if (!bd->pVertexShader)
- if (!ImGui_ImplDX10_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplDX10_CreateDeviceObjects() failed!");
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx10.h b/libs/imgui-1.92.1/backends/imgui_impl_dx10.h
deleted file mode 100644
index 38ecbdf..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx10.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// dear imgui: Renderer Backend for DirectX10
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// 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
-
-struct ID3D10Device;
-struct ID3D10SamplerState;
-struct ID3D10Buffer;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device);
-IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data);
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplDX10_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplDX10_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplDX10_RenderState
-{
- ID3D10Device* Device;
- ID3D10SamplerState* SamplerDefault;
- ID3D10Buffer* VertexConstantBuffer;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx11.cpp b/libs/imgui-1.92.1/backends/imgui_impl_dx11.cpp
deleted file mode 100644
index 1b28745..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx11.cpp
+++ /dev/null
@@ -1,677 +0,0 @@
-// dear imgui: Renderer Backend for DirectX11
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-11: DirectX11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
-// 2025-05-07: DirectX11: Honor draw_data->FramebufferScale to allow for custom backends and experiment using it (consistently with other renderer backends, even though in normal condition it is not set under Windows).
-// 2025-01-06: DirectX11: Expose VertexConstantBuffer in ImGui_ImplDX11_RenderState. Reset projection matrix in ImDrawCallback_ResetRenderState handler.
-// 2024-10-07: DirectX11: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-10-07: DirectX11: Expose selected render state in ImGui_ImplDX11_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-05-19: DirectX11: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-02-18: DirectX11: Change blending equation to preserve alpha in output buffer.
-// 2019-08-01: DirectX11: Fixed code querying the Geometry Shader state (would generally error with Debug layer enabled).
-// 2019-07-21: DirectX11: Backup, clear and restore Geometry Shader is any is bound when calling ImGui_ImplDX11_RenderDrawData. Clearing Hull/Domain/Compute shaders without backup/restore.
-// 2019-05-29: DirectX11: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: DirectX11: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-08-01: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility.
-// 2018-07-13: DirectX11: Fixed unreleased resources in Init and Shutdown functions.
-// 2018-06-08: Misc: Extracted imgui_impl_dx11.cpp/.h away from the old combined DX11+Win32 example.
-// 2018-06-08: DirectX11: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX11_RenderDrawData() in the .h file so you can call it yourself.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2016-05-07: DirectX11: Disabling depth-write.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_dx11.h"
-
-// DirectX
-#include <stdio.h>
-#include <d3d11.h>
-#include <d3dcompiler.h>
-#ifdef _MSC_VER
-#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
-#endif
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast // yes, they are more terse.
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#endif
-
-// DirectX11 data
-struct ImGui_ImplDX11_Texture
-{
- ID3D11Texture2D* pTexture;
- ID3D11ShaderResourceView* pTextureView;
-};
-
-struct ImGui_ImplDX11_Data
-{
- ID3D11Device* pd3dDevice;
- ID3D11DeviceContext* pd3dDeviceContext;
- IDXGIFactory* pFactory;
- ID3D11Buffer* pVB;
- ID3D11Buffer* pIB;
- ID3D11VertexShader* pVertexShader;
- ID3D11InputLayout* pInputLayout;
- ID3D11Buffer* pVertexConstantBuffer;
- ID3D11PixelShader* pPixelShader;
- ID3D11SamplerState* pFontSampler;
- ID3D11RasterizerState* pRasterizerState;
- ID3D11BlendState* pBlendState;
- ID3D11DepthStencilState* pDepthStencilState;
- int VertexBufferSize;
- int IndexBufferSize;
-
- ImGui_ImplDX11_Data() { memset((void*)this, 0, sizeof(*this)); VertexBufferSize = 5000; IndexBufferSize = 10000; }
-};
-
-struct VERTEX_CONSTANT_BUFFER_DX11
-{
- float mvp[4][4];
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplDX11_Data* ImGui_ImplDX11_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplDX11_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Functions
-static void ImGui_ImplDX11_SetupRenderState(ImDrawData* draw_data, ID3D11DeviceContext* device_ctx)
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
-
- // Setup viewport
- D3D11_VIEWPORT vp = {};
- vp.Width = draw_data->DisplaySize.x * draw_data->FramebufferScale.x;
- vp.Height = draw_data->DisplaySize.y * draw_data->FramebufferScale.y;
- vp.MinDepth = 0.0f;
- vp.MaxDepth = 1.0f;
- vp.TopLeftX = vp.TopLeftY = 0;
- device_ctx->RSSetViewports(1, &vp);
-
- // Setup orthographic projection matrix into our constant buffer
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- D3D11_MAPPED_SUBRESOURCE mapped_resource;
- if (device_ctx->Map(bd->pVertexConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped_resource) == S_OK)
- {
- VERTEX_CONSTANT_BUFFER_DX11* constant_buffer = (VERTEX_CONSTANT_BUFFER_DX11*)mapped_resource.pData;
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- float mvp[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, 0.5f, 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
- };
- memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
- device_ctx->Unmap(bd->pVertexConstantBuffer, 0);
- }
-
- // Setup shader and vertex buffers
- unsigned int stride = sizeof(ImDrawVert);
- unsigned int offset = 0;
- device_ctx->IASetInputLayout(bd->pInputLayout);
- device_ctx->IASetVertexBuffers(0, 1, &bd->pVB, &stride, &offset);
- device_ctx->IASetIndexBuffer(bd->pIB, sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, 0);
- device_ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
- device_ctx->VSSetShader(bd->pVertexShader, nullptr, 0);
- device_ctx->VSSetConstantBuffers(0, 1, &bd->pVertexConstantBuffer);
- device_ctx->PSSetShader(bd->pPixelShader, nullptr, 0);
- device_ctx->PSSetSamplers(0, 1, &bd->pFontSampler);
- device_ctx->GSSetShader(nullptr, nullptr, 0);
- device_ctx->HSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
- device_ctx->DSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
- device_ctx->CSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
-
- // Setup render state
- const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
- device_ctx->OMSetBlendState(bd->pBlendState, blend_factor, 0xffffffff);
- device_ctx->OMSetDepthStencilState(bd->pDepthStencilState, 0);
- device_ctx->RSSetState(bd->pRasterizerState);
-}
-
-// Render function
-void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
-{
- // Avoid rendering when minimized
- if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
- return;
-
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- ID3D11DeviceContext* device = bd->pd3dDeviceContext;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplDX11_UpdateTexture(tex);
-
- // Create and grow vertex/index buffers if needed
- if (!bd->pVB || bd->VertexBufferSize < draw_data->TotalVtxCount)
- {
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- bd->VertexBufferSize = draw_data->TotalVtxCount + 5000;
- D3D11_BUFFER_DESC desc = {};
- desc.Usage = D3D11_USAGE_DYNAMIC;
- desc.ByteWidth = bd->VertexBufferSize * sizeof(ImDrawVert);
- desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- desc.MiscFlags = 0;
- if (bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pVB) < 0)
- return;
- }
- if (!bd->pIB || bd->IndexBufferSize < draw_data->TotalIdxCount)
- {
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
- bd->IndexBufferSize = draw_data->TotalIdxCount + 10000;
- D3D11_BUFFER_DESC desc = {};
- desc.Usage = D3D11_USAGE_DYNAMIC;
- desc.ByteWidth = bd->IndexBufferSize * sizeof(ImDrawIdx);
- desc.BindFlags = D3D11_BIND_INDEX_BUFFER;
- desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- if (bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pIB) < 0)
- return;
- }
-
- // Upload vertex/index data into a single contiguous GPU buffer
- D3D11_MAPPED_SUBRESOURCE vtx_resource, idx_resource;
- if (device->Map(bd->pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &vtx_resource) != S_OK)
- return;
- if (device->Map(bd->pIB, 0, D3D11_MAP_WRITE_DISCARD, 0, &idx_resource) != S_OK)
- return;
- ImDrawVert* vtx_dst = (ImDrawVert*)vtx_resource.pData;
- ImDrawIdx* idx_dst = (ImDrawIdx*)idx_resource.pData;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
- device->Unmap(bd->pVB, 0);
- device->Unmap(bd->pIB, 0);
-
- // Backup DX state that will be modified to restore it afterwards (unfortunately this is very ugly looking and verbose. Close your eyes!)
- struct BACKUP_DX11_STATE
- {
- UINT ScissorRectsCount, ViewportsCount;
- D3D11_RECT ScissorRects[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- D3D11_VIEWPORT Viewports[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- ID3D11RasterizerState* RS;
- ID3D11BlendState* BlendState;
- FLOAT BlendFactor[4];
- UINT SampleMask;
- UINT StencilRef;
- ID3D11DepthStencilState* DepthStencilState;
- ID3D11ShaderResourceView* PSShaderResource;
- ID3D11SamplerState* PSSampler;
- ID3D11PixelShader* PS;
- ID3D11VertexShader* VS;
- ID3D11GeometryShader* GS;
- UINT PSInstancesCount, VSInstancesCount, GSInstancesCount;
- ID3D11ClassInstance *PSInstances[256], *VSInstances[256], *GSInstances[256]; // 256 is max according to PSSetShader documentation
- D3D11_PRIMITIVE_TOPOLOGY PrimitiveTopology;
- ID3D11Buffer* IndexBuffer, *VertexBuffer, *VSConstantBuffer;
- UINT IndexBufferOffset, VertexBufferStride, VertexBufferOffset;
- DXGI_FORMAT IndexBufferFormat;
- ID3D11InputLayout* InputLayout;
- };
- BACKUP_DX11_STATE old = {};
- old.ScissorRectsCount = old.ViewportsCount = D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
- device->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
- device->RSGetViewports(&old.ViewportsCount, old.Viewports);
- device->RSGetState(&old.RS);
- device->OMGetBlendState(&old.BlendState, old.BlendFactor, &old.SampleMask);
- device->OMGetDepthStencilState(&old.DepthStencilState, &old.StencilRef);
- device->PSGetShaderResources(0, 1, &old.PSShaderResource);
- device->PSGetSamplers(0, 1, &old.PSSampler);
- old.PSInstancesCount = old.VSInstancesCount = old.GSInstancesCount = 256;
- device->PSGetShader(&old.PS, old.PSInstances, &old.PSInstancesCount);
- device->VSGetShader(&old.VS, old.VSInstances, &old.VSInstancesCount);
- device->VSGetConstantBuffers(0, 1, &old.VSConstantBuffer);
- device->GSGetShader(&old.GS, old.GSInstances, &old.GSInstancesCount);
-
- device->IAGetPrimitiveTopology(&old.PrimitiveTopology);
- device->IAGetIndexBuffer(&old.IndexBuffer, &old.IndexBufferFormat, &old.IndexBufferOffset);
- device->IAGetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset);
- device->IAGetInputLayout(&old.InputLayout);
-
- // Setup desired DX state
- ImGui_ImplDX11_SetupRenderState(draw_data, device);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplDX11_RenderState render_state;
- render_state.Device = bd->pd3dDevice;
- render_state.DeviceContext = bd->pd3dDeviceContext;
- render_state.SamplerDefault = bd->pFontSampler;
- render_state.VertexConstantBuffer = bd->pVertexConstantBuffer;
- platform_io.Renderer_RenderState = &render_state;
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_idx_offset = 0;
- int global_vtx_offset = 0;
- ImVec2 clip_off = draw_data->DisplayPos;
- ImVec2 clip_scale = draw_data->FramebufferScale;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplDX11_SetupRenderState(draw_data, device);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- const D3D11_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
- device->RSSetScissorRects(1, &r);
-
- // Bind texture, Draw
- ID3D11ShaderResourceView* texture_srv = (ID3D11ShaderResourceView*)pcmd->GetTexID();
- device->PSSetShaderResources(0, 1, &texture_srv);
- device->DrawIndexed(pcmd->ElemCount, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
- platform_io.Renderer_RenderState = nullptr;
-
- // Restore modified DX state
- device->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
- device->RSSetViewports(old.ViewportsCount, old.Viewports);
- device->RSSetState(old.RS); if (old.RS) old.RS->Release();
- device->OMSetBlendState(old.BlendState, old.BlendFactor, old.SampleMask); if (old.BlendState) old.BlendState->Release();
- device->OMSetDepthStencilState(old.DepthStencilState, old.StencilRef); if (old.DepthStencilState) old.DepthStencilState->Release();
- device->PSSetShaderResources(0, 1, &old.PSShaderResource); if (old.PSShaderResource) old.PSShaderResource->Release();
- device->PSSetSamplers(0, 1, &old.PSSampler); if (old.PSSampler) old.PSSampler->Release();
- device->PSSetShader(old.PS, old.PSInstances, old.PSInstancesCount); if (old.PS) old.PS->Release();
- for (UINT i = 0; i < old.PSInstancesCount; i++) if (old.PSInstances[i]) old.PSInstances[i]->Release();
- device->VSSetShader(old.VS, old.VSInstances, old.VSInstancesCount); if (old.VS) old.VS->Release();
- device->VSSetConstantBuffers(0, 1, &old.VSConstantBuffer); if (old.VSConstantBuffer) old.VSConstantBuffer->Release();
- device->GSSetShader(old.GS, old.GSInstances, old.GSInstancesCount); if (old.GS) old.GS->Release();
- for (UINT i = 0; i < old.VSInstancesCount; i++) if (old.VSInstances[i]) old.VSInstances[i]->Release();
- device->IASetPrimitiveTopology(old.PrimitiveTopology);
- device->IASetIndexBuffer(old.IndexBuffer, old.IndexBufferFormat, old.IndexBufferOffset); if (old.IndexBuffer) old.IndexBuffer->Release();
- device->IASetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset); if (old.VertexBuffer) old.VertexBuffer->Release();
- device->IASetInputLayout(old.InputLayout); if (old.InputLayout) old.InputLayout->Release();
-}
-
-static void ImGui_ImplDX11_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplDX11_Texture* backend_tex = (ImGui_ImplDX11_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(backend_tex->pTextureView == (ID3D11ShaderResourceView*)(intptr_t)tex->TexID);
- backend_tex->pTextureView->Release();
- backend_tex->pTexture->Release();
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplDX11_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- unsigned int* pixels = (unsigned int*)tex->GetPixels();
- ImGui_ImplDX11_Texture* backend_tex = IM_NEW(ImGui_ImplDX11_Texture)();
-
- // Create texture
- D3D11_TEXTURE2D_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Width = (UINT)tex->Width;
- desc.Height = (UINT)tex->Height;
- desc.MipLevels = 1;
- desc.ArraySize = 1;
- desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- desc.SampleDesc.Count = 1;
- desc.Usage = D3D11_USAGE_DEFAULT;
- desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
- desc.CPUAccessFlags = 0;
- D3D11_SUBRESOURCE_DATA subResource;
- subResource.pSysMem = pixels;
- subResource.SysMemPitch = desc.Width * 4;
- subResource.SysMemSlicePitch = 0;
- bd->pd3dDevice->CreateTexture2D(&desc, &subResource, &backend_tex->pTexture);
- IM_ASSERT(backend_tex->pTexture != nullptr && "Backend failed to create texture!");
-
- // Create texture view
- D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
- ZeroMemory(&srvDesc, sizeof(srvDesc));
- srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
- srvDesc.Texture2D.MipLevels = desc.MipLevels;
- srvDesc.Texture2D.MostDetailedMip = 0;
- bd->pd3dDevice->CreateShaderResourceView(backend_tex->pTexture, &srvDesc, &backend_tex->pTextureView);
- IM_ASSERT(backend_tex->pTextureView != nullptr && "Backend failed to create texture!");
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)backend_tex->pTextureView);
- tex->SetStatus(ImTextureStatus_OK);
- tex->BackendUserData = backend_tex;
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- ImGui_ImplDX11_Texture* backend_tex = (ImGui_ImplDX11_Texture*)tex->BackendUserData;
- IM_ASSERT(backend_tex->pTextureView == (ID3D11ShaderResourceView*)(intptr_t)tex->TexID);
- for (ImTextureRect& r : tex->Updates)
- {
- D3D11_BOX box = { (UINT)r.x, (UINT)r.y, (UINT)0, (UINT)(r.x + r.w), (UINT)(r.y + r .h), (UINT)1 };
- bd->pd3dDeviceContext->UpdateSubresource(backend_tex->pTexture, 0, &box, tex->GetPixelsAt(r.x, r.y), (UINT)tex->GetPitch(), 0);
- }
- tex->SetStatus(ImTextureStatus_OK);
- }
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- ImGui_ImplDX11_DestroyTexture(tex);
-}
-
-bool ImGui_ImplDX11_CreateDeviceObjects()
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- if (!bd->pd3dDevice)
- return false;
- ImGui_ImplDX11_InvalidateDeviceObjects();
-
- // By using D3DCompile() from <d3dcompiler.h> / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
- // If you would like to use this DX11 sample code but remove this dependency you can:
- // 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
- // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
- // See https://github.com/ocornut/imgui/pull/638 for sources and details.
-
- // Create the vertex shader
- {
- static const char* vertexShader =
- "cbuffer vertexBuffer : register(b0) \
- {\
- float4x4 ProjectionMatrix; \
- };\
- struct VS_INPUT\
- {\
- float2 pos : POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- PS_INPUT main(VS_INPUT input)\
- {\
- PS_INPUT output;\
- output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
- output.col = input.col;\
- output.uv = input.uv;\
- return output;\
- }";
-
- ID3DBlob* vertexShaderBlob;
- if (FAILED(D3DCompile(vertexShader, strlen(vertexShader), nullptr, nullptr, nullptr, "main", "vs_4_0", 0, 0, &vertexShaderBlob, nullptr)))
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- if (bd->pd3dDevice->CreateVertexShader(vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), nullptr, &bd->pVertexShader) != S_OK)
- {
- vertexShaderBlob->Release();
- return false;
- }
-
- // Create the input layout
- D3D11_INPUT_ELEMENT_DESC local_layout[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
- { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
- };
- if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK)
- {
- vertexShaderBlob->Release();
- return false;
- }
- vertexShaderBlob->Release();
-
- // Create the constant buffer
- {
- D3D11_BUFFER_DESC desc = {};
- desc.ByteWidth = sizeof(VERTEX_CONSTANT_BUFFER_DX11);
- desc.Usage = D3D11_USAGE_DYNAMIC;
- desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
- desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
- desc.MiscFlags = 0;
- bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pVertexConstantBuffer);
- }
- }
-
- // Create the pixel shader
- {
- static const char* pixelShader =
- "struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- sampler sampler0;\
- Texture2D texture0;\
- \
- float4 main(PS_INPUT input) : SV_Target\
- {\
- float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
- return out_col; \
- }";
-
- ID3DBlob* pixelShaderBlob;
- if (FAILED(D3DCompile(pixelShader, strlen(pixelShader), nullptr, nullptr, nullptr, "main", "ps_4_0", 0, 0, &pixelShaderBlob, nullptr)))
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- if (bd->pd3dDevice->CreatePixelShader(pixelShaderBlob->GetBufferPointer(), pixelShaderBlob->GetBufferSize(), nullptr, &bd->pPixelShader) != S_OK)
- {
- pixelShaderBlob->Release();
- return false;
- }
- pixelShaderBlob->Release();
- }
-
- // Create the blending setup
- {
- D3D11_BLEND_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.AlphaToCoverageEnable = false;
- desc.RenderTarget[0].BlendEnable = true;
- desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
- desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
- desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
- desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
- desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
- desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
- desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
- bd->pd3dDevice->CreateBlendState(&desc, &bd->pBlendState);
- }
-
- // Create the rasterizer state
- {
- D3D11_RASTERIZER_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.FillMode = D3D11_FILL_SOLID;
- desc.CullMode = D3D11_CULL_NONE;
- desc.ScissorEnable = true;
- desc.DepthClipEnable = true;
- bd->pd3dDevice->CreateRasterizerState(&desc, &bd->pRasterizerState);
- }
-
- // Create depth-stencil State
- {
- D3D11_DEPTH_STENCIL_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.DepthEnable = false;
- desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
- desc.DepthFunc = D3D11_COMPARISON_ALWAYS;
- desc.StencilEnable = false;
- desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
- desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
- desc.BackFace = desc.FrontFace;
- bd->pd3dDevice->CreateDepthStencilState(&desc, &bd->pDepthStencilState);
- }
-
- // Create texture sampler
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- {
- D3D11_SAMPLER_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
- desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
- desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
- desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
- desc.MipLODBias = 0.f;
- desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
- desc.MinLOD = 0.f;
- desc.MaxLOD = 0.f;
- bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
- }
-
- return true;
-}
-
-void ImGui_ImplDX11_InvalidateDeviceObjects()
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- if (!bd->pd3dDevice)
- return;
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplDX11_DestroyTexture(tex);
-
- if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }
- if (bd->pDepthStencilState) { bd->pDepthStencilState->Release(); bd->pDepthStencilState = nullptr; }
- if (bd->pRasterizerState) { bd->pRasterizerState->Release(); bd->pRasterizerState = nullptr; }
- if (bd->pPixelShader) { bd->pPixelShader->Release(); bd->pPixelShader = nullptr; }
- if (bd->pVertexConstantBuffer) { bd->pVertexConstantBuffer->Release(); bd->pVertexConstantBuffer = nullptr; }
- if (bd->pInputLayout) { bd->pInputLayout->Release(); bd->pInputLayout = nullptr; }
- if (bd->pVertexShader) { bd->pVertexShader->Release(); bd->pVertexShader = nullptr; }
-}
-
-bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplDX11_Data* bd = IM_NEW(ImGui_ImplDX11_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_dx11";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Renderer_TextureMaxWidth = platform_io.Renderer_TextureMaxHeight = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
-
- // Get factory from device
- IDXGIDevice* pDXGIDevice = nullptr;
- IDXGIAdapter* pDXGIAdapter = nullptr;
- IDXGIFactory* pFactory = nullptr;
-
- if (device->QueryInterface(IID_PPV_ARGS(&pDXGIDevice)) == S_OK)
- if (pDXGIDevice->GetParent(IID_PPV_ARGS(&pDXGIAdapter)) == S_OK)
- if (pDXGIAdapter->GetParent(IID_PPV_ARGS(&pFactory)) == S_OK)
- {
- bd->pd3dDevice = device;
- bd->pd3dDeviceContext = device_context;
- bd->pFactory = pFactory;
- }
- if (pDXGIDevice) pDXGIDevice->Release();
- if (pDXGIAdapter) pDXGIAdapter->Release();
- bd->pd3dDevice->AddRef();
- bd->pd3dDeviceContext->AddRef();
-
- return true;
-}
-
-void ImGui_ImplDX11_Shutdown()
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplDX11_InvalidateDeviceObjects();
- if (bd->pFactory) { bd->pFactory->Release(); }
- if (bd->pd3dDevice) { bd->pd3dDevice->Release(); }
- if (bd->pd3dDeviceContext) { bd->pd3dDeviceContext->Release(); }
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplDX11_NewFrame()
-{
- ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX11_Init()?");
-
- if (!bd->pVertexShader)
- if (!ImGui_ImplDX11_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplDX11_CreateDeviceObjects() failed!");
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx11.h b/libs/imgui-1.92.1/backends/imgui_impl_dx11.h
deleted file mode 100644
index c120bf0..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx11.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// dear imgui: Renderer Backend for DirectX11
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// 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
-
-struct ID3D11Device;
-struct ID3D11DeviceContext;
-struct ID3D11SamplerState;
-struct ID3D11Buffer;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context);
-IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data);
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplDX11_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplDX11_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplDX11_RenderState
-{
- ID3D11Device* Device;
- ID3D11DeviceContext* DeviceContext;
- ID3D11SamplerState* SamplerDefault;
- ID3D11Buffer* VertexConstantBuffer;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx12.cpp b/libs/imgui-1.92.1/backends/imgui_impl_dx12.cpp
deleted file mode 100644
index 5578509..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx12.cpp
+++ /dev/null
@@ -1,934 +0,0 @@
-// dear imgui: Renderer Backend for DirectX12
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// The aim of imgui_impl_dx12.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-19: Fixed build on MinGW. (#8702, #4594)
-// 2025-06-11: DirectX12: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
-// 2025-05-07: DirectX12: Honor draw_data->FramebufferScale to allow for custom backends and experiment using it (consistently with other renderer backends, even though in normal condition it is not set under Windows).
-// 2025-02-24: DirectX12: Fixed an issue where ImGui_ImplDX12_Init() signature change from 2024-11-15 combined with change from 2025-01-15 made legacy ImGui_ImplDX12_Init() crash. (#8429)
-// 2025-01-15: DirectX12: Texture upload use the command queue provided in ImGui_ImplDX12_InitInfo instead of creating its own.
-// 2024-12-09: DirectX12: Let user specifies the DepthStencilView format by setting ImGui_ImplDX12_InitInfo::DSVFormat.
-// 2024-11-15: DirectX12: *BREAKING CHANGE* Changed ImGui_ImplDX12_Init() signature to take a ImGui_ImplDX12_InitInfo struct. Legacy ImGui_ImplDX12_Init() signature is still supported (will obsolete).
-// 2024-11-15: DirectX12: *BREAKING CHANGE* User is now required to pass function pointers to allocate/free SRV Descriptors. We provide convenience legacy fields to pass a single descriptor, matching the old API, but upcoming features will want multiple.
-// 2024-10-23: DirectX12: Unmap() call specify written range. The range is informational and may be used by debug tools.
-// 2024-10-07: DirectX12: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-10-07: DirectX12: Expose selected render state in ImGui_ImplDX12_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-10-07: DirectX12: Compiling with '#define ImTextureID=ImU64' is unnecessary now that dear imgui defaults ImTextureID to u64 instead of void*.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-05-19: DirectX12: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-02-18: DirectX12: Change blending equation to preserve alpha in output buffer.
-// 2021-01-11: DirectX12: Improve Windows 7 compatibility (for D3D12On7) by loading d3d12.dll dynamically.
-// 2020-09-16: DirectX12: Avoid rendering calls with zero-sized scissor rectangle since it generates a validation layer warning.
-// 2020-09-08: DirectX12: Clarified support for building on 32-bit systems by redefining ImTextureID.
-// 2019-10-18: DirectX12: *BREAKING CHANGE* Added extra ID3D12DescriptorHeap parameter to ImGui_ImplDX12_Init() function.
-// 2019-05-29: DirectX12: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: DirectX12: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2019-03-29: Misc: Various minor tidying up.
-// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-06-12: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from NewFrame() to RenderDrawData().
-// 2018-06-08: Misc: Extracted imgui_impl_dx12.cpp/.h away from the old combined DX12+Win32 example.
-// 2018-06-08: DirectX12: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle (to ease support for future multi-viewport).
-// 2018-02-22: Merged into master with all Win32 code synchronized to other examples.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_dx12.h"
-
-// DirectX
-#include <d3d12.h>
-#include <dxgi1_4.h>
-#include <d3dcompiler.h>
-#ifdef _MSC_VER
-#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
-#endif
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast // yes, they are more terse.
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#endif
-
-// MinGW workaround, see #4594
-typedef decltype(D3D12SerializeRootSignature) *_PFN_D3D12_SERIALIZE_ROOT_SIGNATURE;
-
-// DirectX12 data
-struct ImGui_ImplDX12_RenderBuffers;
-
-struct ImGui_ImplDX12_Texture
-{
- ID3D12Resource* pTextureResource;
- D3D12_CPU_DESCRIPTOR_HANDLE hFontSrvCpuDescHandle;
- D3D12_GPU_DESCRIPTOR_HANDLE hFontSrvGpuDescHandle;
-
- ImGui_ImplDX12_Texture() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-struct ImGui_ImplDX12_Data
-{
- ImGui_ImplDX12_InitInfo InitInfo;
- ID3D12Device* pd3dDevice;
- ID3D12RootSignature* pRootSignature;
- ID3D12PipelineState* pPipelineState;
- ID3D12CommandQueue* pCommandQueue;
- bool commandQueueOwned;
- DXGI_FORMAT RTVFormat;
- DXGI_FORMAT DSVFormat;
- ID3D12DescriptorHeap* pd3dSrvDescHeap;
- UINT numFramesInFlight;
-
- ImGui_ImplDX12_RenderBuffers* pFrameResources;
- UINT frameIndex;
-
- ImGui_ImplDX12_Texture FontTexture;
- bool LegacySingleDescriptorUsed;
-
- ImGui_ImplDX12_Data() { memset((void*)this, 0, sizeof(*this)); frameIndex = UINT_MAX; }
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplDX12_Data* ImGui_ImplDX12_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplDX12_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Buffers used during the rendering of a frame
-struct ImGui_ImplDX12_RenderBuffers
-{
- ID3D12Resource* IndexBuffer;
- ID3D12Resource* VertexBuffer;
- int IndexBufferSize;
- int VertexBufferSize;
-};
-
-struct VERTEX_CONSTANT_BUFFER_DX12
-{
- float mvp[4][4];
-};
-
-// Functions
-static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12GraphicsCommandList* command_list, ImGui_ImplDX12_RenderBuffers* fr)
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
-
- // Setup orthographic projection matrix into our constant buffer
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
- VERTEX_CONSTANT_BUFFER_DX12 vertex_constant_buffer;
- {
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- float mvp[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, 0.5f, 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
- };
- memcpy(&vertex_constant_buffer.mvp, mvp, sizeof(mvp));
- }
-
- // Setup viewport
- D3D12_VIEWPORT vp = {};
- vp.Width = draw_data->DisplaySize.x * draw_data->FramebufferScale.x;
- vp.Height = draw_data->DisplaySize.y * draw_data->FramebufferScale.y;
- vp.MinDepth = 0.0f;
- vp.MaxDepth = 1.0f;
- vp.TopLeftX = vp.TopLeftY = 0.0f;
- command_list->RSSetViewports(1, &vp);
-
- // Bind shader and vertex buffers
- unsigned int stride = sizeof(ImDrawVert);
- unsigned int offset = 0;
- D3D12_VERTEX_BUFFER_VIEW vbv = {};
- vbv.BufferLocation = fr->VertexBuffer->GetGPUVirtualAddress() + offset;
- vbv.SizeInBytes = fr->VertexBufferSize * stride;
- vbv.StrideInBytes = stride;
- command_list->IASetVertexBuffers(0, 1, &vbv);
- D3D12_INDEX_BUFFER_VIEW ibv = {};
- ibv.BufferLocation = fr->IndexBuffer->GetGPUVirtualAddress();
- ibv.SizeInBytes = fr->IndexBufferSize * sizeof(ImDrawIdx);
- ibv.Format = sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT;
- command_list->IASetIndexBuffer(&ibv);
- command_list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
- command_list->SetPipelineState(bd->pPipelineState);
- command_list->SetGraphicsRootSignature(bd->pRootSignature);
- command_list->SetGraphicsRoot32BitConstants(0, 16, &vertex_constant_buffer, 0);
-
- // Setup blend factor
- const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
- command_list->OMSetBlendFactor(blend_factor);
-}
-
-template<typename T>
-static inline void SafeRelease(T*& res)
-{
- if (res)
- res->Release();
- res = nullptr;
-}
-
-// Render function
-void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* command_list)
-{
- // Avoid rendering when minimized
- if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplDX12_UpdateTexture(tex);
-
- // FIXME: We are assuming that this only gets called once per frame!
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- bd->frameIndex = bd->frameIndex + 1;
- ImGui_ImplDX12_RenderBuffers* fr = &bd->pFrameResources[bd->frameIndex % bd->numFramesInFlight];
-
- // Create and grow vertex/index buffers if needed
- if (fr->VertexBuffer == nullptr || fr->VertexBufferSize < draw_data->TotalVtxCount)
- {
- SafeRelease(fr->VertexBuffer);
- fr->VertexBufferSize = draw_data->TotalVtxCount + 5000;
- D3D12_HEAP_PROPERTIES props = {};
- props.Type = D3D12_HEAP_TYPE_UPLOAD;
- props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
- props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
- D3D12_RESOURCE_DESC desc = {};
- desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
- desc.Width = fr->VertexBufferSize * sizeof(ImDrawVert);
- desc.Height = 1;
- desc.DepthOrArraySize = 1;
- desc.MipLevels = 1;
- desc.Format = DXGI_FORMAT_UNKNOWN;
- desc.SampleDesc.Count = 1;
- desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
- desc.Flags = D3D12_RESOURCE_FLAG_NONE;
- if (bd->pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&fr->VertexBuffer)) < 0)
- return;
- }
- if (fr->IndexBuffer == nullptr || fr->IndexBufferSize < draw_data->TotalIdxCount)
- {
- SafeRelease(fr->IndexBuffer);
- fr->IndexBufferSize = draw_data->TotalIdxCount + 10000;
- D3D12_HEAP_PROPERTIES props = {};
- props.Type = D3D12_HEAP_TYPE_UPLOAD;
- props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
- props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
- D3D12_RESOURCE_DESC desc = {};
- desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
- desc.Width = fr->IndexBufferSize * sizeof(ImDrawIdx);
- desc.Height = 1;
- desc.DepthOrArraySize = 1;
- desc.MipLevels = 1;
- desc.Format = DXGI_FORMAT_UNKNOWN;
- desc.SampleDesc.Count = 1;
- desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
- desc.Flags = D3D12_RESOURCE_FLAG_NONE;
- if (bd->pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&fr->IndexBuffer)) < 0)
- return;
- }
-
- // Upload vertex/index data into a single contiguous GPU buffer
- // During Map() we specify a null read range (as per DX12 API, this is informational and for tooling only)
- void* vtx_resource, *idx_resource;
- D3D12_RANGE range = { 0, 0 };
- if (fr->VertexBuffer->Map(0, &range, &vtx_resource) != S_OK)
- return;
- if (fr->IndexBuffer->Map(0, &range, &idx_resource) != S_OK)
- return;
- ImDrawVert* vtx_dst = (ImDrawVert*)vtx_resource;
- ImDrawIdx* idx_dst = (ImDrawIdx*)idx_resource;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
-
- // During Unmap() we specify the written range (as per DX12 API, this is informational and for tooling only)
- range.End = (SIZE_T)((intptr_t)vtx_dst - (intptr_t)vtx_resource);
- IM_ASSERT(range.End == draw_data->TotalVtxCount * sizeof(ImDrawVert));
- fr->VertexBuffer->Unmap(0, &range);
- range.End = (SIZE_T)((intptr_t)idx_dst - (intptr_t)idx_resource);
- IM_ASSERT(range.End == draw_data->TotalIdxCount * sizeof(ImDrawIdx));
- fr->IndexBuffer->Unmap(0, &range);
-
- // Setup desired DX state
- ImGui_ImplDX12_SetupRenderState(draw_data, command_list, fr);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplDX12_RenderState render_state;
- render_state.Device = bd->pd3dDevice;
- render_state.CommandList = command_list;
- platform_io.Renderer_RenderState = &render_state;
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- ImVec2 clip_off = draw_data->DisplayPos;
- ImVec2 clip_scale = draw_data->FramebufferScale;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplDX12_SetupRenderState(draw_data, command_list, fr);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- const D3D12_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
- command_list->RSSetScissorRects(1, &r);
-
- // Bind texture, Draw
- D3D12_GPU_DESCRIPTOR_HANDLE texture_handle = {};
- texture_handle.ptr = (UINT64)pcmd->GetTexID();
- command_list->SetGraphicsRootDescriptorTable(1, texture_handle);
- command_list->DrawIndexedInstanced(pcmd->ElemCount, 1, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset, 0);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
- platform_io.Renderer_RenderState = nullptr;
-}
-
-static void ImGui_ImplDX12_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplDX12_Texture* backend_tex = (ImGui_ImplDX12_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(backend_tex->hFontSrvGpuDescHandle.ptr == (UINT64)tex->TexID);
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- bd->InitInfo.SrvDescriptorFreeFn(&bd->InitInfo, backend_tex->hFontSrvCpuDescHandle, backend_tex->hFontSrvGpuDescHandle);
- SafeRelease(backend_tex->pTextureResource);
- backend_tex->hFontSrvCpuDescHandle.ptr = 0;
- backend_tex->hFontSrvGpuDescHandle.ptr = 0;
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplDX12_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- bool need_barrier_before_copy = true; // Do we need a resource barrier before we copy new data in?
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- ImGui_ImplDX12_Texture* backend_tex = IM_NEW(ImGui_ImplDX12_Texture)();
- bd->InitInfo.SrvDescriptorAllocFn(&bd->InitInfo, &backend_tex->hFontSrvCpuDescHandle, &backend_tex->hFontSrvGpuDescHandle); // Allocate a desctriptor handle
-
- D3D12_HEAP_PROPERTIES props = {};
- props.Type = D3D12_HEAP_TYPE_DEFAULT;
- props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
- props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-
- D3D12_RESOURCE_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
- desc.Alignment = 0;
- desc.Width = tex->Width;
- desc.Height = tex->Height;
- desc.DepthOrArraySize = 1;
- desc.MipLevels = 1;
- desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- desc.SampleDesc.Count = 1;
- desc.SampleDesc.Quality = 0;
- desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
- desc.Flags = D3D12_RESOURCE_FLAG_NONE;
-
- ID3D12Resource* pTexture = nullptr;
- bd->pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc,
- D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&pTexture));
-
- // Create SRV
- D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
- ZeroMemory(&srvDesc, sizeof(srvDesc));
- srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
- srvDesc.Texture2D.MipLevels = desc.MipLevels;
- srvDesc.Texture2D.MostDetailedMip = 0;
- srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
- bd->pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, backend_tex->hFontSrvCpuDescHandle);
- SafeRelease(backend_tex->pTextureResource);
- backend_tex->pTextureResource = pTexture;
-
- // Store identifiers
- tex->SetTexID((ImTextureID)backend_tex->hFontSrvGpuDescHandle.ptr);
- tex->BackendUserData = backend_tex;
- need_barrier_before_copy = false; // Because this is a newly-created texture it will be in D3D12_RESOURCE_STATE_COMMON and thus we don't need a barrier
- // We don't set tex->Status to ImTextureStatus_OK to let the code fallthrough below.
- }
-
- if (tex->Status == ImTextureStatus_WantCreate || tex->Status == ImTextureStatus_WantUpdates)
- {
- ImGui_ImplDX12_Texture* backend_tex = (ImGui_ImplDX12_Texture*)tex->BackendUserData;
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // We could use the smaller rect on _WantCreate but using the full rect allows us to clear the texture.
- // FIXME-OPT: Uploading single box even when using ImTextureStatus_WantUpdates. Could use tex->Updates[]
- // - Copy all blocks contiguously in upload buffer.
- // - Barrier before copy, submit all CopyTextureRegion(), barrier after copy.
- const int upload_x = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.x;
- const int upload_y = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.y;
- const int upload_w = (tex->Status == ImTextureStatus_WantCreate) ? tex->Width : tex->UpdateRect.w;
- const int upload_h = (tex->Status == ImTextureStatus_WantCreate) ? tex->Height : tex->UpdateRect.h;
-
- // Update full texture or selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->UpdateRect but you can use tex->Updates[] to upload individual regions.
- UINT upload_pitch_src = upload_w * tex->BytesPerPixel;
- UINT upload_pitch_dst = (upload_pitch_src + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1u) & ~(D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1u);
- UINT upload_size = upload_pitch_dst * upload_h;
-
- D3D12_RESOURCE_DESC desc;
- ZeroMemory(&desc, sizeof(desc));
- desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
- desc.Alignment = 0;
- desc.Width = upload_size;
- desc.Height = 1;
- desc.DepthOrArraySize = 1;
- desc.MipLevels = 1;
- desc.Format = DXGI_FORMAT_UNKNOWN;
- desc.SampleDesc.Count = 1;
- desc.SampleDesc.Quality = 0;
- desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
- desc.Flags = D3D12_RESOURCE_FLAG_NONE;
-
- D3D12_HEAP_PROPERTIES props;
- memset(&props, 0, sizeof(D3D12_HEAP_PROPERTIES));
- props.Type = D3D12_HEAP_TYPE_UPLOAD;
- props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
- props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-
- // FIXME-OPT: Can upload buffer be reused?
- ID3D12Resource* uploadBuffer = nullptr;
- HRESULT hr = bd->pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc,
- D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&uploadBuffer));
- IM_ASSERT(SUCCEEDED(hr));
-
- // Create temporary command list and execute immediately
- ID3D12Fence* fence = nullptr;
- hr = bd->pd3dDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence));
- IM_ASSERT(SUCCEEDED(hr));
-
- HANDLE event = ::CreateEvent(0, 0, 0, 0);
- IM_ASSERT(event != nullptr);
-
- // FIXME-OPT: Create once and reuse?
- ID3D12CommandAllocator* cmdAlloc = nullptr;
- hr = bd->pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&cmdAlloc));
- IM_ASSERT(SUCCEEDED(hr));
-
- // FIXME-OPT: Can be use the one from user? (pass ID3D12GraphicsCommandList* to ImGui_ImplDX12_UpdateTextures)
- ID3D12GraphicsCommandList* cmdList = nullptr;
- hr = bd->pd3dDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, cmdAlloc, nullptr, IID_PPV_ARGS(&cmdList));
- IM_ASSERT(SUCCEEDED(hr));
-
- // Copy to upload buffer
- void* mapped = nullptr;
- D3D12_RANGE range = { 0, upload_size };
- hr = uploadBuffer->Map(0, &range, &mapped);
- IM_ASSERT(SUCCEEDED(hr));
- for (int y = 0; y < upload_h; y++)
- memcpy((void*)((uintptr_t)mapped + y * upload_pitch_dst), tex->GetPixelsAt(upload_x, upload_y + y), upload_pitch_src);
- uploadBuffer->Unmap(0, &range);
-
- if (need_barrier_before_copy)
- {
- D3D12_RESOURCE_BARRIER barrier = {};
- barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
- barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
- barrier.Transition.pResource = backend_tex->pTextureResource;
- barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
- barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
- barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
- cmdList->ResourceBarrier(1, &barrier);
- }
-
- D3D12_TEXTURE_COPY_LOCATION srcLocation = {};
- D3D12_TEXTURE_COPY_LOCATION dstLocation = {};
- {
- srcLocation.pResource = uploadBuffer;
- srcLocation.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
- srcLocation.PlacedFootprint.Footprint.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- srcLocation.PlacedFootprint.Footprint.Width = upload_w;
- srcLocation.PlacedFootprint.Footprint.Height = upload_h;
- srcLocation.PlacedFootprint.Footprint.Depth = 1;
- srcLocation.PlacedFootprint.Footprint.RowPitch = upload_pitch_dst;
- dstLocation.pResource = backend_tex->pTextureResource;
- dstLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
- dstLocation.SubresourceIndex = 0;
- }
- cmdList->CopyTextureRegion(&dstLocation, upload_x, upload_y, 0, &srcLocation, nullptr);
-
- {
- D3D12_RESOURCE_BARRIER barrier = {};
- barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
- barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
- barrier.Transition.pResource = backend_tex->pTextureResource;
- barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
- barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
- barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
- cmdList->ResourceBarrier(1, &barrier);
- }
-
- hr = cmdList->Close();
- IM_ASSERT(SUCCEEDED(hr));
-
- ID3D12CommandQueue* cmdQueue = bd->pCommandQueue;
- cmdQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&cmdList);
- hr = cmdQueue->Signal(fence, 1);
- IM_ASSERT(SUCCEEDED(hr));
-
- // FIXME-OPT: Suboptimal?
- // - To remove this may need to create NumFramesInFlight x ImGui_ImplDX12_FrameContext in backend data (mimick docking version)
- // - Store per-frame in flight: upload buffer?
- // - Where do cmdList and cmdAlloc fit?
- fence->SetEventOnCompletion(1, event);
- ::WaitForSingleObject(event, INFINITE);
-
- cmdList->Release();
- cmdAlloc->Release();
- ::CloseHandle(event);
- fence->Release();
- uploadBuffer->Release();
- tex->SetStatus(ImTextureStatus_OK);
- }
-
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames >= (int)bd->numFramesInFlight)
- ImGui_ImplDX12_DestroyTexture(tex);
-}
-
-bool ImGui_ImplDX12_CreateDeviceObjects()
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- if (!bd || !bd->pd3dDevice)
- return false;
- if (bd->pPipelineState)
- ImGui_ImplDX12_InvalidateDeviceObjects();
-
- // Create the root signature
- {
- D3D12_DESCRIPTOR_RANGE descRange = {};
- descRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
- descRange.NumDescriptors = 1;
- descRange.BaseShaderRegister = 0;
- descRange.RegisterSpace = 0;
- descRange.OffsetInDescriptorsFromTableStart = 0;
-
- D3D12_ROOT_PARAMETER param[2] = {};
-
- param[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
- param[0].Constants.ShaderRegister = 0;
- param[0].Constants.RegisterSpace = 0;
- param[0].Constants.Num32BitValues = 16;
- param[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
-
- param[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
- param[1].DescriptorTable.NumDescriptorRanges = 1;
- param[1].DescriptorTable.pDescriptorRanges = &descRange;
- param[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
-
- // Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling.
- D3D12_STATIC_SAMPLER_DESC staticSampler = {};
- staticSampler.Filter = D3D12_FILTER_MIN_MAG_MIP_LINEAR;
- staticSampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
- staticSampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
- staticSampler.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
- staticSampler.MipLODBias = 0.f;
- staticSampler.MaxAnisotropy = 0;
- staticSampler.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
- staticSampler.BorderColor = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK;
- staticSampler.MinLOD = 0.f;
- staticSampler.MaxLOD = D3D12_FLOAT32_MAX;
- staticSampler.ShaderRegister = 0;
- staticSampler.RegisterSpace = 0;
- staticSampler.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
-
- D3D12_ROOT_SIGNATURE_DESC desc = {};
- desc.NumParameters = _countof(param);
- desc.pParameters = param;
- desc.NumStaticSamplers = 1;
- desc.pStaticSamplers = &staticSampler;
- desc.Flags =
- D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |
- D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS |
- D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS |
- D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS;
-
- // Load d3d12.dll and D3D12SerializeRootSignature() function address dynamically to facilitate using with D3D12On7.
- // See if any version of d3d12.dll is already loaded in the process. If so, give preference to that.
- static HINSTANCE d3d12_dll = ::GetModuleHandleA("d3d12.dll");
- if (d3d12_dll == nullptr)
- {
- // Attempt to load d3d12.dll from local directories. This will only succeed if
- // (1) the current OS is Windows 7, and
- // (2) there exists a version of d3d12.dll for Windows 7 (D3D12On7) in one of the following directories.
- // See https://github.com/ocornut/imgui/pull/3696 for details.
- const char* localD3d12Paths[] = { ".\\d3d12.dll", ".\\d3d12on7\\d3d12.dll", ".\\12on7\\d3d12.dll" }; // A. current directory, B. used by some games, C. used in Microsoft D3D12On7 sample
- for (int i = 0; i < IM_ARRAYSIZE(localD3d12Paths); i++)
- if ((d3d12_dll = ::LoadLibraryA(localD3d12Paths[i])) != nullptr)
- break;
-
- // If failed, we are on Windows >= 10.
- if (d3d12_dll == nullptr)
- d3d12_dll = ::LoadLibraryA("d3d12.dll");
-
- if (d3d12_dll == nullptr)
- return false;
- }
-
- _PFN_D3D12_SERIALIZE_ROOT_SIGNATURE D3D12SerializeRootSignatureFn = (_PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(void*)::GetProcAddress(d3d12_dll, "D3D12SerializeRootSignature");
- if (D3D12SerializeRootSignatureFn == nullptr)
- return false;
-
- ID3DBlob* blob = nullptr;
- if (D3D12SerializeRootSignatureFn(&desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, nullptr) != S_OK)
- return false;
-
- bd->pd3dDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&bd->pRootSignature));
- blob->Release();
- }
-
- // By using D3DCompile() from <d3dcompiler.h> / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
- // If you would like to use this DX12 sample code but remove this dependency you can:
- // 1) compile once, save the compiled shader blobs into a file or source code and assign them to psoDesc.VS/PS [preferred solution]
- // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
- // See https://github.com/ocornut/imgui/pull/638 for sources and details.
-
- D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
- psoDesc.NodeMask = 1;
- psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
- psoDesc.pRootSignature = bd->pRootSignature;
- psoDesc.SampleMask = UINT_MAX;
- psoDesc.NumRenderTargets = 1;
- psoDesc.RTVFormats[0] = bd->RTVFormat;
- psoDesc.DSVFormat = bd->DSVFormat;
- psoDesc.SampleDesc.Count = 1;
- psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
-
- ID3DBlob* vertexShaderBlob;
- ID3DBlob* pixelShaderBlob;
-
- // Create the vertex shader
- {
- static const char* vertexShader =
- "cbuffer vertexBuffer : register(b0) \
- {\
- float4x4 ProjectionMatrix; \
- };\
- struct VS_INPUT\
- {\
- float2 pos : POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- \
- PS_INPUT main(VS_INPUT input)\
- {\
- PS_INPUT output;\
- output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
- output.col = input.col;\
- output.uv = input.uv;\
- return output;\
- }";
-
- if (FAILED(D3DCompile(vertexShader, strlen(vertexShader), nullptr, nullptr, nullptr, "main", "vs_5_0", 0, 0, &vertexShaderBlob, nullptr)))
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- psoDesc.VS = { vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize() };
-
- // Create the input layout
- static D3D12_INPUT_ELEMENT_DESC local_layout[] =
- {
- { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
- { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
- { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
- };
- psoDesc.InputLayout = { local_layout, 3 };
- }
-
- // Create the pixel shader
- {
- static const char* pixelShader =
- "struct PS_INPUT\
- {\
- float4 pos : SV_POSITION;\
- float4 col : COLOR0;\
- float2 uv : TEXCOORD0;\
- };\
- SamplerState sampler0 : register(s0);\
- Texture2D texture0 : register(t0);\
- \
- float4 main(PS_INPUT input) : SV_Target\
- {\
- float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
- return out_col; \
- }";
-
- if (FAILED(D3DCompile(pixelShader, strlen(pixelShader), nullptr, nullptr, nullptr, "main", "ps_5_0", 0, 0, &pixelShaderBlob, nullptr)))
- {
- vertexShaderBlob->Release();
- return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
- }
- psoDesc.PS = { pixelShaderBlob->GetBufferPointer(), pixelShaderBlob->GetBufferSize() };
- }
-
- // Create the blending setup
- {
- D3D12_BLEND_DESC& desc = psoDesc.BlendState;
- desc.AlphaToCoverageEnable = false;
- desc.RenderTarget[0].BlendEnable = true;
- desc.RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_ALPHA;
- desc.RenderTarget[0].DestBlend = D3D12_BLEND_INV_SRC_ALPHA;
- desc.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
- desc.RenderTarget[0].SrcBlendAlpha = D3D12_BLEND_ONE;
- desc.RenderTarget[0].DestBlendAlpha = D3D12_BLEND_INV_SRC_ALPHA;
- desc.RenderTarget[0].BlendOpAlpha = D3D12_BLEND_OP_ADD;
- desc.RenderTarget[0].RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;
- }
-
- // Create the rasterizer state
- {
- D3D12_RASTERIZER_DESC& desc = psoDesc.RasterizerState;
- desc.FillMode = D3D12_FILL_MODE_SOLID;
- desc.CullMode = D3D12_CULL_MODE_NONE;
- desc.FrontCounterClockwise = FALSE;
- desc.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
- desc.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
- desc.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
- desc.DepthClipEnable = true;
- desc.MultisampleEnable = FALSE;
- desc.AntialiasedLineEnable = FALSE;
- desc.ForcedSampleCount = 0;
- desc.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
- }
-
- // Create depth-stencil State
- {
- D3D12_DEPTH_STENCIL_DESC& desc = psoDesc.DepthStencilState;
- desc.DepthEnable = false;
- desc.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
- desc.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
- desc.StencilEnable = false;
- desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D12_STENCIL_OP_KEEP;
- desc.FrontFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS;
- desc.BackFace = desc.FrontFace;
- }
-
- HRESULT result_pipeline_state = bd->pd3dDevice->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&bd->pPipelineState));
- vertexShaderBlob->Release();
- pixelShaderBlob->Release();
- if (result_pipeline_state != S_OK)
- return false;
-
- return true;
-}
-
-void ImGui_ImplDX12_InvalidateDeviceObjects()
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- if (!bd || !bd->pd3dDevice)
- return;
-
- if (bd->commandQueueOwned)
- SafeRelease(bd->pCommandQueue);
- bd->commandQueueOwned = false;
- SafeRelease(bd->pRootSignature);
- SafeRelease(bd->pPipelineState);
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplDX12_DestroyTexture(tex);
-
- for (UINT i = 0; i < bd->numFramesInFlight; i++)
- {
- ImGui_ImplDX12_RenderBuffers* fr = &bd->pFrameResources[i];
- SafeRelease(fr->IndexBuffer);
- SafeRelease(fr->VertexBuffer);
- }
-}
-
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-static void ImGui_ImplDX12_InitLegacySingleDescriptorMode(ImGui_ImplDX12_InitInfo* init_info)
-{
- // Wrap legacy behavior of passing space for a single descriptor
- IM_ASSERT(init_info->LegacySingleSrvCpuDescriptor.ptr != 0 && init_info->LegacySingleSrvGpuDescriptor.ptr != 0);
- init_info->SrvDescriptorAllocFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_handle)
- {
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- IM_ASSERT(bd->LegacySingleDescriptorUsed == false && "Only 1 simultaneous texture allowed with legacy ImGui_ImplDX12_Init() signature!");
- *out_cpu_handle = bd->InitInfo.LegacySingleSrvCpuDescriptor;
- *out_gpu_handle = bd->InitInfo.LegacySingleSrvGpuDescriptor;
- bd->LegacySingleDescriptorUsed = true;
- };
- init_info->SrvDescriptorFreeFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE, D3D12_GPU_DESCRIPTOR_HANDLE)
- {
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- IM_ASSERT(bd->LegacySingleDescriptorUsed == true);
- bd->LegacySingleDescriptorUsed = false;
- };
-}
-#endif
-
-bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplDX12_Data* bd = IM_NEW(ImGui_ImplDX12_Data)();
- bd->InitInfo = *init_info; // Deep copy
- init_info = &bd->InitInfo;
-
- bd->pd3dDevice = init_info->Device;
- IM_ASSERT(init_info->CommandQueue != NULL);
- bd->pCommandQueue = init_info->CommandQueue;
- bd->RTVFormat = init_info->RTVFormat;
- bd->DSVFormat = init_info->DSVFormat;
- bd->numFramesInFlight = init_info->NumFramesInFlight;
- bd->pd3dSrvDescHeap = init_info->SrvDescriptorHeap;
-
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_dx12";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- if (init_info->SrvDescriptorAllocFn == nullptr)
- ImGui_ImplDX12_InitLegacySingleDescriptorMode(init_info);
-#endif
- IM_ASSERT(init_info->SrvDescriptorAllocFn != nullptr && init_info->SrvDescriptorFreeFn != nullptr);
-
- // Create buffers with a default size (they will later be grown as needed)
- bd->frameIndex = UINT_MAX;
- bd->pFrameResources = new ImGui_ImplDX12_RenderBuffers[bd->numFramesInFlight];
- for (int i = 0; i < (int)bd->numFramesInFlight; i++)
- {
- ImGui_ImplDX12_RenderBuffers* fr = &bd->pFrameResources[i];
- fr->IndexBuffer = nullptr;
- fr->VertexBuffer = nullptr;
- fr->IndexBufferSize = 10000;
- fr->VertexBufferSize = 5000;
- }
-
- return true;
-}
-
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-// Legacy initialization API Obsoleted in 1.91.5
-// font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture, they must be in 'srv_descriptor_heap'
-bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* srv_descriptor_heap, D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle)
-{
- ImGui_ImplDX12_InitInfo init_info;
- init_info.Device = device;
- init_info.NumFramesInFlight = num_frames_in_flight;
- init_info.RTVFormat = rtv_format;
- init_info.SrvDescriptorHeap = srv_descriptor_heap;
- init_info.LegacySingleSrvCpuDescriptor = font_srv_cpu_desc_handle;
- init_info.LegacySingleSrvGpuDescriptor = font_srv_gpu_desc_handle;
-
- D3D12_COMMAND_QUEUE_DESC queueDesc = {};
- queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
- queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
- queueDesc.NodeMask = 1;
- HRESULT hr = device->CreateCommandQueue(&queueDesc, IID_PPV_ARGS(&init_info.CommandQueue));
- IM_ASSERT(SUCCEEDED(hr));
-
- bool ret = ImGui_ImplDX12_Init(&init_info);
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- bd->commandQueueOwned = true;
- ImGuiIO& io = ImGui::GetIO();
- io.BackendFlags &= ~ImGuiBackendFlags_RendererHasTextures; // Using legacy ImGui_ImplDX12_Init() call with 1 SRV descriptor we cannot support multiple textures.
-
- return ret;
-}
-#endif
-
-void ImGui_ImplDX12_Shutdown()
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Clean up windows and device objects
- ImGui_ImplDX12_InvalidateDeviceObjects();
- delete[] bd->pFrameResources;
-
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplDX12_NewFrame()
-{
- ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX12_Init()?");
-
- if (!bd->pPipelineState)
- if (!ImGui_ImplDX12_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplDX12_CreateDeviceObjects() failed!");
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx12.h b/libs/imgui-1.92.1/backends/imgui_impl_dx12.h
deleted file mode 100644
index 4ff5104..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx12.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// dear imgui: Renderer Backend for DirectX12
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// The aim of imgui_impl_dx12.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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 <dxgiformat.h> // DXGI_FORMAT
-#include <d3d12.h> // D3D12_CPU_DESCRIPTOR_HANDLE
-
-// Initialization data, for ImGui_ImplDX12_Init()
-struct ImGui_ImplDX12_InitInfo
-{
- ID3D12Device* Device;
- ID3D12CommandQueue* CommandQueue; // Command queue used for queuing texture uploads.
- int NumFramesInFlight;
- DXGI_FORMAT RTVFormat; // RenderTarget format.
- DXGI_FORMAT DSVFormat; // DepthStencilView format.
- void* UserData;
-
- // Allocating SRV descriptors for textures is up to the application, so we provide callbacks.
- // (current version of the backend will only allocate one descriptor, from 1.92 the backend will need to allocate more)
- ID3D12DescriptorHeap* SrvDescriptorHeap;
- void (*SrvDescriptorAllocFn)(ImGui_ImplDX12_InitInfo* info, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_desc_handle);
- void (*SrvDescriptorFreeFn)(ImGui_ImplDX12_InitInfo* info, D3D12_CPU_DESCRIPTOR_HANDLE cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE gpu_desc_handle);
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- D3D12_CPU_DESCRIPTOR_HANDLE LegacySingleSrvCpuDescriptor; // To facilitate transition from single descriptor to allocator callback, you may use those.
- D3D12_GPU_DESCRIPTOR_HANDLE LegacySingleSrvGpuDescriptor;
-#endif
-
- ImGui_ImplDX12_InitInfo() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* info);
-IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list);
-
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-// Legacy initialization API Obsoleted in 1.91.5
-// - font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture, they must be in 'srv_descriptor_heap'
-// - When we introduced the ImGui_ImplDX12_InitInfo struct we also added a 'ID3D12CommandQueue* CommandQueue' field.
-IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* srv_descriptor_heap, D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle);
-#endif
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplDX12_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplDX12_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplDX12_RenderState
-{
- ID3D12Device* Device;
- ID3D12GraphicsCommandList* CommandList;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx9.cpp b/libs/imgui-1.92.1/backends/imgui_impl_dx9.cpp
deleted file mode 100644
index b0159bf..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx9.cpp
+++ /dev/null
@@ -1,478 +0,0 @@
-// dear imgui: Renderer Backend for DirectX9
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: IMGUI_USE_BGRA_PACKED_COLOR support, as this is the optimal color encoding for DirectX9.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-11: DirectX9: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
-// 2024-10-07: DirectX9: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-02-12: DirectX9: Using RGBA format when supported by the driver to avoid CPU side conversion. (#6575)
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-06-25: DirectX9: Explicitly disable texture state stages after >= 1.
-// 2021-05-19: DirectX9: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-04-23: DirectX9: Explicitly setting up more graphics states to increase compatibility with unusual non-default states.
-// 2021-03-18: DirectX9: Calling IDirect3DStateBlock9::Capture() after CreateStateBlock() as a workaround for state restoring issues (see #3857).
-// 2021-03-03: DirectX9: Added support for IMGUI_USE_BGRA_PACKED_COLOR in user's imconfig file.
-// 2021-02-18: DirectX9: Change blending equation to preserve alpha in output buffer.
-// 2019-05-29: DirectX9: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: DirectX9: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2019-03-29: Misc: Fixed erroneous assert in ImGui_ImplDX9_InvalidateDeviceObjects().
-// 2019-01-16: Misc: Disabled fog before drawing UI's. Fixes issue #2288.
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-06-08: Misc: Extracted imgui_impl_dx9.cpp/.h away from the old combined DX9+Win32 example.
-// 2018-06-08: DirectX9: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-05-07: Render: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX9_RenderDrawData() in the .h file so you can call it yourself.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_dx9.h"
-
-// DirectX
-#include <d3d9.h>
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast // yes, they are more terse.
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#endif
-
-// DirectX data
-struct ImGui_ImplDX9_Data
-{
- LPDIRECT3DDEVICE9 pd3dDevice;
- LPDIRECT3DVERTEXBUFFER9 pVB;
- LPDIRECT3DINDEXBUFFER9 pIB;
- int VertexBufferSize;
- int IndexBufferSize;
- bool HasRgbaSupport;
-
- ImGui_ImplDX9_Data() { memset((void*)this, 0, sizeof(*this)); VertexBufferSize = 5000; IndexBufferSize = 10000; }
-};
-
-struct CUSTOMVERTEX
-{
- float pos[3];
- D3DCOLOR col;
- float uv[2];
-};
-#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
-
-#ifdef IMGUI_USE_BGRA_PACKED_COLOR
-#define IMGUI_COL_TO_DX9_ARGB(_COL) (_COL)
-#else
-#define IMGUI_COL_TO_DX9_ARGB(_COL) (((_COL) & 0xFF00FF00) | (((_COL) & 0xFF0000) >> 16) | (((_COL) & 0xFF) << 16))
-#endif
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplDX9_Data* ImGui_ImplDX9_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplDX9_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Functions
-static void ImGui_ImplDX9_SetupRenderState(ImDrawData* draw_data)
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
-
- // Setup viewport
- D3DVIEWPORT9 vp;
- vp.X = vp.Y = 0;
- vp.Width = (DWORD)draw_data->DisplaySize.x;
- vp.Height = (DWORD)draw_data->DisplaySize.y;
- vp.MinZ = 0.0f;
- vp.MaxZ = 1.0f;
-
- LPDIRECT3DDEVICE9 device = bd->pd3dDevice;
- device->SetViewport(&vp);
-
- // Setup render state: fixed-pipeline, alpha-blending, no face culling, no depth testing, shade mode (for gradient), bilinear sampling.
- device->SetPixelShader(nullptr);
- device->SetVertexShader(nullptr);
- device->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
- device->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
- device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
- device->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE);
- device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
- device->SetRenderState(D3DRS_ZENABLE, FALSE);
- device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
- device->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
- device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
- device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
- device->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, TRUE);
- device->SetRenderState(D3DRS_SRCBLENDALPHA, D3DBLEND_ONE);
- device->SetRenderState(D3DRS_DESTBLENDALPHA, D3DBLEND_INVSRCALPHA);
- device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE);
- device->SetRenderState(D3DRS_FOGENABLE, FALSE);
- device->SetRenderState(D3DRS_RANGEFOGENABLE, FALSE);
- device->SetRenderState(D3DRS_SPECULARENABLE, FALSE);
- device->SetRenderState(D3DRS_STENCILENABLE, FALSE);
- device->SetRenderState(D3DRS_CLIPPING, TRUE);
- device->SetRenderState(D3DRS_LIGHTING, FALSE);
- device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
- device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
- device->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
- device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
- device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
- device->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
- device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
- device->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
- device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
- device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
- device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
- device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
-
- // Setup orthographic projection matrix
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- // Being agnostic of whether <d3dx9.h> or <DirectXMath.h> can be used, we aren't relying on D3DXMatrixIdentity()/D3DXMatrixOrthoOffCenterLH() or DirectX::XMMatrixIdentity()/DirectX::XMMatrixOrthographicOffCenterLH()
- {
- float L = draw_data->DisplayPos.x + 0.5f;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x + 0.5f;
- float T = draw_data->DisplayPos.y + 0.5f;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y + 0.5f;
- D3DMATRIX mat_identity = { { { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f } } };
- D3DMATRIX mat_projection =
- { { {
- 2.0f/(R-L), 0.0f, 0.0f, 0.0f,
- 0.0f, 2.0f/(T-B), 0.0f, 0.0f,
- 0.0f, 0.0f, 0.5f, 0.0f,
- (L+R)/(L-R), (T+B)/(B-T), 0.5f, 1.0f
- } } };
- device->SetTransform(D3DTS_WORLD, &mat_identity);
- device->SetTransform(D3DTS_VIEW, &mat_identity);
- device->SetTransform(D3DTS_PROJECTION, &mat_projection);
- }
-}
-
-// Render function.
-void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data)
-{
- // Avoid rendering when minimized
- if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
- return;
-
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- LPDIRECT3DDEVICE9 device = bd->pd3dDevice;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplDX9_UpdateTexture(tex);
-
- // Create and grow buffers if needed
- if (!bd->pVB || bd->VertexBufferSize < draw_data->TotalVtxCount)
- {
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- bd->VertexBufferSize = draw_data->TotalVtxCount + 5000;
- if (device->CreateVertexBuffer(bd->VertexBufferSize * sizeof(CUSTOMVERTEX), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &bd->pVB, nullptr) < 0)
- return;
- }
- if (!bd->pIB || bd->IndexBufferSize < draw_data->TotalIdxCount)
- {
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
- bd->IndexBufferSize = draw_data->TotalIdxCount + 10000;
- if (device->CreateIndexBuffer(bd->IndexBufferSize * sizeof(ImDrawIdx), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, sizeof(ImDrawIdx) == 2 ? D3DFMT_INDEX16 : D3DFMT_INDEX32, D3DPOOL_DEFAULT, &bd->pIB, nullptr) < 0)
- return;
- }
-
- // Backup the DX9 state
- IDirect3DStateBlock9* state_block = nullptr;
- if (device->CreateStateBlock(D3DSBT_ALL, &state_block) < 0)
- return;
- if (state_block->Capture() < 0)
- {
- state_block->Release();
- return;
- }
-
- // Backup the DX9 transform (DX9 documentation suggests that it is included in the StateBlock but it doesn't appear to)
- D3DMATRIX last_world, last_view, last_projection;
- device->GetTransform(D3DTS_WORLD, &last_world);
- device->GetTransform(D3DTS_VIEW, &last_view);
- device->GetTransform(D3DTS_PROJECTION, &last_projection);
-
- // Allocate buffers
- CUSTOMVERTEX* vtx_dst;
- ImDrawIdx* idx_dst;
- if (bd->pVB->Lock(0, (UINT)(draw_data->TotalVtxCount * sizeof(CUSTOMVERTEX)), (void**)&vtx_dst, D3DLOCK_DISCARD) < 0)
- {
- state_block->Release();
- return;
- }
- if (bd->pIB->Lock(0, (UINT)(draw_data->TotalIdxCount * sizeof(ImDrawIdx)), (void**)&idx_dst, D3DLOCK_DISCARD) < 0)
- {
- bd->pVB->Unlock();
- state_block->Release();
- return;
- }
-
- // Copy and convert all vertices into a single contiguous buffer, convert colors to DX9 default format.
- // FIXME-OPT: This is a minor waste of resource, the ideal is to use imconfig.h and
- // 1) to avoid repacking colors: #define IMGUI_USE_BGRA_PACKED_COLOR
- // 2) to avoid repacking vertices: #define IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT struct ImDrawVert { ImVec2 pos; float z; ImU32 col; ImVec2 uv; }
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- const ImDrawVert* vtx_src = draw_list->VtxBuffer.Data;
- for (int i = 0; i < draw_list->VtxBuffer.Size; i++)
- {
- vtx_dst->pos[0] = vtx_src->pos.x;
- vtx_dst->pos[1] = vtx_src->pos.y;
- vtx_dst->pos[2] = 0.0f;
- vtx_dst->col = IMGUI_COL_TO_DX9_ARGB(vtx_src->col);
- vtx_dst->uv[0] = vtx_src->uv.x;
- vtx_dst->uv[1] = vtx_src->uv.y;
- vtx_dst++;
- vtx_src++;
- }
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- idx_dst += draw_list->IdxBuffer.Size;
- }
- bd->pVB->Unlock();
- bd->pIB->Unlock();
- device->SetStreamSource(0, bd->pVB, 0, sizeof(CUSTOMVERTEX));
- device->SetIndices(bd->pIB);
- device->SetFVF(D3DFVF_CUSTOMVERTEX);
-
- // Setup desired DX state
- ImGui_ImplDX9_SetupRenderState(draw_data);
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- ImVec2 clip_off = draw_data->DisplayPos;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplDX9_SetupRenderState(draw_data);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min(pcmd->ClipRect.x - clip_off.x, pcmd->ClipRect.y - clip_off.y);
- ImVec2 clip_max(pcmd->ClipRect.z - clip_off.x, pcmd->ClipRect.w - clip_off.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- const RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
- device->SetScissorRect(&r);
-
- // Bind texture, Draw
- const LPDIRECT3DTEXTURE9 texture = (LPDIRECT3DTEXTURE9)pcmd->GetTexID();
- device->SetTexture(0, texture);
- device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, pcmd->VtxOffset + global_vtx_offset, 0, (UINT)draw_list->VtxBuffer.Size, pcmd->IdxOffset + global_idx_offset, pcmd->ElemCount / 3);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
-
- // Restore the DX9 transform
- device->SetTransform(D3DTS_WORLD, &last_world);
- device->SetTransform(D3DTS_VIEW, &last_view);
- device->SetTransform(D3DTS_PROJECTION, &last_projection);
-
- // Restore the DX9 state
- state_block->Apply();
- state_block->Release();
-}
-
-static bool ImGui_ImplDX9_CheckFormatSupport(LPDIRECT3DDEVICE9 pDevice, D3DFORMAT format)
-{
- LPDIRECT3D9 pd3d = nullptr;
- if (pDevice->GetDirect3D(&pd3d) != D3D_OK)
- return false;
- D3DDEVICE_CREATION_PARAMETERS param = {};
- D3DDISPLAYMODE mode = {};
- if (pDevice->GetCreationParameters(&param) != D3D_OK || pDevice->GetDisplayMode(0, &mode) != D3D_OK)
- {
- pd3d->Release();
- return false;
- }
- // Font texture should support linear filter, color blend and write to render-target
- bool support = (pd3d->CheckDeviceFormat(param.AdapterOrdinal, param.DeviceType, mode.Format, D3DUSAGE_DYNAMIC | D3DUSAGE_QUERY_FILTER | D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3DRTYPE_TEXTURE, format)) == D3D_OK;
- pd3d->Release();
- return support;
-}
-
-bool ImGui_ImplDX9_Init(IDirect3DDevice9* device)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplDX9_Data* bd = IM_NEW(ImGui_ImplDX9_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_dx9";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Renderer_TextureMaxWidth = platform_io.Renderer_TextureMaxHeight = 4096;
-
- bd->pd3dDevice = device;
- bd->pd3dDevice->AddRef();
- bd->HasRgbaSupport = ImGui_ImplDX9_CheckFormatSupport(bd->pd3dDevice, D3DFMT_A8B8G8R8);
-
- return true;
-}
-
-void ImGui_ImplDX9_Shutdown()
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplDX9_InvalidateDeviceObjects();
- if (bd->pd3dDevice) { bd->pd3dDevice->Release(); }
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-// Convert RGBA32 to BGRA32 (because RGBA32 is not well supported by DX9 devices)
-static void ImGui_ImplDX9_CopyTextureRegion(bool tex_use_colors, const ImU32* src, int src_pitch, ImU32* dst, int dst_pitch, int w, int h)
-{
-#ifndef IMGUI_USE_BGRA_PACKED_COLOR
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- const bool convert_rgba_to_bgra = (!bd->HasRgbaSupport && tex_use_colors);
-#else
- const bool convert_rgba_to_bgra = false;
- IM_UNUSED(tex_use_colors);
-#endif
- for (int y = 0; y < h; y++)
- {
- const ImU32* src_p = (const ImU32*)(const void*)((const unsigned char*)src + src_pitch * y);
- ImU32* dst_p = (ImU32*)(void*)((unsigned char*)dst + dst_pitch * y);
- if (convert_rgba_to_bgra)
- for (int x = w; x > 0; x--, src_p++, dst_p++) // Convert copy
- *dst_p = IMGUI_COL_TO_DX9_ARGB(*src_p);
- else
- memcpy(dst_p, src_p, w * 4); // Raw copy
- }
-}
-
-void ImGui_ImplDX9_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- LPDIRECT3DTEXTURE9 dx_tex = nullptr;
- HRESULT hr = bd->pd3dDevice->CreateTexture(tex->Width, tex->Height, 1, D3DUSAGE_DYNAMIC, bd->HasRgbaSupport ? D3DFMT_A8B8G8R8 : D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &dx_tex, nullptr);
- if (hr < 0)
- {
- IM_ASSERT(hr >= 0 && "Backend failed to create texture!");
- return;
- }
-
- D3DLOCKED_RECT locked_rect;
- if (dx_tex->LockRect(0, &locked_rect, nullptr, 0) == D3D_OK)
- {
- ImGui_ImplDX9_CopyTextureRegion(tex->UseColors, (ImU32*)tex->GetPixels(), tex->Width * 4, (ImU32*)locked_rect.pBits, (ImU32)locked_rect.Pitch, tex->Width, tex->Height);
- dx_tex->UnlockRect(0);
- }
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)dx_tex);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- LPDIRECT3DTEXTURE9 backend_tex = (LPDIRECT3DTEXTURE9)(intptr_t)tex->TexID;
- RECT update_rect = { (LONG)tex->UpdateRect.x, (LONG)tex->UpdateRect.y, (LONG)(tex->UpdateRect.x + tex->UpdateRect.w), (LONG)(tex->UpdateRect.y + tex->UpdateRect.h) };
- D3DLOCKED_RECT locked_rect;
- if (backend_tex->LockRect(0, &locked_rect, &update_rect, 0) == D3D_OK)
- for (ImTextureRect& r : tex->Updates)
- ImGui_ImplDX9_CopyTextureRegion(tex->UseColors, (ImU32*)tex->GetPixelsAt(r.x, r.y), tex->Width * 4,
- (ImU32*)locked_rect.pBits + (r.x - update_rect.left) + (r.y - update_rect.top) * (locked_rect.Pitch / 4), (int)locked_rect.Pitch, r.w, r.h);
- backend_tex->UnlockRect(0);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantDestroy)
- {
- LPDIRECT3DTEXTURE9 backend_tex = (LPDIRECT3DTEXTURE9)tex->TexID;
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(tex->TexID == (ImTextureID)(intptr_t)backend_tex);
- backend_tex->Release();
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- }
-}
-
-bool ImGui_ImplDX9_CreateDeviceObjects()
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- if (!bd || !bd->pd3dDevice)
- return false;
- return true;
-}
-
-void ImGui_ImplDX9_InvalidateDeviceObjects()
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- if (!bd || !bd->pd3dDevice)
- return;
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- {
- tex->SetStatus(ImTextureStatus_WantDestroy);
- ImGui_ImplDX9_UpdateTexture(tex);
- }
- if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
- if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
-}
-
-void ImGui_ImplDX9_NewFrame()
-{
- ImGui_ImplDX9_Data* bd = ImGui_ImplDX9_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX9_Init()?");
- IM_UNUSED(bd);
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_dx9.h b/libs/imgui-1.92.1/backends/imgui_impl_dx9.h
deleted file mode 100644
index 600f0a7..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_dx9.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// dear imgui: Renderer Backend for DirectX9
-// This needs to be used along with a Platform Backend (e.g. Win32)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: IMGUI_USE_BGRA_PACKED_COLOR support, as this is the optimal color encoding for DirectX9.
-
-// 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
-
-struct IDirect3DDevice9;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device);
-IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data);
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplDX9_UpdateTexture(ImTextureData* tex);
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_glut.cpp b/libs/imgui-1.92.1/backends/imgui_impl_glut.cpp
deleted file mode 100644
index a68f9db..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_glut.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-// dear imgui: Platform Backend for GLUT/FreeGLUT
-// This needs to be used along with a Renderer (e.g. OpenGL2)
-
-// !!! GLUT/FreeGLUT IS OBSOLETE PREHISTORIC SOFTWARE. Using GLUT is not recommended unless you really miss the 90's. !!!
-// !!! If someone or something is teaching you GLUT today, you are being abused. Please show some resistance. !!!
-// !!! Nowadays, prefer using GLFW or SDL instead!
-
-// Implemented features:
-// [X] Platform: Partial 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 GLUT values are obsolete since 1.87 and not supported since 1.91.5]
-// Missing features or Issues:
-// [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I
-// [ ] Platform: Missing horizontal mouse wheel support.
-// [ ] Platform: Missing mouse cursor shape/visibility support.
-// [ ] Platform: Missing clipboard support (not supported by Glut).
-// [ ] Platform: Missing gamepad support.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2023-04-17: BREAKING: Removed call to ImGui::NewFrame() from ImGui_ImplGLUT_NewFrame(). Needs to be called from the main application loop, like with every other backends.
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2019-04-03: Misc: Renamed imgui_impl_freeglut.cpp/.h to imgui_impl_glut.cpp/.h.
-// 2019-03-25: Misc: Made io.DeltaTime always above zero.
-// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
-// 2018-03-22: Added GLUT Platform binding.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_glut.h"
-#define GL_SILENCE_DEPRECATION
-#ifdef __APPLE__
-#include <GLUT/glut.h>
-#else
-#include <GL/freeglut.h>
-#endif
-
-#ifdef _MSC_VER
-#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
-#endif
-
-static int g_Time = 0; // Current time, in milliseconds
-
-// Glut has one function for characters and one for "special keys". We map the characters in the 0..255 range and the keys above.
-static ImGuiKey ImGui_ImplGLUT_KeyToImGuiKey(int key)
-{
- switch (key)
- {
- case '\t': return ImGuiKey_Tab;
- case 256 + GLUT_KEY_LEFT: return ImGuiKey_LeftArrow;
- case 256 + GLUT_KEY_RIGHT: return ImGuiKey_RightArrow;
- case 256 + GLUT_KEY_UP: return ImGuiKey_UpArrow;
- case 256 + GLUT_KEY_DOWN: return ImGuiKey_DownArrow;
- case 256 + GLUT_KEY_PAGE_UP: return ImGuiKey_PageUp;
- case 256 + GLUT_KEY_PAGE_DOWN: return ImGuiKey_PageDown;
- case 256 + GLUT_KEY_HOME: return ImGuiKey_Home;
- case 256 + GLUT_KEY_END: return ImGuiKey_End;
- case 256 + GLUT_KEY_INSERT: return ImGuiKey_Insert;
- case 127: return ImGuiKey_Delete;
- case 8: return ImGuiKey_Backspace;
- case ' ': return ImGuiKey_Space;
- case 13: return ImGuiKey_Enter;
- case 27: return ImGuiKey_Escape;
- case 39: return ImGuiKey_Apostrophe;
- case 44: return ImGuiKey_Comma;
- case 45: return ImGuiKey_Minus;
- case 46: return ImGuiKey_Period;
- case 47: return ImGuiKey_Slash;
- case 59: return ImGuiKey_Semicolon;
- case 61: return ImGuiKey_Equal;
- case 91: return ImGuiKey_LeftBracket;
- case 92: return ImGuiKey_Backslash;
- case 93: return ImGuiKey_RightBracket;
- case 96: return ImGuiKey_GraveAccent;
- //case 0: return ImGuiKey_CapsLock;
- //case 0: return ImGuiKey_ScrollLock;
- case 256 + 0x006D: return ImGuiKey_NumLock;
- //case 0: return ImGuiKey_PrintScreen;
- //case 0: return ImGuiKey_Pause;
- //case '0': return ImGuiKey_Keypad0;
- //case '1': return ImGuiKey_Keypad1;
- //case '2': return ImGuiKey_Keypad2;
- //case '3': return ImGuiKey_Keypad3;
- //case '4': return ImGuiKey_Keypad4;
- //case '5': return ImGuiKey_Keypad5;
- //case '6': return ImGuiKey_Keypad6;
- //case '7': return ImGuiKey_Keypad7;
- //case '8': return ImGuiKey_Keypad8;
- //case '9': return ImGuiKey_Keypad9;
- //case 46: return ImGuiKey_KeypadDecimal;
- //case 47: return ImGuiKey_KeypadDivide;
- case 42: return ImGuiKey_KeypadMultiply;
- //case 45: return ImGuiKey_KeypadSubtract;
- case 43: return ImGuiKey_KeypadAdd;
- //case 13: return ImGuiKey_KeypadEnter;
- //case 0: return ImGuiKey_KeypadEqual;
- case 256 + 0x0072: return ImGuiKey_LeftCtrl;
- case 256 + 0x0070: return ImGuiKey_LeftShift;
- case 256 + 0x0074: return ImGuiKey_LeftAlt;
- //case 0: return ImGuiKey_LeftSuper;
- case 256 + 0x0073: return ImGuiKey_RightCtrl;
- case 256 + 0x0071: return ImGuiKey_RightShift;
- case 256 + 0x0075: return ImGuiKey_RightAlt;
- //case 0: return ImGuiKey_RightSuper;
- //case 0: return ImGuiKey_Menu;
- case '0': return ImGuiKey_0;
- case '1': return ImGuiKey_1;
- case '2': return ImGuiKey_2;
- case '3': return ImGuiKey_3;
- case '4': return ImGuiKey_4;
- case '5': return ImGuiKey_5;
- case '6': return ImGuiKey_6;
- case '7': return ImGuiKey_7;
- case '8': return ImGuiKey_8;
- case '9': return ImGuiKey_9;
- case 'A': case 'a': return ImGuiKey_A;
- case 'B': case 'b': return ImGuiKey_B;
- case 'C': case 'c': return ImGuiKey_C;
- case 'D': case 'd': return ImGuiKey_D;
- case 'E': case 'e': return ImGuiKey_E;
- case 'F': case 'f': return ImGuiKey_F;
- case 'G': case 'g': return ImGuiKey_G;
- case 'H': case 'h': return ImGuiKey_H;
- case 'I': case 'i': return ImGuiKey_I;
- case 'J': case 'j': return ImGuiKey_J;
- case 'K': case 'k': return ImGuiKey_K;
- case 'L': case 'l': return ImGuiKey_L;
- case 'M': case 'm': return ImGuiKey_M;
- case 'N': case 'n': return ImGuiKey_N;
- case 'O': case 'o': return ImGuiKey_O;
- case 'P': case 'p': return ImGuiKey_P;
- case 'Q': case 'q': return ImGuiKey_Q;
- case 'R': case 'r': return ImGuiKey_R;
- case 'S': case 's': return ImGuiKey_S;
- case 'T': case 't': return ImGuiKey_T;
- case 'U': case 'u': return ImGuiKey_U;
- case 'V': case 'v': return ImGuiKey_V;
- case 'W': case 'w': return ImGuiKey_W;
- case 'X': case 'x': return ImGuiKey_X;
- case 'Y': case 'y': return ImGuiKey_Y;
- case 'Z': case 'z': return ImGuiKey_Z;
- case 256 + GLUT_KEY_F1: return ImGuiKey_F1;
- case 256 + GLUT_KEY_F2: return ImGuiKey_F2;
- case 256 + GLUT_KEY_F3: return ImGuiKey_F3;
- case 256 + GLUT_KEY_F4: return ImGuiKey_F4;
- case 256 + GLUT_KEY_F5: return ImGuiKey_F5;
- case 256 + GLUT_KEY_F6: return ImGuiKey_F6;
- case 256 + GLUT_KEY_F7: return ImGuiKey_F7;
- case 256 + GLUT_KEY_F8: return ImGuiKey_F8;
- case 256 + GLUT_KEY_F9: return ImGuiKey_F9;
- case 256 + GLUT_KEY_F10: return ImGuiKey_F10;
- case 256 + GLUT_KEY_F11: return ImGuiKey_F11;
- case 256 + GLUT_KEY_F12: return ImGuiKey_F12;
- default: return ImGuiKey_None;
- }
-}
-
-bool ImGui_ImplGLUT_Init()
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
-
-#ifdef FREEGLUT
- io.BackendPlatformName = "imgui_impl_glut (freeglut)";
-#else
- io.BackendPlatformName = "imgui_impl_glut";
-#endif
- g_Time = 0;
-
- return true;
-}
-
-void ImGui_ImplGLUT_InstallFuncs()
-{
- glutReshapeFunc(ImGui_ImplGLUT_ReshapeFunc);
- glutMotionFunc(ImGui_ImplGLUT_MotionFunc);
- glutPassiveMotionFunc(ImGui_ImplGLUT_MotionFunc);
- glutMouseFunc(ImGui_ImplGLUT_MouseFunc);
-#ifdef __FREEGLUT_EXT_H__
- glutMouseWheelFunc(ImGui_ImplGLUT_MouseWheelFunc);
-#endif
- glutKeyboardFunc(ImGui_ImplGLUT_KeyboardFunc);
- glutKeyboardUpFunc(ImGui_ImplGLUT_KeyboardUpFunc);
- glutSpecialFunc(ImGui_ImplGLUT_SpecialFunc);
- glutSpecialUpFunc(ImGui_ImplGLUT_SpecialUpFunc);
-}
-
-void ImGui_ImplGLUT_Shutdown()
-{
- ImGuiIO& io = ImGui::GetIO();
- io.BackendPlatformName = nullptr;
-}
-
-void ImGui_ImplGLUT_NewFrame()
-{
- // Setup time step
- ImGuiIO& io = ImGui::GetIO();
- int current_time = glutGet(GLUT_ELAPSED_TIME);
- int delta_time_ms = (current_time - g_Time);
- if (delta_time_ms <= 0)
- delta_time_ms = 1;
- io.DeltaTime = delta_time_ms / 1000.0f;
- g_Time = current_time;
-}
-
-static void ImGui_ImplGLUT_UpdateKeyModifiers()
-{
- ImGuiIO& io = ImGui::GetIO();
- int glut_key_mods = glutGetModifiers();
- io.AddKeyEvent(ImGuiMod_Ctrl, (glut_key_mods & GLUT_ACTIVE_CTRL) != 0);
- io.AddKeyEvent(ImGuiMod_Shift, (glut_key_mods & GLUT_ACTIVE_SHIFT) != 0);
- io.AddKeyEvent(ImGuiMod_Alt, (glut_key_mods & GLUT_ACTIVE_ALT) != 0);
-}
-
-static void ImGui_ImplGLUT_AddKeyEvent(ImGuiKey key, bool down, int native_keycode)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddKeyEvent(key, down);
- io.SetKeyEventNativeData(key, native_keycode, -1); // To support legacy indexing (<1.87 user code)
-}
-
-void ImGui_ImplGLUT_KeyboardFunc(unsigned char c, int x, int y)
-{
- // Send character to imgui
- //printf("char_down_func %d '%c'\n", c, c);
- ImGuiIO& io = ImGui::GetIO();
- if (c >= 32)
- io.AddInputCharacter((unsigned int)c);
-
- ImGuiKey key = ImGui_ImplGLUT_KeyToImGuiKey(c);
- ImGui_ImplGLUT_AddKeyEvent(key, true, c);
- ImGui_ImplGLUT_UpdateKeyModifiers();
- (void)x; (void)y; // Unused
-}
-
-void ImGui_ImplGLUT_KeyboardUpFunc(unsigned char c, int x, int y)
-{
- //printf("char_up_func %d '%c'\n", c, c);
- ImGuiKey key = ImGui_ImplGLUT_KeyToImGuiKey(c);
- ImGui_ImplGLUT_AddKeyEvent(key, false, c);
- ImGui_ImplGLUT_UpdateKeyModifiers();
- (void)x; (void)y; // Unused
-}
-
-void ImGui_ImplGLUT_SpecialFunc(int key, int x, int y)
-{
- //printf("key_down_func %d\n", key);
- ImGuiKey imgui_key = ImGui_ImplGLUT_KeyToImGuiKey(key + 256);
- ImGui_ImplGLUT_AddKeyEvent(imgui_key, true, key + 256);
- ImGui_ImplGLUT_UpdateKeyModifiers();
- (void)x; (void)y; // Unused
-}
-
-void ImGui_ImplGLUT_SpecialUpFunc(int key, int x, int y)
-{
- //printf("key_up_func %d\n", key);
- ImGuiKey imgui_key = ImGui_ImplGLUT_KeyToImGuiKey(key + 256);
- ImGui_ImplGLUT_AddKeyEvent(imgui_key, false, key + 256);
- ImGui_ImplGLUT_UpdateKeyModifiers();
- (void)x; (void)y; // Unused
-}
-
-void ImGui_ImplGLUT_MouseFunc(int glut_button, int state, int x, int y)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddMousePosEvent((float)x, (float)y);
- int button = -1;
- if (glut_button == GLUT_LEFT_BUTTON) button = 0;
- if (glut_button == GLUT_RIGHT_BUTTON) button = 1;
- if (glut_button == GLUT_MIDDLE_BUTTON) button = 2;
- if (button != -1 && (state == GLUT_DOWN || state == GLUT_UP))
- io.AddMouseButtonEvent(button, state == GLUT_DOWN);
-}
-
-#ifdef __FREEGLUT_EXT_H__
-void ImGui_ImplGLUT_MouseWheelFunc(int button, int dir, int x, int y)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddMousePosEvent((float)x, (float)y);
- if (dir != 0)
- io.AddMouseWheelEvent(0.0f, dir > 0 ? 1.0f : -1.0f);
- (void)button; // Unused
-}
-#endif
-
-void ImGui_ImplGLUT_ReshapeFunc(int w, int h)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.DisplaySize = ImVec2((float)w, (float)h);
-}
-
-void ImGui_ImplGLUT_MotionFunc(int x, int y)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddMousePosEvent((float)x, (float)y);
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_glut.h b/libs/imgui-1.92.1/backends/imgui_impl_glut.h
deleted file mode 100644
index 20e77db..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_glut.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// dear imgui: Platform Backend for GLUT/FreeGLUT
-// This needs to be used along with a Renderer (e.g. OpenGL2)
-
-// !!! GLUT/FreeGLUT IS OBSOLETE PREHISTORIC SOFTWARE. Using GLUT is not recommended unless you really miss the 90's. !!!
-// !!! If someone or something is teaching you GLUT today, you are being abused. Please show some resistance. !!!
-// !!! Nowadays, prefer using GLFW or SDL instead!
-
-// Implemented features:
-// [X] Platform: Partial 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 GLUT values are obsolete since 1.87 and not supported since 1.91.5]
-// Missing features or Issues:
-// [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I
-// [ ] Platform: Missing horizontal mouse wheel support.
-// [ ] Platform: Missing mouse cursor shape/visibility support.
-// [ ] Platform: Missing clipboard support (not supported by Glut).
-// [ ] Platform: Missing gamepad support.
-
-// 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
-#ifndef IMGUI_DISABLE
-#include "imgui.h" // IMGUI_IMPL_API
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplGLUT_Init();
-IMGUI_IMPL_API void ImGui_ImplGLUT_InstallFuncs();
-IMGUI_IMPL_API void ImGui_ImplGLUT_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplGLUT_NewFrame();
-
-// You can call ImGui_ImplGLUT_InstallFuncs() to get all those functions installed automatically,
-// or call them yourself from your own GLUT handlers. We are using the same weird names as GLUT for consistency..
-//------------------------------------ GLUT name ---------------------------------------------- Decent Name ---------
-IMGUI_IMPL_API void ImGui_ImplGLUT_ReshapeFunc(int w, int h); // ~ ResizeFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_MotionFunc(int x, int y); // ~ MouseMoveFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_MouseFunc(int button, int state, int x, int y); // ~ MouseButtonFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_MouseWheelFunc(int button, int dir, int x, int y); // ~ MouseWheelFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_KeyboardFunc(unsigned char c, int x, int y); // ~ CharPressedFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_KeyboardUpFunc(unsigned char c, int x, int y); // ~ CharReleasedFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_SpecialFunc(int key, int x, int y); // ~ KeyPressedFunc
-IMGUI_IMPL_API void ImGui_ImplGLUT_SpecialUpFunc(int key, int x, int y); // ~ KeyReleasedFunc
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_metal.h b/libs/imgui-1.92.1/backends/imgui_impl_metal.h
deleted file mode 100644
index 2a9a26a..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_metal.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// dear imgui: Renderer Backend for Metal
-// This needs to be used along with a Platform Backend (e.g. OSX)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'MTLTexture' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// 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
-
-//-----------------------------------------------------------------------------
-// ObjC API
-//-----------------------------------------------------------------------------
-
-#ifdef __OBJC__
-
-@class MTLRenderPassDescriptor;
-@protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id<MTLDevice> device);
-IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor* renderPassDescriptor);
-IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* drawData,
- id<MTLCommandBuffer> commandBuffer,
- id<MTLRenderCommandEncoder> commandEncoder);
-
-// Called by Init/NewFrame/Shutdown
-IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device);
-IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplMetal_UpdateTexture(ImTextureData* tex);
-
-#endif
-
-//-----------------------------------------------------------------------------
-// C++ API
-//-----------------------------------------------------------------------------
-
-// Enable Metal C++ binding support with '#define IMGUI_IMPL_METAL_CPP' in your imconfig.h file
-// More info about using Metal from C++: https://developer.apple.com/metal/cpp/
-
-#ifdef IMGUI_IMPL_METAL_CPP
-#include <Metal/Metal.hpp>
-#ifndef __OBJC__
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplMetal_Init(MTL::Device* device);
-IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTL::RenderPassDescriptor* renderPassDescriptor);
-IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
- MTL::CommandBuffer* commandBuffer,
- MTL::RenderCommandEncoder* commandEncoder);
-
-// Called by Init/NewFrame/Shutdown
-IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(MTL::Device* device);
-IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplMetal_UpdateTexture(ImTextureData* tex);
-
-#endif
-#endif
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_metal.mm b/libs/imgui-1.92.1/backends/imgui_impl_metal.mm
deleted file mode 100644
index b1decb2..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_metal.mm
+++ /dev/null
@@ -1,652 +0,0 @@
-// dear imgui: Renderer Backend for Metal
-// This needs to be used along with a Platform Backend (e.g. OSX)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'MTLTexture' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplMetal_CreateFontsTexture() and ImGui_ImplMetal_DestroyFontsTexture().
-// 2025-02-03: Metal: Crash fix. (#8367)
-// 2024-01-08: Metal: Fixed memory leaks when using metal-cpp (#8276, #8166) or when using multiple contexts (#7419).
-// 2022-08-23: Metal: Update deprecated property 'sampleCount'->'rasterSampleCount'.
-// 2022-07-05: Metal: Add dispatch synchronization.
-// 2022-06-30: Metal: Use __bridge for ARC based systems.
-// 2022-06-01: Metal: Fixed null dereference on exit inside command buffer completion handler.
-// 2022-04-27: Misc: Store backend data in a per-context struct, allowing to use this backend with multiple contexts.
-// 2022-01-03: Metal: Ignore ImDrawCmd where ElemCount == 0 (very rare but can technically be manufactured by user code).
-// 2021-12-30: Metal: Added Metal C++ support. Enable with '#define IMGUI_IMPL_METAL_CPP' in your imconfig.h file.
-// 2021-08-24: Metal: Fixed a crash when clipping rect larger than framebuffer is submitted. (#4464)
-// 2021-05-19: Metal: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-02-18: Metal: Change blending equation to preserve alpha in output buffer.
-// 2021-01-25: Metal: Fixed texture storage mode when building on Mac Catalyst.
-// 2019-05-29: Metal: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: Metal: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2019-02-11: Metal: Projecting clipping rectangles correctly using draw_data->FramebufferScale to allow multi-viewports for retina display.
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-07-05: Metal: Added new Metal backend implementation.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_metal.h"
-#import <time.h>
-#import <Metal/Metal.h>
-
-#pragma mark - Support classes
-
-// A wrapper around a MTLBuffer object that knows the last time it was reused
-@interface MetalBuffer : NSObject
-@property (nonatomic, strong) id<MTLBuffer> buffer;
-@property (nonatomic, assign) double lastReuseTime;
-- (instancetype)initWithBuffer:(id<MTLBuffer>)buffer;
-@end
-
-// An object that encapsulates the data necessary to uniquely identify a
-// render pipeline state. These are used as cache keys.
-@interface FramebufferDescriptor : NSObject<NSCopying>
-@property (nonatomic, assign) unsigned long sampleCount;
-@property (nonatomic, assign) MTLPixelFormat colorPixelFormat;
-@property (nonatomic, assign) MTLPixelFormat depthPixelFormat;
-@property (nonatomic, assign) MTLPixelFormat stencilPixelFormat;
-- (instancetype)initWithRenderPassDescriptor:(MTLRenderPassDescriptor*)renderPassDescriptor;
-@end
-
-@interface MetalTexture : NSObject
-@property (nonatomic, strong) id<MTLTexture> metalTexture;
-- (instancetype)initWithTexture:(id<MTLTexture>)metalTexture;
-@end
-
-// A singleton that stores long-lived objects that are needed by the Metal
-// renderer backend. Stores the render pipeline state cache and the default
-// font texture, and manages the reusable buffer cache.
-@interface MetalContext : NSObject
-@property (nonatomic, strong) id<MTLDevice> device;
-@property (nonatomic, strong) id<MTLDepthStencilState> depthStencilState;
-@property (nonatomic, strong) FramebufferDescriptor* framebufferDescriptor; // framebuffer descriptor for current frame; transient
-@property (nonatomic, strong) NSMutableDictionary* renderPipelineStateCache; // pipeline cache; keyed on framebuffer descriptors
-@property (nonatomic, strong) NSMutableArray<MetalBuffer*>* bufferCache;
-@property (nonatomic, assign) double lastBufferCachePurge;
-- (MetalBuffer*)dequeueReusableBufferOfLength:(NSUInteger)length device:(id<MTLDevice>)device;
-- (id<MTLRenderPipelineState>)renderPipelineStateForFramebufferDescriptor:(FramebufferDescriptor*)descriptor device:(id<MTLDevice>)device;
-@end
-
-struct ImGui_ImplMetal_Data
-{
- MetalContext* SharedMetalContext;
-
- ImGui_ImplMetal_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-static ImGui_ImplMetal_Data* ImGui_ImplMetal_GetBackendData() { return ImGui::GetCurrentContext() ? (ImGui_ImplMetal_Data*)ImGui::GetIO().BackendRendererUserData : nullptr; }
-static void ImGui_ImplMetal_DestroyBackendData(){ IM_DELETE(ImGui_ImplMetal_GetBackendData()); }
-
-static inline CFTimeInterval GetMachAbsoluteTimeInSeconds() { return (CFTimeInterval)(double)(clock_gettime_nsec_np(CLOCK_UPTIME_RAW) / 1e9); }
-
-#ifdef IMGUI_IMPL_METAL_CPP
-
-#pragma mark - Dear ImGui Metal C++ Backend API
-
-bool ImGui_ImplMetal_Init(MTL::Device* device)
-{
- return ImGui_ImplMetal_Init((__bridge id<MTLDevice>)(device));
-}
-
-void ImGui_ImplMetal_NewFrame(MTL::RenderPassDescriptor* renderPassDescriptor)
-{
- ImGui_ImplMetal_NewFrame((__bridge MTLRenderPassDescriptor*)(renderPassDescriptor));
-}
-
-void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
- MTL::CommandBuffer* commandBuffer,
- MTL::RenderCommandEncoder* commandEncoder)
-{
- ImGui_ImplMetal_RenderDrawData(draw_data,
- (__bridge id<MTLCommandBuffer>)(commandBuffer),
- (__bridge id<MTLRenderCommandEncoder>)(commandEncoder));
-
-}
-
-bool ImGui_ImplMetal_CreateDeviceObjects(MTL::Device* device)
-{
- return ImGui_ImplMetal_CreateDeviceObjects((__bridge id<MTLDevice>)(device));
-}
-
-#endif // #ifdef IMGUI_IMPL_METAL_CPP
-
-#pragma mark - Dear ImGui Metal Backend API
-
-bool ImGui_ImplMetal_Init(id<MTLDevice> device)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- ImGui_ImplMetal_Data* bd = IM_NEW(ImGui_ImplMetal_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_metal";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- bd->SharedMetalContext = [[MetalContext alloc] init];
- bd->SharedMetalContext.device = device;
-
- return true;
-}
-
-void ImGui_ImplMetal_Shutdown()
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- IM_UNUSED(bd);
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGui_ImplMetal_DestroyDeviceObjects();
- ImGui_ImplMetal_DestroyBackendData();
-
- ImGuiIO& io = ImGui::GetIO();
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
-}
-
-void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor* renderPassDescriptor)
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- IM_ASSERT(bd != nil && "Context or backend not initialized! Did you call ImGui_ImplMetal_Init()?");
-#ifdef IMGUI_IMPL_METAL_CPP
- bd->SharedMetalContext.framebufferDescriptor = [[[FramebufferDescriptor alloc] initWithRenderPassDescriptor:renderPassDescriptor]autorelease];
-#else
- bd->SharedMetalContext.framebufferDescriptor = [[FramebufferDescriptor alloc] initWithRenderPassDescriptor:renderPassDescriptor];
-#endif
- if (bd->SharedMetalContext.depthStencilState == nil)
- ImGui_ImplMetal_CreateDeviceObjects(bd->SharedMetalContext.device);
-}
-
-static void ImGui_ImplMetal_SetupRenderState(ImDrawData* draw_data, id<MTLCommandBuffer> commandBuffer,
- id<MTLRenderCommandEncoder> commandEncoder, id<MTLRenderPipelineState> renderPipelineState,
- MetalBuffer* vertexBuffer, size_t vertexBufferOffset)
-{
- IM_UNUSED(commandBuffer);
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- [commandEncoder setCullMode:MTLCullModeNone];
- [commandEncoder setDepthStencilState:bd->SharedMetalContext.depthStencilState];
-
- // Setup viewport, orthographic projection matrix
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to
- // draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
- MTLViewport viewport =
- {
- .originX = 0.0,
- .originY = 0.0,
- .width = (double)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x),
- .height = (double)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y),
- .znear = 0.0,
- .zfar = 1.0
- };
- [commandEncoder setViewport:viewport];
-
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- float N = (float)viewport.znear;
- float F = (float)viewport.zfar;
- const float ortho_projection[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, 1/(F-N), 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), N/(F-N), 1.0f },
- };
- [commandEncoder setVertexBytes:&ortho_projection length:sizeof(ortho_projection) atIndex:1];
-
- [commandEncoder setRenderPipelineState:renderPipelineState];
-
- [commandEncoder setVertexBuffer:vertexBuffer.buffer offset:0 atIndex:0];
- [commandEncoder setVertexBufferOffset:vertexBufferOffset atIndex:0];
-}
-
-// Metal Render function.
-void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, id<MTLCommandBuffer> commandBuffer, id<MTLRenderCommandEncoder> commandEncoder)
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- MetalContext* ctx = bd->SharedMetalContext;
-
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0 || draw_data->CmdListsCount == 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplMetal_UpdateTexture(tex);
-
- // Try to retrieve a render pipeline state that is compatible with the framebuffer config for this frame
- // The hit rate for this cache should be very near 100%.
- id<MTLRenderPipelineState> renderPipelineState = ctx.renderPipelineStateCache[ctx.framebufferDescriptor];
- if (renderPipelineState == nil)
- {
- // No luck; make a new render pipeline state
- renderPipelineState = [ctx renderPipelineStateForFramebufferDescriptor:ctx.framebufferDescriptor device:commandBuffer.device];
-
- // Cache render pipeline state for later reuse
- ctx.renderPipelineStateCache[ctx.framebufferDescriptor] = renderPipelineState;
- }
-
- size_t vertexBufferLength = (size_t)draw_data->TotalVtxCount * sizeof(ImDrawVert);
- size_t indexBufferLength = (size_t)draw_data->TotalIdxCount * sizeof(ImDrawIdx);
- MetalBuffer* vertexBuffer = [ctx dequeueReusableBufferOfLength:vertexBufferLength device:commandBuffer.device];
- MetalBuffer* indexBuffer = [ctx dequeueReusableBufferOfLength:indexBufferLength device:commandBuffer.device];
-
- ImGui_ImplMetal_SetupRenderState(draw_data, commandBuffer, commandEncoder, renderPipelineState, vertexBuffer, 0);
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
-
- // Render command lists
- size_t vertexBufferOffset = 0;
- size_t indexBufferOffset = 0;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
-
- memcpy((char*)vertexBuffer.buffer.contents + vertexBufferOffset, draw_list->VtxBuffer.Data, (size_t)draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy((char*)indexBuffer.buffer.contents + indexBufferOffset, draw_list->IdxBuffer.Data, (size_t)draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
-
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplMetal_SetupRenderState(draw_data, commandBuffer, commandEncoder, renderPipelineState, vertexBuffer, vertexBufferOffset);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
-
- // Clamp to viewport as setScissorRect() won't accept values that are off bounds
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
- if (pcmd->ElemCount == 0) // drawIndexedPrimitives() validation doesn't accept this
- continue;
-
- // Apply scissor/clipping rectangle
- MTLScissorRect scissorRect =
- {
- .x = NSUInteger(clip_min.x),
- .y = NSUInteger(clip_min.y),
- .width = NSUInteger(clip_max.x - clip_min.x),
- .height = NSUInteger(clip_max.y - clip_min.y)
- };
- [commandEncoder setScissorRect:scissorRect];
-
- // Bind texture, Draw
- if (ImTextureID tex_id = pcmd->GetTexID())
- [commandEncoder setFragmentTexture:(__bridge id<MTLTexture>)(void*)(intptr_t)(tex_id) atIndex:0];
-
- [commandEncoder setVertexBufferOffset:(vertexBufferOffset + pcmd->VtxOffset * sizeof(ImDrawVert)) atIndex:0];
- [commandEncoder drawIndexedPrimitives:MTLPrimitiveTypeTriangle
- indexCount:pcmd->ElemCount
- indexType:sizeof(ImDrawIdx) == 2 ? MTLIndexTypeUInt16 : MTLIndexTypeUInt32
- indexBuffer:indexBuffer.buffer
- indexBufferOffset:indexBufferOffset + pcmd->IdxOffset * sizeof(ImDrawIdx)];
- }
- }
-
- vertexBufferOffset += (size_t)draw_list->VtxBuffer.Size * sizeof(ImDrawVert);
- indexBufferOffset += (size_t)draw_list->IdxBuffer.Size * sizeof(ImDrawIdx);
- }
-
- MetalContext* sharedMetalContext = bd->SharedMetalContext;
- [commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>)
- {
- dispatch_async(dispatch_get_main_queue(), ^{
- @synchronized(sharedMetalContext.bufferCache)
- {
- [sharedMetalContext.bufferCache addObject:vertexBuffer];
- [sharedMetalContext.bufferCache addObject:indexBuffer];
- }
- });
- }];
-}
-
-static void ImGui_ImplMetal_DestroyTexture(ImTextureData* tex)
-{
- MetalTexture* backend_tex = (__bridge_transfer MetalTexture*)(tex->BackendUserData);
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(backend_tex.metalTexture == (__bridge id<MTLTexture>)(void*)(intptr_t)tex->TexID);
- backend_tex.metalTexture = nil;
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplMetal_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // We are retrieving and uploading the font atlas as a 4-channels RGBA texture here.
- // In theory we could call GetTexDataAsAlpha8() and upload a 1-channel texture to save on memory access bandwidth.
- // However, using a shader designed for 1-channel texture would make it less obvious to use the ImTextureID facility to render users own textures.
- // You can make that change in your implementation.
- MTLTextureDescriptor* textureDescriptor = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm
- width:(NSUInteger)tex->Width
- height:(NSUInteger)tex->Height
- mipmapped:NO];
- textureDescriptor.usage = MTLTextureUsageShaderRead;
- #if TARGET_OS_OSX || TARGET_OS_MACCATALYST
- textureDescriptor.storageMode = MTLStorageModeManaged;
- #else
- textureDescriptor.storageMode = MTLStorageModeShared;
- #endif
- id <MTLTexture> texture = [bd->SharedMetalContext.device newTextureWithDescriptor:textureDescriptor];
- [texture replaceRegion:MTLRegionMake2D(0, 0, (NSUInteger)tex->Width, (NSUInteger)tex->Height) mipmapLevel:0 withBytes:tex->Pixels bytesPerRow:(NSUInteger)tex->Width * 4];
- MetalTexture* backend_tex = [[MetalTexture alloc] initWithTexture:texture];
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)texture);
- tex->SetStatus(ImTextureStatus_OK);
- tex->BackendUserData = (__bridge_retained void*)(backend_tex);
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- MetalTexture* backend_tex = (__bridge MetalTexture*)(tex->BackendUserData);
- for (ImTextureRect& r : tex->Updates)
- {
- [backend_tex.metalTexture replaceRegion:MTLRegionMake2D((NSUInteger)r.x, (NSUInteger)r.y, (NSUInteger)r.w, (NSUInteger)r.h)
- mipmapLevel:0
- withBytes:tex->GetPixelsAt(r.x, r.y)
- bytesPerRow:(NSUInteger)tex->Width * 4];
- }
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- {
- ImGui_ImplMetal_DestroyTexture(tex);
- }
-}
-
-bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device)
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
- MTLDepthStencilDescriptor* depthStencilDescriptor = [[MTLDepthStencilDescriptor alloc] init];
- depthStencilDescriptor.depthWriteEnabled = NO;
- depthStencilDescriptor.depthCompareFunction = MTLCompareFunctionAlways;
- bd->SharedMetalContext.depthStencilState = [device newDepthStencilStateWithDescriptor:depthStencilDescriptor];
-#ifdef IMGUI_IMPL_METAL_CPP
- [depthStencilDescriptor release];
-#endif
-
- return true;
-}
-
-void ImGui_ImplMetal_DestroyDeviceObjects()
-{
- ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplMetal_DestroyTexture(tex);
-
- [bd->SharedMetalContext.renderPipelineStateCache removeAllObjects];
-}
-
-#pragma mark - MetalBuffer implementation
-
-@implementation MetalBuffer
-- (instancetype)initWithBuffer:(id<MTLBuffer>)buffer
-{
- if ((self = [super init]))
- {
- _buffer = buffer;
- _lastReuseTime = GetMachAbsoluteTimeInSeconds();
- }
- return self;
-}
-@end
-
-#pragma mark - FramebufferDescriptor implementation
-
-@implementation FramebufferDescriptor
-- (instancetype)initWithRenderPassDescriptor:(MTLRenderPassDescriptor*)renderPassDescriptor
-{
- if ((self = [super init]))
- {
- _sampleCount = renderPassDescriptor.colorAttachments[0].texture.sampleCount;
- _colorPixelFormat = renderPassDescriptor.colorAttachments[0].texture.pixelFormat;
- _depthPixelFormat = renderPassDescriptor.depthAttachment.texture.pixelFormat;
- _stencilPixelFormat = renderPassDescriptor.stencilAttachment.texture.pixelFormat;
- }
- return self;
-}
-
-- (nonnull id)copyWithZone:(nullable NSZone*)zone
-{
- FramebufferDescriptor* copy = [[FramebufferDescriptor allocWithZone:zone] init];
- copy.sampleCount = self.sampleCount;
- copy.colorPixelFormat = self.colorPixelFormat;
- copy.depthPixelFormat = self.depthPixelFormat;
- copy.stencilPixelFormat = self.stencilPixelFormat;
- return copy;
-}
-
-- (NSUInteger)hash
-{
- NSUInteger sc = _sampleCount & 0x3;
- NSUInteger cf = _colorPixelFormat & 0x3FF;
- NSUInteger df = _depthPixelFormat & 0x3FF;
- NSUInteger sf = _stencilPixelFormat & 0x3FF;
- NSUInteger hash = (sf << 22) | (df << 12) | (cf << 2) | sc;
- return hash;
-}
-
-- (BOOL)isEqual:(id)object
-{
- FramebufferDescriptor* other = object;
- if (![other isKindOfClass:[FramebufferDescriptor class]])
- return NO;
- return other.sampleCount == self.sampleCount &&
- other.colorPixelFormat == self.colorPixelFormat &&
- other.depthPixelFormat == self.depthPixelFormat &&
- other.stencilPixelFormat == self.stencilPixelFormat;
-}
-
-@end
-
-#pragma mark - MetalTexture implementation
-
-@implementation MetalTexture
-- (instancetype)initWithTexture:(id<MTLTexture>)metalTexture
-{
- if ((self = [super init]))
- self.metalTexture = metalTexture;
- return self;
-}
-
-@end
-
-#pragma mark - MetalContext implementation
-
-@implementation MetalContext
-- (instancetype)init
-{
- if ((self = [super init]))
- {
- self.renderPipelineStateCache = [NSMutableDictionary dictionary];
- self.bufferCache = [NSMutableArray array];
- _lastBufferCachePurge = GetMachAbsoluteTimeInSeconds();
- }
- return self;
-}
-
-- (MetalBuffer*)dequeueReusableBufferOfLength:(NSUInteger)length device:(id<MTLDevice>)device
-{
- uint64_t now = GetMachAbsoluteTimeInSeconds();
-
- @synchronized(self.bufferCache)
- {
- // Purge old buffers that haven't been useful for a while
- if (now - self.lastBufferCachePurge > 1.0)
- {
- NSMutableArray* survivors = [NSMutableArray array];
- for (MetalBuffer* candidate in self.bufferCache)
- if (candidate.lastReuseTime > self.lastBufferCachePurge)
- [survivors addObject:candidate];
- self.bufferCache = [survivors mutableCopy];
- self.lastBufferCachePurge = now;
- }
-
- // See if we have a buffer we can reuse
- MetalBuffer* bestCandidate = nil;
- for (MetalBuffer* candidate in self.bufferCache)
- if (candidate.buffer.length >= length && (bestCandidate == nil || bestCandidate.lastReuseTime > candidate.lastReuseTime))
- bestCandidate = candidate;
-
- if (bestCandidate != nil)
- {
- [self.bufferCache removeObject:bestCandidate];
- bestCandidate.lastReuseTime = now;
- return bestCandidate;
- }
- }
-
- // No luck; make a new buffer
- id<MTLBuffer> backing = [device newBufferWithLength:length options:MTLResourceStorageModeShared];
- return [[MetalBuffer alloc] initWithBuffer:backing];
-}
-
-// Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling.
-- (id<MTLRenderPipelineState>)renderPipelineStateForFramebufferDescriptor:(FramebufferDescriptor*)descriptor device:(id<MTLDevice>)device
-{
- NSError* error = nil;
-
- NSString* shaderSource = @""
- "#include <metal_stdlib>\n"
- "using namespace metal;\n"
- "\n"
- "struct Uniforms {\n"
- " float4x4 projectionMatrix;\n"
- "};\n"
- "\n"
- "struct VertexIn {\n"
- " float2 position [[attribute(0)]];\n"
- " float2 texCoords [[attribute(1)]];\n"
- " uchar4 color [[attribute(2)]];\n"
- "};\n"
- "\n"
- "struct VertexOut {\n"
- " float4 position [[position]];\n"
- " float2 texCoords;\n"
- " float4 color;\n"
- "};\n"
- "\n"
- "vertex VertexOut vertex_main(VertexIn in [[stage_in]],\n"
- " constant Uniforms &uniforms [[buffer(1)]]) {\n"
- " VertexOut out;\n"
- " out.position = uniforms.projectionMatrix * float4(in.position, 0, 1);\n"
- " out.texCoords = in.texCoords;\n"
- " out.color = float4(in.color) / float4(255.0);\n"
- " return out;\n"
- "}\n"
- "\n"
- "fragment half4 fragment_main(VertexOut in [[stage_in]],\n"
- " texture2d<half, access::sample> texture [[texture(0)]]) {\n"
- " constexpr sampler linearSampler(coord::normalized, min_filter::linear, mag_filter::linear, mip_filter::linear);\n"
- " half4 texColor = texture.sample(linearSampler, in.texCoords);\n"
- " return half4(in.color) * texColor;\n"
- "}\n";
-
- id<MTLLibrary> library = [device newLibraryWithSource:shaderSource options:nil error:&error];
- if (library == nil)
- {
- NSLog(@"Error: failed to create Metal library: %@", error);
- return nil;
- }
-
- id<MTLFunction> vertexFunction = [library newFunctionWithName:@"vertex_main"];
- id<MTLFunction> fragmentFunction = [library newFunctionWithName:@"fragment_main"];
-
- if (vertexFunction == nil || fragmentFunction == nil)
- {
- NSLog(@"Error: failed to find Metal shader functions in library: %@", error);
- return nil;
- }
-
- MTLVertexDescriptor* vertexDescriptor = [MTLVertexDescriptor vertexDescriptor];
- vertexDescriptor.attributes[0].offset = offsetof(ImDrawVert, pos);
- vertexDescriptor.attributes[0].format = MTLVertexFormatFloat2; // position
- vertexDescriptor.attributes[0].bufferIndex = 0;
- vertexDescriptor.attributes[1].offset = offsetof(ImDrawVert, uv);
- vertexDescriptor.attributes[1].format = MTLVertexFormatFloat2; // texCoords
- vertexDescriptor.attributes[1].bufferIndex = 0;
- vertexDescriptor.attributes[2].offset = offsetof(ImDrawVert, col);
- vertexDescriptor.attributes[2].format = MTLVertexFormatUChar4; // color
- vertexDescriptor.attributes[2].bufferIndex = 0;
- vertexDescriptor.layouts[0].stepRate = 1;
- vertexDescriptor.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex;
- vertexDescriptor.layouts[0].stride = sizeof(ImDrawVert);
-
- MTLRenderPipelineDescriptor* pipelineDescriptor = [[MTLRenderPipelineDescriptor alloc] init];
- pipelineDescriptor.vertexFunction = vertexFunction;
- pipelineDescriptor.fragmentFunction = fragmentFunction;
- pipelineDescriptor.vertexDescriptor = vertexDescriptor;
- pipelineDescriptor.rasterSampleCount = self.framebufferDescriptor.sampleCount;
- pipelineDescriptor.colorAttachments[0].pixelFormat = self.framebufferDescriptor.colorPixelFormat;
- pipelineDescriptor.colorAttachments[0].blendingEnabled = YES;
- pipelineDescriptor.colorAttachments[0].rgbBlendOperation = MTLBlendOperationAdd;
- pipelineDescriptor.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;
- pipelineDescriptor.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
- pipelineDescriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd;
- pipelineDescriptor.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorOne;
- pipelineDescriptor.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
- pipelineDescriptor.depthAttachmentPixelFormat = self.framebufferDescriptor.depthPixelFormat;
- pipelineDescriptor.stencilAttachmentPixelFormat = self.framebufferDescriptor.stencilPixelFormat;
-
- id<MTLRenderPipelineState> renderPipelineState = [device newRenderPipelineStateWithDescriptor:pipelineDescriptor error:&error];
- if (error != nil)
- NSLog(@"Error: failed to create Metal pipeline state: %@", error);
-
- return renderPipelineState;
-}
-
-@end
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_opengl3.cpp b/libs/imgui-1.92.1/backends/imgui_impl_opengl3.cpp
deleted file mode 100644
index 40b3be6..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_opengl3.cpp
+++ /dev/null
@@ -1,1038 +0,0 @@
-// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline
-// - Desktop GL: 2.x 3.x 4.x
-// - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0)
-// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [x] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset) [Desktop OpenGL only!]
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// About WebGL/ES:
-// - You need to '#define IMGUI_IMPL_OPENGL_ES2' or '#define IMGUI_IMPL_OPENGL_ES3' to use WebGL or OpenGL ES.
-// - This is done automatically on iOS, Android and Emscripten targets.
-// - For other targets, the define needs to be visible from the imgui_impl_opengl3.cpp compilation unit. If unsure, define globally or in imconfig.h.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-11: OpenGL: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplOpenGL3_CreateFontsTexture() and ImGui_ImplOpenGL3_DestroyFontsTexture().
-// 2025-06-04: OpenGL: Made GLES 3.20 contexts not access GL_CONTEXT_PROFILE_MASK nor GL_PRIMITIVE_RESTART. (#8664)
-// 2025-02-18: OpenGL: Lazily reinitialize embedded GL loader for when calling backend from e.g. other DLL boundaries. (#8406)
-// 2024-10-07: OpenGL: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-06-28: OpenGL: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748)
-// 2024-05-07: OpenGL: Update loader for Linux to support EGL/GLVND. (#7562)
-// 2024-04-16: OpenGL: Detect ES3 contexts on desktop based on version string, to e.g. avoid calling glPolygonMode() on them. (#7447)
-// 2024-01-09: OpenGL: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" and variants, fixing regression on distros missing a symlink.
-// 2023-11-08: OpenGL: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" instead of "libGL.so.1", accommodating for NetBSD systems having only "libGL.so.3" available. (#6983)
-// 2023-10-05: OpenGL: Rename symbols in our internal loader so that LTO compilation with another copy of gl3w is possible. (#6875, #6668, #4445)
-// 2023-06-20: OpenGL: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts lower than 3.2. (#6539, #6333)
-// 2023-05-09: OpenGL: Support for glBindSampler() backup/restore on ES3. (#6375)
-// 2023-04-18: OpenGL: Restore front and back polygon mode separately when supported by context. (#6333)
-// 2023-03-23: OpenGL: Properly restoring "no shader program bound" if it was the case prior to running the rendering function. (#6267, #6220, #6224)
-// 2023-03-15: OpenGL: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
-// 2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
-// 2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2022-09-27: OpenGL: Added ability to '#define IMGUI_IMPL_OPENGL_DEBUG'.
-// 2022-05-23: OpenGL: Reworking 2021-12-15 "Using buffer orphaning" so it only happens on Intel GPU, seems to cause problems otherwise. (#4468, #4825, #4832, #5127).
-// 2022-05-13: OpenGL: Fixed state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING and vertex attribute states.
-// 2021-12-15: OpenGL: Using buffer orphaning + glBufferSubData(), seems to fix leaks with multi-viewports with some Intel HD drivers.
-// 2021-08-23: OpenGL: Fixed ES 3.0 shader ("#version 300 es") use normal precision floats to avoid wobbly rendering at HD resolutions.
-// 2021-08-19: OpenGL: Embed and use our own minimal GL loader (imgui_impl_opengl3_loader.h), removing requirement and support for third-party loader.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-06-25: OpenGL: Use OES_vertex_array extension on Emscripten + backup/restore current state.
-// 2021-06-21: OpenGL: Destroy individual vertex/fragment shader objects right after they are linked into the main shader.
-// 2021-05-24: OpenGL: Access GL_CLIP_ORIGIN when "GL_ARB_clip_control" extension is detected, inside of just OpenGL 4.5 version.
-// 2021-05-19: OpenGL: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-04-06: OpenGL: Don't try to read GL_CLIP_ORIGIN unless we're OpenGL 4.5 or greater.
-// 2021-02-18: OpenGL: Change blending equation to preserve alpha in output buffer.
-// 2021-01-03: OpenGL: Backup, setup and restore GL_STENCIL_TEST state.
-// 2020-10-23: OpenGL: Backup, setup and restore GL_PRIMITIVE_RESTART state.
-// 2020-10-15: OpenGL: Use glGetString(GL_VERSION) instead of glGetIntegerv(GL_MAJOR_VERSION, ...) when the later returns zero (e.g. Desktop GL 2.x)
-// 2020-09-17: OpenGL: Fix to avoid compiling/calling glBindSampler() on ES or pre-3.3 context which have the defines set by a loader.
-// 2020-07-10: OpenGL: Added support for glad2 OpenGL loader.
-// 2020-05-08: OpenGL: Made default GLSL version 150 (instead of 130) on OSX.
-// 2020-04-21: OpenGL: Fixed handling of glClipControl(GL_UPPER_LEFT) by inverting projection matrix.
-// 2020-04-12: OpenGL: Fixed context version check mistakenly testing for 4.0+ instead of 3.2+ to enable ImGuiBackendFlags_RendererHasVtxOffset.
-// 2020-03-24: OpenGL: Added support for glbinding 2.x OpenGL loader.
-// 2020-01-07: OpenGL: Added support for glbinding 3.x OpenGL loader.
-// 2019-10-25: OpenGL: Using a combination of GL define and runtime GL version to decide whether to use glDrawElementsBaseVertex(). Fix building with pre-3.2 GL loaders.
-// 2019-09-22: OpenGL: Detect default GL loader using __has_include compiler facility.
-// 2019-09-16: OpenGL: Tweak initialization code to allow application calling ImGui_ImplOpenGL3_CreateFontsTexture() before the first NewFrame() call.
-// 2019-05-29: OpenGL: Desktop GL only: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: OpenGL: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2019-03-29: OpenGL: Not calling glBindBuffer more than necessary in the render loop.
-// 2019-03-15: OpenGL: Added a GL call + comments in ImGui_ImplOpenGL3_Init() to detect uninitialized GL function loaders early.
-// 2019-03-03: OpenGL: Fix support for ES 2.0 (WebGL 1.0).
-// 2019-02-20: OpenGL: Fix for OSX not supporting OpenGL 4.5, we don't try to read GL_CLIP_ORIGIN even if defined by the headers/loader.
-// 2019-02-11: OpenGL: Projecting clipping rectangles correctly using draw_data->FramebufferScale to allow multi-viewports for retina display.
-// 2019-02-01: OpenGL: Using GLSL 410 shaders for any version over 410 (e.g. 430, 450).
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-11-13: OpenGL: Support for GL 4.5's glClipControl(GL_UPPER_LEFT) / GL_CLIP_ORIGIN.
-// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
-// 2018-08-09: OpenGL: Default to OpenGL ES 3 on iOS and Android. GLSL version default to "#version 300 ES".
-// 2018-07-30: OpenGL: Support for GLSL 300 ES and 410 core. Fixes for Emscripten compilation.
-// 2018-07-10: OpenGL: Support for more GLSL versions (based on the GLSL version string). Added error output when shaders fail to compile/link.
-// 2018-06-08: Misc: Extracted imgui_impl_opengl3.cpp/.h away from the old combined GLFW/SDL+OpenGL3 examples.
-// 2018-06-08: OpenGL: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-05-25: OpenGL: Removed unnecessary backup/restore of GL_ELEMENT_ARRAY_BUFFER_BINDING since this is part of the VAO state.
-// 2018-05-14: OpenGL: Making the call to glBindSampler() optional so 3.2 context won't fail if the function is a nullptr pointer.
-// 2018-03-06: OpenGL: Added const char* glsl_version parameter to ImGui_ImplOpenGL3_Init() so user can override the GLSL version e.g. "#version 150".
-// 2018-02-23: OpenGL: Create the VAO in the render function so the setup can more easily be used with multiple shared GL context.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplSdlGL3_RenderDrawData() in the .h file so you can call it yourself.
-// 2018-01-07: OpenGL: Changed GLSL shader version from 330 to 150.
-// 2017-09-01: OpenGL: Save and restore current bound sampler. Save and restore current polygon mode.
-// 2017-05-01: OpenGL: Fixed save and restore of current blend func state.
-// 2017-05-01: OpenGL: Fixed save and restore of current GL_ACTIVE_TEXTURE.
-// 2016-09-05: OpenGL: Fixed save and restore of current scissor rectangle.
-// 2016-07-29: OpenGL: Explicitly setting GL_UNPACK_ROW_LENGTH to reduce issues because SDL changes it. (#752)
-
-//----------------------------------------
-// OpenGL GLSL GLSL
-// version version string
-//----------------------------------------
-// 2.0 110 "#version 110"
-// 2.1 120 "#version 120"
-// 3.0 130 "#version 130"
-// 3.1 140 "#version 140"
-// 3.2 150 "#version 150"
-// 3.3 330 "#version 330 core"
-// 4.0 400 "#version 400 core"
-// 4.1 410 "#version 410 core"
-// 4.2 420 "#version 410 core"
-// 4.3 430 "#version 430 core"
-// ES 2.0 100 "#version 100" = WebGL 1.0
-// ES 3.0 300 "#version 300 es" = WebGL 2.0
-//----------------------------------------
-
-#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_opengl3.h"
-#include <stdio.h>
-#include <stdint.h> // intptr_t
-#if defined(__APPLE__)
-#include <TargetConditionals.h>
-#endif
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: ignore unknown flags
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#pragma clang diagnostic ignored "-Wunused-macros" // warning: macro is not used
-#pragma clang diagnostic ignored "-Wnonportable-system-include-path"
-#pragma clang diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
-#endif
-#if defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
-#pragma GCC diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx'
-#pragma GCC diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
-#pragma GCC diagnostic ignored "-Wstrict-overflow" // warning: assuming signed overflow does not occur when simplifying division / ..when changing X +- C1 cmp C2 to X cmp C2 -+ C1
-#endif
-
-// GL includes
-#if defined(IMGUI_IMPL_OPENGL_ES2)
-#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV))
-#include <OpenGLES/ES2/gl.h> // Use GL ES 2
-#else
-#include <GLES2/gl2.h> // Use GL ES 2
-#endif
-#if defined(__EMSCRIPTEN__)
-#ifndef GL_GLEXT_PROTOTYPES
-#define GL_GLEXT_PROTOTYPES
-#endif
-#include <GLES2/gl2ext.h>
-#endif
-#elif defined(IMGUI_IMPL_OPENGL_ES3)
-#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV))
-#include <OpenGLES/ES3/gl.h> // Use GL ES 3
-#else
-#include <GLES3/gl3.h> // Use GL ES 3
-#endif
-#elif !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM)
-// Modern desktop OpenGL doesn't have a standard portable header file to load OpenGL function pointers.
-// Helper libraries are often used for this purpose! Here we are using our own minimal custom loader based on gl3w.
-// In the rest of your app/engine, you can use another loader of your choice (gl3w, glew, glad, glbinding, glext, glLoadGen, etc.).
-// If you happen to be developing a new feature for this backend (imgui_impl_opengl3.cpp):
-// - You may need to regenerate imgui_impl_opengl3_loader.h to add new symbols. See https://github.com/dearimgui/gl3w_stripped
-// Typically you would run: python3 ./gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt
-// - You can temporarily use an unstripped version. See https://github.com/dearimgui/gl3w_stripped/releases
-// Changes to this backend using new APIs should be accompanied by a regenerated stripped loader version.
-#define IMGL3W_IMPL
-#define IMGUI_IMPL_OPENGL_LOADER_IMGL3W
-#include "imgui_impl_opengl3_loader.h"
-#endif
-
-// Vertex arrays are not supported on ES2/WebGL1 unless Emscripten which uses an extension
-#ifndef IMGUI_IMPL_OPENGL_ES2
-#define IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
-#elif defined(__EMSCRIPTEN__)
-#define IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
-#define glBindVertexArray glBindVertexArrayOES
-#define glGenVertexArrays glGenVertexArraysOES
-#define glDeleteVertexArrays glDeleteVertexArraysOES
-#define GL_VERTEX_ARRAY_BINDING GL_VERTEX_ARRAY_BINDING_OES
-#endif
-
-// Desktop GL 2.0+ has extension and glPolygonMode() which GL ES and WebGL don't have..
-// A desktop ES context can technically compile fine with our loader, so we also perform a runtime checks
-#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3)
-#define IMGUI_IMPL_OPENGL_HAS_EXTENSIONS // has glGetIntegerv(GL_NUM_EXTENSIONS)
-#define IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE // may have glPolygonMode()
-#endif
-
-// Desktop GL 2.1+ and GL ES 3.0+ have glBindBuffer() with GL_PIXEL_UNPACK_BUFFER target.
-#if !defined(IMGUI_IMPL_OPENGL_ES2)
-#define IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK
-#endif
-
-// Desktop GL 3.1+ has GL_PRIMITIVE_RESTART state
-#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) && defined(GL_VERSION_3_1)
-#define IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART
-#endif
-
-// Desktop GL 3.2+ has glDrawElementsBaseVertex() which GL ES and WebGL don't have.
-#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) && defined(GL_VERSION_3_2)
-#define IMGUI_IMPL_OPENGL_MAY_HAVE_VTX_OFFSET
-#endif
-
-// Desktop GL 3.3+ and GL ES 3.0+ have glBindSampler()
-#if !defined(IMGUI_IMPL_OPENGL_ES2) && (defined(IMGUI_IMPL_OPENGL_ES3) || defined(GL_VERSION_3_3))
-#define IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER
-#endif
-
-// [Debugging]
-//#define IMGUI_IMPL_OPENGL_DEBUG
-#ifdef IMGUI_IMPL_OPENGL_DEBUG
-#include <stdio.h>
-#define GL_CALL(_CALL) do { _CALL; GLenum gl_err = glGetError(); if (gl_err != 0) fprintf(stderr, "GL error 0x%x returned from '%s'.\n", gl_err, #_CALL); } while (0) // Call with error check
-#else
-#define GL_CALL(_CALL) _CALL // Call without error check
-#endif
-
-// OpenGL Data
-struct ImGui_ImplOpenGL3_Data
-{
- GLuint GlVersion; // Extracted at runtime using GL_MAJOR_VERSION, GL_MINOR_VERSION queries (e.g. 320 for GL 3.2)
- char GlslVersionString[32]; // Specified by user or detected based on compile time GL settings.
- bool GlProfileIsES2;
- bool GlProfileIsES3;
- bool GlProfileIsCompat;
- GLint GlProfileMask;
- GLint MaxTextureSize;
- GLuint ShaderHandle;
- GLint AttribLocationTex; // Uniforms location
- GLint AttribLocationProjMtx;
- GLuint AttribLocationVtxPos; // Vertex attributes location
- GLuint AttribLocationVtxUV;
- GLuint AttribLocationVtxColor;
- unsigned int VboHandle, ElementsHandle;
- GLsizeiptr VertexBufferSize;
- GLsizeiptr IndexBufferSize;
- bool HasPolygonMode;
- bool HasClipOrigin;
- bool UseBufferSubData;
- ImVector<char> TempBuffer;
-
- ImGui_ImplOpenGL3_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplOpenGL3_Data* ImGui_ImplOpenGL3_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplOpenGL3_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// OpenGL vertex attribute state (for ES 1.0 and ES 2.0 only)
-#ifndef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
-struct ImGui_ImplOpenGL3_VtxAttribState
-{
- GLint Enabled, Size, Type, Normalized, Stride;
- GLvoid* Ptr;
-
- void GetState(GLint index)
- {
- glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &Enabled);
- glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_SIZE, &Size);
- glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_TYPE, &Type);
- glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &Normalized);
- glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &Stride);
- glGetVertexAttribPointerv(index, GL_VERTEX_ATTRIB_ARRAY_POINTER, &Ptr);
- }
- void SetState(GLint index)
- {
- glVertexAttribPointer(index, Size, Type, (GLboolean)Normalized, Stride, Ptr);
- if (Enabled) glEnableVertexAttribArray(index); else glDisableVertexAttribArray(index);
- }
-};
-#endif
-
-// Not static to allow third-party code to use that if they want to (but undocumented)
-bool ImGui_ImplOpenGL3_InitLoader();
-bool ImGui_ImplOpenGL3_InitLoader()
-{
- // Initialize our loader
-#ifdef IMGUI_IMPL_OPENGL_LOADER_IMGL3W
- if (glGetIntegerv == nullptr && imgl3wInit() != 0)
- {
- fprintf(stderr, "Failed to initialize OpenGL loader!\n");
- return false;
- }
-#endif
- return true;
-}
-
-// Functions
-bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Initialize loader
- if (!ImGui_ImplOpenGL3_InitLoader())
- return false;
-
- // Setup backend capabilities flags
- ImGui_ImplOpenGL3_Data* bd = IM_NEW(ImGui_ImplOpenGL3_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_opengl3";
-
- // Query for GL version (e.g. 320 for GL 3.2)
- const char* gl_version_str = (const char*)glGetString(GL_VERSION);
-#if defined(IMGUI_IMPL_OPENGL_ES2)
- // GLES 2
- bd->GlVersion = 200;
- bd->GlProfileIsES2 = true;
- IM_UNUSED(gl_version_str);
-#else
- // Desktop or GLES 3
- GLint major = 0;
- GLint minor = 0;
- glGetIntegerv(GL_MAJOR_VERSION, &major);
- glGetIntegerv(GL_MINOR_VERSION, &minor);
- if (major == 0 && minor == 0)
- sscanf(gl_version_str, "%d.%d", &major, &minor); // Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
- bd->GlVersion = (GLuint)(major * 100 + minor * 10);
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &bd->MaxTextureSize);
-
-#if defined(IMGUI_IMPL_OPENGL_ES3)
- bd->GlProfileIsES3 = true;
-#else
- if (strncmp(gl_version_str, "OpenGL ES 3", 11) == 0)
- bd->GlProfileIsES3 = true;
-#endif
-
-#if defined(GL_CONTEXT_PROFILE_MASK)
- if (!bd->GlProfileIsES3 && bd->GlVersion >= 320)
- glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &bd->GlProfileMask);
- bd->GlProfileIsCompat = (bd->GlProfileMask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0;
-#endif
-
- bd->UseBufferSubData = false;
- /*
- // Query vendor to enable glBufferSubData kludge
-#ifdef _WIN32
- if (const char* vendor = (const char*)glGetString(GL_VENDOR))
- if (strncmp(vendor, "Intel", 5) == 0)
- bd->UseBufferSubData = true;
-#endif
- */
-#endif
-
-#ifdef IMGUI_IMPL_OPENGL_DEBUG
- printf("GlVersion = %d, \"%s\"\nGlProfileIsCompat = %d\nGlProfileMask = 0x%X\nGlProfileIsES2/IsEs3 = %d/%d\nGL_VENDOR = '%s'\nGL_RENDERER = '%s'\n", bd->GlVersion, gl_version_str, bd->GlProfileIsCompat, bd->GlProfileMask, bd->GlProfileIsES2, bd->GlProfileIsES3, (const char*)glGetString(GL_VENDOR), (const char*)glGetString(GL_RENDERER)); // [DEBUG]
-#endif
-
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_VTX_OFFSET
- if (bd->GlVersion >= 320)
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
-#endif
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Renderer_TextureMaxWidth = platform_io.Renderer_TextureMaxHeight = (int)bd->MaxTextureSize;
-
- // Store GLSL version string so we can refer to it later in case we recreate shaders.
- // Note: GLSL version is NOT the same as GL version. Leave this to nullptr if unsure.
- if (glsl_version == nullptr)
- {
-#if defined(IMGUI_IMPL_OPENGL_ES2)
- glsl_version = "#version 100";
-#elif defined(IMGUI_IMPL_OPENGL_ES3)
- glsl_version = "#version 300 es";
-#elif defined(__APPLE__)
- glsl_version = "#version 150";
-#else
- glsl_version = "#version 130";
-#endif
- }
- IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(bd->GlslVersionString));
- strcpy(bd->GlslVersionString, glsl_version);
- strcat(bd->GlslVersionString, "\n");
-
- // Make an arbitrary GL call (we don't actually need the result)
- // IF YOU GET A CRASH HERE: it probably means the OpenGL function loader didn't do its job. Let us know!
- GLint current_texture;
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &current_texture);
-
- // Detect extensions we support
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE
- bd->HasPolygonMode = (!bd->GlProfileIsES2 && !bd->GlProfileIsES3);
-#endif
- bd->HasClipOrigin = (bd->GlVersion >= 450);
-#ifdef IMGUI_IMPL_OPENGL_HAS_EXTENSIONS
- GLint num_extensions = 0;
- glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions);
- for (GLint i = 0; i < num_extensions; i++)
- {
- const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
- if (extension != nullptr && strcmp(extension, "GL_ARB_clip_control") == 0)
- bd->HasClipOrigin = true;
- }
-#endif
-
- return true;
-}
-
-void ImGui_ImplOpenGL3_Shutdown()
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplOpenGL3_DestroyDeviceObjects();
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplOpenGL3_NewFrame()
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplOpenGL3_Init()?");
-
- ImGui_ImplOpenGL3_InitLoader(); // Lazily init loader if not already done for e.g. DLL boundaries.
-
- if (!bd->ShaderHandle)
- if (!ImGui_ImplOpenGL3_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplOpenGL3_CreateDeviceObjects() failed!");
-}
-
-static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_width, int fb_height, GLuint vertex_array_object)
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
-
- // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled, polygon fill
- glEnable(GL_BLEND);
- glBlendEquation(GL_FUNC_ADD);
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_STENCIL_TEST);
- glEnable(GL_SCISSOR_TEST);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART
- if (!bd->GlProfileIsES3 && bd->GlVersion >= 310)
- glDisable(GL_PRIMITIVE_RESTART);
-#endif
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE
- if (bd->HasPolygonMode)
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-#endif
-
- // Support for GL 4.5 rarely used glClipControl(GL_UPPER_LEFT)
-#if defined(GL_CLIP_ORIGIN)
- bool clip_origin_lower_left = true;
- if (bd->HasClipOrigin)
- {
- GLenum current_clip_origin = 0; glGetIntegerv(GL_CLIP_ORIGIN, (GLint*)&current_clip_origin);
- if (current_clip_origin == GL_UPPER_LEFT)
- clip_origin_lower_left = false;
- }
-#endif
-
- // Setup viewport, orthographic projection matrix
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- GL_CALL(glViewport(0, 0, (GLsizei)fb_width, (GLsizei)fb_height));
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
-#if defined(GL_CLIP_ORIGIN)
- if (!clip_origin_lower_left) { float tmp = T; T = B; B = tmp; } // Swap top and bottom if origin is upper left
-#endif
- const float ortho_projection[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, -1.0f, 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), 0.0f, 1.0f },
- };
- glUseProgram(bd->ShaderHandle);
- glUniform1i(bd->AttribLocationTex, 0);
- glUniformMatrix4fv(bd->AttribLocationProjMtx, 1, GL_FALSE, &ortho_projection[0][0]);
-
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER
- if (bd->GlVersion >= 330 || bd->GlProfileIsES3)
- glBindSampler(0, 0); // We use combined texture/sampler state. Applications using GL 3.3 and GL ES 3.0 may set that otherwise.
-#endif
-
- (void)vertex_array_object;
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- glBindVertexArray(vertex_array_object);
-#endif
-
- // Bind vertex/index buffers and setup attributes for ImDrawVert
- GL_CALL(glBindBuffer(GL_ARRAY_BUFFER, bd->VboHandle));
- GL_CALL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bd->ElementsHandle));
- GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxPos));
- GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxUV));
- GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxColor));
- GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxPos, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, pos)));
- GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxUV, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, uv)));
- GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxColor, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, col)));
-}
-
-// OpenGL3 Render function.
-// Note that this implementation is little overcomplicated because we are saving/setting up/restoring every OpenGL state explicitly.
-// This is in order to be able to run within an OpenGL engine that doesn't do so.
-void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data)
-{
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0)
- return;
-
- ImGui_ImplOpenGL3_InitLoader(); // Lazily init loader if not already done for e.g. DLL boundaries.
-
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplOpenGL3_UpdateTexture(tex);
-
- // Backup GL state
- GLenum last_active_texture; glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint*)&last_active_texture);
- glActiveTexture(GL_TEXTURE0);
- GLuint last_program; glGetIntegerv(GL_CURRENT_PROGRAM, (GLint*)&last_program);
- GLuint last_texture; glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint*)&last_texture);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER
- GLuint last_sampler; if (bd->GlVersion >= 330 || bd->GlProfileIsES3) { glGetIntegerv(GL_SAMPLER_BINDING, (GLint*)&last_sampler); } else { last_sampler = 0; }
-#endif
- GLuint last_array_buffer; glGetIntegerv(GL_ARRAY_BUFFER_BINDING, (GLint*)&last_array_buffer);
-#ifndef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- // This is part of VAO on OpenGL 3.0+ and OpenGL ES 3.0+.
- GLint last_element_array_buffer; glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &last_element_array_buffer);
- ImGui_ImplOpenGL3_VtxAttribState last_vtx_attrib_state_pos; last_vtx_attrib_state_pos.GetState(bd->AttribLocationVtxPos);
- ImGui_ImplOpenGL3_VtxAttribState last_vtx_attrib_state_uv; last_vtx_attrib_state_uv.GetState(bd->AttribLocationVtxUV);
- ImGui_ImplOpenGL3_VtxAttribState last_vtx_attrib_state_color; last_vtx_attrib_state_color.GetState(bd->AttribLocationVtxColor);
-#endif
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- GLuint last_vertex_array_object; glGetIntegerv(GL_VERTEX_ARRAY_BINDING, (GLint*)&last_vertex_array_object);
-#endif
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE
- GLint last_polygon_mode[2]; if (bd->HasPolygonMode) { glGetIntegerv(GL_POLYGON_MODE, last_polygon_mode); }
-#endif
- GLint last_viewport[4]; glGetIntegerv(GL_VIEWPORT, last_viewport);
- GLint last_scissor_box[4]; glGetIntegerv(GL_SCISSOR_BOX, last_scissor_box);
- GLenum last_blend_src_rgb; glGetIntegerv(GL_BLEND_SRC_RGB, (GLint*)&last_blend_src_rgb);
- GLenum last_blend_dst_rgb; glGetIntegerv(GL_BLEND_DST_RGB, (GLint*)&last_blend_dst_rgb);
- GLenum last_blend_src_alpha; glGetIntegerv(GL_BLEND_SRC_ALPHA, (GLint*)&last_blend_src_alpha);
- GLenum last_blend_dst_alpha; glGetIntegerv(GL_BLEND_DST_ALPHA, (GLint*)&last_blend_dst_alpha);
- GLenum last_blend_equation_rgb; glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint*)&last_blend_equation_rgb);
- GLenum last_blend_equation_alpha; glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint*)&last_blend_equation_alpha);
- GLboolean last_enable_blend = glIsEnabled(GL_BLEND);
- GLboolean last_enable_cull_face = glIsEnabled(GL_CULL_FACE);
- GLboolean last_enable_depth_test = glIsEnabled(GL_DEPTH_TEST);
- GLboolean last_enable_stencil_test = glIsEnabled(GL_STENCIL_TEST);
- GLboolean last_enable_scissor_test = glIsEnabled(GL_SCISSOR_TEST);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART
- GLboolean last_enable_primitive_restart = (!bd->GlProfileIsES3 && bd->GlVersion >= 310) ? glIsEnabled(GL_PRIMITIVE_RESTART) : GL_FALSE;
-#endif
-
- // Setup desired GL state
- // Recreate the VAO every time (this is to easily allow multiple GL contexts to be rendered to. VAO are not shared among GL contexts)
- // The renderer would actually work without any VAO bound, but then our VertexAttrib calls would overwrite the default one currently bound.
- GLuint vertex_array_object = 0;
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- GL_CALL(glGenVertexArrays(1, &vertex_array_object));
-#endif
- ImGui_ImplOpenGL3_SetupRenderState(draw_data, fb_width, fb_height, vertex_array_object);
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
-
- // Render command lists
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
-
- // Upload vertex/index buffers
- // - OpenGL drivers are in a very sorry state nowadays....
- // During 2021 we attempted to switch from glBufferData() to orphaning+glBufferSubData() following reports
- // of leaks on Intel GPU when using multi-viewports on Windows.
- // - After this we kept hearing of various display corruptions issues. We started disabling on non-Intel GPU, but issues still got reported on Intel.
- // - We are now back to using exclusively glBufferData(). So bd->UseBufferSubData IS ALWAYS FALSE in this code.
- // We are keeping the old code path for a while in case people finding new issues may want to test the bd->UseBufferSubData path.
- // - See https://github.com/ocornut/imgui/issues/4468 and please report any corruption issues.
- const GLsizeiptr vtx_buffer_size = (GLsizeiptr)draw_list->VtxBuffer.Size * (int)sizeof(ImDrawVert);
- const GLsizeiptr idx_buffer_size = (GLsizeiptr)draw_list->IdxBuffer.Size * (int)sizeof(ImDrawIdx);
- if (bd->UseBufferSubData)
- {
- if (bd->VertexBufferSize < vtx_buffer_size)
- {
- bd->VertexBufferSize = vtx_buffer_size;
- GL_CALL(glBufferData(GL_ARRAY_BUFFER, bd->VertexBufferSize, nullptr, GL_STREAM_DRAW));
- }
- if (bd->IndexBufferSize < idx_buffer_size)
- {
- bd->IndexBufferSize = idx_buffer_size;
- GL_CALL(glBufferData(GL_ELEMENT_ARRAY_BUFFER, bd->IndexBufferSize, nullptr, GL_STREAM_DRAW));
- }
- GL_CALL(glBufferSubData(GL_ARRAY_BUFFER, 0, vtx_buffer_size, (const GLvoid*)draw_list->VtxBuffer.Data));
- GL_CALL(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, idx_buffer_size, (const GLvoid*)draw_list->IdxBuffer.Data));
- }
- else
- {
- GL_CALL(glBufferData(GL_ARRAY_BUFFER, vtx_buffer_size, (const GLvoid*)draw_list->VtxBuffer.Data, GL_STREAM_DRAW));
- GL_CALL(glBufferData(GL_ELEMENT_ARRAY_BUFFER, idx_buffer_size, (const GLvoid*)draw_list->IdxBuffer.Data, GL_STREAM_DRAW));
- }
-
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplOpenGL3_SetupRenderState(draw_data, fb_width, fb_height, vertex_array_object);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle (Y is inverted in OpenGL)
- GL_CALL(glScissor((int)clip_min.x, (int)((float)fb_height - clip_max.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y)));
-
- // Bind texture, Draw
- GL_CALL(glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->GetTexID()));
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_VTX_OFFSET
- if (bd->GlVersion >= 320)
- GL_CALL(glDrawElementsBaseVertex(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, (void*)(intptr_t)(pcmd->IdxOffset * sizeof(ImDrawIdx)), (GLint)pcmd->VtxOffset));
- else
-#endif
- GL_CALL(glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, (void*)(intptr_t)(pcmd->IdxOffset * sizeof(ImDrawIdx))));
- }
- }
- }
-
- // Destroy the temporary VAO
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- GL_CALL(glDeleteVertexArrays(1, &vertex_array_object));
-#endif
-
- // Restore modified GL state
- // This "glIsProgram()" check is required because if the program is "pending deletion" at the time of binding backup, it will have been deleted by now and will cause an OpenGL error. See #6220.
- if (last_program == 0 || glIsProgram(last_program)) glUseProgram(last_program);
- glBindTexture(GL_TEXTURE_2D, last_texture);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER
- if (bd->GlVersion >= 330 || bd->GlProfileIsES3)
- glBindSampler(0, last_sampler);
-#endif
- glActiveTexture(last_active_texture);
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- glBindVertexArray(last_vertex_array_object);
-#endif
- glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
-#ifndef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, last_element_array_buffer);
- last_vtx_attrib_state_pos.SetState(bd->AttribLocationVtxPos);
- last_vtx_attrib_state_uv.SetState(bd->AttribLocationVtxUV);
- last_vtx_attrib_state_color.SetState(bd->AttribLocationVtxColor);
-#endif
- glBlendEquationSeparate(last_blend_equation_rgb, last_blend_equation_alpha);
- glBlendFuncSeparate(last_blend_src_rgb, last_blend_dst_rgb, last_blend_src_alpha, last_blend_dst_alpha);
- if (last_enable_blend) glEnable(GL_BLEND); else glDisable(GL_BLEND);
- if (last_enable_cull_face) glEnable(GL_CULL_FACE); else glDisable(GL_CULL_FACE);
- if (last_enable_depth_test) glEnable(GL_DEPTH_TEST); else glDisable(GL_DEPTH_TEST);
- if (last_enable_stencil_test) glEnable(GL_STENCIL_TEST); else glDisable(GL_STENCIL_TEST);
- if (last_enable_scissor_test) glEnable(GL_SCISSOR_TEST); else glDisable(GL_SCISSOR_TEST);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART
- if (!bd->GlProfileIsES3 && bd->GlVersion >= 310) { if (last_enable_primitive_restart) glEnable(GL_PRIMITIVE_RESTART); else glDisable(GL_PRIMITIVE_RESTART); }
-#endif
-
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE
- // Desktop OpenGL 3.0 and OpenGL 3.1 had separate polygon draw modes for front-facing and back-facing faces of polygons
- if (bd->HasPolygonMode) { if (bd->GlVersion <= 310 || bd->GlProfileIsCompat) { glPolygonMode(GL_FRONT, (GLenum)last_polygon_mode[0]); glPolygonMode(GL_BACK, (GLenum)last_polygon_mode[1]); } else { glPolygonMode(GL_FRONT_AND_BACK, (GLenum)last_polygon_mode[0]); } }
-#endif // IMGUI_IMPL_OPENGL_MAY_HAVE_POLYGON_MODE
-
- glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3]);
- glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]);
- (void)bd; // Not all compilation paths use this
-}
-
-static void ImGui_ImplOpenGL3_DestroyTexture(ImTextureData* tex)
-{
- GLuint gl_tex_id = (GLuint)(intptr_t)tex->TexID;
- glDeleteTextures(1, &gl_tex_id);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
-}
-
-void ImGui_ImplOpenGL3_UpdateTexture(ImTextureData* tex)
-{
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == 0 && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- const void* pixels = tex->GetPixels();
- GLuint gl_texture_id = 0;
-
- // Upload texture to graphics system
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- GLint last_texture;
- GL_CALL(glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture));
- GL_CALL(glGenTextures(1, &gl_texture_id));
- GL_CALL(glBindTexture(GL_TEXTURE_2D, gl_texture_id));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
-#ifdef GL_UNPACK_ROW_LENGTH // Not on WebGL/ES
- GL_CALL(glPixelStorei(GL_UNPACK_ROW_LENGTH, 0));
-#endif
- GL_CALL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tex->Width, tex->Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels));
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)gl_texture_id);
- tex->SetStatus(ImTextureStatus_OK);
-
- // Restore state
- GL_CALL(glBindTexture(GL_TEXTURE_2D, last_texture));
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- GLint last_texture;
- GL_CALL(glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture));
-
- GLuint gl_tex_id = (GLuint)(intptr_t)tex->TexID;
- GL_CALL(glBindTexture(GL_TEXTURE_2D, gl_tex_id));
-#if 0// GL_UNPACK_ROW_LENGTH // Not on WebGL/ES
- GL_CALL(glPixelStorei(GL_UNPACK_ROW_LENGTH, tex->Width));
- for (ImTextureRect& r : tex->Updates)
- GL_CALL(glTexSubImage2D(GL_TEXTURE_2D, 0, r.x, r.y, r.w, r.h, GL_RGBA, GL_UNSIGNED_BYTE, tex->GetPixelsAt(r.x, r.y)));
- GL_CALL(glPixelStorei(GL_UNPACK_ROW_LENGTH, 0));
-#else
- // GL ES doesn't have GL_UNPACK_ROW_LENGTH, so we need to (A) copy to a contiguous buffer or (B) upload line by line.
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- for (ImTextureRect& r : tex->Updates)
- {
- const int src_pitch = r.w * tex->BytesPerPixel;
- bd->TempBuffer.resize(r.h * src_pitch);
- char* out_p = bd->TempBuffer.Data;
- for (int y = 0; y < r.h; y++, out_p += src_pitch)
- memcpy(out_p, tex->GetPixelsAt(r.x, r.y + y), src_pitch);
- IM_ASSERT(out_p == bd->TempBuffer.end());
- GL_CALL(glTexSubImage2D(GL_TEXTURE_2D, 0, r.x, r.y, r.w, r.h, GL_RGBA, GL_UNSIGNED_BYTE, bd->TempBuffer.Data));
- }
-#endif
- tex->SetStatus(ImTextureStatus_OK);
- GL_CALL(glBindTexture(GL_TEXTURE_2D, last_texture)); // Restore state
- }
- else if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- ImGui_ImplOpenGL3_DestroyTexture(tex);
-}
-
-// If you get an error please report on github. You may try different GL context version or GLSL version. See GL<>GLSL version table at the top of this file.
-static bool CheckShader(GLuint handle, const char* desc)
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- GLint status = 0, log_length = 0;
- glGetShaderiv(handle, GL_COMPILE_STATUS, &status);
- glGetShaderiv(handle, GL_INFO_LOG_LENGTH, &log_length);
- if ((GLboolean)status == GL_FALSE)
- fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile %s! With GLSL: %s\n", desc, bd->GlslVersionString);
- if (log_length > 1)
- {
- ImVector<char> buf;
- buf.resize((int)(log_length + 1));
- glGetShaderInfoLog(handle, log_length, nullptr, (GLchar*)buf.begin());
- fprintf(stderr, "%s\n", buf.begin());
- }
- return (GLboolean)status == GL_TRUE;
-}
-
-// If you get an error please report on GitHub. You may try different GL context version or GLSL version.
-static bool CheckProgram(GLuint handle, const char* desc)
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- GLint status = 0, log_length = 0;
- glGetProgramiv(handle, GL_LINK_STATUS, &status);
- glGetProgramiv(handle, GL_INFO_LOG_LENGTH, &log_length);
- if ((GLboolean)status == GL_FALSE)
- fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link %s! With GLSL %s\n", desc, bd->GlslVersionString);
- if (log_length > 1)
- {
- ImVector<char> buf;
- buf.resize((int)(log_length + 1));
- glGetProgramInfoLog(handle, log_length, nullptr, (GLchar*)buf.begin());
- fprintf(stderr, "%s\n", buf.begin());
- }
- return (GLboolean)status == GL_TRUE;
-}
-
-bool ImGui_ImplOpenGL3_CreateDeviceObjects()
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
-
- // Backup GL state
- GLint last_texture, last_array_buffer;
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK
- GLint last_pixel_unpack_buffer = 0;
- if (bd->GlVersion >= 210) { glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, &last_pixel_unpack_buffer); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); }
-#endif
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- GLint last_vertex_array;
- glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array);
-#endif
-
- // Parse GLSL version string
- int glsl_version = 130;
- sscanf(bd->GlslVersionString, "#version %d", &glsl_version);
-
- const GLchar* vertex_shader_glsl_120 =
- "uniform mat4 ProjMtx;\n"
- "attribute vec2 Position;\n"
- "attribute vec2 UV;\n"
- "attribute vec4 Color;\n"
- "varying vec2 Frag_UV;\n"
- "varying vec4 Frag_Color;\n"
- "void main()\n"
- "{\n"
- " Frag_UV = UV;\n"
- " Frag_Color = Color;\n"
- " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
- "}\n";
-
- const GLchar* vertex_shader_glsl_130 =
- "uniform mat4 ProjMtx;\n"
- "in vec2 Position;\n"
- "in vec2 UV;\n"
- "in vec4 Color;\n"
- "out vec2 Frag_UV;\n"
- "out vec4 Frag_Color;\n"
- "void main()\n"
- "{\n"
- " Frag_UV = UV;\n"
- " Frag_Color = Color;\n"
- " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
- "}\n";
-
- const GLchar* vertex_shader_glsl_300_es =
- "precision highp float;\n"
- "layout (location = 0) in vec2 Position;\n"
- "layout (location = 1) in vec2 UV;\n"
- "layout (location = 2) in vec4 Color;\n"
- "uniform mat4 ProjMtx;\n"
- "out vec2 Frag_UV;\n"
- "out vec4 Frag_Color;\n"
- "void main()\n"
- "{\n"
- " Frag_UV = UV;\n"
- " Frag_Color = Color;\n"
- " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
- "}\n";
-
- const GLchar* vertex_shader_glsl_410_core =
- "layout (location = 0) in vec2 Position;\n"
- "layout (location = 1) in vec2 UV;\n"
- "layout (location = 2) in vec4 Color;\n"
- "uniform mat4 ProjMtx;\n"
- "out vec2 Frag_UV;\n"
- "out vec4 Frag_Color;\n"
- "void main()\n"
- "{\n"
- " Frag_UV = UV;\n"
- " Frag_Color = Color;\n"
- " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
- "}\n";
-
- const GLchar* fragment_shader_glsl_120 =
- "#ifdef GL_ES\n"
- " precision mediump float;\n"
- "#endif\n"
- "uniform sampler2D Texture;\n"
- "varying vec2 Frag_UV;\n"
- "varying vec4 Frag_Color;\n"
- "void main()\n"
- "{\n"
- " gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);\n"
- "}\n";
-
- const GLchar* fragment_shader_glsl_130 =
- "uniform sampler2D Texture;\n"
- "in vec2 Frag_UV;\n"
- "in vec4 Frag_Color;\n"
- "out vec4 Out_Color;\n"
- "void main()\n"
- "{\n"
- " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
- "}\n";
-
- const GLchar* fragment_shader_glsl_300_es =
- "precision mediump float;\n"
- "uniform sampler2D Texture;\n"
- "in vec2 Frag_UV;\n"
- "in vec4 Frag_Color;\n"
- "layout (location = 0) out vec4 Out_Color;\n"
- "void main()\n"
- "{\n"
- " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
- "}\n";
-
- const GLchar* fragment_shader_glsl_410_core =
- "in vec2 Frag_UV;\n"
- "in vec4 Frag_Color;\n"
- "uniform sampler2D Texture;\n"
- "layout (location = 0) out vec4 Out_Color;\n"
- "void main()\n"
- "{\n"
- " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
- "}\n";
-
- // Select shaders matching our GLSL versions
- const GLchar* vertex_shader = nullptr;
- const GLchar* fragment_shader = nullptr;
- if (glsl_version < 130)
- {
- vertex_shader = vertex_shader_glsl_120;
- fragment_shader = fragment_shader_glsl_120;
- }
- else if (glsl_version >= 410)
- {
- vertex_shader = vertex_shader_glsl_410_core;
- fragment_shader = fragment_shader_glsl_410_core;
- }
- else if (glsl_version == 300)
- {
- vertex_shader = vertex_shader_glsl_300_es;
- fragment_shader = fragment_shader_glsl_300_es;
- }
- else
- {
- vertex_shader = vertex_shader_glsl_130;
- fragment_shader = fragment_shader_glsl_130;
- }
-
- // Create shaders
- const GLchar* vertex_shader_with_version[2] = { bd->GlslVersionString, vertex_shader };
- GLuint vert_handle;
- GL_CALL(vert_handle = glCreateShader(GL_VERTEX_SHADER));
- glShaderSource(vert_handle, 2, vertex_shader_with_version, nullptr);
- glCompileShader(vert_handle);
- if (!CheckShader(vert_handle, "vertex shader"))
- return false;
-
- const GLchar* fragment_shader_with_version[2] = { bd->GlslVersionString, fragment_shader };
- GLuint frag_handle;
- GL_CALL(frag_handle = glCreateShader(GL_FRAGMENT_SHADER));
- glShaderSource(frag_handle, 2, fragment_shader_with_version, nullptr);
- glCompileShader(frag_handle);
- if (!CheckShader(frag_handle, "fragment shader"))
- return false;
-
- // Link
- bd->ShaderHandle = glCreateProgram();
- glAttachShader(bd->ShaderHandle, vert_handle);
- glAttachShader(bd->ShaderHandle, frag_handle);
- glLinkProgram(bd->ShaderHandle);
- if (!CheckProgram(bd->ShaderHandle, "shader program"))
- return false;
-
- glDetachShader(bd->ShaderHandle, vert_handle);
- glDetachShader(bd->ShaderHandle, frag_handle);
- glDeleteShader(vert_handle);
- glDeleteShader(frag_handle);
-
- bd->AttribLocationTex = glGetUniformLocation(bd->ShaderHandle, "Texture");
- bd->AttribLocationProjMtx = glGetUniformLocation(bd->ShaderHandle, "ProjMtx");
- bd->AttribLocationVtxPos = (GLuint)glGetAttribLocation(bd->ShaderHandle, "Position");
- bd->AttribLocationVtxUV = (GLuint)glGetAttribLocation(bd->ShaderHandle, "UV");
- bd->AttribLocationVtxColor = (GLuint)glGetAttribLocation(bd->ShaderHandle, "Color");
-
- // Create buffers
- glGenBuffers(1, &bd->VboHandle);
- glGenBuffers(1, &bd->ElementsHandle);
-
- // Restore modified GL state
- glBindTexture(GL_TEXTURE_2D, last_texture);
- glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
-#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK
- if (bd->GlVersion >= 210) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, last_pixel_unpack_buffer); }
-#endif
-#ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
- glBindVertexArray(last_vertex_array);
-#endif
-
- return true;
-}
-
-void ImGui_ImplOpenGL3_DestroyDeviceObjects()
-{
- ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
- if (bd->VboHandle) { glDeleteBuffers(1, &bd->VboHandle); bd->VboHandle = 0; }
- if (bd->ElementsHandle) { glDeleteBuffers(1, &bd->ElementsHandle); bd->ElementsHandle = 0; }
- if (bd->ShaderHandle) { glDeleteProgram(bd->ShaderHandle); bd->ShaderHandle = 0; }
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplOpenGL3_DestroyTexture(tex);
-}
-
-//-----------------------------------------------------------------------------
-
-#if defined(__GNUC__)
-#pragma GCC diagnostic pop
-#endif
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_opengl3.h b/libs/imgui-1.92.1/backends/imgui_impl_opengl3.h
deleted file mode 100644
index b72b5c8..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_opengl3.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline
-// - Desktop GL: 2.x 3.x 4.x
-// - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0)
-// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [x] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset) [Desktop OpenGL only!]
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// About WebGL/ES:
-// - You need to '#define IMGUI_IMPL_OPENGL_ES2' or '#define IMGUI_IMPL_OPENGL_ES3' to use WebGL or OpenGL ES.
-// - This is done automatically on iOS, Android and Emscripten targets.
-// - For other targets, the define needs to be visible from the imgui_impl_opengl3.cpp compilation unit. If unsure, define globally or in imconfig.h.
-
-// 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
-
-// About GLSL version:
-// The 'glsl_version' initialization parameter should be nullptr (default) or a "#version XXX" string.
-// On computer platform the GLSL version default to "#version 130". On OpenGL ES 3 platform it defaults to "#version 300 es"
-// Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp.
-
-#pragma once
-#include "imgui.h" // IMGUI_IMPL_API
-#ifndef IMGUI_DISABLE
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = nullptr);
-IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data);
-
-// (Optional) Called by Init/NewFrame/Shutdown
-IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplOpenGL3_UpdateTexture(ImTextureData* tex);
-
-// Configuration flags to add in your imconfig file:
-//#define IMGUI_IMPL_OPENGL_ES2 // Enable ES 2 (Auto-detected on Emscripten)
-//#define IMGUI_IMPL_OPENGL_ES3 // Enable ES 3 (Auto-detected on iOS/Android)
-
-// You can explicitly select GLES2 or GLES3 API by using one of the '#define IMGUI_IMPL_OPENGL_LOADER_XXX' in imconfig.h or compiler command-line.
-#if !defined(IMGUI_IMPL_OPENGL_ES2) \
- && !defined(IMGUI_IMPL_OPENGL_ES3)
-
-// Try to detect GLES on matching platforms
-#if defined(__APPLE__)
-#include <TargetConditionals.h>
-#endif
-#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__))
-#define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es"
-#elif defined(__EMSCRIPTEN__) || defined(__amigaos4__)
-#define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
-#else
-// Otherwise imgui_impl_opengl3_loader.h will be used.
-#endif
-
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_opengl3_loader.h b/libs/imgui-1.92.1/backends/imgui_impl_opengl3_loader.h
deleted file mode 100644
index 4ca0536..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_opengl3_loader.h
+++ /dev/null
@@ -1,922 +0,0 @@
-//-----------------------------------------------------------------------------
-// About imgui_impl_opengl3_loader.h:
-//
-// We embed our own OpenGL loader to not require user to provide their own or to have to use ours,
-// which proved to be endless problems for users.
-// Our loader is custom-generated, based on gl3w but automatically filtered to only include
-// enums/functions that we use in our imgui_impl_opengl3.cpp source file in order to be small.
-//
-// YOU SHOULD NOT NEED TO INCLUDE/USE THIS DIRECTLY. THIS IS USED BY imgui_impl_opengl3.cpp ONLY.
-// THE REST OF YOUR APP SHOULD USE A DIFFERENT GL LOADER: ANY GL LOADER OF YOUR CHOICE.
-//
-// IF YOU GET BUILD ERRORS IN THIS FILE (commonly macro redefinitions or function redefinitions):
-// IT LIKELY MEANS THAT YOU ARE BUILDING 'imgui_impl_opengl3.cpp' OR INCLUDING 'imgui_impl_opengl3_loader.h'
-// IN THE SAME COMPILATION UNIT AS ONE OF YOUR FILE WHICH IS USING A THIRD-PARTY OPENGL LOADER.
-// (e.g. COULD HAPPEN IF YOU ARE DOING A UNITY/JUMBO BUILD, OR INCLUDING .CPP FILES FROM OTHERS)
-// YOU SHOULD NOT BUILD BOTH IN THE SAME COMPILATION UNIT.
-// BUT IF YOU REALLY WANT TO, you can '#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM' and imgui_impl_opengl3.cpp
-// WILL NOT BE USING OUR LOADER, AND INSTEAD EXPECT ANOTHER/YOUR LOADER TO BE AVAILABLE IN THE COMPILATION UNIT.
-//
-// Regenerate with:
-// python3 gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt
-//
-// More info:
-// https://github.com/dearimgui/gl3w_stripped
-// https://github.com/ocornut/imgui/issues/4445
-//-----------------------------------------------------------------------------
-
-/*
- * This file was generated with gl3w_gen.py, part of imgl3w
- * (hosted at https://github.com/dearimgui/gl3w_stripped)
- *
- * This is free and unencumbered software released into the public domain.
- *
- * Anyone is free to copy, modify, publish, use, compile, sell, or
- * distribute this software, either in source code form or as a compiled
- * binary, for any purpose, commercial or non-commercial, and by any
- * means.
- *
- * In jurisdictions that recognize copyright laws, the author or authors
- * of this software dedicate any and all copyright interest in the
- * software to the public domain. We make this dedication for the benefit
- * of the public at large and to the detriment of our heirs and
- * successors. We intend this dedication to be an overt act of
- * relinquishment in perpetuity of all present and future rights to this
- * software under copyright law.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __gl3w_h_
-#define __gl3w_h_
-
-// Adapted from KHR/khrplatform.h to avoid including entire file.
-#ifndef __khrplatform_h_
-typedef float khronos_float_t;
-typedef signed char khronos_int8_t;
-typedef unsigned char khronos_uint8_t;
-typedef signed short int khronos_int16_t;
-typedef unsigned short int khronos_uint16_t;
-#ifdef _WIN64
-typedef signed long long int khronos_intptr_t;
-typedef signed long long int khronos_ssize_t;
-#else
-typedef signed long int khronos_intptr_t;
-typedef signed long int khronos_ssize_t;
-#endif
-
-#if defined(_MSC_VER) && !defined(__clang__)
-typedef signed __int64 khronos_int64_t;
-typedef unsigned __int64 khronos_uint64_t;
-#elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)
-#include <stdint.h>
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#else
-typedef signed long long khronos_int64_t;
-typedef unsigned long long khronos_uint64_t;
-#endif
-#endif // __khrplatform_h_
-
-#ifndef __gl_glcorearb_h_
-#define __gl_glcorearb_h_ 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
-** Copyright 2013-2020 The Khronos Group Inc.
-** SPDX-License-Identifier: MIT
-**
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** https://github.com/KhronosGroup/OpenGL-Registry
-*/
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#include <windows.h>
-#endif
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-/* glcorearb.h is for use with OpenGL core profile implementations.
-** It should should be placed in the same directory as gl.h and
-** included as <GL/glcorearb.h>.
-**
-** glcorearb.h includes only APIs in the latest OpenGL core profile
-** implementation together with APIs in newer ARB extensions which
-** can be supported by the core profile. It does not, and never will
-** include functionality removed from the core profile, such as
-** fixed-function vertex and fragment processing.
-**
-** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or
-** <GL/glext.h> in the same source file.
-*/
-/* Generated C header for:
- * API: gl
- * Profile: core
- * Versions considered: .*
- * Versions emitted: .*
- * Default extensions included: glcore
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-#ifndef GL_VERSION_1_0
-typedef void GLvoid;
-typedef unsigned int GLenum;
-
-typedef khronos_float_t GLfloat;
-typedef int GLint;
-typedef int GLsizei;
-typedef unsigned int GLbitfield;
-typedef double GLdouble;
-typedef unsigned int GLuint;
-typedef unsigned char GLboolean;
-typedef khronos_uint8_t GLubyte;
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_TRIANGLES 0x0004
-#define GL_ONE 1
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_POLYGON_MODE 0x0B40
-#define GL_CULL_FACE 0x0B44
-#define GL_DEPTH_TEST 0x0B71
-#define GL_STENCIL_TEST 0x0B90
-#define GL_VIEWPORT 0x0BA2
-#define GL_BLEND 0x0BE2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_RGBA 0x1908
-#define GL_FILL 0x1B02
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_LINEAR 0x2601
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_REPEAT 0x2901
-typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
-typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
-typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
-typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
-typedef void (APIENTRYP PFNGLFLUSHPROC) (void);
-typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
-typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
-typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
-typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
-typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
-GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glClear (GLbitfield mask);
-GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI void APIENTRY glDisable (GLenum cap);
-GLAPI void APIENTRY glEnable (GLenum cap);
-GLAPI void APIENTRY glFlush (void);
-GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
-GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GLAPI GLenum APIENTRY glGetError (void);
-GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GLAPI const GLubyte *APIENTRY glGetString (GLenum name);
-GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
-GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_VERSION_1_0 */
-#ifndef GL_VERSION_1_1
-typedef khronos_float_t GLclampf;
-typedef double GLclampd;
-#define GL_TEXTURE_BINDING_2D 0x8069
-typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
-typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
-typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
-typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
-GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-#endif
-#endif /* GL_VERSION_1_1 */
-#ifndef GL_VERSION_1_2
-#define GL_CLAMP_TO_EDGE 0x812F
-#endif /* GL_VERSION_1_2 */
-#ifndef GL_VERSION_1_3
-#define GL_TEXTURE0 0x84C0
-#define GL_ACTIVE_TEXTURE 0x84E0
-typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTexture (GLenum texture);
-#endif
-#endif /* GL_VERSION_1_3 */
-#ifndef GL_VERSION_1_4
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_FUNC_ADD 0x8006
-typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GLAPI void APIENTRY glBlendEquation (GLenum mode);
-#endif
-#endif /* GL_VERSION_1_4 */
-#ifndef GL_VERSION_1_5
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-#endif
-#endif /* GL_VERSION_1_5 */
-#ifndef GL_VERSION_2_0
-typedef char GLchar;
-typedef khronos_int16_t GLshort;
-typedef khronos_int8_t GLbyte;
-typedef khronos_uint16_t GLushort;
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_LINK_STATUS 0x8B82
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_UPPER_LEFT 0x8CA2
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
-typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
-typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
-typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
-typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
-typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
-typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
-typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
-typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
-GLAPI void APIENTRY glCompileShader (GLuint shader);
-GLAPI GLuint APIENTRY glCreateProgram (void);
-GLAPI GLuint APIENTRY glCreateShader (GLenum type);
-GLAPI void APIENTRY glDeleteProgram (GLuint program);
-GLAPI void APIENTRY glDeleteShader (GLuint shader);
-GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
-GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
-GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
-GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
-GLAPI void APIENTRY glLinkProgram (GLuint program);
-GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GLAPI void APIENTRY glUseProgram (GLuint program);
-GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
-GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-#endif
-#endif /* GL_VERSION_2_0 */
-#ifndef GL_VERSION_2_1
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-#endif /* GL_VERSION_2_1 */
-#ifndef GL_VERSION_3_0
-typedef khronos_uint16_t GLhalf;
-#define GL_MAJOR_VERSION 0x821B
-#define GL_MINOR_VERSION 0x821C
-#define GL_NUM_EXTENSIONS 0x821D
-#define GL_FRAMEBUFFER_SRGB 0x8DB9
-#define GL_VERTEX_ARRAY_BINDING 0x85B5
-typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
-typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
-typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
-typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
-typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
-typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
-GLAPI void APIENTRY glBindVertexArray (GLuint array);
-GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-#endif
-#endif /* GL_VERSION_3_0 */
-#ifndef GL_VERSION_3_1
-#define GL_VERSION_3_1 1
-#define GL_PRIMITIVE_RESTART 0x8F9D
-#endif /* GL_VERSION_3_1 */
-#ifndef GL_VERSION_3_2
-#define GL_VERSION_3_2 1
-typedef struct __GLsync *GLsync;
-typedef khronos_uint64_t GLuint64;
-typedef khronos_int64_t GLint64;
-#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
-#define GL_CONTEXT_PROFILE_MASK 0x9126
-typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-#endif
-#endif /* GL_VERSION_3_2 */
-#ifndef GL_VERSION_3_3
-#define GL_VERSION_3_3 1
-#define GL_SAMPLER_BINDING 0x8919
-typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-#endif
-#endif /* GL_VERSION_3_3 */
-#ifndef GL_VERSION_4_1
-typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
-typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
-#endif /* GL_VERSION_4_1 */
-#ifndef GL_VERSION_4_3
-typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#endif /* GL_VERSION_4_3 */
-#ifndef GL_VERSION_4_5
-#define GL_CLIP_ORIGIN 0x935C
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
-typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
-#endif /* GL_VERSION_4_5 */
-#ifndef GL_ARB_bindless_texture
-typedef khronos_uint64_t GLuint64EXT;
-#endif /* GL_ARB_bindless_texture */
-#ifndef GL_ARB_cl_event
-struct _cl_context;
-struct _cl_event;
-#endif /* GL_ARB_cl_event */
-#ifndef GL_ARB_clip_control
-#define GL_ARB_clip_control 1
-#endif /* GL_ARB_clip_control */
-#ifndef GL_ARB_debug_output
-typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-#endif /* GL_ARB_debug_output */
-#ifndef GL_EXT_EGL_image_storage
-typedef void *GLeglImageOES;
-#endif /* GL_EXT_EGL_image_storage */
-#ifndef GL_EXT_direct_state_access
-typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
-typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
-typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
-#endif /* GL_EXT_direct_state_access */
-#ifndef GL_NV_draw_vulkan_image
-typedef void (APIENTRY *GLVULKANPROCNV)(void);
-#endif /* GL_NV_draw_vulkan_image */
-#ifndef GL_NV_gpu_shader5
-typedef khronos_int64_t GLint64EXT;
-#endif /* GL_NV_gpu_shader5 */
-#ifndef GL_NV_vertex_buffer_unified_memory
-typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
-#endif /* GL_NV_vertex_buffer_unified_memory */
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-#ifndef GL3W_API
-#define GL3W_API
-#endif
-
-#ifndef __gl_h_
-#define __gl_h_
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GL3W_OK 0
-#define GL3W_ERROR_INIT -1
-#define GL3W_ERROR_LIBRARY_OPEN -2
-#define GL3W_ERROR_OPENGL_VERSION -3
-
-typedef void (*GL3WglProc)(void);
-typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc);
-
-/* gl3w api */
-GL3W_API int imgl3wInit(void);
-GL3W_API int imgl3wInit2(GL3WGetProcAddressProc proc);
-GL3W_API int imgl3wIsSupported(int major, int minor);
-GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc);
-
-/* gl3w internal state */
-union ImGL3WProcs {
- GL3WglProc ptr[60];
- struct {
- PFNGLACTIVETEXTUREPROC ActiveTexture;
- PFNGLATTACHSHADERPROC AttachShader;
- PFNGLBINDBUFFERPROC BindBuffer;
- PFNGLBINDSAMPLERPROC BindSampler;
- PFNGLBINDTEXTUREPROC BindTexture;
- PFNGLBINDVERTEXARRAYPROC BindVertexArray;
- PFNGLBLENDEQUATIONPROC BlendEquation;
- PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate;
- PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
- PFNGLBUFFERDATAPROC BufferData;
- PFNGLBUFFERSUBDATAPROC BufferSubData;
- PFNGLCLEARPROC Clear;
- PFNGLCLEARCOLORPROC ClearColor;
- PFNGLCOMPILESHADERPROC CompileShader;
- PFNGLCREATEPROGRAMPROC CreateProgram;
- PFNGLCREATESHADERPROC CreateShader;
- PFNGLDELETEBUFFERSPROC DeleteBuffers;
- PFNGLDELETEPROGRAMPROC DeleteProgram;
- PFNGLDELETESHADERPROC DeleteShader;
- PFNGLDELETETEXTURESPROC DeleteTextures;
- PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays;
- PFNGLDETACHSHADERPROC DetachShader;
- PFNGLDISABLEPROC Disable;
- PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
- PFNGLDRAWELEMENTSPROC DrawElements;
- PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex;
- PFNGLENABLEPROC Enable;
- PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
- PFNGLFLUSHPROC Flush;
- PFNGLGENBUFFERSPROC GenBuffers;
- PFNGLGENTEXTURESPROC GenTextures;
- PFNGLGENVERTEXARRAYSPROC GenVertexArrays;
- PFNGLGETATTRIBLOCATIONPROC GetAttribLocation;
- PFNGLGETERRORPROC GetError;
- PFNGLGETINTEGERVPROC GetIntegerv;
- PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog;
- PFNGLGETPROGRAMIVPROC GetProgramiv;
- PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog;
- PFNGLGETSHADERIVPROC GetShaderiv;
- PFNGLGETSTRINGPROC GetString;
- PFNGLGETSTRINGIPROC GetStringi;
- PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
- PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv;
- PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv;
- PFNGLISENABLEDPROC IsEnabled;
- PFNGLISPROGRAMPROC IsProgram;
- PFNGLLINKPROGRAMPROC LinkProgram;
- PFNGLPIXELSTOREIPROC PixelStorei;
- PFNGLPOLYGONMODEPROC PolygonMode;
- PFNGLREADPIXELSPROC ReadPixels;
- PFNGLSCISSORPROC Scissor;
- PFNGLSHADERSOURCEPROC ShaderSource;
- PFNGLTEXIMAGE2DPROC TexImage2D;
- PFNGLTEXPARAMETERIPROC TexParameteri;
- PFNGLTEXSUBIMAGE2DPROC TexSubImage2D;
- PFNGLUNIFORM1IPROC Uniform1i;
- PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
- PFNGLUSEPROGRAMPROC UseProgram;
- PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
- PFNGLVIEWPORTPROC Viewport;
- } gl;
-};
-
-GL3W_API extern union ImGL3WProcs imgl3wProcs;
-
-/* OpenGL functions */
-#define glActiveTexture imgl3wProcs.gl.ActiveTexture
-#define glAttachShader imgl3wProcs.gl.AttachShader
-#define glBindBuffer imgl3wProcs.gl.BindBuffer
-#define glBindSampler imgl3wProcs.gl.BindSampler
-#define glBindTexture imgl3wProcs.gl.BindTexture
-#define glBindVertexArray imgl3wProcs.gl.BindVertexArray
-#define glBlendEquation imgl3wProcs.gl.BlendEquation
-#define glBlendEquationSeparate imgl3wProcs.gl.BlendEquationSeparate
-#define glBlendFuncSeparate imgl3wProcs.gl.BlendFuncSeparate
-#define glBufferData imgl3wProcs.gl.BufferData
-#define glBufferSubData imgl3wProcs.gl.BufferSubData
-#define glClear imgl3wProcs.gl.Clear
-#define glClearColor imgl3wProcs.gl.ClearColor
-#define glCompileShader imgl3wProcs.gl.CompileShader
-#define glCreateProgram imgl3wProcs.gl.CreateProgram
-#define glCreateShader imgl3wProcs.gl.CreateShader
-#define glDeleteBuffers imgl3wProcs.gl.DeleteBuffers
-#define glDeleteProgram imgl3wProcs.gl.DeleteProgram
-#define glDeleteShader imgl3wProcs.gl.DeleteShader
-#define glDeleteTextures imgl3wProcs.gl.DeleteTextures
-#define glDeleteVertexArrays imgl3wProcs.gl.DeleteVertexArrays
-#define glDetachShader imgl3wProcs.gl.DetachShader
-#define glDisable imgl3wProcs.gl.Disable
-#define glDisableVertexAttribArray imgl3wProcs.gl.DisableVertexAttribArray
-#define glDrawElements imgl3wProcs.gl.DrawElements
-#define glDrawElementsBaseVertex imgl3wProcs.gl.DrawElementsBaseVertex
-#define glEnable imgl3wProcs.gl.Enable
-#define glEnableVertexAttribArray imgl3wProcs.gl.EnableVertexAttribArray
-#define glFlush imgl3wProcs.gl.Flush
-#define glGenBuffers imgl3wProcs.gl.GenBuffers
-#define glGenTextures imgl3wProcs.gl.GenTextures
-#define glGenVertexArrays imgl3wProcs.gl.GenVertexArrays
-#define glGetAttribLocation imgl3wProcs.gl.GetAttribLocation
-#define glGetError imgl3wProcs.gl.GetError
-#define glGetIntegerv imgl3wProcs.gl.GetIntegerv
-#define glGetProgramInfoLog imgl3wProcs.gl.GetProgramInfoLog
-#define glGetProgramiv imgl3wProcs.gl.GetProgramiv
-#define glGetShaderInfoLog imgl3wProcs.gl.GetShaderInfoLog
-#define glGetShaderiv imgl3wProcs.gl.GetShaderiv
-#define glGetString imgl3wProcs.gl.GetString
-#define glGetStringi imgl3wProcs.gl.GetStringi
-#define glGetUniformLocation imgl3wProcs.gl.GetUniformLocation
-#define glGetVertexAttribPointerv imgl3wProcs.gl.GetVertexAttribPointerv
-#define glGetVertexAttribiv imgl3wProcs.gl.GetVertexAttribiv
-#define glIsEnabled imgl3wProcs.gl.IsEnabled
-#define glIsProgram imgl3wProcs.gl.IsProgram
-#define glLinkProgram imgl3wProcs.gl.LinkProgram
-#define glPixelStorei imgl3wProcs.gl.PixelStorei
-#define glPolygonMode imgl3wProcs.gl.PolygonMode
-#define glReadPixels imgl3wProcs.gl.ReadPixels
-#define glScissor imgl3wProcs.gl.Scissor
-#define glShaderSource imgl3wProcs.gl.ShaderSource
-#define glTexImage2D imgl3wProcs.gl.TexImage2D
-#define glTexParameteri imgl3wProcs.gl.TexParameteri
-#define glTexSubImage2D imgl3wProcs.gl.TexSubImage2D
-#define glUniform1i imgl3wProcs.gl.Uniform1i
-#define glUniformMatrix4fv imgl3wProcs.gl.UniformMatrix4fv
-#define glUseProgram imgl3wProcs.gl.UseProgram
-#define glVertexAttribPointer imgl3wProcs.gl.VertexAttribPointer
-#define glViewport imgl3wProcs.gl.Viewport
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#ifdef IMGL3W_IMPL
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-
-#define GL3W_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-#if defined(_WIN32)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#include <windows.h>
-
-static HMODULE libgl;
-typedef PROC(__stdcall* GL3WglGetProcAddr)(LPCSTR);
-static GL3WglGetProcAddr wgl_get_proc_address;
-
-static int open_libgl(void)
-{
- libgl = LoadLibraryA("opengl32.dll");
- if (!libgl)
- return GL3W_ERROR_LIBRARY_OPEN;
- wgl_get_proc_address = (GL3WglGetProcAddr)GetProcAddress(libgl, "wglGetProcAddress");
- return GL3W_OK;
-}
-
-static void close_libgl(void) { FreeLibrary(libgl); }
-static GL3WglProc get_proc(const char *proc)
-{
- GL3WglProc res;
- res = (GL3WglProc)wgl_get_proc_address(proc);
- if (!res)
- res = (GL3WglProc)GetProcAddress(libgl, proc);
- return res;
-}
-#elif defined(__APPLE__)
-#include <dlfcn.h>
-
-static void *libgl;
-static int open_libgl(void)
-{
- libgl = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_LOCAL);
- if (!libgl)
- return GL3W_ERROR_LIBRARY_OPEN;
- return GL3W_OK;
-}
-
-static void close_libgl(void) { dlclose(libgl); }
-
-static GL3WglProc get_proc(const char *proc)
-{
- GL3WglProc res;
- *(void **)(&res) = dlsym(libgl, proc);
- return res;
-}
-#else
-#include <dlfcn.h>
-
-static void* libgl; // OpenGL library
-static void* libglx; // GLX library
-static void* libegl; // EGL library
-static GL3WGetProcAddressProc gl_get_proc_address;
-
-static void close_libgl(void)
-{
- if (libgl) {
- dlclose(libgl);
- libgl = NULL;
- }
- if (libegl) {
- dlclose(libegl);
- libegl = NULL;
- }
- if (libglx) {
- dlclose(libglx);
- libglx = NULL;
- }
-}
-
-static int is_library_loaded(const char* name, void** lib)
-{
- *lib = dlopen(name, RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
- return *lib != NULL;
-}
-
-static int open_libs(void)
-{
- // On Linux we have two APIs to get process addresses: EGL and GLX.
- // EGL is supported under both X11 and Wayland, whereas GLX is X11-specific.
-
- libgl = NULL;
- libegl = NULL;
- libglx = NULL;
-
- // First check what's already loaded, the windowing library might have
- // already loaded either EGL or GLX and we want to use the same one.
-
- if (is_library_loaded("libEGL.so.1", &libegl) ||
- is_library_loaded("libGLX.so.0", &libglx)) {
- libgl = dlopen("libOpenGL.so.0", RTLD_LAZY | RTLD_LOCAL);
- if (libgl)
- return GL3W_OK;
- else
- close_libgl();
- }
-
- if (is_library_loaded("libGL.so", &libgl))
- return GL3W_OK;
- if (is_library_loaded("libGL.so.1", &libgl))
- return GL3W_OK;
- if (is_library_loaded("libGL.so.3", &libgl))
- return GL3W_OK;
-
- // Neither is already loaded, so we have to load one. Try EGL first
- // because it is supported under both X11 and Wayland.
-
- // Load OpenGL + EGL
- libgl = dlopen("libOpenGL.so.0", RTLD_LAZY | RTLD_LOCAL);
- libegl = dlopen("libEGL.so.1", RTLD_LAZY | RTLD_LOCAL);
- if (libgl && libegl)
- return GL3W_OK;
- else
- close_libgl();
-
- // Fall back to legacy libGL, which includes GLX
- // While most systems use libGL.so.1, NetBSD seems to use that libGL.so.3. See https://github.com/ocornut/imgui/issues/6983
- libgl = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
- if (!libgl)
- libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL);
- if (!libgl)
- libgl = dlopen("libGL.so.3", RTLD_LAZY | RTLD_LOCAL);
-
- if (libgl)
- return GL3W_OK;
-
- return GL3W_ERROR_LIBRARY_OPEN;
-}
-
-static int open_libgl(void)
-{
- int res = open_libs();
- if (res)
- return res;
-
- if (libegl)
- *(void**)(&gl_get_proc_address) = dlsym(libegl, "eglGetProcAddress");
- else if (libglx)
- *(void**)(&gl_get_proc_address) = dlsym(libglx, "glXGetProcAddressARB");
- else
- *(void**)(&gl_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");
-
- if (!gl_get_proc_address) {
- close_libgl();
- return GL3W_ERROR_LIBRARY_OPEN;
- }
-
- return GL3W_OK;
-}
-
-static GL3WglProc get_proc(const char* proc)
-{
- GL3WglProc res = NULL;
-
- // Before EGL version 1.5, eglGetProcAddress doesn't support querying core
- // functions and may return a dummy function if we try, so try to load the
- // function from the GL library directly first.
- if (libegl)
- *(void**)(&res) = dlsym(libgl, proc);
-
- if (!res)
- res = gl_get_proc_address(proc);
-
- if (!libegl && !res)
- *(void**)(&res) = dlsym(libgl, proc);
-
- return res;
-}
-#endif
-
-static struct { int major, minor; } version;
-
-static int parse_version(void)
-{
- if (!glGetIntegerv)
- return GL3W_ERROR_INIT;
- glGetIntegerv(GL_MAJOR_VERSION, &version.major);
- glGetIntegerv(GL_MINOR_VERSION, &version.minor);
- if (version.major == 0 && version.minor == 0)
- {
- // Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
- if (const char* gl_version = (const char*)glGetString(GL_VERSION))
- sscanf(gl_version, "%d.%d", &version.major, &version.minor);
- }
- if (version.major < 2)
- return GL3W_ERROR_OPENGL_VERSION;
- return GL3W_OK;
-}
-
-static void load_procs(GL3WGetProcAddressProc proc);
-
-int imgl3wInit(void)
-{
- int res = open_libgl();
- if (res)
- return res;
- atexit(close_libgl);
- return imgl3wInit2(get_proc);
-}
-
-int imgl3wInit2(GL3WGetProcAddressProc proc)
-{
- load_procs(proc);
- return parse_version();
-}
-
-int imgl3wIsSupported(int major, int minor)
-{
- if (major < 2)
- return 0;
- if (version.major == major)
- return version.minor >= minor;
- return version.major >= major;
-}
-
-GL3WglProc imgl3wGetProcAddress(const char *proc) { return get_proc(proc); }
-
-static const char *proc_names[] = {
- "glActiveTexture",
- "glAttachShader",
- "glBindBuffer",
- "glBindSampler",
- "glBindTexture",
- "glBindVertexArray",
- "glBlendEquation",
- "glBlendEquationSeparate",
- "glBlendFuncSeparate",
- "glBufferData",
- "glBufferSubData",
- "glClear",
- "glClearColor",
- "glCompileShader",
- "glCreateProgram",
- "glCreateShader",
- "glDeleteBuffers",
- "glDeleteProgram",
- "glDeleteShader",
- "glDeleteTextures",
- "glDeleteVertexArrays",
- "glDetachShader",
- "glDisable",
- "glDisableVertexAttribArray",
- "glDrawElements",
- "glDrawElementsBaseVertex",
- "glEnable",
- "glEnableVertexAttribArray",
- "glFlush",
- "glGenBuffers",
- "glGenTextures",
- "glGenVertexArrays",
- "glGetAttribLocation",
- "glGetError",
- "glGetIntegerv",
- "glGetProgramInfoLog",
- "glGetProgramiv",
- "glGetShaderInfoLog",
- "glGetShaderiv",
- "glGetString",
- "glGetStringi",
- "glGetUniformLocation",
- "glGetVertexAttribPointerv",
- "glGetVertexAttribiv",
- "glIsEnabled",
- "glIsProgram",
- "glLinkProgram",
- "glPixelStorei",
- "glPolygonMode",
- "glReadPixels",
- "glScissor",
- "glShaderSource",
- "glTexImage2D",
- "glTexParameteri",
- "glTexSubImage2D",
- "glUniform1i",
- "glUniformMatrix4fv",
- "glUseProgram",
- "glVertexAttribPointer",
- "glViewport",
-};
-
-GL3W_API union ImGL3WProcs imgl3wProcs;
-
-static void load_procs(GL3WGetProcAddressProc proc)
-{
- size_t i;
- for (i = 0; i < GL3W_ARRAY_SIZE(proc_names); i++)
- imgl3wProcs.ptr[i] = proc(proc_names[i]);
-}
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_osx.h b/libs/imgui-1.92.1/backends/imgui_impl_osx.h
deleted file mode 100644
index ea2b4f4..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_osx.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// dear imgui: Platform Backend for OSX / Cocoa
-// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
-// - Not well tested. If you want a portable application, prefer using the GLFW or SDL platform Backends on Mac.
-// - Requires linking with the GameController framework ("-framework GameController").
-
-// Implemented features:
-// [X] Platform: Clipboard support is part of core Dear ImGui (no specific code in this backend).
-// [X] Platform: Mouse support. Can discriminate Mouse/Pen.
-// [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 kVK_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: IME support.
-
-// 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
-
-#ifdef __OBJC__
-
-@class NSEvent;
-@class NSView;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplOSX_Init(NSView* _Nonnull view);
-IMGUI_IMPL_API void ImGui_ImplOSX_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(NSView* _Nullable view);
-
-#endif
-
-//-----------------------------------------------------------------------------
-// C++ API
-//-----------------------------------------------------------------------------
-
-#ifdef IMGUI_IMPL_METAL_CPP_EXTENSIONS
-// #include <AppKit/AppKit.hpp>
-#ifndef __OBJC__
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplOSX_Init(void* _Nonnull view);
-IMGUI_IMPL_API void ImGui_ImplOSX_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(void* _Nullable view);
-
-#endif
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_osx.mm b/libs/imgui-1.92.1/backends/imgui_impl_osx.mm
deleted file mode 100644
index 06a6aff..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_osx.mm
+++ /dev/null
@@ -1,832 +0,0 @@
-// dear imgui: Platform Backend for OSX / Cocoa
-// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
-// - Not well tested. If you want a portable application, prefer using the GLFW or SDL platform Backends on Mac.
-// - Requires linking with the GameController framework ("-framework GameController").
-
-// Implemented features:
-// [X] Platform: Clipboard support is part of core Dear ImGui (no specific code in this backend).
-// [X] Platform: Mouse support. Can discriminate Mouse/Pen.
-// [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 kVK_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: IME support.
-
-// 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
-
-#import "imgui.h"
-#ifndef IMGUI_DISABLE
-#import "imgui_impl_osx.h"
-#import <Cocoa/Cocoa.h>
-#import <Carbon/Carbon.h>
-#import <GameController/GameController.h>
-#import <time.h>
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-27: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
-// 2025-06-12: ImGui_ImplOSX_HandleEvent() only process event for window containing our view. (#8644)
-// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
-// 2025-01-20: Removed notification observer when shutting down. (#8331)
-// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
-// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
-// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
-// - io.PlatformSetImeDataFn -> platform_io.Platform_SetImeDataFn
-// 2024-07-02: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() renaming in main library.
-// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F20 function keys. Stopped mapping F13 into PrintScreen.
-// 2023-04-09: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_Pen.
-// 2023-02-01: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mice).
-// 2022-11-02: Fixed mouse coordinates before clicking the host window.
-// 2022-10-06: Fixed mouse inputs on flipped views.
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-05-03: Inputs: Removed ImGui_ImplOSX_HandleEvent() from backend API in favor of backend automatically handling event capture.
-// 2022-04-27: Misc: Store backend data in a per-context struct, allowing to use this backend with multiple contexts.
-// 2022-03-22: Inputs: Monitor NSKeyUp events to catch missing keyUp for key when user press Cmd + key
-// 2022-02-07: Inputs: Forward keyDown/keyUp events to OS when unused by dear imgui.
-// 2022-01-31: Fixed building with old Xcode versions that are missing gamepad features.
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-12: Inputs: Added basic Platform IME support, hooking the io.SetPlatformImeDataFn() function.
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2021-12-13: *BREAKING CHANGE* Add NSView parameter to ImGui_ImplOSX_Init(). Generally fix keyboard support. Using kVK_* codes for keyboard keys.
-// 2021-12-13: Add game controller support.
-// 2021-09-21: Use mach_absolute_time as CFAbsoluteTimeGetCurrent can jump backwards.
-// 2021-08-17: Calling io.AddFocusEvent() on NSApplicationDidBecomeActiveNotification/NSApplicationDidResignActiveNotification events.
-// 2021-06-23: Inputs: Added a fix for shortcuts using CTRL key instead of CMD key.
-// 2021-04-19: Inputs: Added a fix for keys remaining stuck in pressed state when CMD-tabbing into different application.
-// 2021-01-27: Inputs: Added a fix for mouse position not being reported when mouse buttons other than left one are down.
-// 2020-10-28: Inputs: Added a fix for handling keypad-enter key.
-// 2020-05-25: Inputs: Added a fix for missing trackpad clicks when done with "soft tap".
-// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
-// 2019-10-11: Inputs: Fix using Backspace key.
-// 2019-07-21: Re-added clipboard handlers as they are not enabled by default in core imgui.cpp (reverted 2019-05-18 change).
-// 2019-05-28: Inputs: Added mouse cursor shape and visibility support.
-// 2019-05-18: Misc: Removed clipboard handlers as they are now supported by core imgui.cpp.
-// 2019-05-11: Inputs: Don't filter character values before calling AddInputCharacter() apart from 0xF700..0xFFFF range.
-// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
-// 2018-07-07: Initial version.
-
-#define APPLE_HAS_BUTTON_OPTIONS (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 || __TV_OS_VERSION_MIN_REQUIRED >= 130000)
-#define APPLE_HAS_CONTROLLER (__IPHONE_OS_VERSION_MIN_REQUIRED >= 140000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 || __TV_OS_VERSION_MIN_REQUIRED >= 140000)
-#define APPLE_HAS_THUMBSTICKS (__IPHONE_OS_VERSION_MIN_REQUIRED >= 120100 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101401 || __TV_OS_VERSION_MIN_REQUIRED >= 120100)
-
-@class ImGuiObserver;
-@class KeyEventResponder;
-
-// Data
-struct ImGui_ImplOSX_Data
-{
- CFTimeInterval Time;
- NSCursor* MouseCursors[ImGuiMouseCursor_COUNT];
- bool MouseCursorHidden;
- ImGuiObserver* Observer;
- KeyEventResponder* KeyEventResponder;
- NSTextInputContext* InputContext;
- id Monitor;
- NSWindow* Window;
-
- ImGui_ImplOSX_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-static ImGui_ImplOSX_Data* ImGui_ImplOSX_GetBackendData() { return (ImGui_ImplOSX_Data*)ImGui::GetIO().BackendPlatformUserData; }
-static void ImGui_ImplOSX_DestroyBackendData() { IM_DELETE(ImGui_ImplOSX_GetBackendData()); }
-
-static inline CFTimeInterval GetMachAbsoluteTimeInSeconds() { return (CFTimeInterval)(double)(clock_gettime_nsec_np(CLOCK_UPTIME_RAW) / 1e9); }
-
-// Forward Declarations
-static void ImGui_ImplOSX_AddTrackingArea(NSView* _Nonnull view);
-static bool ImGui_ImplOSX_HandleEvent(NSEvent* event, NSView* view);
-
-// Undocumented methods for creating cursors.
-@interface NSCursor()
-+ (id)_windowResizeNorthWestSouthEastCursor;
-+ (id)_windowResizeNorthEastSouthWestCursor;
-+ (id)_windowResizeNorthSouthCursor;
-+ (id)_windowResizeEastWestCursor;
-+ (id)busyButClickableCursor;
-@end
-
-/**
- KeyEventResponder implements the NSTextInputClient protocol as is required by the macOS text input manager.
-
- The macOS text input manager is invoked by calling the interpretKeyEvents method from the keyDown method.
- Keyboard events are then evaluated by the macOS input manager and valid text input is passed back via the
- insertText:replacementRange method.
-
- This is the same approach employed by other cross-platform libraries such as SDL2:
- https://github.com/spurious/SDL-mirror/blob/e17aacbd09e65a4fd1e166621e011e581fb017a8/src/video/cocoa/SDL_cocoakeyboard.m#L53
- and GLFW:
- https://github.com/glfw/glfw/blob/b55a517ae0c7b5127dffa79a64f5406021bf9076/src/cocoa_window.m#L722-L723
- */
-@interface KeyEventResponder: NSView<NSTextInputClient>
-@end
-
-@implementation KeyEventResponder
-{
- float _posX;
- float _posY;
- NSRect _imeRect;
-}
-
-#pragma mark - Public
-
-- (void)setImePosX:(float)posX imePosY:(float)posY
-{
- _posX = posX;
- _posY = posY;
-}
-
-- (void)updateImePosWithView:(NSView *)view
-{
- NSWindow* window = view.window;
- if (!window)
- return;
- NSRect contentRect = [window contentRectForFrameRect:window.frame];
- NSRect rect = NSMakeRect(_posX, contentRect.size.height - _posY, 0, 0);
- _imeRect = [window convertRectToScreen:rect];
-}
-
-- (void)viewDidMoveToWindow
-{
- // Ensure self is a first responder to receive the input events.
- [self.window makeFirstResponder:self];
-}
-
-- (void)keyDown:(NSEvent*)event
-{
- if (!ImGui_ImplOSX_HandleEvent(event, self))
- [super keyDown:event];
-
- // Call to the macOS input manager system.
- [self interpretKeyEvents:@[event]];
-}
-
-- (void)keyUp:(NSEvent*)event
-{
- if (!ImGui_ImplOSX_HandleEvent(event, self))
- [super keyUp:event];
-}
-
-- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
-{
- ImGuiIO& io = ImGui::GetIO();
-
- NSString* characters;
- if ([aString isKindOfClass:[NSAttributedString class]])
- characters = [aString string];
- else
- characters = (NSString*)aString;
-
- io.AddInputCharactersUTF8(characters.UTF8String);
-}
-
-- (BOOL)acceptsFirstResponder
-{
- return YES;
-}
-
-- (void)doCommandBySelector:(SEL)myselector
-{
-}
-
-- (nullable NSAttributedString*)attributedSubstringForProposedRange:(NSRange)range actualRange:(nullable NSRangePointer)actualRange
-{
- return nil;
-}
-
-- (NSUInteger)characterIndexForPoint:(NSPoint)point
-{
- return 0;
-}
-
-- (NSRect)firstRectForCharacterRange:(NSRange)range actualRange:(nullable NSRangePointer)actualRange
-{
- return _imeRect;
-}
-
-- (BOOL)hasMarkedText
-{
- return NO;
-}
-
-- (NSRange)markedRange
-{
- return NSMakeRange(NSNotFound, 0);
-}
-
-- (NSRange)selectedRange
-{
- return NSMakeRange(NSNotFound, 0);
-}
-
-- (void)setMarkedText:(nonnull id)string selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
-{
-}
-
-- (void)unmarkText
-{
-}
-
-- (nonnull NSArray<NSAttributedStringKey>*)validAttributesForMarkedText
-{
- return @[];
-}
-
-@end
-
-@interface ImGuiObserver : NSObject
-
-- (void)onApplicationBecomeActive:(NSNotification*)aNotification;
-- (void)onApplicationBecomeInactive:(NSNotification*)aNotification;
-
-@end
-
-@implementation ImGuiObserver
-
-- (void)onApplicationBecomeActive:(NSNotification*)aNotification
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddFocusEvent(true);
-}
-
-- (void)onApplicationBecomeInactive:(NSNotification*)aNotification
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddFocusEvent(false);
-}
-
-@end
-
-// Functions
-
-// Not static to allow third-party code to use that if they want to (but undocumented)
-ImGuiKey ImGui_ImplOSX_KeyCodeToImGuiKey(int key_code);
-ImGuiKey ImGui_ImplOSX_KeyCodeToImGuiKey(int key_code)
-{
- switch (key_code)
- {
- case kVK_ANSI_A: return ImGuiKey_A;
- case kVK_ANSI_S: return ImGuiKey_S;
- case kVK_ANSI_D: return ImGuiKey_D;
- case kVK_ANSI_F: return ImGuiKey_F;
- case kVK_ANSI_H: return ImGuiKey_H;
- case kVK_ANSI_G: return ImGuiKey_G;
- case kVK_ANSI_Z: return ImGuiKey_Z;
- case kVK_ANSI_X: return ImGuiKey_X;
- case kVK_ANSI_C: return ImGuiKey_C;
- case kVK_ANSI_V: return ImGuiKey_V;
- case kVK_ANSI_B: return ImGuiKey_B;
- case kVK_ANSI_Q: return ImGuiKey_Q;
- case kVK_ANSI_W: return ImGuiKey_W;
- case kVK_ANSI_E: return ImGuiKey_E;
- case kVK_ANSI_R: return ImGuiKey_R;
- case kVK_ANSI_Y: return ImGuiKey_Y;
- case kVK_ANSI_T: return ImGuiKey_T;
- case kVK_ANSI_1: return ImGuiKey_1;
- case kVK_ANSI_2: return ImGuiKey_2;
- case kVK_ANSI_3: return ImGuiKey_3;
- case kVK_ANSI_4: return ImGuiKey_4;
- case kVK_ANSI_6: return ImGuiKey_6;
- case kVK_ANSI_5: return ImGuiKey_5;
- case kVK_ANSI_Equal: return ImGuiKey_Equal;
- case kVK_ANSI_9: return ImGuiKey_9;
- case kVK_ANSI_7: return ImGuiKey_7;
- case kVK_ANSI_Minus: return ImGuiKey_Minus;
- case kVK_ANSI_8: return ImGuiKey_8;
- case kVK_ANSI_0: return ImGuiKey_0;
- case kVK_ANSI_RightBracket: return ImGuiKey_RightBracket;
- case kVK_ANSI_O: return ImGuiKey_O;
- case kVK_ANSI_U: return ImGuiKey_U;
- case kVK_ANSI_LeftBracket: return ImGuiKey_LeftBracket;
- case kVK_ANSI_I: return ImGuiKey_I;
- case kVK_ANSI_P: return ImGuiKey_P;
- case kVK_ANSI_L: return ImGuiKey_L;
- case kVK_ANSI_J: return ImGuiKey_J;
- case kVK_ANSI_Quote: return ImGuiKey_Apostrophe;
- case kVK_ANSI_K: return ImGuiKey_K;
- case kVK_ANSI_Semicolon: return ImGuiKey_Semicolon;
- case kVK_ANSI_Backslash: return ImGuiKey_Backslash;
- case kVK_ANSI_Comma: return ImGuiKey_Comma;
- case kVK_ANSI_Slash: return ImGuiKey_Slash;
- case kVK_ANSI_N: return ImGuiKey_N;
- case kVK_ANSI_M: return ImGuiKey_M;
- case kVK_ANSI_Period: return ImGuiKey_Period;
- case kVK_ANSI_Grave: return ImGuiKey_GraveAccent;
- case kVK_ANSI_KeypadDecimal: return ImGuiKey_KeypadDecimal;
- case kVK_ANSI_KeypadMultiply: return ImGuiKey_KeypadMultiply;
- case kVK_ANSI_KeypadPlus: return ImGuiKey_KeypadAdd;
- case kVK_ANSI_KeypadClear: return ImGuiKey_NumLock;
- case kVK_ANSI_KeypadDivide: return ImGuiKey_KeypadDivide;
- case kVK_ANSI_KeypadEnter: return ImGuiKey_KeypadEnter;
- case kVK_ANSI_KeypadMinus: return ImGuiKey_KeypadSubtract;
- case kVK_ANSI_KeypadEquals: return ImGuiKey_KeypadEqual;
- case kVK_ANSI_Keypad0: return ImGuiKey_Keypad0;
- case kVK_ANSI_Keypad1: return ImGuiKey_Keypad1;
- case kVK_ANSI_Keypad2: return ImGuiKey_Keypad2;
- case kVK_ANSI_Keypad3: return ImGuiKey_Keypad3;
- case kVK_ANSI_Keypad4: return ImGuiKey_Keypad4;
- case kVK_ANSI_Keypad5: return ImGuiKey_Keypad5;
- case kVK_ANSI_Keypad6: return ImGuiKey_Keypad6;
- case kVK_ANSI_Keypad7: return ImGuiKey_Keypad7;
- case kVK_ANSI_Keypad8: return ImGuiKey_Keypad8;
- case kVK_ANSI_Keypad9: return ImGuiKey_Keypad9;
- case kVK_Return: return ImGuiKey_Enter;
- case kVK_Tab: return ImGuiKey_Tab;
- case kVK_Space: return ImGuiKey_Space;
- case kVK_Delete: return ImGuiKey_Backspace;
- case kVK_Escape: return ImGuiKey_Escape;
- case kVK_CapsLock: return ImGuiKey_CapsLock;
- case kVK_Control: return ImGuiKey_LeftCtrl;
- case kVK_Shift: return ImGuiKey_LeftShift;
- case kVK_Option: return ImGuiKey_LeftAlt;
- case kVK_Command: return ImGuiKey_LeftSuper;
- case kVK_RightControl: return ImGuiKey_RightCtrl;
- case kVK_RightShift: return ImGuiKey_RightShift;
- case kVK_RightOption: return ImGuiKey_RightAlt;
- case kVK_RightCommand: return ImGuiKey_RightSuper;
-// case kVK_Function: return ImGuiKey_;
-// case kVK_VolumeUp: return ImGuiKey_;
-// case kVK_VolumeDown: return ImGuiKey_;
-// case kVK_Mute: return ImGuiKey_;
- case kVK_F1: return ImGuiKey_F1;
- case kVK_F2: return ImGuiKey_F2;
- case kVK_F3: return ImGuiKey_F3;
- case kVK_F4: return ImGuiKey_F4;
- case kVK_F5: return ImGuiKey_F5;
- case kVK_F6: return ImGuiKey_F6;
- case kVK_F7: return ImGuiKey_F7;
- case kVK_F8: return ImGuiKey_F8;
- case kVK_F9: return ImGuiKey_F9;
- case kVK_F10: return ImGuiKey_F10;
- case kVK_F11: return ImGuiKey_F11;
- case kVK_F12: return ImGuiKey_F12;
- case kVK_F13: return ImGuiKey_F13;
- case kVK_F14: return ImGuiKey_F14;
- case kVK_F15: return ImGuiKey_F15;
- case kVK_F16: return ImGuiKey_F16;
- case kVK_F17: return ImGuiKey_F17;
- case kVK_F18: return ImGuiKey_F18;
- case kVK_F19: return ImGuiKey_F19;
- case kVK_F20: return ImGuiKey_F20;
- case 0x6E: return ImGuiKey_Menu;
- case kVK_Help: return ImGuiKey_Insert;
- case kVK_Home: return ImGuiKey_Home;
- case kVK_PageUp: return ImGuiKey_PageUp;
- case kVK_ForwardDelete: return ImGuiKey_Delete;
- case kVK_End: return ImGuiKey_End;
- case kVK_PageDown: return ImGuiKey_PageDown;
- case kVK_LeftArrow: return ImGuiKey_LeftArrow;
- case kVK_RightArrow: return ImGuiKey_RightArrow;
- case kVK_DownArrow: return ImGuiKey_DownArrow;
- case kVK_UpArrow: return ImGuiKey_UpArrow;
- default: return ImGuiKey_None;
- }
-}
-
-#ifdef IMGUI_IMPL_METAL_CPP_EXTENSIONS
-
-IMGUI_IMPL_API bool ImGui_ImplOSX_Init(void* _Nonnull view) {
- return ImGui_ImplOSX_Init((__bridge NSView*)(view));
-}
-
-IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(void* _Nullable view) {
- return ImGui_ImplOSX_NewFrame((__bridge NSView*)(view));
-}
-
-#endif
-
-
-bool ImGui_ImplOSX_Init(NSView* view)
-{
- ImGuiIO& io = ImGui::GetIO();
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplOSX_Data* bd = IM_NEW(ImGui_ImplOSX_Data)();
- io.BackendPlatformUserData = (void*)bd;
- io.BackendPlatformName = "imgui_impl_osx";
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
- //io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
-
- bd->Observer = [ImGuiObserver new];
- bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
- ImGuiViewport* main_viewport = ImGui::GetMainViewport();
- main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
-
- // Load cursors. Some of them are undocumented.
- bd->MouseCursorHidden = false;
- bd->MouseCursors[ImGuiMouseCursor_Arrow] = [NSCursor arrowCursor];
- bd->MouseCursors[ImGuiMouseCursor_TextInput] = [NSCursor IBeamCursor];
- bd->MouseCursors[ImGuiMouseCursor_ResizeAll] = [NSCursor closedHandCursor];
- bd->MouseCursors[ImGuiMouseCursor_ResizeNS] = [NSCursor respondsToSelector:@selector(_windowResizeNorthSouthCursor)] ? [NSCursor _windowResizeNorthSouthCursor] : [NSCursor resizeUpDownCursor];
- bd->MouseCursors[ImGuiMouseCursor_ResizeEW] = [NSCursor respondsToSelector:@selector(_windowResizeEastWestCursor)] ? [NSCursor _windowResizeEastWestCursor] : [NSCursor resizeLeftRightCursor];
- bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = [NSCursor respondsToSelector:@selector(_windowResizeNorthEastSouthWestCursor)] ? [NSCursor _windowResizeNorthEastSouthWestCursor] : [NSCursor closedHandCursor];
- bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = [NSCursor respondsToSelector:@selector(_windowResizeNorthWestSouthEastCursor)] ? [NSCursor _windowResizeNorthWestSouthEastCursor] : [NSCursor closedHandCursor];
- bd->MouseCursors[ImGuiMouseCursor_Hand] = [NSCursor pointingHandCursor];
- bd->MouseCursors[ImGuiMouseCursor_Wait] = bd->MouseCursors[ImGuiMouseCursor_Progress] = [NSCursor respondsToSelector:@selector(busyButClickableCursor)] ? [NSCursor busyButClickableCursor] : [NSCursor arrowCursor];
- bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = [NSCursor operationNotAllowedCursor];
-
- // Note that imgui.cpp also include default OSX clipboard handlers which can be enabled
- // by adding '#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS' in imconfig.h and adding '-framework ApplicationServices' to your linker command-line.
- // Since we are already in ObjC land here, it is easy for us to add a clipboard handler using the NSPasteboard api.
- platform_io.Platform_SetClipboardTextFn = [](ImGuiContext*, const char* str) -> void
- {
- NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
- [pasteboard declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
- [pasteboard setString:[NSString stringWithUTF8String:str] forType:NSPasteboardTypeString];
- };
-
- platform_io.Platform_GetClipboardTextFn = [](ImGuiContext*) -> const char*
- {
- NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
- NSString* available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:NSPasteboardTypeString]];
- if (![available isEqualToString:NSPasteboardTypeString])
- return nullptr;
-
- NSString* string = [pasteboard stringForType:NSPasteboardTypeString];
- if (string == nil)
- return nullptr;
-
- const char* string_c = (const char*)[string UTF8String];
- size_t string_len = strlen(string_c);
- static ImVector<char> s_clipboard;
- s_clipboard.resize((int)string_len + 1);
- strcpy(s_clipboard.Data, string_c);
- return s_clipboard.Data;
- };
-
- [[NSNotificationCenter defaultCenter] addObserver:bd->Observer
- selector:@selector(onApplicationBecomeActive:)
- name:NSApplicationDidBecomeActiveNotification
- object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:bd->Observer
- selector:@selector(onApplicationBecomeInactive:)
- name:NSApplicationDidResignActiveNotification
- object:nil];
-
- // Add the NSTextInputClient to the view hierarchy,
- // to receive keyboard events and translate them to input text.
- bd->KeyEventResponder = [[KeyEventResponder alloc] initWithFrame:NSZeroRect];
- bd->InputContext = [[NSTextInputContext alloc] initWithClient:bd->KeyEventResponder];
- [view addSubview:bd->KeyEventResponder];
- ImGui_ImplOSX_AddTrackingArea(view);
-
- platform_io.Platform_SetImeDataFn = [](ImGuiContext*, ImGuiViewport*, ImGuiPlatformImeData* data) -> void
- {
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- if (data->WantVisible)
- {
- [bd->InputContext activate];
- }
- else
- {
- [bd->InputContext discardMarkedText];
- [bd->InputContext invalidateCharacterCoordinates];
- [bd->InputContext deactivate];
- }
- [bd->KeyEventResponder setImePosX:data->InputPos.x imePosY:data->InputPos.y + data->InputLineHeight];
- };
-
- return true;
-}
-
-void ImGui_ImplOSX_Shutdown()
-{
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
-
- [[NSNotificationCenter defaultCenter] removeObserver:bd->Observer];
- bd->Observer = nullptr;
- if (bd->Monitor != nullptr)
- {
- [NSEvent removeMonitor:bd->Monitor];
- bd->Monitor = nullptr;
- }
-
- ImGui_ImplOSX_DestroyBackendData();
-
- ImGuiIO& io = ImGui::GetIO();
- io.BackendPlatformName = nullptr;
- io.BackendPlatformUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_HasGamepad);
-}
-
-static void ImGui_ImplOSX_UpdateMouseCursor()
-{
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- ImGuiIO& io = ImGui::GetIO();
- if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
- return;
-
- ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
- if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)
- {
- // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
- if (!bd->MouseCursorHidden)
- {
- bd->MouseCursorHidden = true;
- [NSCursor hide];
- }
- }
- else
- {
- NSCursor* desired = bd->MouseCursors[imgui_cursor] ?: bd->MouseCursors[ImGuiMouseCursor_Arrow];
- // -[NSCursor set] generates measurable overhead if called unconditionally.
- if (desired != NSCursor.currentCursor)
- {
- [desired set];
- }
- if (bd->MouseCursorHidden)
- {
- bd->MouseCursorHidden = false;
- [NSCursor unhide];
- }
- }
-}
-
-static void ImGui_ImplOSX_UpdateGamepads()
-{
- ImGuiIO& io = ImGui::GetIO();
-
-#if APPLE_HAS_CONTROLLER
- GCController* controller = GCController.current;
-#else
- GCController* controller = GCController.controllers.firstObject;
-#endif
- if (controller == nil || controller.extendedGamepad == nil)
- {
- io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
- return;
- }
-
- GCExtendedGamepad* gp = controller.extendedGamepad;
-
- // Update gamepad inputs
- #define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V)
- #define MAP_BUTTON(KEY_NO, BUTTON_NAME) { io.AddKeyEvent(KEY_NO, gp.BUTTON_NAME.isPressed); }
- #define MAP_ANALOG(KEY_NO, AXIS_NAME, V0, V1) { float vn = (float)(gp.AXIS_NAME.value - V0) / (float)(V1 - V0); vn = IM_SATURATE(vn); io.AddKeyAnalogEvent(KEY_NO, vn > 0.1f, vn); }
- const float thumb_dead_zone = 0.0f;
-
-#if APPLE_HAS_BUTTON_OPTIONS
- MAP_BUTTON(ImGuiKey_GamepadBack, buttonOptions);
-#endif
- MAP_BUTTON(ImGuiKey_GamepadFaceLeft, buttonX); // Xbox X, PS Square
- MAP_BUTTON(ImGuiKey_GamepadFaceRight, buttonB); // Xbox B, PS Circle
- MAP_BUTTON(ImGuiKey_GamepadFaceUp, buttonY); // Xbox Y, PS Triangle
- MAP_BUTTON(ImGuiKey_GamepadFaceDown, buttonA); // Xbox A, PS Cross
- MAP_BUTTON(ImGuiKey_GamepadDpadLeft, dpad.left);
- MAP_BUTTON(ImGuiKey_GamepadDpadRight, dpad.right);
- MAP_BUTTON(ImGuiKey_GamepadDpadUp, dpad.up);
- MAP_BUTTON(ImGuiKey_GamepadDpadDown, dpad.down);
- MAP_ANALOG(ImGuiKey_GamepadL1, leftShoulder, 0.0f, 1.0f);
- MAP_ANALOG(ImGuiKey_GamepadR1, rightShoulder, 0.0f, 1.0f);
- MAP_ANALOG(ImGuiKey_GamepadL2, leftTrigger, 0.0f, 1.0f);
- MAP_ANALOG(ImGuiKey_GamepadR2, rightTrigger, 0.0f, 1.0f);
-#if APPLE_HAS_THUMBSTICKS
- MAP_BUTTON(ImGuiKey_GamepadL3, leftThumbstickButton);
- MAP_BUTTON(ImGuiKey_GamepadR3, rightThumbstickButton);
-#endif
- MAP_ANALOG(ImGuiKey_GamepadLStickLeft, leftThumbstick.xAxis, -thumb_dead_zone, -1.0f);
- MAP_ANALOG(ImGuiKey_GamepadLStickRight, leftThumbstick.xAxis, +thumb_dead_zone, +1.0f);
- MAP_ANALOG(ImGuiKey_GamepadLStickUp, leftThumbstick.yAxis, +thumb_dead_zone, +1.0f);
- MAP_ANALOG(ImGuiKey_GamepadLStickDown, leftThumbstick.yAxis, -thumb_dead_zone, -1.0f);
- MAP_ANALOG(ImGuiKey_GamepadRStickLeft, rightThumbstick.xAxis, -thumb_dead_zone, -1.0f);
- MAP_ANALOG(ImGuiKey_GamepadRStickRight, rightThumbstick.xAxis, +thumb_dead_zone, +1.0f);
- MAP_ANALOG(ImGuiKey_GamepadRStickUp, rightThumbstick.yAxis, +thumb_dead_zone, +1.0f);
- MAP_ANALOG(ImGuiKey_GamepadRStickDown, rightThumbstick.yAxis, -thumb_dead_zone, -1.0f);
- #undef MAP_BUTTON
- #undef MAP_ANALOG
-
- io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
-}
-
-static void ImGui_ImplOSX_UpdateImePosWithView(NSView* view)
-{
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- ImGuiIO& io = ImGui::GetIO();
- if (io.WantTextInput)
- [bd->KeyEventResponder updateImePosWithView:view];
-}
-
-void ImGui_ImplOSX_NewFrame(NSView* view)
-{
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplOSX_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Setup display size
- if (view)
- {
- const float dpi = (float)[view.window backingScaleFactor];
- io.DisplaySize = ImVec2((float)view.bounds.size.width, (float)view.bounds.size.height);
- io.DisplayFramebufferScale = ImVec2(dpi, dpi);
- }
-
- // Setup time step
- if (bd->Time == 0.0)
- bd->Time = GetMachAbsoluteTimeInSeconds();
-
- double current_time = GetMachAbsoluteTimeInSeconds();
- io.DeltaTime = (float)(current_time - bd->Time);
- bd->Time = current_time;
-
- ImGui_ImplOSX_UpdateMouseCursor();
- ImGui_ImplOSX_UpdateGamepads();
- ImGui_ImplOSX_UpdateImePosWithView(view);
-}
-
-// Must only be called for a mouse event, otherwise an exception occurs
-// (Note that NSEventTypeScrollWheel is considered "other input". Oddly enough an exception does not occur with it, but the value will sometimes be wrong!)
-static ImGuiMouseSource GetMouseSource(NSEvent* event)
-{
- switch (event.subtype)
- {
- case NSEventSubtypeTabletPoint:
- return ImGuiMouseSource_Pen;
- // macOS considers input from relative touch devices (like the trackpad or Apple Magic Mouse) to be touch input.
- // This doesn't really make sense for Dear ImGui, which expects absolute touch devices only.
- // There does not seem to be a simple way to disambiguate things here so we consider NSEventSubtypeTouch events to always come from mice.
- // See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html#//apple_ref/doc/uid/10000060i-CH13-SW24
- //case NSEventSubtypeTouch:
- // return ImGuiMouseSource_TouchScreen;
- case NSEventSubtypeMouseEvent:
- default:
- return ImGuiMouseSource_Mouse;
- }
-}
-
-static bool ImGui_ImplOSX_HandleEvent(NSEvent* event, NSView* view)
-{
- // Only process events from the window containing ImGui view
- if (event.window != view.window)
- return false;
- ImGuiIO& io = ImGui::GetIO();
-
- if (event.type == NSEventTypeLeftMouseDown || event.type == NSEventTypeRightMouseDown || event.type == NSEventTypeOtherMouseDown)
- {
- int button = (int)[event buttonNumber];
- if (button >= 0 && button < ImGuiMouseButton_COUNT)
- {
- io.AddMouseSourceEvent(GetMouseSource(event));
- io.AddMouseButtonEvent(button, true);
- }
- return io.WantCaptureMouse;
- }
-
- if (event.type == NSEventTypeLeftMouseUp || event.type == NSEventTypeRightMouseUp || event.type == NSEventTypeOtherMouseUp)
- {
- int button = (int)[event buttonNumber];
- if (button >= 0 && button < ImGuiMouseButton_COUNT)
- {
- io.AddMouseSourceEvent(GetMouseSource(event));
- io.AddMouseButtonEvent(button, false);
- }
- return io.WantCaptureMouse;
- }
-
- if (event.type == NSEventTypeMouseMoved || event.type == NSEventTypeLeftMouseDragged || event.type == NSEventTypeRightMouseDragged || event.type == NSEventTypeOtherMouseDragged)
- {
- NSPoint mousePoint = event.locationInWindow;
- if (event.window == nil)
- mousePoint = [[view window] convertPointFromScreen:mousePoint];
- mousePoint = [view convertPoint:mousePoint fromView:nil];
- if ([view isFlipped])
- mousePoint = NSMakePoint(mousePoint.x, mousePoint.y);
- else
- mousePoint = NSMakePoint(mousePoint.x, view.bounds.size.height - mousePoint.y);
- io.AddMouseSourceEvent(GetMouseSource(event));
- io.AddMousePosEvent((float)mousePoint.x, (float)mousePoint.y);
- return io.WantCaptureMouse;
- }
-
- if (event.type == NSEventTypeScrollWheel)
- {
- // Ignore canceled events.
- //
- // From macOS 12.1, scrolling with two fingers and then decelerating
- // by tapping two fingers results in two events appearing:
- //
- // 1. A scroll wheel NSEvent, with a phase == NSEventPhaseMayBegin, when the user taps
- // two fingers to decelerate or stop the scroll events.
- //
- // 2. A scroll wheel NSEvent, with a phase == NSEventPhaseCancelled, when the user releases the
- // two-finger tap. It is this event that sometimes contains large values for scrollingDeltaX and
- // scrollingDeltaY. When these are added to the current x and y positions of the scrolling view,
- // it appears to jump up or down. It can be observed in Preview, various JetBrains IDEs and here.
- if (event.phase == NSEventPhaseCancelled)
- return false;
-
- double wheel_dx = 0.0;
- double wheel_dy = 0.0;
-
- #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
- {
- wheel_dx = [event scrollingDeltaX];
- wheel_dy = [event scrollingDeltaY];
- if ([event hasPreciseScrollingDeltas])
- {
- wheel_dx *= 0.01;
- wheel_dy *= 0.01;
- }
- }
- else
- #endif // MAC_OS_X_VERSION_MAX_ALLOWED
- {
- wheel_dx = [event deltaX] * 0.1;
- wheel_dy = [event deltaY] * 0.1;
- }
- if (wheel_dx != 0.0 || wheel_dy != 0.0)
- io.AddMouseWheelEvent((float)wheel_dx, (float)wheel_dy);
-
- return io.WantCaptureMouse;
- }
-
- if (event.type == NSEventTypeKeyDown || event.type == NSEventTypeKeyUp)
- {
- if ([event isARepeat])
- return io.WantCaptureKeyboard;
-
- int key_code = (int)[event keyCode];
- ImGuiKey key = ImGui_ImplOSX_KeyCodeToImGuiKey(key_code);
- io.AddKeyEvent(key, event.type == NSEventTypeKeyDown);
- io.SetKeyEventNativeData(key, key_code, -1); // To support legacy indexing (<1.87 user code)
-
- return io.WantCaptureKeyboard;
- }
-
- if (event.type == NSEventTypeFlagsChanged)
- {
- unsigned short key_code = [event keyCode];
- NSEventModifierFlags modifier_flags = [event modifierFlags];
-
- io.AddKeyEvent(ImGuiMod_Shift, (modifier_flags & NSEventModifierFlagShift) != 0);
- io.AddKeyEvent(ImGuiMod_Ctrl, (modifier_flags & NSEventModifierFlagControl) != 0);
- io.AddKeyEvent(ImGuiMod_Alt, (modifier_flags & NSEventModifierFlagOption) != 0);
- io.AddKeyEvent(ImGuiMod_Super, (modifier_flags & NSEventModifierFlagCommand) != 0);
-
- ImGuiKey key = ImGui_ImplOSX_KeyCodeToImGuiKey(key_code);
- if (key != ImGuiKey_None)
- {
- // macOS does not generate down/up event for modifiers. We're trying
- // to use hardware dependent masks to extract that information.
- // 'imgui_mask' is left as a fallback.
- NSEventModifierFlags mask = 0;
- switch (key)
- {
- case ImGuiKey_LeftCtrl: mask = 0x0001; break;
- case ImGuiKey_RightCtrl: mask = 0x2000; break;
- case ImGuiKey_LeftShift: mask = 0x0002; break;
- case ImGuiKey_RightShift: mask = 0x0004; break;
- case ImGuiKey_LeftSuper: mask = 0x0008; break;
- case ImGuiKey_RightSuper: mask = 0x0010; break;
- case ImGuiKey_LeftAlt: mask = 0x0020; break;
- case ImGuiKey_RightAlt: mask = 0x0040; break;
- default:
- return io.WantCaptureKeyboard;
- }
- io.AddKeyEvent(key, (modifier_flags & mask) != 0);
- io.SetKeyEventNativeData(key, key_code, -1); // To support legacy indexing (<1.87 user code)
- }
-
- return io.WantCaptureKeyboard;
- }
-
- return false;
-}
-
-static void ImGui_ImplOSX_AddTrackingArea(NSView* _Nonnull view)
-{
- // If we want to receive key events, we either need to be in the responder chain of the key view,
- // or else we can install a local monitor. The consequence of this heavy-handed approach is that
- // we receive events for all controls, not just Dear ImGui widgets. If we had native controls in our
- // window, we'd want to be much more careful than just ingesting the complete event stream.
- // To match the behavior of other backends, we pass every event down to the OS.
- ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
- if (bd->Monitor)
- return;
- NSEventMask eventMask = 0;
- eventMask |= NSEventMaskMouseMoved | NSEventMaskScrollWheel;
- eventMask |= NSEventMaskLeftMouseDown | NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged;
- eventMask |= NSEventMaskRightMouseDown | NSEventMaskRightMouseUp | NSEventMaskRightMouseDragged;
- eventMask |= NSEventMaskOtherMouseDown | NSEventMaskOtherMouseUp | NSEventMaskOtherMouseDragged;
- eventMask |= NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged;
- bd->Monitor = [NSEvent addLocalMonitorForEventsMatchingMask:eventMask
- handler:^NSEvent* _Nullable(NSEvent* event)
- {
- ImGui_ImplOSX_HandleEvent(event, view);
- return event;
- }];
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdl2.cpp b/libs/imgui-1.92.1/backends/imgui_impl_sdl2.cpp
deleted file mode 100644
index 291edb8..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdl2.cpp
+++ /dev/null
@@ -1,894 +0,0 @@
-// dear imgui: Platform Backend for SDL2
-// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
-// (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
-// (Prefer SDL 2.0.5+ for full feature support.)
-
-// Implemented features:
-// [X] Platform: Clipboard support.
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
-// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: Basic IME support. App needs to call 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");' before SDL_CreateWindow()!.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-07-08: Made ImGui_ImplSDL2_GetContentScaleForWindow(), ImGui_ImplSDL2_GetContentScaleForDisplay() helpers return 1.0f on Emscripten and Android platforms, matching macOS logic. (#8742, #8733)
-// 2025-06-11: Added ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window) and ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index) helper to facilitate making DPI-aware apps.
-// 2025-04-09: Don't attempt to call SDL_CaptureMouse() on drivers where we don't call SDL_GetGlobalMouseState(). (#8561)
-// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
-// 2025-03-10: When dealing with OEM keys, use scancodes instead of translated keycodes to choose ImGuiKey values. (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
-// 2025-02-26: Only start SDL_CaptureMouse() when mouse is being dragged, to mitigate issues with e.g.Linux debuggers not claiming capture back. (#6410, #3650)
-// 2025-02-24: Avoid calling SDL_GetGlobalMouseState() when mouse is in relative mode.
-// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
-// 2025-02-10: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn handler.
-// 2025-01-20: Made ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode_Manual) accept an empty array.
-// 2024-10-24: Emscripten: from SDL 2.30.9, SDL_EVENT_MOUSE_WHEEL event doesn't require dividing by 100.0f.
-// 2024-09-09: use SDL_Vulkan_GetDrawableSize() when available. (#7967, #3190)
-// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
-// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
-// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
-// - io.PlatformOpenInShellFn -> platform_io.Platform_OpenInShellFn
-// - io.PlatformSetImeDataFn -> platform_io.Platform_SetImeDataFn
-// 2024-08-19: Storing SDL's Uint32 WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
-// 2024-08-19: ImGui_ImplSDL2_ProcessEvent() now ignores events intended for other SDL windows. (#7853)
-// 2024-07-02: Emscripten: Added io.PlatformOpenInShellFn() handler for Emscripten versions.
-// 2024-07-02: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() renaming in main library.
-// 2024-02-14: Inputs: Handle gamepad disconnection. Added ImGui_ImplSDL2_SetGamepadMode().
-// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys.
-// 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
-// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702)
-// 2023-02-23: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644)
-// 2023-02-07: Implement IME handler (io.SetPlatformImeDataFn will call SDL_SetTextInputRect()/SDL_StartTextInput()).
-// 2023-02-07: *BREAKING CHANGE* Renamed this backend file from imgui_impl_sdl.cpp/.h to imgui_impl_sdl2.cpp/.h in prevision for the future release of SDL3.
-// 2023-02-02: Avoid calling SDL_SetCursor() when cursor has not changed, as the function is surprisingly costly on Mac with latest SDL (may be fixed in next SDL version).
-// 2023-02-02: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling + Scaling X value on Emscripten (bug?). (#4019, #6096)
-// 2023-02-02: Removed SDL_MOUSEWHEEL value clamping, as values seem correct in latest Emscripten. (#4019)
-// 2023-02-01: Flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and offer consistent horizontal scrolling direction. (#4019, #6096, #1463)
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2022-09-26: Inputs: Disable SDL 2.0.22 new "auto capture" (SDL_HINT_MOUSE_AUTO_CAPTURE) which prevents drag and drop across windows for multi-viewport support + don't capture when drag and dropping. (#5710)
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-03-22: Inputs: Fix mouse position issues when dragging outside of boundaries. SDL_CaptureMouse() erroneously still gives out LEAVE events when hovering OS decorations.
-// 2022-03-22: Inputs: Added support for extra mouse buttons (SDL_BUTTON_X1/SDL_BUTTON_X2).
-// 2022-02-04: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(), so we can use SDL_GetRendererOutputSize() instead of SDL_GL_GetDrawableSize() when bound to a SDL_Renderer.
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-17: Inputs: always update key mods next and before key event (not in NewFrame) to fix input queue with very low framerates.
-// 2022-01-12: Update mouse inputs using SDL_MOUSEMOTION/SDL_WINDOWEVENT_LEAVE + fallback to provide it when focused but not hovered/captured. More standard and will allow us to pass it to future input queue API.
-// 2022-01-12: Maintain our own copy of MouseButtonsDown mask instead of using ImGui::IsAnyMouseDown() which will be obsoleted.
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2021-08-17: Calling io.AddFocusEvent() on SDL_WINDOWEVENT_FOCUS_GAINED/SDL_WINDOWEVENT_FOCUS_LOST.
-// 2021-07-29: Inputs: MousePos is correctly reported when the host platform window is hovered but not focused (using SDL_GetMouseFocus() + SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, requires SDL 2.0.5+)
-// 2021-06-29: *BREAKING CHANGE* Removed 'SDL_Window* window' parameter to ImGui_ImplSDL2_NewFrame() which was unnecessary.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-03-22: Rework global mouse pos availability check listing supported platforms explicitly, effectively fixing mouse access on Raspberry Pi. (#2837, #3950)
-// 2020-05-25: Misc: Report a zero display-size when window is minimized, to be consistent with other backends.
-// 2020-02-20: Inputs: Fixed mapping for ImGuiKey_KeyPadEnter (using SDL_SCANCODE_KP_ENTER instead of SDL_SCANCODE_RETURN2).
-// 2019-12-17: Inputs: On Wayland, use SDL_GetMouseState (because there is no global mouse state).
-// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
-// 2019-07-21: Inputs: Added mapping for ImGuiKey_KeyPadEnter.
-// 2019-04-23: Inputs: Added support for SDL_GameController (if ImGuiConfigFlags_NavEnableGamepad is set by user application).
-// 2019-03-12: Misc: Preserve DisplayFramebufferScale when main window is minimized.
-// 2018-12-21: Inputs: Workaround for Android/iOS which don't seem to handle focus related calls.
-// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
-// 2018-11-14: Changed the signature of ImGui_ImplSDL2_ProcessEvent() to take a 'const SDL_Event*'.
-// 2018-08-01: Inputs: Workaround for Emscripten which doesn't seem to handle focus related calls.
-// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
-// 2018-06-08: Misc: Extracted imgui_impl_sdl.cpp/.h away from the old combined SDL2+OpenGL/Vulkan examples.
-// 2018-06-08: Misc: ImGui_ImplSDL2_InitForOpenGL() now takes a SDL_GLContext parameter.
-// 2018-05-09: Misc: Fixed clipboard paste memory leak (we didn't call SDL_FreeMemory on the data returned by SDL_GetClipboardText).
-// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
-// 2018-02-16: Inputs: Added support for mouse cursors, honoring ImGui::GetMouseCursor() value.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
-// 2018-02-05: Misc: Using SDL_GetPerformanceCounter() instead of SDL_GetTicks() to be able to handle very high framerate (1000+ FPS).
-// 2018-02-05: Inputs: Keyboard mapping is using scancodes everywhere instead of a confusing mixture of keycodes and scancodes.
-// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
-// 2018-01-19: Inputs: When available (SDL 2.0.4+) using SDL_CaptureMouse() to retrieve coordinates outside of client area when dragging. Otherwise (SDL 2.0.3 and before) testing for SDL_WINDOW_INPUT_FOCUS instead of SDL_WINDOW_MOUSE_FOCUS.
-// 2018-01-18: Inputs: Added mapping for ImGuiKey_Insert.
-// 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1).
-// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_sdl2.h"
-
-// Clang warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
-#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
-#endif
-
-// SDL
-#include <SDL.h>
-#include <SDL_syswm.h>
-#include <stdio.h> // for snprintf()
-#ifdef __APPLE__
-#include <TargetConditionals.h>
-#endif
-#ifdef __EMSCRIPTEN__
-#include <emscripten/em_js.h>
-#endif
-#undef Status // X11 headers are leaking this.
-
-#if SDL_VERSION_ATLEAST(2,0,4) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS) && !defined(__amigaos4__)
-#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 1
-#else
-#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 0
-#endif
-#define SDL_HAS_PER_MONITOR_DPI SDL_VERSION_ATLEAST(2,0,4)
-#define SDL_HAS_VULKAN SDL_VERSION_ATLEAST(2,0,6)
-#define SDL_HAS_OPEN_URL SDL_VERSION_ATLEAST(2,0,14)
-#if SDL_HAS_VULKAN
-#include <SDL_vulkan.h>
-#endif
-
-// SDL Data
-struct ImGui_ImplSDL2_Data
-{
- SDL_Window* Window;
- Uint32 WindowID;
- SDL_Renderer* Renderer;
- Uint64 Time;
- char* ClipboardTextData;
- char BackendPlatformName[48];
-
- // Mouse handling
- Uint32 MouseWindowID;
- int MouseButtonsDown;
- SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT];
- SDL_Cursor* MouseLastCursor;
- int MouseLastLeaveFrame;
- bool MouseCanUseGlobalState;
- bool MouseCanUseCapture;
-
- // Gamepad handling
- ImVector<SDL_GameController*> Gamepads;
- ImGui_ImplSDL2_GamepadMode GamepadMode;
- bool WantUpdateGamepadsList;
-
- ImGui_ImplSDL2_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support is not well tested and probably dysfunctional in this backend.
-// FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context.
-static ImGui_ImplSDL2_Data* ImGui_ImplSDL2_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplSDL2_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr;
-}
-
-// Functions
-static const char* ImGui_ImplSDL2_GetClipboardText(ImGuiContext*)
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- if (bd->ClipboardTextData)
- SDL_free(bd->ClipboardTextData);
- bd->ClipboardTextData = SDL_GetClipboardText();
- return bd->ClipboardTextData;
-}
-
-static void ImGui_ImplSDL2_SetClipboardText(ImGuiContext*, const char* text)
-{
- SDL_SetClipboardText(text);
-}
-
-// Note: native IME will only display if user calls SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1") _before_ SDL_CreateWindow().
-static void ImGui_ImplSDL2_PlatformSetImeData(ImGuiContext*, ImGuiViewport*, ImGuiPlatformImeData* data)
-{
- if (data->WantVisible)
- {
- SDL_Rect r;
- r.x = (int)data->InputPos.x;
- r.y = (int)data->InputPos.y;
- r.w = 1;
- r.h = (int)data->InputLineHeight;
- SDL_SetTextInputRect(&r);
- }
-}
-
-// Not static to allow third-party code to use that if they want to (but undocumented)
-ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode);
-ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode)
-{
- switch (keycode)
- {
- case SDLK_TAB: return ImGuiKey_Tab;
- case SDLK_LEFT: return ImGuiKey_LeftArrow;
- case SDLK_RIGHT: return ImGuiKey_RightArrow;
- case SDLK_UP: return ImGuiKey_UpArrow;
- case SDLK_DOWN: return ImGuiKey_DownArrow;
- case SDLK_PAGEUP: return ImGuiKey_PageUp;
- case SDLK_PAGEDOWN: return ImGuiKey_PageDown;
- case SDLK_HOME: return ImGuiKey_Home;
- case SDLK_END: return ImGuiKey_End;
- case SDLK_INSERT: return ImGuiKey_Insert;
- case SDLK_DELETE: return ImGuiKey_Delete;
- case SDLK_BACKSPACE: return ImGuiKey_Backspace;
- case SDLK_SPACE: return ImGuiKey_Space;
- case SDLK_RETURN: return ImGuiKey_Enter;
- case SDLK_ESCAPE: return ImGuiKey_Escape;
- //case SDLK_QUOTE: return ImGuiKey_Apostrophe;
- case SDLK_COMMA: return ImGuiKey_Comma;
- //case SDLK_MINUS: return ImGuiKey_Minus;
- case SDLK_PERIOD: return ImGuiKey_Period;
- //case SDLK_SLASH: return ImGuiKey_Slash;
- case SDLK_SEMICOLON: return ImGuiKey_Semicolon;
- //case SDLK_EQUALS: return ImGuiKey_Equal;
- //case SDLK_LEFTBRACKET: return ImGuiKey_LeftBracket;
- //case SDLK_BACKSLASH: return ImGuiKey_Backslash;
- //case SDLK_RIGHTBRACKET: return ImGuiKey_RightBracket;
- //case SDLK_BACKQUOTE: return ImGuiKey_GraveAccent;
- case SDLK_CAPSLOCK: return ImGuiKey_CapsLock;
- case SDLK_SCROLLLOCK: return ImGuiKey_ScrollLock;
- case SDLK_NUMLOCKCLEAR: return ImGuiKey_NumLock;
- case SDLK_PRINTSCREEN: return ImGuiKey_PrintScreen;
- case SDLK_PAUSE: return ImGuiKey_Pause;
- case SDLK_KP_0: return ImGuiKey_Keypad0;
- case SDLK_KP_1: return ImGuiKey_Keypad1;
- case SDLK_KP_2: return ImGuiKey_Keypad2;
- case SDLK_KP_3: return ImGuiKey_Keypad3;
- case SDLK_KP_4: return ImGuiKey_Keypad4;
- case SDLK_KP_5: return ImGuiKey_Keypad5;
- case SDLK_KP_6: return ImGuiKey_Keypad6;
- case SDLK_KP_7: return ImGuiKey_Keypad7;
- case SDLK_KP_8: return ImGuiKey_Keypad8;
- case SDLK_KP_9: return ImGuiKey_Keypad9;
- case SDLK_KP_PERIOD: return ImGuiKey_KeypadDecimal;
- case SDLK_KP_DIVIDE: return ImGuiKey_KeypadDivide;
- case SDLK_KP_MULTIPLY: return ImGuiKey_KeypadMultiply;
- case SDLK_KP_MINUS: return ImGuiKey_KeypadSubtract;
- case SDLK_KP_PLUS: return ImGuiKey_KeypadAdd;
- case SDLK_KP_ENTER: return ImGuiKey_KeypadEnter;
- case SDLK_KP_EQUALS: return ImGuiKey_KeypadEqual;
- case SDLK_LCTRL: return ImGuiKey_LeftCtrl;
- case SDLK_LSHIFT: return ImGuiKey_LeftShift;
- case SDLK_LALT: return ImGuiKey_LeftAlt;
- case SDLK_LGUI: return ImGuiKey_LeftSuper;
- case SDLK_RCTRL: return ImGuiKey_RightCtrl;
- case SDLK_RSHIFT: return ImGuiKey_RightShift;
- case SDLK_RALT: return ImGuiKey_RightAlt;
- case SDLK_RGUI: return ImGuiKey_RightSuper;
- case SDLK_APPLICATION: return ImGuiKey_Menu;
- case SDLK_0: return ImGuiKey_0;
- case SDLK_1: return ImGuiKey_1;
- case SDLK_2: return ImGuiKey_2;
- case SDLK_3: return ImGuiKey_3;
- case SDLK_4: return ImGuiKey_4;
- case SDLK_5: return ImGuiKey_5;
- case SDLK_6: return ImGuiKey_6;
- case SDLK_7: return ImGuiKey_7;
- case SDLK_8: return ImGuiKey_8;
- case SDLK_9: return ImGuiKey_9;
- case SDLK_a: return ImGuiKey_A;
- case SDLK_b: return ImGuiKey_B;
- case SDLK_c: return ImGuiKey_C;
- case SDLK_d: return ImGuiKey_D;
- case SDLK_e: return ImGuiKey_E;
- case SDLK_f: return ImGuiKey_F;
- case SDLK_g: return ImGuiKey_G;
- case SDLK_h: return ImGuiKey_H;
- case SDLK_i: return ImGuiKey_I;
- case SDLK_j: return ImGuiKey_J;
- case SDLK_k: return ImGuiKey_K;
- case SDLK_l: return ImGuiKey_L;
- case SDLK_m: return ImGuiKey_M;
- case SDLK_n: return ImGuiKey_N;
- case SDLK_o: return ImGuiKey_O;
- case SDLK_p: return ImGuiKey_P;
- case SDLK_q: return ImGuiKey_Q;
- case SDLK_r: return ImGuiKey_R;
- case SDLK_s: return ImGuiKey_S;
- case SDLK_t: return ImGuiKey_T;
- case SDLK_u: return ImGuiKey_U;
- case SDLK_v: return ImGuiKey_V;
- case SDLK_w: return ImGuiKey_W;
- case SDLK_x: return ImGuiKey_X;
- case SDLK_y: return ImGuiKey_Y;
- case SDLK_z: return ImGuiKey_Z;
- case SDLK_F1: return ImGuiKey_F1;
- case SDLK_F2: return ImGuiKey_F2;
- case SDLK_F3: return ImGuiKey_F3;
- case SDLK_F4: return ImGuiKey_F4;
- case SDLK_F5: return ImGuiKey_F5;
- case SDLK_F6: return ImGuiKey_F6;
- case SDLK_F7: return ImGuiKey_F7;
- case SDLK_F8: return ImGuiKey_F8;
- case SDLK_F9: return ImGuiKey_F9;
- case SDLK_F10: return ImGuiKey_F10;
- case SDLK_F11: return ImGuiKey_F11;
- case SDLK_F12: return ImGuiKey_F12;
- case SDLK_F13: return ImGuiKey_F13;
- case SDLK_F14: return ImGuiKey_F14;
- case SDLK_F15: return ImGuiKey_F15;
- case SDLK_F16: return ImGuiKey_F16;
- case SDLK_F17: return ImGuiKey_F17;
- case SDLK_F18: return ImGuiKey_F18;
- case SDLK_F19: return ImGuiKey_F19;
- case SDLK_F20: return ImGuiKey_F20;
- case SDLK_F21: return ImGuiKey_F21;
- case SDLK_F22: return ImGuiKey_F22;
- case SDLK_F23: return ImGuiKey_F23;
- case SDLK_F24: return ImGuiKey_F24;
- case SDLK_AC_BACK: return ImGuiKey_AppBack;
- case SDLK_AC_FORWARD: return ImGuiKey_AppForward;
- default: break;
- }
-
- // Fallback to scancode
- switch (scancode)
- {
- case SDL_SCANCODE_GRAVE: return ImGuiKey_GraveAccent;
- case SDL_SCANCODE_MINUS: return ImGuiKey_Minus;
- case SDL_SCANCODE_EQUALS: return ImGuiKey_Equal;
- case SDL_SCANCODE_LEFTBRACKET: return ImGuiKey_LeftBracket;
- case SDL_SCANCODE_RIGHTBRACKET: return ImGuiKey_RightBracket;
- case SDL_SCANCODE_NONUSBACKSLASH: return ImGuiKey_Oem102;
- case SDL_SCANCODE_BACKSLASH: return ImGuiKey_Backslash;
- case SDL_SCANCODE_SEMICOLON: return ImGuiKey_Semicolon;
- case SDL_SCANCODE_APOSTROPHE: return ImGuiKey_Apostrophe;
- case SDL_SCANCODE_COMMA: return ImGuiKey_Comma;
- case SDL_SCANCODE_PERIOD: return ImGuiKey_Period;
- case SDL_SCANCODE_SLASH: return ImGuiKey_Slash;
- default: break;
- }
- return ImGuiKey_None;
-}
-
-static void ImGui_ImplSDL2_UpdateKeyModifiers(SDL_Keymod sdl_key_mods)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddKeyEvent(ImGuiMod_Ctrl, (sdl_key_mods & KMOD_CTRL) != 0);
- io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & KMOD_SHIFT) != 0);
- io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & KMOD_ALT) != 0);
- io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & KMOD_GUI) != 0);
-}
-
-static ImGuiViewport* ImGui_ImplSDL2_GetViewportForWindowID(Uint32 window_id)
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- return (window_id == bd->WindowID) ? ImGui::GetMainViewport() : nullptr;
-}
-
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-// If you have multiple SDL events and some of them are not meant to be used by dear imgui, you may need to filter events based on their windowID field.
-bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL2_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- switch (event->type)
- {
- case SDL_MOUSEMOTION:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->motion.windowID) == nullptr)
- return false;
- ImVec2 mouse_pos((float)event->motion.x, (float)event->motion.y);
- io.AddMouseSourceEvent(event->motion.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMousePosEvent(mouse_pos.x, mouse_pos.y);
- return true;
- }
- case SDL_MOUSEWHEEL:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->wheel.windowID) == nullptr)
- return false;
- //IMGUI_DEBUG_LOG("wheel %.2f %.2f, precise %.2f %.2f\n", (float)event->wheel.x, (float)event->wheel.y, event->wheel.preciseX, event->wheel.preciseY);
-#if SDL_VERSION_ATLEAST(2,0,18) // If this fails to compile on Emscripten: update to latest Emscripten!
- float wheel_x = -event->wheel.preciseX;
- float wheel_y = event->wheel.preciseY;
-#else
- float wheel_x = -(float)event->wheel.x;
- float wheel_y = (float)event->wheel.y;
-#endif
-#if defined(__EMSCRIPTEN__) && !SDL_VERSION_ATLEAST(2,31,0)
- wheel_x /= 100.0f;
-#endif
- io.AddMouseSourceEvent(event->wheel.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMouseWheelEvent(wheel_x, wheel_y);
- return true;
- }
- case SDL_MOUSEBUTTONDOWN:
- case SDL_MOUSEBUTTONUP:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->button.windowID) == nullptr)
- return false;
- int mouse_button = -1;
- if (event->button.button == SDL_BUTTON_LEFT) { mouse_button = 0; }
- if (event->button.button == SDL_BUTTON_RIGHT) { mouse_button = 1; }
- if (event->button.button == SDL_BUTTON_MIDDLE) { mouse_button = 2; }
- if (event->button.button == SDL_BUTTON_X1) { mouse_button = 3; }
- if (event->button.button == SDL_BUTTON_X2) { mouse_button = 4; }
- if (mouse_button == -1)
- break;
- io.AddMouseSourceEvent(event->button.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMouseButtonEvent(mouse_button, (event->type == SDL_MOUSEBUTTONDOWN));
- bd->MouseButtonsDown = (event->type == SDL_MOUSEBUTTONDOWN) ? (bd->MouseButtonsDown | (1 << mouse_button)) : (bd->MouseButtonsDown & ~(1 << mouse_button));
- return true;
- }
- case SDL_TEXTINPUT:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->text.windowID) == nullptr)
- return false;
- io.AddInputCharactersUTF8(event->text.text);
- return true;
- }
- case SDL_KEYDOWN:
- case SDL_KEYUP:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->key.windowID) == nullptr)
- return false;
- ImGui_ImplSDL2_UpdateKeyModifiers((SDL_Keymod)event->key.keysym.mod);
- //IMGUI_DEBUG_LOG("SDL_KEY_%s : key=%d ('%s'), scancode=%d ('%s'), mod=%X\n",
- // (event->type == SDL_KEYDOWN) ? "DOWN" : "UP ", event->key.keysym.sym, SDL_GetKeyName(event->key.keysym.sym), event->key.keysym.scancode, SDL_GetScancodeName(event->key.keysym.scancode), event->key.keysym.mod);
- ImGuiKey key = ImGui_ImplSDL2_KeyEventToImGuiKey(event->key.keysym.sym, event->key.keysym.scancode);
- io.AddKeyEvent(key, (event->type == SDL_KEYDOWN));
- io.SetKeyEventNativeData(key, (int)event->key.keysym.sym, (int)event->key.keysym.scancode, (int)event->key.keysym.scancode); // To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
- return true;
- }
- case SDL_WINDOWEVENT:
- {
- if (ImGui_ImplSDL2_GetViewportForWindowID(event->window.windowID) == nullptr)
- return false;
- // - When capturing mouse, SDL will send a bunch of conflicting LEAVE/ENTER event on every mouse move, but the final ENTER tends to be right.
- // - However we won't get a correct LEAVE event for a captured window.
- // - In some cases, when detaching a window from main viewport SDL may send SDL_WINDOWEVENT_ENTER one frame too late,
- // causing SDL_WINDOWEVENT_LEAVE on previous frame to interrupt drag operation by clear mouse position. This is why
- // we delay process the SDL_WINDOWEVENT_LEAVE events by one frame. See issue #5012 for details.
- Uint8 window_event = event->window.event;
- if (window_event == SDL_WINDOWEVENT_ENTER)
- {
- bd->MouseWindowID = event->window.windowID;
- bd->MouseLastLeaveFrame = 0;
- }
- if (window_event == SDL_WINDOWEVENT_LEAVE)
- bd->MouseLastLeaveFrame = ImGui::GetFrameCount() + 1;
- if (window_event == SDL_WINDOWEVENT_FOCUS_GAINED)
- io.AddFocusEvent(true);
- else if (event->window.event == SDL_WINDOWEVENT_FOCUS_LOST)
- io.AddFocusEvent(false);
- return true;
- }
- case SDL_CONTROLLERDEVICEADDED:
- case SDL_CONTROLLERDEVICEREMOVED:
- {
- bd->WantUpdateGamepadsList = true;
- return true;
- }
- default:
- break;
- }
- return false;
-}
-
-#ifdef __EMSCRIPTEN__
-EM_JS(void, ImGui_ImplSDL2_EmscriptenOpenURL, (char const* url), { url = url ? UTF8ToString(url) : null; if (url) window.open(url, '_blank'); });
-#endif
-
-static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void* sdl_gl_context)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
-
- // Obtain compiled and runtime versions
- SDL_version ver_compiled;
- SDL_version ver_runtime;
- SDL_VERSION(&ver_compiled);
- SDL_GetVersion(&ver_runtime);
-
- // Setup backend capabilities flags
- ImGui_ImplSDL2_Data* bd = IM_NEW(ImGui_ImplSDL2_Data)();
- snprintf(bd->BackendPlatformName, sizeof(bd->BackendPlatformName), "imgui_impl_sdl2 (%u.%u.%u, %u.%u.%u)",
- ver_compiled.major, ver_compiled.minor, ver_compiled.patch, ver_runtime.major, ver_runtime.minor, ver_runtime.patch);
- io.BackendPlatformUserData = (void*)bd;
- io.BackendPlatformName = bd->BackendPlatformName;
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
- io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
-
- bd->Window = window;
- bd->WindowID = SDL_GetWindowID(window);
- bd->Renderer = renderer;
-
- // Check and store if we are on a SDL backend that supports SDL_GetGlobalMouseState() and SDL_CaptureMouse()
- // ("wayland" and "rpi" don't support it, but we chose to use a white-list instead of a black-list)
- bd->MouseCanUseGlobalState = false;
- bd->MouseCanUseCapture = false;
-#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
- const char* sdl_backend = SDL_GetCurrentVideoDriver();
- const char* capture_and_global_state_whitelist[] = { "windows", "cocoa", "x11", "DIVE", "VMAN" };
- for (const char* item : capture_and_global_state_whitelist)
- if (strncmp(sdl_backend, item, strlen(item)) == 0)
- bd->MouseCanUseGlobalState = bd->MouseCanUseCapture = true;
-#endif
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Platform_SetClipboardTextFn = ImGui_ImplSDL2_SetClipboardText;
- platform_io.Platform_GetClipboardTextFn = ImGui_ImplSDL2_GetClipboardText;
- platform_io.Platform_ClipboardUserData = nullptr;
- platform_io.Platform_SetImeDataFn = ImGui_ImplSDL2_PlatformSetImeData;
-#ifdef __EMSCRIPTEN__
- platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplSDL2_EmscriptenOpenURL(url); return true; };
-#elif SDL_HAS_OPEN_URL
- platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { return SDL_OpenURL(url) == 0; };
-#endif
-
- // Gamepad handling
- bd->GamepadMode = ImGui_ImplSDL2_GamepadMode_AutoFirst;
- bd->WantUpdateGamepadsList = true;
-
- // Load mouse cursors
- bd->MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
- bd->MouseCursors[ImGuiMouseCursor_TextInput] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_IBEAM);
- bd->MouseCursors[ImGuiMouseCursor_ResizeAll] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEALL);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNS] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENS);
- bd->MouseCursors[ImGuiMouseCursor_ResizeEW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEWE);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENESW);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENWSE);
- bd->MouseCursors[ImGuiMouseCursor_Hand] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
- bd->MouseCursors[ImGuiMouseCursor_Wait] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_WAIT);
- bd->MouseCursors[ImGuiMouseCursor_Progress] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_WAITARROW);
- bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NO);
-
- // Set platform dependent data in viewport
- // Our mouse update function expect PlatformHandle to be filled for the main viewport
- ImGuiViewport* main_viewport = ImGui::GetMainViewport();
- main_viewport->PlatformHandle = (void*)(intptr_t)bd->WindowID;
- main_viewport->PlatformHandleRaw = nullptr;
- SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
- if (SDL_GetWindowWMInfo(window, &info))
- {
-#if defined(SDL_VIDEO_DRIVER_WINDOWS)
- main_viewport->PlatformHandleRaw = (void*)info.info.win.window;
-#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
- main_viewport->PlatformHandleRaw = (void*)info.info.cocoa.window;
-#endif
- }
-
- // From 2.0.5: Set SDL hint to receive mouse click events on window focus, otherwise SDL doesn't emit the event.
- // Without this, when clicking to gain focus, our widgets wouldn't activate even though they showed as hovered.
- // (This is unfortunately a global SDL setting, so enabling it might have a side-effect on your application.
- // It is unlikely to make a difference, but if your app absolutely needs to ignore the initial on-focus click:
- // you can ignore SDL_MOUSEBUTTONDOWN events coming right after a SDL_WINDOWEVENT_FOCUS_GAINED)
-#ifdef SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH
- SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
-#endif
-
- // From 2.0.18: Enable native IME.
- // IMPORTANT: This is used at the time of SDL_CreateWindow() so this will only affects secondary windows, if any.
- // For the main window to be affected, your application needs to call this manually before calling SDL_CreateWindow().
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // From 2.0.22: Disable auto-capture, this is preventing drag and drop across multiple windows (see #5710)
-#ifdef SDL_HINT_MOUSE_AUTO_CAPTURE
- SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "0");
-#endif
-
- (void)sdl_gl_context; // Unused in 'master' branch.
- return true;
-}
-
-bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
-{
- return ImGui_ImplSDL2_Init(window, nullptr, sdl_gl_context);
-}
-
-bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window)
-{
-#if !SDL_HAS_VULKAN
- IM_ASSERT(0 && "Unsupported");
-#endif
- return ImGui_ImplSDL2_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window)
-{
-#if !defined(_WIN32)
- IM_ASSERT(0 && "Unsupported");
-#endif
- return ImGui_ImplSDL2_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window)
-{
- return ImGui_ImplSDL2_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL2_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer)
-{
- return ImGui_ImplSDL2_Init(window, renderer, nullptr);
-}
-
-bool ImGui_ImplSDL2_InitForOther(SDL_Window* window)
-{
- return ImGui_ImplSDL2_Init(window, nullptr, nullptr);
-}
-
-static void ImGui_ImplSDL2_CloseGamepads();
-
-void ImGui_ImplSDL2_Shutdown()
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- if (bd->ClipboardTextData)
- SDL_free(bd->ClipboardTextData);
- for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
- SDL_FreeCursor(bd->MouseCursors[cursor_n]);
- ImGui_ImplSDL2_CloseGamepads();
-
- io.BackendPlatformName = nullptr;
- io.BackendPlatformUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_HasSetMousePos | ImGuiBackendFlags_HasGamepad);
- IM_DELETE(bd);
-}
-
-static void ImGui_ImplSDL2_UpdateMouseData()
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- ImGuiIO& io = ImGui::GetIO();
-
- // We forward mouse input when hovered or captured (via SDL_MOUSEMOTION) or when focused (below)
-#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
- // - SDL_CaptureMouse() let the OS know e.g. that our drags can extend outside of parent boundaries (we want updated position) and shouldn't trigger other operations outside.
- // - Debuggers under Linux tends to leave captured mouse on break, which may be very inconvenient, so to mitigate the issue we wait until mouse has moved to begin capture.
- if (bd->MouseCanUseCapture)
- {
- bool want_capture = false;
- for (int button_n = 0; button_n < ImGuiMouseButton_COUNT && !want_capture; button_n++)
- if (ImGui::IsMouseDragging(button_n, 1.0f))
- want_capture = true;
- SDL_CaptureMouse(want_capture ? SDL_TRUE : SDL_FALSE);
- }
-
- SDL_Window* focused_window = SDL_GetKeyboardFocus();
- const bool is_app_focused = (bd->Window == focused_window);
-#else
- const bool is_app_focused = (SDL_GetWindowFlags(bd->Window) & SDL_WINDOW_INPUT_FOCUS) != 0; // SDL 2.0.3 and non-windowed systems: single-viewport only
-#endif
- if (is_app_focused)
- {
- // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when io.ConfigNavMoveSetMousePos is enabled by user)
- if (io.WantSetMousePos)
- SDL_WarpMouseInWindow(bd->Window, (int)io.MousePos.x, (int)io.MousePos.y);
-
- // (Optional) Fallback to provide mouse position when focused (SDL_MOUSEMOTION already provides this when hovered or captured)
- const bool is_relative_mouse_mode = SDL_GetRelativeMouseMode() != 0;
- if (bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
- {
- // Single-viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
- int window_x, window_y, mouse_x_global, mouse_y_global;
- SDL_GetGlobalMouseState(&mouse_x_global, &mouse_y_global);
- SDL_GetWindowPosition(bd->Window, &window_x, &window_y);
- io.AddMousePosEvent((float)(mouse_x_global - window_x), (float)(mouse_y_global - window_y));
- }
- }
-}
-
-static void ImGui_ImplSDL2_UpdateMouseCursor()
-{
- ImGuiIO& io = ImGui::GetIO();
- if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
- return;
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
-
- ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
- if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)
- {
- // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
- SDL_ShowCursor(SDL_FALSE);
- }
- else
- {
- // Show OS mouse cursor
- SDL_Cursor* expected_cursor = bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow];
- if (bd->MouseLastCursor != expected_cursor)
- {
- SDL_SetCursor(expected_cursor); // SDL function doesn't have an early out (see #6113)
- bd->MouseLastCursor = expected_cursor;
- }
- SDL_ShowCursor(SDL_TRUE);
- }
-}
-
-// - On Windows the process needs to be marked DPI-aware!! SDL2 doesn't do it by default. You can call ::SetProcessDPIAware() or call ImGui_ImplWin32_EnableDpiAwareness() from Win32 backend.
-// - Apple platforms use FramebufferScale so we always return 1.0f.
-// - Some accessibility applications are declaring virtual monitors with a DPI of 0.0f, see #7902. We preserve this value for caller to handle.
-float ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window)
-{
- return ImGui_ImplSDL2_GetContentScaleForDisplay(SDL_GetWindowDisplayIndex(window));
-}
-
-float ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index)
-{
-#if SDL_HAS_PER_MONITOR_DPI
-#if !defined(__APPLE__) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__)
- float dpi = 0.0f;
- if (SDL_GetDisplayDPI(display_index, &dpi, nullptr, nullptr) == 0)
- return dpi / 96.0f;
-#endif
-#endif
- IM_UNUSED(display_index);
- return 1.0f;
-}
-
-static void ImGui_ImplSDL2_CloseGamepads()
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- if (bd->GamepadMode != ImGui_ImplSDL2_GamepadMode_Manual)
- for (SDL_GameController* gamepad : bd->Gamepads)
- SDL_GameControllerClose(gamepad);
- bd->Gamepads.resize(0);
-}
-
-void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array, int manual_gamepads_count)
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- ImGui_ImplSDL2_CloseGamepads();
- if (mode == ImGui_ImplSDL2_GamepadMode_Manual)
- {
- IM_ASSERT(manual_gamepads_array != nullptr || manual_gamepads_count <= 0);
- for (int n = 0; n < manual_gamepads_count; n++)
- bd->Gamepads.push_back(manual_gamepads_array[n]);
- }
- else
- {
- IM_ASSERT(manual_gamepads_array == nullptr && manual_gamepads_count <= 0);
- bd->WantUpdateGamepadsList = true;
- }
- bd->GamepadMode = mode;
-}
-
-static void ImGui_ImplSDL2_UpdateGamepadButton(ImGui_ImplSDL2_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GameControllerButton button_no)
-{
- bool merged_value = false;
- for (SDL_GameController* gamepad : bd->Gamepads)
- merged_value |= SDL_GameControllerGetButton(gamepad, button_no) != 0;
- io.AddKeyEvent(key, merged_value);
-}
-
-static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; }
-static void ImGui_ImplSDL2_UpdateGamepadAnalog(ImGui_ImplSDL2_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GameControllerAxis axis_no, float v0, float v1)
-{
- float merged_value = 0.0f;
- for (SDL_GameController* gamepad : bd->Gamepads)
- {
- float vn = Saturate((float)(SDL_GameControllerGetAxis(gamepad, axis_no) - v0) / (float)(v1 - v0));
- if (merged_value < vn)
- merged_value = vn;
- }
- io.AddKeyAnalogEvent(key, merged_value > 0.1f, merged_value);
-}
-
-static void ImGui_ImplSDL2_UpdateGamepads()
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- ImGuiIO& io = ImGui::GetIO();
-
- // Update list of controller(s) to use
- if (bd->WantUpdateGamepadsList && bd->GamepadMode != ImGui_ImplSDL2_GamepadMode_Manual)
- {
- ImGui_ImplSDL2_CloseGamepads();
- int joystick_count = SDL_NumJoysticks();
- for (int n = 0; n < joystick_count; n++)
- if (SDL_IsGameController(n))
- if (SDL_GameController* gamepad = SDL_GameControllerOpen(n))
- {
- bd->Gamepads.push_back(gamepad);
- if (bd->GamepadMode == ImGui_ImplSDL2_GamepadMode_AutoFirst)
- break;
- }
- bd->WantUpdateGamepadsList = false;
- }
-
- io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
- if (bd->Gamepads.Size == 0)
- return;
- io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
-
- // Update gamepad inputs
- const int thumb_dead_zone = 8000; // SDL_gamecontroller.h suggests using this value.
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadStart, SDL_CONTROLLER_BUTTON_START);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadBack, SDL_CONTROLLER_BUTTON_BACK);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceLeft, SDL_CONTROLLER_BUTTON_X); // Xbox X, PS Square
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceRight, SDL_CONTROLLER_BUTTON_B); // Xbox B, PS Circle
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceUp, SDL_CONTROLLER_BUTTON_Y); // Xbox Y, PS Triangle
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceDown, SDL_CONTROLLER_BUTTON_A); // Xbox A, PS Cross
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadLeft, SDL_CONTROLLER_BUTTON_DPAD_LEFT);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadRight, SDL_CONTROLLER_BUTTON_DPAD_RIGHT);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadUp, SDL_CONTROLLER_BUTTON_DPAD_UP);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadDown, SDL_CONTROLLER_BUTTON_DPAD_DOWN);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL1, SDL_CONTROLLER_BUTTON_LEFTSHOULDER);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR1, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadL2, SDL_CONTROLLER_AXIS_TRIGGERLEFT, 0.0f, 32767);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadR2, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, 0.0f, 32767);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL3, SDL_CONTROLLER_BUTTON_LEFTSTICK);
- ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR3, SDL_CONTROLLER_BUTTON_RIGHTSTICK);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickLeft, SDL_CONTROLLER_AXIS_LEFTX, -thumb_dead_zone, -32768);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickRight, SDL_CONTROLLER_AXIS_LEFTX, +thumb_dead_zone, +32767);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickUp, SDL_CONTROLLER_AXIS_LEFTY, -thumb_dead_zone, -32768);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickDown, SDL_CONTROLLER_AXIS_LEFTY, +thumb_dead_zone, +32767);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickLeft, SDL_CONTROLLER_AXIS_RIGHTX, -thumb_dead_zone, -32768);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickRight, SDL_CONTROLLER_AXIS_RIGHTX, +thumb_dead_zone, +32767);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickUp, SDL_CONTROLLER_AXIS_RIGHTY, -thumb_dead_zone, -32768);
- ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickDown, SDL_CONTROLLER_AXIS_RIGHTY, +thumb_dead_zone, +32767);
-}
-
-static void ImGui_ImplSDL2_GetWindowSizeAndFramebufferScale(SDL_Window* window, SDL_Renderer* renderer, ImVec2* out_size, ImVec2* out_framebuffer_scale)
-{
- int w, h;
- int display_w, display_h;
- SDL_GetWindowSize(window, &w, &h);
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- w = h = 0;
- if (renderer != nullptr)
- SDL_GetRendererOutputSize(renderer, &display_w, &display_h);
-#if SDL_HAS_VULKAN
- else if (SDL_GetWindowFlags(window) & SDL_WINDOW_VULKAN)
- SDL_Vulkan_GetDrawableSize(window, &display_w, &display_h);
-#endif
- else
- SDL_GL_GetDrawableSize(window, &display_w, &display_h);
- if (out_size != nullptr)
- *out_size = ImVec2((float)w, (float)h);
- if (out_framebuffer_scale != nullptr)
- *out_framebuffer_scale = (w > 0 && h > 0) ? ImVec2((float)display_w / w, (float)display_h / h) : ImVec2(1.0f, 1.0f);
-}
-
-void ImGui_ImplSDL2_NewFrame()
-{
- ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL2_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Setup main viewport size (every frame to accommodate for window resizing)
- ImGui_ImplSDL2_GetWindowSizeAndFramebufferScale(bd->Window, bd->Renderer, &io.DisplaySize, &io.DisplayFramebufferScale);
-
- // Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution)
- // (Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. Happens in VMs and Emscripten, see #6189, #6114, #3644)
- static Uint64 frequency = SDL_GetPerformanceFrequency();
- Uint64 current_time = SDL_GetPerformanceCounter();
- if (current_time <= bd->Time)
- current_time = bd->Time + 1;
- io.DeltaTime = bd->Time > 0 ? (float)((double)(current_time - bd->Time) / frequency) : (float)(1.0f / 60.0f);
- bd->Time = current_time;
-
- if (bd->MouseLastLeaveFrame && bd->MouseLastLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0)
- {
- bd->MouseWindowID = 0;
- bd->MouseLastLeaveFrame = 0;
- io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
- }
-
- ImGui_ImplSDL2_UpdateMouseData();
- ImGui_ImplSDL2_UpdateMouseCursor();
-
- // Update game controllers (if enabled and available)
- ImGui_ImplSDL2_UpdateGamepads();
-}
-
-//-----------------------------------------------------------------------------
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdl2.h b/libs/imgui-1.92.1/backends/imgui_impl_sdl2.h
deleted file mode 100644
index 3c0a4a7..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdl2.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// dear imgui: Platform Backend for SDL2
-// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
-// (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
-
-// Implemented features:
-// [X] Platform: Clipboard support.
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
-// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: Basic IME support. App needs to call 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");' before SDL_CreateWindow()!.
-
-// 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
-
-struct SDL_Window;
-struct SDL_Renderer;
-struct _SDL_GameController;
-typedef union SDL_Event SDL_Event;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context);
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer);
-IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOther(SDL_Window* window);
-IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame();
-IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);
-
-// DPI-related helpers (optional)
-IMGUI_IMPL_API float ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window);
-IMGUI_IMPL_API float ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index);
-
-// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this.
-// When using manual mode, caller is responsible for opening/closing gamepad.
-enum ImGui_ImplSDL2_GamepadMode { ImGui_ImplSDL2_GamepadMode_AutoFirst, ImGui_ImplSDL2_GamepadMode_AutoAll, ImGui_ImplSDL2_GamepadMode_Manual };
-IMGUI_IMPL_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array = nullptr, int manual_gamepads_count = -1);
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdl3.cpp b/libs/imgui-1.92.1/backends/imgui_impl_sdl3.cpp
deleted file mode 100644
index 48e766b..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdl3.cpp
+++ /dev/null
@@ -1,830 +0,0 @@
-// dear imgui: Platform Backend for SDL3
-// This needs to be used along with a Renderer (e.g. SDL_GPU, DirectX11, OpenGL3, Vulkan..)
-// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
-
-// Implemented features:
-// [X] Platform: Clipboard support.
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
-// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: IME support.
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-27: IME: avoid calling SDL_StartTextInput() again if already active. (#8727)
-// 2025-04-22: IME: honor ImGuiPlatformImeData->WantTextInput as an alternative way to call SDL_StartTextInput(), without IME being necessarily visible.
-// 2025-04-09: Don't attempt to call SDL_CaptureMouse() on drivers where we don't call SDL_GetGlobalMouseState(). (#8561)
-// 2025-03-30: Update for SDL3 api changes: Revert SDL_GetClipboardText() memory ownership change. (#8530, #7801)
-// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
-// 2025-03-10: When dealing with OEM keys, use scancodes instead of translated keycodes to choose ImGuiKey values. (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
-// 2025-02-26: Only start SDL_CaptureMouse() when mouse is being dragged, to mitigate issues with e.g.Linux debuggers not claiming capture back. (#6410, #3650)
-// 2025-02-24: Avoid calling SDL_GetGlobalMouseState() when mouse is in relative mode.
-// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
-// 2025-02-10: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn handler.
-// 2025-01-20: Made ImGui_ImplSDL3_SetGamepadMode(ImGui_ImplSDL3_GamepadMode_Manual) accept an empty array.
-// 2024-10-24: Emscripten: SDL_EVENT_MOUSE_WHEEL event doesn't require dividing by 100.0f on Emscripten.
-// 2024-09-03: Update for SDL3 api changes: SDL_GetGamepads() memory ownership revert. (#7918, #7898, #7807)
-// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
-// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
-// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
-// - io.PlatformSetImeDataFn -> platform_io.Platform_SetImeDataFn
-// 2024-08-19: Storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
-// 2024-08-19: ImGui_ImplSDL3_ProcessEvent() now ignores events intended for other SDL windows. (#7853)
-// 2024-07-22: Update for SDL3 api changes: SDL_GetGamepads() memory ownership change. (#7807)
-// 2024-07-18: Update for SDL3 api changes: SDL_GetClipboardText() memory ownership change. (#7801)
-// 2024-07-15: Update for SDL3 api changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794)
-// 2024-07-02: Update for SDL3 api changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762).
-// 2024-07-01: Update for SDL3 api changes: SDL_SetTextInputRect() changed to SDL_SetTextInputArea().
-// 2024-06-26: Update for SDL3 api changes: SDL_StartTextInput()/SDL_StopTextInput()/SDL_SetTextInputRect() functions signatures.
-// 2024-06-24: Update for SDL3 api changes: SDL_EVENT_KEY_DOWN/SDL_EVENT_KEY_UP contents.
-// 2024-06-03; Update for SDL3 api changes: SDL_SYSTEM_CURSOR_ renames.
-// 2024-05-15: Update for SDL3 api changes: SDLK_ renames.
-// 2024-04-15: Inputs: Re-enable calling SDL_StartTextInput()/SDL_StopTextInput() as SDL3 no longer enables it by default and should play nicer with IME.
-// 2024-02-13: Inputs: Fixed gamepad support. Handle gamepad disconnection. Added ImGui_ImplSDL3_SetGamepadMode().
-// 2023-11-13: Updated for recent SDL3 API changes.
-// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys.
-// 2023-05-04: Fixed build on Emscripten/iOS/Android. (#6391)
-// 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
-// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702)
-// 2023-02-23: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644)
-// 2023-02-07: Forked "imgui_impl_sdl2" into "imgui_impl_sdl3". Removed version checks for old feature. Refer to imgui_impl_sdl2.cpp for older changelog.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_sdl3.h"
-
-// Clang warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
-#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
-#endif
-
-// SDL
-#include <SDL3/SDL.h>
-#include <stdio.h> // for snprintf()
-#if defined(__APPLE__)
-#include <TargetConditionals.h>
-#endif
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-
-#if !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS) && !defined(__amigaos4__)
-#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 1
-#else
-#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 0
-#endif
-
-// FIXME-LEGACY: remove when SDL 3.1.3 preview is released.
-#ifndef SDLK_APOSTROPHE
-#define SDLK_APOSTROPHE SDLK_QUOTE
-#endif
-#ifndef SDLK_GRAVE
-#define SDLK_GRAVE SDLK_BACKQUOTE
-#endif
-
-// SDL Data
-struct ImGui_ImplSDL3_Data
-{
- SDL_Window* Window;
- SDL_WindowID WindowID;
- SDL_Renderer* Renderer;
- Uint64 Time;
- char* ClipboardTextData;
- char BackendPlatformName[48];
-
- // IME handling
- SDL_Window* ImeWindow;
-
- // Mouse handling
- Uint32 MouseWindowID;
- int MouseButtonsDown;
- SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT];
- SDL_Cursor* MouseLastCursor;
- int MousePendingLeaveFrame;
- bool MouseCanUseGlobalState;
- bool MouseCanUseCapture;
-
- // Gamepad handling
- ImVector<SDL_Gamepad*> Gamepads;
- ImGui_ImplSDL3_GamepadMode GamepadMode;
- bool WantUpdateGamepadsList;
-
- ImGui_ImplSDL3_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support is not well tested and probably dysfunctional in this backend.
-// FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context.
-static ImGui_ImplSDL3_Data* ImGui_ImplSDL3_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplSDL3_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr;
-}
-
-// Functions
-static const char* ImGui_ImplSDL3_GetClipboardText(ImGuiContext*)
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- if (bd->ClipboardTextData)
- SDL_free(bd->ClipboardTextData);
- bd->ClipboardTextData = SDL_GetClipboardText();
- return bd->ClipboardTextData;
-}
-
-static void ImGui_ImplSDL3_SetClipboardText(ImGuiContext*, const char* text)
-{
- SDL_SetClipboardText(text);
-}
-
-static void ImGui_ImplSDL3_PlatformSetImeData(ImGuiContext*, ImGuiViewport* viewport, ImGuiPlatformImeData* data)
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- SDL_WindowID window_id = (SDL_WindowID)(intptr_t)viewport->PlatformHandle;
- SDL_Window* window = SDL_GetWindowFromID(window_id);
- if ((!(data->WantVisible || data->WantTextInput) || bd->ImeWindow != window) && bd->ImeWindow != nullptr)
- {
- SDL_StopTextInput(bd->ImeWindow);
- bd->ImeWindow = nullptr;
- }
- if (data->WantVisible)
- {
- SDL_Rect r;
- r.x = (int)data->InputPos.x;
- r.y = (int)data->InputPos.y;
- r.w = 1;
- r.h = (int)data->InputLineHeight;
- SDL_SetTextInputArea(window, &r, 0);
- bd->ImeWindow = window;
- }
- if (!SDL_TextInputActive(window) && (data->WantVisible || data->WantTextInput))
- SDL_StartTextInput(window);
-}
-
-// Not static to allow third-party code to use that if they want to (but undocumented)
-ImGuiKey ImGui_ImplSDL3_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode);
-ImGuiKey ImGui_ImplSDL3_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode)
-{
- // Keypad doesn't have individual key values in SDL3
- switch (scancode)
- {
- case SDL_SCANCODE_KP_0: return ImGuiKey_Keypad0;
- case SDL_SCANCODE_KP_1: return ImGuiKey_Keypad1;
- case SDL_SCANCODE_KP_2: return ImGuiKey_Keypad2;
- case SDL_SCANCODE_KP_3: return ImGuiKey_Keypad3;
- case SDL_SCANCODE_KP_4: return ImGuiKey_Keypad4;
- case SDL_SCANCODE_KP_5: return ImGuiKey_Keypad5;
- case SDL_SCANCODE_KP_6: return ImGuiKey_Keypad6;
- case SDL_SCANCODE_KP_7: return ImGuiKey_Keypad7;
- case SDL_SCANCODE_KP_8: return ImGuiKey_Keypad8;
- case SDL_SCANCODE_KP_9: return ImGuiKey_Keypad9;
- case SDL_SCANCODE_KP_PERIOD: return ImGuiKey_KeypadDecimal;
- case SDL_SCANCODE_KP_DIVIDE: return ImGuiKey_KeypadDivide;
- case SDL_SCANCODE_KP_MULTIPLY: return ImGuiKey_KeypadMultiply;
- case SDL_SCANCODE_KP_MINUS: return ImGuiKey_KeypadSubtract;
- case SDL_SCANCODE_KP_PLUS: return ImGuiKey_KeypadAdd;
- case SDL_SCANCODE_KP_ENTER: return ImGuiKey_KeypadEnter;
- case SDL_SCANCODE_KP_EQUALS: return ImGuiKey_KeypadEqual;
- default: break;
- }
- switch (keycode)
- {
- case SDLK_TAB: return ImGuiKey_Tab;
- case SDLK_LEFT: return ImGuiKey_LeftArrow;
- case SDLK_RIGHT: return ImGuiKey_RightArrow;
- case SDLK_UP: return ImGuiKey_UpArrow;
- case SDLK_DOWN: return ImGuiKey_DownArrow;
- case SDLK_PAGEUP: return ImGuiKey_PageUp;
- case SDLK_PAGEDOWN: return ImGuiKey_PageDown;
- case SDLK_HOME: return ImGuiKey_Home;
- case SDLK_END: return ImGuiKey_End;
- case SDLK_INSERT: return ImGuiKey_Insert;
- case SDLK_DELETE: return ImGuiKey_Delete;
- case SDLK_BACKSPACE: return ImGuiKey_Backspace;
- case SDLK_SPACE: return ImGuiKey_Space;
- case SDLK_RETURN: return ImGuiKey_Enter;
- case SDLK_ESCAPE: return ImGuiKey_Escape;
- //case SDLK_APOSTROPHE: return ImGuiKey_Apostrophe;
- case SDLK_COMMA: return ImGuiKey_Comma;
- //case SDLK_MINUS: return ImGuiKey_Minus;
- case SDLK_PERIOD: return ImGuiKey_Period;
- //case SDLK_SLASH: return ImGuiKey_Slash;
- case SDLK_SEMICOLON: return ImGuiKey_Semicolon;
- //case SDLK_EQUALS: return ImGuiKey_Equal;
- //case SDLK_LEFTBRACKET: return ImGuiKey_LeftBracket;
- //case SDLK_BACKSLASH: return ImGuiKey_Backslash;
- //case SDLK_RIGHTBRACKET: return ImGuiKey_RightBracket;
- //case SDLK_GRAVE: return ImGuiKey_GraveAccent;
- case SDLK_CAPSLOCK: return ImGuiKey_CapsLock;
- case SDLK_SCROLLLOCK: return ImGuiKey_ScrollLock;
- case SDLK_NUMLOCKCLEAR: return ImGuiKey_NumLock;
- case SDLK_PRINTSCREEN: return ImGuiKey_PrintScreen;
- case SDLK_PAUSE: return ImGuiKey_Pause;
- case SDLK_LCTRL: return ImGuiKey_LeftCtrl;
- case SDLK_LSHIFT: return ImGuiKey_LeftShift;
- case SDLK_LALT: return ImGuiKey_LeftAlt;
- case SDLK_LGUI: return ImGuiKey_LeftSuper;
- case SDLK_RCTRL: return ImGuiKey_RightCtrl;
- case SDLK_RSHIFT: return ImGuiKey_RightShift;
- case SDLK_RALT: return ImGuiKey_RightAlt;
- case SDLK_RGUI: return ImGuiKey_RightSuper;
- case SDLK_APPLICATION: return ImGuiKey_Menu;
- case SDLK_0: return ImGuiKey_0;
- case SDLK_1: return ImGuiKey_1;
- case SDLK_2: return ImGuiKey_2;
- case SDLK_3: return ImGuiKey_3;
- case SDLK_4: return ImGuiKey_4;
- case SDLK_5: return ImGuiKey_5;
- case SDLK_6: return ImGuiKey_6;
- case SDLK_7: return ImGuiKey_7;
- case SDLK_8: return ImGuiKey_8;
- case SDLK_9: return ImGuiKey_9;
- case SDLK_A: return ImGuiKey_A;
- case SDLK_B: return ImGuiKey_B;
- case SDLK_C: return ImGuiKey_C;
- case SDLK_D: return ImGuiKey_D;
- case SDLK_E: return ImGuiKey_E;
- case SDLK_F: return ImGuiKey_F;
- case SDLK_G: return ImGuiKey_G;
- case SDLK_H: return ImGuiKey_H;
- case SDLK_I: return ImGuiKey_I;
- case SDLK_J: return ImGuiKey_J;
- case SDLK_K: return ImGuiKey_K;
- case SDLK_L: return ImGuiKey_L;
- case SDLK_M: return ImGuiKey_M;
- case SDLK_N: return ImGuiKey_N;
- case SDLK_O: return ImGuiKey_O;
- case SDLK_P: return ImGuiKey_P;
- case SDLK_Q: return ImGuiKey_Q;
- case SDLK_R: return ImGuiKey_R;
- case SDLK_S: return ImGuiKey_S;
- case SDLK_T: return ImGuiKey_T;
- case SDLK_U: return ImGuiKey_U;
- case SDLK_V: return ImGuiKey_V;
- case SDLK_W: return ImGuiKey_W;
- case SDLK_X: return ImGuiKey_X;
- case SDLK_Y: return ImGuiKey_Y;
- case SDLK_Z: return ImGuiKey_Z;
- case SDLK_F1: return ImGuiKey_F1;
- case SDLK_F2: return ImGuiKey_F2;
- case SDLK_F3: return ImGuiKey_F3;
- case SDLK_F4: return ImGuiKey_F4;
- case SDLK_F5: return ImGuiKey_F5;
- case SDLK_F6: return ImGuiKey_F6;
- case SDLK_F7: return ImGuiKey_F7;
- case SDLK_F8: return ImGuiKey_F8;
- case SDLK_F9: return ImGuiKey_F9;
- case SDLK_F10: return ImGuiKey_F10;
- case SDLK_F11: return ImGuiKey_F11;
- case SDLK_F12: return ImGuiKey_F12;
- case SDLK_F13: return ImGuiKey_F13;
- case SDLK_F14: return ImGuiKey_F14;
- case SDLK_F15: return ImGuiKey_F15;
- case SDLK_F16: return ImGuiKey_F16;
- case SDLK_F17: return ImGuiKey_F17;
- case SDLK_F18: return ImGuiKey_F18;
- case SDLK_F19: return ImGuiKey_F19;
- case SDLK_F20: return ImGuiKey_F20;
- case SDLK_F21: return ImGuiKey_F21;
- case SDLK_F22: return ImGuiKey_F22;
- case SDLK_F23: return ImGuiKey_F23;
- case SDLK_F24: return ImGuiKey_F24;
- case SDLK_AC_BACK: return ImGuiKey_AppBack;
- case SDLK_AC_FORWARD: return ImGuiKey_AppForward;
- default: break;
- }
-
- // Fallback to scancode
- switch (scancode)
- {
- case SDL_SCANCODE_GRAVE: return ImGuiKey_GraveAccent;
- case SDL_SCANCODE_MINUS: return ImGuiKey_Minus;
- case SDL_SCANCODE_EQUALS: return ImGuiKey_Equal;
- case SDL_SCANCODE_LEFTBRACKET: return ImGuiKey_LeftBracket;
- case SDL_SCANCODE_RIGHTBRACKET: return ImGuiKey_RightBracket;
- case SDL_SCANCODE_NONUSBACKSLASH: return ImGuiKey_Oem102;
- case SDL_SCANCODE_BACKSLASH: return ImGuiKey_Backslash;
- case SDL_SCANCODE_SEMICOLON: return ImGuiKey_Semicolon;
- case SDL_SCANCODE_APOSTROPHE: return ImGuiKey_Apostrophe;
- case SDL_SCANCODE_COMMA: return ImGuiKey_Comma;
- case SDL_SCANCODE_PERIOD: return ImGuiKey_Period;
- case SDL_SCANCODE_SLASH: return ImGuiKey_Slash;
- default: break;
- }
- return ImGuiKey_None;
-}
-
-static void ImGui_ImplSDL3_UpdateKeyModifiers(SDL_Keymod sdl_key_mods)
-{
- ImGuiIO& io = ImGui::GetIO();
- io.AddKeyEvent(ImGuiMod_Ctrl, (sdl_key_mods & SDL_KMOD_CTRL) != 0);
- io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & SDL_KMOD_SHIFT) != 0);
- io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & SDL_KMOD_ALT) != 0);
- io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & SDL_KMOD_GUI) != 0);
-}
-
-
-static ImGuiViewport* ImGui_ImplSDL3_GetViewportForWindowID(SDL_WindowID window_id)
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- return (window_id == bd->WindowID) ? ImGui::GetMainViewport() : nullptr;
-}
-
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-// If you have multiple SDL events and some of them are not meant to be used by dear imgui, you may need to filter events based on their windowID field.
-bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event)
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL3_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- switch (event->type)
- {
- case SDL_EVENT_MOUSE_MOTION:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->motion.windowID) == nullptr)
- return false;
- ImVec2 mouse_pos((float)event->motion.x, (float)event->motion.y);
- io.AddMouseSourceEvent(event->motion.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMousePosEvent(mouse_pos.x, mouse_pos.y);
- return true;
- }
- case SDL_EVENT_MOUSE_WHEEL:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->wheel.windowID) == nullptr)
- return false;
- //IMGUI_DEBUG_LOG("wheel %.2f %.2f, precise %.2f %.2f\n", (float)event->wheel.x, (float)event->wheel.y, event->wheel.preciseX, event->wheel.preciseY);
- float wheel_x = -event->wheel.x;
- float wheel_y = event->wheel.y;
- io.AddMouseSourceEvent(event->wheel.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMouseWheelEvent(wheel_x, wheel_y);
- return true;
- }
- case SDL_EVENT_MOUSE_BUTTON_DOWN:
- case SDL_EVENT_MOUSE_BUTTON_UP:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->button.windowID) == nullptr)
- return false;
- int mouse_button = -1;
- if (event->button.button == SDL_BUTTON_LEFT) { mouse_button = 0; }
- if (event->button.button == SDL_BUTTON_RIGHT) { mouse_button = 1; }
- if (event->button.button == SDL_BUTTON_MIDDLE) { mouse_button = 2; }
- if (event->button.button == SDL_BUTTON_X1) { mouse_button = 3; }
- if (event->button.button == SDL_BUTTON_X2) { mouse_button = 4; }
- if (mouse_button == -1)
- break;
- io.AddMouseSourceEvent(event->button.which == SDL_TOUCH_MOUSEID ? ImGuiMouseSource_TouchScreen : ImGuiMouseSource_Mouse);
- io.AddMouseButtonEvent(mouse_button, (event->type == SDL_EVENT_MOUSE_BUTTON_DOWN));
- bd->MouseButtonsDown = (event->type == SDL_EVENT_MOUSE_BUTTON_DOWN) ? (bd->MouseButtonsDown | (1 << mouse_button)) : (bd->MouseButtonsDown & ~(1 << mouse_button));
- return true;
- }
- case SDL_EVENT_TEXT_INPUT:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->text.windowID) == nullptr)
- return false;
- io.AddInputCharactersUTF8(event->text.text);
- return true;
- }
- case SDL_EVENT_KEY_DOWN:
- case SDL_EVENT_KEY_UP:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->key.windowID) == nullptr)
- return false;
- ImGui_ImplSDL3_UpdateKeyModifiers((SDL_Keymod)event->key.mod);
- //IMGUI_DEBUG_LOG("SDL_EVENT_KEY_%s : key=%d ('%s'), scancode=%d ('%s'), mod=%X\n",
- // (event->type == SDL_EVENT_KEY_DOWN) ? "DOWN" : "UP ", event->key.key, SDL_GetKeyName(event->key.key), event->key.scancode, SDL_GetScancodeName(event->key.scancode), event->key.mod);
- ImGuiKey key = ImGui_ImplSDL3_KeyEventToImGuiKey(event->key.key, event->key.scancode);
- io.AddKeyEvent(key, (event->type == SDL_EVENT_KEY_DOWN));
- io.SetKeyEventNativeData(key, (int)event->key.key, (int)event->key.scancode, (int)event->key.scancode); // To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
- return true;
- }
- case SDL_EVENT_WINDOW_MOUSE_ENTER:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->window.windowID) == nullptr)
- return false;
- bd->MouseWindowID = event->window.windowID;
- bd->MousePendingLeaveFrame = 0;
- return true;
- }
- // - In some cases, when detaching a window from main viewport SDL may send SDL_WINDOWEVENT_ENTER one frame too late,
- // causing SDL_WINDOWEVENT_LEAVE on previous frame to interrupt drag operation by clear mouse position. This is why
- // we delay process the SDL_WINDOWEVENT_LEAVE events by one frame. See issue #5012 for details.
- // FIXME: Unconfirmed whether this is still needed with SDL3.
- case SDL_EVENT_WINDOW_MOUSE_LEAVE:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->window.windowID) == nullptr)
- return false;
- bd->MousePendingLeaveFrame = ImGui::GetFrameCount() + 1;
- return true;
- }
- case SDL_EVENT_WINDOW_FOCUS_GAINED:
- case SDL_EVENT_WINDOW_FOCUS_LOST:
- {
- if (ImGui_ImplSDL3_GetViewportForWindowID(event->window.windowID) == nullptr)
- return false;
- io.AddFocusEvent(event->type == SDL_EVENT_WINDOW_FOCUS_GAINED);
- return true;
- }
- case SDL_EVENT_GAMEPAD_ADDED:
- case SDL_EVENT_GAMEPAD_REMOVED:
- {
- bd->WantUpdateGamepadsList = true;
- return true;
- }
- default:
- break;
- }
- return false;
-}
-
-static void ImGui_ImplSDL3_SetupPlatformHandles(ImGuiViewport* viewport, SDL_Window* window)
-{
- viewport->PlatformHandle = (void*)(intptr_t)SDL_GetWindowID(window);
- viewport->PlatformHandleRaw = nullptr;
-#if defined(_WIN32) && !defined(__WINRT__)
- viewport->PlatformHandleRaw = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr);
-#elif defined(__APPLE__)
- viewport->PlatformHandleRaw = SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr);
-#endif
-}
-
-static bool ImGui_ImplSDL3_Init(SDL_Window* window, SDL_Renderer* renderer, void* sdl_gl_context)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
- IM_UNUSED(sdl_gl_context); // Unused in this branch
-
- const int ver_linked = SDL_GetVersion();
-
- // Setup backend capabilities flags
- ImGui_ImplSDL3_Data* bd = IM_NEW(ImGui_ImplSDL3_Data)();
- snprintf(bd->BackendPlatformName, sizeof(bd->BackendPlatformName), "imgui_impl_sdl3 (%d.%d.%d; %d.%d.%d)",
- SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION, SDL_VERSIONNUM_MAJOR(ver_linked), SDL_VERSIONNUM_MINOR(ver_linked), SDL_VERSIONNUM_MICRO(ver_linked));
- io.BackendPlatformUserData = (void*)bd;
- io.BackendPlatformName = bd->BackendPlatformName;
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
- io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
-
- bd->Window = window;
- bd->WindowID = SDL_GetWindowID(window);
- bd->Renderer = renderer;
-
- // Check and store if we are on a SDL backend that supports SDL_GetGlobalMouseState() and SDL_CaptureMouse()
- // ("wayland" and "rpi" don't support it, but we chose to use a white-list instead of a black-list)
- bd->MouseCanUseGlobalState = false;
- bd->MouseCanUseCapture = false;
-#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
- const char* sdl_backend = SDL_GetCurrentVideoDriver();
- const char* capture_and_global_state_whitelist[] = { "windows", "cocoa", "x11", "DIVE", "VMAN" };
- for (const char* item : capture_and_global_state_whitelist)
- if (strncmp(sdl_backend, item, strlen(item)) == 0)
- bd->MouseCanUseGlobalState = bd->MouseCanUseCapture = true;
-#endif
-
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- platform_io.Platform_SetClipboardTextFn = ImGui_ImplSDL3_SetClipboardText;
- platform_io.Platform_GetClipboardTextFn = ImGui_ImplSDL3_GetClipboardText;
- platform_io.Platform_SetImeDataFn = ImGui_ImplSDL3_PlatformSetImeData;
- platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { return SDL_OpenURL(url) == 0; };
-
- // Gamepad handling
- bd->GamepadMode = ImGui_ImplSDL3_GamepadMode_AutoFirst;
- bd->WantUpdateGamepadsList = true;
-
- // Load mouse cursors
- bd->MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_DEFAULT);
- bd->MouseCursors[ImGuiMouseCursor_TextInput] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_TEXT);
- bd->MouseCursors[ImGuiMouseCursor_ResizeAll] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_MOVE);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNS] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NS_RESIZE);
- bd->MouseCursors[ImGuiMouseCursor_ResizeEW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_EW_RESIZE);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NESW_RESIZE);
- bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NWSE_RESIZE);
- bd->MouseCursors[ImGuiMouseCursor_Hand] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_POINTER);
- bd->MouseCursors[ImGuiMouseCursor_Wait] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_WAIT);
- bd->MouseCursors[ImGuiMouseCursor_Progress] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_PROGRESS);
- bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NOT_ALLOWED);
-
- // Set platform dependent data in viewport
- // Our mouse update function expect PlatformHandle to be filled for the main viewport
- ImGuiViewport* main_viewport = ImGui::GetMainViewport();
- ImGui_ImplSDL3_SetupPlatformHandles(main_viewport, window);
-
- // From 2.0.5: Set SDL hint to receive mouse click events on window focus, otherwise SDL doesn't emit the event.
- // Without this, when clicking to gain focus, our widgets wouldn't activate even though they showed as hovered.
- // (This is unfortunately a global SDL setting, so enabling it might have a side-effect on your application.
- // It is unlikely to make a difference, but if your app absolutely needs to ignore the initial on-focus click:
- // you can ignore SDL_EVENT_MOUSE_BUTTON_DOWN events coming right after a SDL_WINDOWEVENT_FOCUS_GAINED)
-#ifdef SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH
- SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
-#endif
-
- // From 2.0.22: Disable auto-capture, this is preventing drag and drop across multiple windows (see #5710)
-#ifdef SDL_HINT_MOUSE_AUTO_CAPTURE
- SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "0");
-#endif
-
- return true;
-}
-
-bool ImGui_ImplSDL3_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
-{
- IM_UNUSED(sdl_gl_context); // Viewport branch will need this.
- return ImGui_ImplSDL3_Init(window, nullptr, sdl_gl_context);
-}
-
-bool ImGui_ImplSDL3_InitForVulkan(SDL_Window* window)
-{
- return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL3_InitForD3D(SDL_Window* window)
-{
-#if !defined(_WIN32)
- IM_ASSERT(0 && "Unsupported");
-#endif
- return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL3_InitForMetal(SDL_Window* window)
-{
- return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer)
-{
- return ImGui_ImplSDL3_Init(window, renderer, nullptr);
-}
-
-bool ImGui_ImplSDL3_InitForSDLGPU(SDL_Window* window)
-{
- return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
-}
-
-bool ImGui_ImplSDL3_InitForOther(SDL_Window* window)
-{
- return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
-}
-
-static void ImGui_ImplSDL3_CloseGamepads();
-
-void ImGui_ImplSDL3_Shutdown()
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- if (bd->ClipboardTextData)
- SDL_free(bd->ClipboardTextData);
- for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
- SDL_DestroyCursor(bd->MouseCursors[cursor_n]);
- ImGui_ImplSDL3_CloseGamepads();
-
- io.BackendPlatformName = nullptr;
- io.BackendPlatformUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_HasSetMousePos | ImGuiBackendFlags_HasGamepad);
- IM_DELETE(bd);
-}
-
-static void ImGui_ImplSDL3_UpdateMouseData()
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- ImGuiIO& io = ImGui::GetIO();
-
- // We forward mouse input when hovered or captured (via SDL_EVENT_MOUSE_MOTION) or when focused (below)
-#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
- // - SDL_CaptureMouse() let the OS know e.g. that our drags can extend outside of parent boundaries (we want updated position) and shouldn't trigger other operations outside.
- // - Debuggers under Linux tends to leave captured mouse on break, which may be very inconvenient, so to mitigate the issue we wait until mouse has moved to begin capture.
- if (bd->MouseCanUseCapture)
- {
- bool want_capture = false;
- for (int button_n = 0; button_n < ImGuiMouseButton_COUNT && !want_capture; button_n++)
- if (ImGui::IsMouseDragging(button_n, 1.0f))
- want_capture = true;
- SDL_CaptureMouse(want_capture);
- }
-
- SDL_Window* focused_window = SDL_GetKeyboardFocus();
- const bool is_app_focused = (bd->Window == focused_window);
-#else
- SDL_Window* focused_window = bd->Window;
- const bool is_app_focused = (SDL_GetWindowFlags(bd->Window) & SDL_WINDOW_INPUT_FOCUS) != 0; // SDL 2.0.3 and non-windowed systems: single-viewport only
-#endif
- if (is_app_focused)
- {
- // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when io.ConfigNavMoveSetMousePos is enabled by user)
- if (io.WantSetMousePos)
- SDL_WarpMouseInWindow(bd->Window, io.MousePos.x, io.MousePos.y);
-
- // (Optional) Fallback to provide mouse position when focused (SDL_EVENT_MOUSE_MOTION already provides this when hovered or captured)
- const bool is_relative_mouse_mode = SDL_GetWindowRelativeMouseMode(bd->Window);
- if (bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
- {
- // Single-viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
- float mouse_x_global, mouse_y_global;
- int window_x, window_y;
- SDL_GetGlobalMouseState(&mouse_x_global, &mouse_y_global);
- SDL_GetWindowPosition(focused_window, &window_x, &window_y);
- io.AddMousePosEvent(mouse_x_global - window_x, mouse_y_global - window_y);
- }
- }
-}
-
-static void ImGui_ImplSDL3_UpdateMouseCursor()
-{
- ImGuiIO& io = ImGui::GetIO();
- if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
- return;
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
-
- ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
- if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)
- {
- // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
- SDL_HideCursor();
- }
- else
- {
- // Show OS mouse cursor
- SDL_Cursor* expected_cursor = bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow];
- if (bd->MouseLastCursor != expected_cursor)
- {
- SDL_SetCursor(expected_cursor); // SDL function doesn't have an early out (see #6113)
- bd->MouseLastCursor = expected_cursor;
- }
- SDL_ShowCursor();
- }
-}
-
-static void ImGui_ImplSDL3_CloseGamepads()
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- if (bd->GamepadMode != ImGui_ImplSDL3_GamepadMode_Manual)
- for (SDL_Gamepad* gamepad : bd->Gamepads)
- SDL_CloseGamepad(gamepad);
- bd->Gamepads.resize(0);
-}
-
-void ImGui_ImplSDL3_SetGamepadMode(ImGui_ImplSDL3_GamepadMode mode, SDL_Gamepad** manual_gamepads_array, int manual_gamepads_count)
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- ImGui_ImplSDL3_CloseGamepads();
- if (mode == ImGui_ImplSDL3_GamepadMode_Manual)
- {
- IM_ASSERT(manual_gamepads_array != nullptr || manual_gamepads_count <= 0);
- for (int n = 0; n < manual_gamepads_count; n++)
- bd->Gamepads.push_back(manual_gamepads_array[n]);
- }
- else
- {
- IM_ASSERT(manual_gamepads_array == nullptr && manual_gamepads_count <= 0);
- bd->WantUpdateGamepadsList = true;
- }
- bd->GamepadMode = mode;
-}
-
-static void ImGui_ImplSDL3_UpdateGamepadButton(ImGui_ImplSDL3_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GamepadButton button_no)
-{
- bool merged_value = false;
- for (SDL_Gamepad* gamepad : bd->Gamepads)
- merged_value |= SDL_GetGamepadButton(gamepad, button_no) != 0;
- io.AddKeyEvent(key, merged_value);
-}
-
-static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; }
-static void ImGui_ImplSDL3_UpdateGamepadAnalog(ImGui_ImplSDL3_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GamepadAxis axis_no, float v0, float v1)
-{
- float merged_value = 0.0f;
- for (SDL_Gamepad* gamepad : bd->Gamepads)
- {
- float vn = Saturate((float)(SDL_GetGamepadAxis(gamepad, axis_no) - v0) / (float)(v1 - v0));
- if (merged_value < vn)
- merged_value = vn;
- }
- io.AddKeyAnalogEvent(key, merged_value > 0.1f, merged_value);
-}
-
-static void ImGui_ImplSDL3_UpdateGamepads()
-{
- ImGuiIO& io = ImGui::GetIO();
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
-
- // Update list of gamepads to use
- if (bd->WantUpdateGamepadsList && bd->GamepadMode != ImGui_ImplSDL3_GamepadMode_Manual)
- {
- ImGui_ImplSDL3_CloseGamepads();
- int sdl_gamepads_count = 0;
- SDL_JoystickID* sdl_gamepads = SDL_GetGamepads(&sdl_gamepads_count);
- for (int n = 0; n < sdl_gamepads_count; n++)
- if (SDL_Gamepad* gamepad = SDL_OpenGamepad(sdl_gamepads[n]))
- {
- bd->Gamepads.push_back(gamepad);
- if (bd->GamepadMode == ImGui_ImplSDL3_GamepadMode_AutoFirst)
- break;
- }
- bd->WantUpdateGamepadsList = false;
- SDL_free(sdl_gamepads);
- }
-
- io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
- if (bd->Gamepads.Size == 0)
- return;
- io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
-
- // Update gamepad inputs
- const int thumb_dead_zone = 8000; // SDL_gamepad.h suggests using this value.
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadStart, SDL_GAMEPAD_BUTTON_START);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadBack, SDL_GAMEPAD_BUTTON_BACK);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceLeft, SDL_GAMEPAD_BUTTON_WEST); // Xbox X, PS Square
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceRight, SDL_GAMEPAD_BUTTON_EAST); // Xbox B, PS Circle
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceUp, SDL_GAMEPAD_BUTTON_NORTH); // Xbox Y, PS Triangle
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceDown, SDL_GAMEPAD_BUTTON_SOUTH); // Xbox A, PS Cross
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadLeft, SDL_GAMEPAD_BUTTON_DPAD_LEFT);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadRight, SDL_GAMEPAD_BUTTON_DPAD_RIGHT);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadUp, SDL_GAMEPAD_BUTTON_DPAD_UP);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadDown, SDL_GAMEPAD_BUTTON_DPAD_DOWN);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL1, SDL_GAMEPAD_BUTTON_LEFT_SHOULDER);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR1, SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadL2, SDL_GAMEPAD_AXIS_LEFT_TRIGGER, 0.0f, 32767);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadR2, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, 0.0f, 32767);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL3, SDL_GAMEPAD_BUTTON_LEFT_STICK);
- ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR3, SDL_GAMEPAD_BUTTON_RIGHT_STICK);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickLeft, SDL_GAMEPAD_AXIS_LEFTX, -thumb_dead_zone, -32768);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickRight, SDL_GAMEPAD_AXIS_LEFTX, +thumb_dead_zone, +32767);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickUp, SDL_GAMEPAD_AXIS_LEFTY, -thumb_dead_zone, -32768);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickDown, SDL_GAMEPAD_AXIS_LEFTY, +thumb_dead_zone, +32767);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickLeft, SDL_GAMEPAD_AXIS_RIGHTX, -thumb_dead_zone, -32768);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickRight, SDL_GAMEPAD_AXIS_RIGHTX, +thumb_dead_zone, +32767);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickUp, SDL_GAMEPAD_AXIS_RIGHTY, -thumb_dead_zone, -32768);
- ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickDown, SDL_GAMEPAD_AXIS_RIGHTY, +thumb_dead_zone, +32767);
-}
-
-static void ImGui_ImplSDL3_GetWindowSizeAndFramebufferScale(SDL_Window* window, ImVec2* out_size, ImVec2* out_framebuffer_scale)
-{
- int w, h;
- int display_w, display_h;
- SDL_GetWindowSize(window, &w, &h);
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- w = h = 0;
- SDL_GetWindowSizeInPixels(window, &display_w, &display_h);
- if (out_size != nullptr)
- *out_size = ImVec2((float)w, (float)h);
- if (out_framebuffer_scale != nullptr)
- *out_framebuffer_scale = (w > 0 && h > 0) ? ImVec2((float)display_w / w, (float)display_h / h) : ImVec2(1.0f, 1.0f);
-}
-
-void ImGui_ImplSDL3_NewFrame()
-{
- ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDL3_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Setup main viewport size (every frame to accommodate for window resizing)
- ImGui_ImplSDL3_GetWindowSizeAndFramebufferScale(bd->Window, &io.DisplaySize, &io.DisplayFramebufferScale);
-
- // Setup time step (we could also use SDL_GetTicksNS() available since SDL3)
- // (Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. Happens in VMs and Emscripten, see #6189, #6114, #3644)
- static Uint64 frequency = SDL_GetPerformanceFrequency();
- Uint64 current_time = SDL_GetPerformanceCounter();
- if (current_time <= bd->Time)
- current_time = bd->Time + 1;
- io.DeltaTime = bd->Time > 0 ? (float)((double)(current_time - bd->Time) / frequency) : (float)(1.0f / 60.0f);
- bd->Time = current_time;
-
- if (bd->MousePendingLeaveFrame && bd->MousePendingLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0)
- {
- bd->MouseWindowID = 0;
- bd->MousePendingLeaveFrame = 0;
- io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
- }
-
- ImGui_ImplSDL3_UpdateMouseData();
- ImGui_ImplSDL3_UpdateMouseCursor();
-
- // Update game controllers (if enabled and available)
- ImGui_ImplSDL3_UpdateGamepads();
-}
-
-//-----------------------------------------------------------------------------
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdl3.h b/libs/imgui-1.92.1/backends/imgui_impl_sdl3.h
deleted file mode 100644
index a822a25..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdl3.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// dear imgui: Platform Backend for SDL3
-// This needs to be used along with a Renderer (e.g. SDL_GPU, DirectX11, OpenGL3, Vulkan..)
-// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
-
-// Implemented features:
-// [X] Platform: Clipboard support.
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
-// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-// [X] Platform: IME support.
-
-// 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
-
-struct SDL_Window;
-struct SDL_Renderer;
-struct SDL_Gamepad;
-typedef union SDL_Event SDL_Event;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForOpenGL(SDL_Window* window, void* sdl_gl_context);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForVulkan(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForD3D(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForMetal(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForSDLGPU(SDL_Window* window);
-IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForOther(SDL_Window* window);
-IMGUI_IMPL_API void ImGui_ImplSDL3_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplSDL3_NewFrame();
-IMGUI_IMPL_API bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event);
-
-// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this.
-// When using manual mode, caller is responsible for opening/closing gamepad.
-enum ImGui_ImplSDL3_GamepadMode { ImGui_ImplSDL3_GamepadMode_AutoFirst, ImGui_ImplSDL3_GamepadMode_AutoAll, ImGui_ImplSDL3_GamepadMode_Manual };
-IMGUI_IMPL_API void ImGui_ImplSDL3_SetGamepadMode(ImGui_ImplSDL3_GamepadMode mode, SDL_Gamepad** manual_gamepads_array = nullptr, int manual_gamepads_count = -1);
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.cpp b/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.cpp
deleted file mode 100644
index 927e511..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.cpp
+++ /dev/null
@@ -1,661 +0,0 @@
-// dear imgui: Renderer Backend for SDL_GPU
-// This needs to be used along with the SDL3 Platform Backend
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use simply cast a reference to your SDL_GPUTextureSamplerBinding to ImTextureID.
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// The aim of imgui_impl_sdlgpu3.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
-// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU3_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU3_RenderDrawData.
-// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
-
-// CHANGELOG
-// 2025-06-25: Mapping transfer buffer for texture update use cycle=true. Fixes artifacts e.g. on Metal backend.
-// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
-// 2025-04-28: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2025-03-30: Made ImGui_ImplSDLGPU3_PrepareDrawData() reuse GPU Transfer Buffers which were unusually slow to recreate every frame. Much faster now.
-// 2025-03-21: Fixed typo in function name Imgui_ImplSDLGPU3_PrepareDrawData() -> ImGui_ImplSDLGPU3_PrepareDrawData().
-// 2025-01-16: Renamed ImGui_ImplSDLGPU3_InitInfo::GpuDevice to Device.
-// 2025-01-09: SDL_GPU: Added the SDL_GPU3 backend.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_sdlgpu3.h"
-#include "imgui_impl_sdlgpu3_shaders.h"
-
-// SDL_GPU Data
-struct ImGui_ImplSDLGPU3_Texture
-{
- SDL_GPUTexture* Texture = nullptr;
- SDL_GPUTextureSamplerBinding TextureSamplerBinding = { nullptr, nullptr };
-};
-
-// Reusable buffers used for rendering 1 current in-flight frame, for ImGui_ImplSDLGPU3_RenderDrawData()
-struct ImGui_ImplSDLGPU3_FrameData
-{
- SDL_GPUBuffer* VertexBuffer = nullptr;
- SDL_GPUTransferBuffer* VertexTransferBuffer = nullptr;
- uint32_t VertexBufferSize = 0;
- SDL_GPUBuffer* IndexBuffer = nullptr;
- SDL_GPUTransferBuffer* IndexTransferBuffer = nullptr;
- uint32_t IndexBufferSize = 0;
-};
-
-struct ImGui_ImplSDLGPU3_Data
-{
- ImGui_ImplSDLGPU3_InitInfo InitInfo;
-
- // Graphics pipeline & shaders
- SDL_GPUShader* VertexShader = nullptr;
- SDL_GPUShader* FragmentShader = nullptr;
- SDL_GPUGraphicsPipeline* Pipeline = nullptr;
- SDL_GPUSampler* TexSampler = nullptr;
- SDL_GPUTransferBuffer* TexTransferBuffer = nullptr;
- uint32_t TexTransferBufferSize = 0;
-
- // Frame data for main window
- ImGui_ImplSDLGPU3_FrameData MainWindowFrameData;
-};
-
-// Forward Declarations
-static void ImGui_ImplSDLGPU3_DestroyFrameData();
-
-//-----------------------------------------------------------------------------
-// FUNCTIONS
-//-----------------------------------------------------------------------------
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support has never been tested.
-static ImGui_ImplSDLGPU3_Data* ImGui_ImplSDLGPU3_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplSDLGPU3_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-static void ImGui_ImplSDLGPU3_SetupRenderState(ImDrawData* draw_data, SDL_GPUGraphicsPipeline* pipeline, SDL_GPUCommandBuffer* command_buffer, SDL_GPURenderPass * render_pass, ImGui_ImplSDLGPU3_FrameData* fd, uint32_t fb_width, uint32_t fb_height)
-{
- //ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
-
- // Bind graphics pipeline
- SDL_BindGPUGraphicsPipeline(render_pass,pipeline);
-
- // Bind Vertex And Index Buffers
- if (draw_data->TotalVtxCount > 0)
- {
- SDL_GPUBufferBinding vertex_buffer_binding = {};
- vertex_buffer_binding.buffer = fd->VertexBuffer;
- vertex_buffer_binding.offset = 0;
- SDL_GPUBufferBinding index_buffer_binding = {};
- index_buffer_binding.buffer = fd->IndexBuffer;
- index_buffer_binding.offset = 0;
- SDL_BindGPUVertexBuffers(render_pass,0, &vertex_buffer_binding, 1);
- SDL_BindGPUIndexBuffer(render_pass, &index_buffer_binding, sizeof(ImDrawIdx) == 2 ? SDL_GPU_INDEXELEMENTSIZE_16BIT : SDL_GPU_INDEXELEMENTSIZE_32BIT);
- }
-
- // Setup viewport
- SDL_GPUViewport viewport = {};
- viewport.x = 0;
- viewport.y = 0;
- viewport.w = (float)fb_width;
- viewport.h = (float)fb_height;
- viewport.min_depth = 0.0f;
- viewport.max_depth = 1.0f;
- SDL_SetGPUViewport(render_pass, &viewport);
-
- // Setup scale and translation
- // Our visible imgui space lies from draw_data->DisplayPps (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- struct UBO { float scale[2]; float translation[2]; } ubo;
- ubo.scale[0] = 2.0f / draw_data->DisplaySize.x;
- ubo.scale[1] = 2.0f / draw_data->DisplaySize.y;
- ubo.translation[0] = -1.0f - draw_data->DisplayPos.x * ubo.scale[0];
- ubo.translation[1] = -1.0f - draw_data->DisplayPos.y * ubo.scale[1];
- SDL_PushGPUVertexUniformData(command_buffer, 0, &ubo, sizeof(UBO));
-}
-
-static void CreateOrResizeBuffers(SDL_GPUBuffer** buffer, SDL_GPUTransferBuffer** transferbuffer, uint32_t* old_size, uint32_t new_size, SDL_GPUBufferUsageFlags usage)
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- // FIXME-OPT: Not optimal, but this is fairly rarely called.
- SDL_WaitForGPUIdle(v->Device);
- SDL_ReleaseGPUBuffer(v->Device, *buffer);
- SDL_ReleaseGPUTransferBuffer(v->Device, *transferbuffer);
-
- SDL_GPUBufferCreateInfo buffer_info = {};
- buffer_info.usage = usage;
- buffer_info.size = new_size;
- buffer_info.props = 0;
- *buffer = SDL_CreateGPUBuffer(v->Device, &buffer_info);
- *old_size = new_size;
- IM_ASSERT(*buffer != nullptr && "Failed to create GPU Buffer, call SDL_GetError() for more information");
-
- SDL_GPUTransferBufferCreateInfo transferbuffer_info = {};
- transferbuffer_info.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
- transferbuffer_info.size = new_size;
- *transferbuffer = SDL_CreateGPUTransferBuffer(v->Device, &transferbuffer_info);
- IM_ASSERT(*transferbuffer != nullptr && "Failed to create GPU Transfer Buffer, call SDL_GetError() for more information");
-}
-
-// SDL_GPU doesn't allow copy passes to occur while a render or compute pass is bound!
-// The only way to allow a user to supply their own RenderPass (to render to a texture instead of the window for example),
-// is to split the upload part of ImGui_ImplSDLGPU3_RenderDrawData() to another function that needs to be called by the user before rendering.
-void ImGui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer)
-{
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0 || draw_data->TotalVtxCount <= 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplSDLGPU3_UpdateTexture(tex);
-
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
- ImGui_ImplSDLGPU3_FrameData* fd = &bd->MainWindowFrameData;
-
- uint32_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert);
- uint32_t index_size = draw_data->TotalIdxCount * sizeof(ImDrawIdx);
- if (fd->VertexBuffer == nullptr || fd->VertexBufferSize < vertex_size)
- CreateOrResizeBuffers(&fd->VertexBuffer, &fd->VertexTransferBuffer, &fd->VertexBufferSize, vertex_size, SDL_GPU_BUFFERUSAGE_VERTEX);
- if (fd->IndexBuffer == nullptr || fd->IndexBufferSize < index_size)
- CreateOrResizeBuffers(&fd->IndexBuffer, &fd->IndexTransferBuffer, &fd->IndexBufferSize, index_size, SDL_GPU_BUFFERUSAGE_INDEX);
-
- ImDrawVert* vtx_dst = (ImDrawVert*)SDL_MapGPUTransferBuffer(v->Device, fd->VertexTransferBuffer, true);
- ImDrawIdx* idx_dst = (ImDrawIdx*)SDL_MapGPUTransferBuffer(v->Device, fd->IndexTransferBuffer, true);
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
- SDL_UnmapGPUTransferBuffer(v->Device, fd->VertexTransferBuffer);
- SDL_UnmapGPUTransferBuffer(v->Device, fd->IndexTransferBuffer);
-
- SDL_GPUTransferBufferLocation vertex_buffer_location = {};
- vertex_buffer_location.offset = 0;
- vertex_buffer_location.transfer_buffer = fd->VertexTransferBuffer;
- SDL_GPUTransferBufferLocation index_buffer_location = {};
- index_buffer_location.offset = 0;
- index_buffer_location.transfer_buffer = fd->IndexTransferBuffer;
-
- SDL_GPUBufferRegion vertex_buffer_region = {};
- vertex_buffer_region.buffer = fd->VertexBuffer;
- vertex_buffer_region.offset = 0;
- vertex_buffer_region.size = vertex_size;
-
- SDL_GPUBufferRegion index_buffer_region = {};
- index_buffer_region.buffer = fd->IndexBuffer;
- index_buffer_region.offset = 0;
- index_buffer_region.size = index_size;
-
- SDL_GPUCopyPass* copy_pass = SDL_BeginGPUCopyPass(command_buffer);
- SDL_UploadToGPUBuffer(copy_pass, &vertex_buffer_location, &vertex_buffer_region, true);
- SDL_UploadToGPUBuffer(copy_pass, &index_buffer_location, &index_buffer_region, true);
- SDL_EndGPUCopyPass(copy_pass);
-}
-
-void ImGui_ImplSDLGPU3_RenderDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer, SDL_GPURenderPass* render_pass, SDL_GPUGraphicsPipeline* pipeline)
-{
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0)
- return;
-
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_FrameData* fd = &bd->MainWindowFrameData;
-
- if (pipeline == nullptr)
- pipeline = bd->Pipeline;
-
- ImGui_ImplSDLGPU3_SetupRenderState(draw_data, pipeline, command_buffer, render_pass, fd, fb_width, fb_height);
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplSDLGPU3_SetupRenderState(draw_data, pipeline, command_buffer, render_pass, fd, fb_width, fb_height);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
-
- // Clamp to viewport as SDL_SetGPUScissor() won't accept values that are off bounds
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- SDL_Rect scissor_rect = {};
- scissor_rect.x = (int)clip_min.x;
- scissor_rect.y = (int)clip_min.y;
- scissor_rect.w = (int)(clip_max.x - clip_min.x);
- scissor_rect.h = (int)(clip_max.y - clip_min.y);
- SDL_SetGPUScissor(render_pass,&scissor_rect);
-
- // Bind DescriptorSet with font or user texture
- SDL_BindGPUFragmentSamplers(render_pass, 0, (SDL_GPUTextureSamplerBinding*)pcmd->GetTexID(), 1);
-
- // Draw
- SDL_DrawGPUIndexedPrimitives(render_pass, pcmd->ElemCount, 1, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset, 0);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
-
- // Note: at this point both SDL_SetGPUViewport() and SDL_SetGPUScissor() have been called.
- // Our last values will leak into user/application rendering if you forgot to call SDL_SetGPUViewport() and SDL_SetGPUScissor() yourself to explicitly set that state
- // In theory we should aim to backup/restore those values but I am not sure this is possible.
- // We perform a call to SDL_SetGPUScissor() to set back a full viewport which is likely to fix things for 99% users but technically this is not perfect. (See github #4644)
- SDL_Rect scissor_rect { 0, 0, fb_width, fb_height };
- SDL_SetGPUScissor(render_pass, &scissor_rect);
-}
-
-static void ImGui_ImplSDLGPU3_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_Texture* backend_tex = (ImGui_ImplSDLGPU3_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
- SDL_GPUTextureSamplerBinding* binding = (SDL_GPUTextureSamplerBinding*)(intptr_t)tex->BackendUserData;
- IM_ASSERT(backend_tex->Texture == binding->texture);
- SDL_ReleaseGPUTexture(bd->InitInfo.Device, backend_tex->Texture);
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplSDLGPU3_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- ImGui_ImplSDLGPU3_Texture* backend_tex = IM_NEW(ImGui_ImplSDLGPU3_Texture)();
-
- // Create texture
- SDL_GPUTextureCreateInfo texture_info = {};
- texture_info.type = SDL_GPU_TEXTURETYPE_2D;
- texture_info.format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM;
- texture_info.usage = SDL_GPU_TEXTUREUSAGE_SAMPLER;
- texture_info.width = tex->Width;
- texture_info.height = tex->Height;
- texture_info.layer_count_or_depth = 1;
- texture_info.num_levels = 1;
- texture_info.sample_count = SDL_GPU_SAMPLECOUNT_1;
-
- backend_tex->Texture = SDL_CreateGPUTexture(v->Device, &texture_info);
- backend_tex->TextureSamplerBinding.texture = backend_tex->Texture;
- backend_tex->TextureSamplerBinding.sampler = bd->TexSampler;
- IM_ASSERT(backend_tex->Texture && "Failed to create font texture, call SDL_GetError() for more info");
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)&backend_tex->TextureSamplerBinding);
- tex->BackendUserData = backend_tex;
- }
-
- if (tex->Status == ImTextureStatus_WantCreate || tex->Status == ImTextureStatus_WantUpdates)
- {
- ImGui_ImplSDLGPU3_Texture* backend_tex = (ImGui_ImplSDLGPU3_Texture*)tex->BackendUserData;
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // Update full texture or selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->UpdateRect but you can use tex->Updates[] to upload individual regions.
- // We could use the smaller rect on _WantCreate but using the full rect allows us to clear the texture.
- const int upload_x = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.x;
- const int upload_y = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.y;
- const int upload_w = (tex->Status == ImTextureStatus_WantCreate) ? tex->Width : tex->UpdateRect.w;
- const int upload_h = (tex->Status == ImTextureStatus_WantCreate) ? tex->Height : tex->UpdateRect.h;
- uint32_t upload_pitch = upload_w * tex->BytesPerPixel;
- uint32_t upload_size = upload_w * upload_h * tex->BytesPerPixel;
-
- // Create transfer buffer
- if (bd->TexTransferBufferSize < upload_size)
- {
- SDL_ReleaseGPUTransferBuffer(v->Device, bd->TexTransferBuffer);
- SDL_GPUTransferBufferCreateInfo transferbuffer_info = {};
- transferbuffer_info.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
- transferbuffer_info.size = upload_size + 1024;
- bd->TexTransferBufferSize = upload_size + 1024;
- bd->TexTransferBuffer = SDL_CreateGPUTransferBuffer(v->Device, &transferbuffer_info);
- IM_ASSERT(bd->TexTransferBuffer != nullptr && "Failed to create font transfer buffer, call SDL_GetError() for more information");
- }
-
- // Copy to transfer buffer
- {
- void* texture_ptr = SDL_MapGPUTransferBuffer(v->Device, bd->TexTransferBuffer, true);
- for (int y = 0; y < upload_h; y++)
- memcpy((void*)((uintptr_t)texture_ptr + y * upload_pitch), tex->GetPixelsAt(upload_x, upload_y + y), upload_pitch);
- SDL_UnmapGPUTransferBuffer(v->Device, bd->TexTransferBuffer);
- }
-
- SDL_GPUTextureTransferInfo transfer_info = {};
- transfer_info.offset = 0;
- transfer_info.transfer_buffer = bd->TexTransferBuffer;
-
- SDL_GPUTextureRegion texture_region = {};
- texture_region.texture = backend_tex->Texture;
- texture_region.x = (Uint32)upload_x;
- texture_region.y = (Uint32)upload_y;
- texture_region.w = (Uint32)upload_w;
- texture_region.h = (Uint32)upload_h;
- texture_region.d = 1;
-
- // Upload
- {
- SDL_GPUCommandBuffer* cmd = SDL_AcquireGPUCommandBuffer(v->Device);
- SDL_GPUCopyPass* copy_pass = SDL_BeginGPUCopyPass(cmd);
- SDL_UploadToGPUTexture(copy_pass, &transfer_info, &texture_region, false);
- SDL_EndGPUCopyPass(copy_pass);
- SDL_SubmitGPUCommandBuffer(cmd);
- }
-
- tex->SetStatus(ImTextureStatus_OK);
- }
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- ImGui_ImplSDLGPU3_DestroyTexture(tex);
-}
-
-static void ImGui_ImplSDLGPU3_CreateShaders()
-{
- // Create the shader modules
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- const char* driver = SDL_GetGPUDeviceDriver(v->Device);
-
- SDL_GPUShaderCreateInfo vertex_shader_info = {};
- vertex_shader_info.entrypoint = "main";
- vertex_shader_info.stage = SDL_GPU_SHADERSTAGE_VERTEX;
- vertex_shader_info.num_uniform_buffers = 1;
- vertex_shader_info.num_storage_buffers = 0;
- vertex_shader_info.num_storage_textures = 0;
- vertex_shader_info.num_samplers = 0;
-
- SDL_GPUShaderCreateInfo fragment_shader_info = {};
- fragment_shader_info.entrypoint = "main";
- fragment_shader_info.stage = SDL_GPU_SHADERSTAGE_FRAGMENT;
- fragment_shader_info.num_samplers = 1;
- fragment_shader_info.num_storage_buffers = 0;
- fragment_shader_info.num_storage_textures = 0;
- fragment_shader_info.num_uniform_buffers = 0;
-
- if (strcmp(driver, "vulkan") == 0)
- {
- vertex_shader_info.format = SDL_GPU_SHADERFORMAT_SPIRV;
- vertex_shader_info.code = spirv_vertex;
- vertex_shader_info.code_size = sizeof(spirv_vertex);
- fragment_shader_info.format = SDL_GPU_SHADERFORMAT_SPIRV;
- fragment_shader_info.code = spirv_fragment;
- fragment_shader_info.code_size = sizeof(spirv_fragment);
- }
- else if (strcmp(driver, "direct3d12") == 0)
- {
- vertex_shader_info.format = SDL_GPU_SHADERFORMAT_DXBC;
- vertex_shader_info.code = dxbc_vertex;
- vertex_shader_info.code_size = sizeof(dxbc_vertex);
- fragment_shader_info.format = SDL_GPU_SHADERFORMAT_DXBC;
- fragment_shader_info.code = dxbc_fragment;
- fragment_shader_info.code_size = sizeof(dxbc_fragment);
- }
-#ifdef __APPLE__
- else
- {
- vertex_shader_info.entrypoint = "main0";
- vertex_shader_info.format = SDL_GPU_SHADERFORMAT_METALLIB;
- vertex_shader_info.code = metallib_vertex;
- vertex_shader_info.code_size = sizeof(metallib_vertex);
- fragment_shader_info.entrypoint = "main0";
- fragment_shader_info.format = SDL_GPU_SHADERFORMAT_METALLIB;
- fragment_shader_info.code = metallib_fragment;
- fragment_shader_info.code_size = sizeof(metallib_fragment);
- }
-#endif
- bd->VertexShader = SDL_CreateGPUShader(v->Device, &vertex_shader_info);
- bd->FragmentShader = SDL_CreateGPUShader(v->Device, &fragment_shader_info);
- IM_ASSERT(bd->VertexShader != nullptr && "Failed to create vertex shader, call SDL_GetError() for more information");
- IM_ASSERT(bd->FragmentShader != nullptr && "Failed to create fragment shader, call SDL_GetError() for more information");
-}
-
-static void ImGui_ImplSDLGPU3_CreateGraphicsPipeline()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
- ImGui_ImplSDLGPU3_CreateShaders();
-
- SDL_GPUVertexBufferDescription vertex_buffer_desc[1];
- vertex_buffer_desc[0].slot = 0;
- vertex_buffer_desc[0].input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX;
- vertex_buffer_desc[0].instance_step_rate = 0;
- vertex_buffer_desc[0].pitch = sizeof(ImDrawVert);
-
- SDL_GPUVertexAttribute vertex_attributes[3];
- vertex_attributes[0].buffer_slot = 0;
- vertex_attributes[0].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2;
- vertex_attributes[0].location = 0;
- vertex_attributes[0].offset = offsetof(ImDrawVert,pos);
-
- vertex_attributes[1].buffer_slot = 0;
- vertex_attributes[1].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2;
- vertex_attributes[1].location = 1;
- vertex_attributes[1].offset = offsetof(ImDrawVert, uv);
-
- vertex_attributes[2].buffer_slot = 0;
- vertex_attributes[2].format = SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM;
- vertex_attributes[2].location = 2;
- vertex_attributes[2].offset = offsetof(ImDrawVert, col);
-
- SDL_GPUVertexInputState vertex_input_state = {};
- vertex_input_state.num_vertex_attributes = 3;
- vertex_input_state.vertex_attributes = vertex_attributes;
- vertex_input_state.num_vertex_buffers = 1;
- vertex_input_state.vertex_buffer_descriptions = vertex_buffer_desc;
-
- SDL_GPURasterizerState rasterizer_state = {};
- rasterizer_state.fill_mode = SDL_GPU_FILLMODE_FILL;
- rasterizer_state.cull_mode = SDL_GPU_CULLMODE_NONE;
- rasterizer_state.front_face = SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
- rasterizer_state.enable_depth_bias = false;
- rasterizer_state.enable_depth_clip = false;
-
- SDL_GPUMultisampleState multisample_state = {};
- multisample_state.sample_count = v->MSAASamples;
- multisample_state.enable_mask = false;
-
- SDL_GPUDepthStencilState depth_stencil_state = {};
- depth_stencil_state.enable_depth_test = false;
- depth_stencil_state.enable_depth_write = false;
- depth_stencil_state.enable_stencil_test = false;
-
- SDL_GPUColorTargetBlendState blend_state = {};
- blend_state.enable_blend = true;
- blend_state.src_color_blendfactor = SDL_GPU_BLENDFACTOR_SRC_ALPHA;
- blend_state.dst_color_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
- blend_state.color_blend_op = SDL_GPU_BLENDOP_ADD;
- blend_state.src_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE;
- blend_state.dst_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
- blend_state.alpha_blend_op = SDL_GPU_BLENDOP_ADD;
- blend_state.color_write_mask = SDL_GPU_COLORCOMPONENT_R | SDL_GPU_COLORCOMPONENT_G | SDL_GPU_COLORCOMPONENT_B | SDL_GPU_COLORCOMPONENT_A;
-
- SDL_GPUColorTargetDescription color_target_desc[1];
- color_target_desc[0].format = v->ColorTargetFormat;
- color_target_desc[0].blend_state = blend_state;
-
- SDL_GPUGraphicsPipelineTargetInfo target_info = {};
- target_info.num_color_targets = 1;
- target_info.color_target_descriptions = color_target_desc;
- target_info.has_depth_stencil_target = false;
-
- SDL_GPUGraphicsPipelineCreateInfo pipeline_info = {};
- pipeline_info.vertex_shader = bd->VertexShader;
- pipeline_info.fragment_shader = bd->FragmentShader;
- pipeline_info.vertex_input_state = vertex_input_state;
- pipeline_info.primitive_type = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
- pipeline_info.rasterizer_state = rasterizer_state;
- pipeline_info.multisample_state = multisample_state;
- pipeline_info.depth_stencil_state = depth_stencil_state;
- pipeline_info.target_info = target_info;
-
- bd->Pipeline = SDL_CreateGPUGraphicsPipeline(v->Device, &pipeline_info);
- IM_ASSERT(bd->Pipeline != nullptr && "Failed to create graphics pipeline, call SDL_GetError() for more information");
-}
-
-void ImGui_ImplSDLGPU3_CreateDeviceObjects()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- ImGui_ImplSDLGPU3_DestroyDeviceObjects();
-
- if (bd->TexSampler == nullptr)
- {
- // Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling.
- SDL_GPUSamplerCreateInfo sampler_info = {};
- sampler_info.min_filter = SDL_GPU_FILTER_LINEAR;
- sampler_info.mag_filter = SDL_GPU_FILTER_LINEAR;
- sampler_info.mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_LINEAR;
- sampler_info.address_mode_u = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
- sampler_info.address_mode_v = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
- sampler_info.address_mode_w = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
- sampler_info.mip_lod_bias = 0.0f;
- sampler_info.min_lod = -1000.0f;
- sampler_info.max_lod = 1000.0f;
- sampler_info.enable_anisotropy = false;
- sampler_info.max_anisotropy = 1.0f;
- sampler_info.enable_compare = false;
-
- bd->TexSampler = SDL_CreateGPUSampler(v->Device, &sampler_info);
- IM_ASSERT(bd->TexSampler != nullptr && "Failed to create font sampler, call SDL_GetError() for more information");
- }
-
- ImGui_ImplSDLGPU3_CreateGraphicsPipeline();
-}
-
-void ImGui_ImplSDLGPU3_DestroyFrameData()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- ImGui_ImplSDLGPU3_FrameData* fd = &bd->MainWindowFrameData;
- SDL_ReleaseGPUBuffer(v->Device, fd->VertexBuffer);
- SDL_ReleaseGPUBuffer(v->Device, fd->IndexBuffer);
- SDL_ReleaseGPUTransferBuffer(v->Device, fd->VertexTransferBuffer);
- SDL_ReleaseGPUTransferBuffer(v->Device, fd->IndexTransferBuffer);
- fd->VertexBuffer = fd->IndexBuffer = nullptr;
- fd->VertexTransferBuffer = fd->IndexTransferBuffer = nullptr;
- fd->VertexBufferSize = fd->IndexBufferSize = 0;
-}
-
-void ImGui_ImplSDLGPU3_DestroyDeviceObjects()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
-
- ImGui_ImplSDLGPU3_DestroyFrameData();
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplSDLGPU3_DestroyTexture(tex);
- if (bd->TexTransferBuffer) { SDL_ReleaseGPUTransferBuffer(v->Device, bd->TexTransferBuffer); bd->TexTransferBuffer = nullptr; }
- if (bd->VertexShader) { SDL_ReleaseGPUShader(v->Device, bd->VertexShader); bd->VertexShader = nullptr; }
- if (bd->FragmentShader) { SDL_ReleaseGPUShader(v->Device, bd->FragmentShader); bd->FragmentShader = nullptr; }
- if (bd->TexSampler) { SDL_ReleaseGPUSampler(v->Device, bd->TexSampler); bd->TexSampler = nullptr; }
- if (bd->Pipeline) { SDL_ReleaseGPUGraphicsPipeline(v->Device, bd->Pipeline); bd->Pipeline = nullptr; }
-}
-
-bool ImGui_ImplSDLGPU3_Init(ImGui_ImplSDLGPU3_InitInfo* info)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplSDLGPU3_Data* bd = IM_NEW(ImGui_ImplSDLGPU3_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_sdlgpu3";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- IM_ASSERT(info->Device != nullptr);
- IM_ASSERT(info->ColorTargetFormat != SDL_GPU_TEXTUREFORMAT_INVALID);
-
- bd->InitInfo = *info;
-
- return true;
-}
-
-void ImGui_ImplSDLGPU3_Shutdown()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplSDLGPU3_DestroyDeviceObjects();
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplSDLGPU3_NewFrame()
-{
- ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLGPU3_Init()?");
-
- if (!bd->TexSampler)
- ImGui_ImplSDLGPU3_CreateDeviceObjects();
-}
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.h b/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.h
deleted file mode 100644
index 826767a..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// dear imgui: Renderer Backend for SDL_GPU
-// This needs to be used along with the SDL3 Platform Backend
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use simply cast a reference to your SDL_GPUTextureSamplerBinding to ImTextureID.
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-
-// The aim of imgui_impl_sdlgpu3.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
-// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU_PrepareDrawData BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
-// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
-
-#pragma once
-#include "imgui.h" // IMGUI_IMPL_API
-#ifndef IMGUI_DISABLE
-#include <SDL3/SDL_gpu.h>
-
-// Initialization data, for ImGui_ImplSDLGPU_Init()
-// - Remember to set ColorTargetFormat to the correct format. If you're rendering to the swapchain, call SDL_GetGPUSwapchainTextureFormat to query the right value
-struct ImGui_ImplSDLGPU3_InitInfo
-{
- SDL_GPUDevice* Device = nullptr;
- SDL_GPUTextureFormat ColorTargetFormat = SDL_GPU_TEXTUREFORMAT_INVALID;
- SDL_GPUSampleCount MSAASamples = SDL_GPU_SAMPLECOUNT_1;
-};
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplSDLGPU3_Init(ImGui_ImplSDLGPU3_InitInfo* info);
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer);
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_RenderDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer, SDL_GPURenderPass* render_pass, SDL_GPUGraphicsPipeline* pipeline = nullptr);
-
-// Use if you want to reset your rendering device without losing Dear ImGui state.
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplSDLGPU3_UpdateTexture(ImTextureData* tex);
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3_shaders.h b/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3_shaders.h
deleted file mode 100644
index f792aa6..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlgpu3_shaders.h
+++ /dev/null
@@ -1,372 +0,0 @@
-#pragma once
-#ifndef IMGUI_DISABLE
-#include <stdint.h>
-
-// Data exported using
-// misc/fonts/binary_to_compressed_c.exe -u8 -nocompress filename symbolname >filename.h
-// With some manual pasting.
-
-// Check sdlgpu3/ folder for the shaders' source code and instruction on how to build them
-const uint8_t spirv_vertex[1732] = {
- 3,2,35,7,0,0,1,0,11,0,13,0,55,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,11,0,6,0,1,0,0,0,71,76,83,76,46,115,116,100,46,52,53,48,0,0,0,0,14,0,3,0,0,0,0,0,1,0,0,0,15,0,10,0,0,0,0,0,4,0,0,0,109,
- 97,105,110,0,0,0,0,11,0,0,0,15,0,0,0,21,0,0,0,30,0,0,0,31,0,0,0,3,0,3,0,2,0,0,0,194,1,0,0,4,0,10,0,71,76,95,71,79,79,71,76,69,95,99,112,112,95,115,116,121,108,101,95,108,105,110,101,
- 95,100,105,114,101,99,116,105,118,101,0,0,4,0,8,0,71,76,95,71,79,79,71,76,69,95,105,110,99,108,117,100,101,95,100,105,114,101,99,116,105,118,101,0,5,0,4,0,4,0,0,0,109,97,105,110,0,
- 0,0,0,5,0,3,0,9,0,0,0,0,0,0,0,6,0,5,0,9,0,0,0,0,0,0,0,67,111,108,111,114,0,0,0,6,0,4,0,9,0,0,0,1,0,0,0,85,86,0,0,5,0,3,0,11,0,0,0,79,117,116,0,5,0,4,0,15,0,0,0,97,67,111,108,111,114,
- 0,0,5,0,3,0,21,0,0,0,97,85,86,0,5,0,6,0,28,0,0,0,103,108,95,80,101,114,86,101,114,116,101,120,0,0,0,0,6,0,6,0,28,0,0,0,0,0,0,0,103,108,95,80,111,115,105,116,105,111,110,0,6,0,7,0,28,
- 0,0,0,1,0,0,0,103,108,95,80,111,105,110,116,83,105,122,101,0,0,0,0,6,0,7,0,28,0,0,0,2,0,0,0,103,108,95,67,108,105,112,68,105,115,116,97,110,99,101,0,6,0,7,0,28,0,0,0,3,0,0,0,103,108,
- 95,67,117,108,108,68,105,115,116,97,110,99,101,0,5,0,3,0,30,0,0,0,0,0,0,0,5,0,4,0,31,0,0,0,97,80,111,115,0,0,0,0,5,0,6,0,33,0,0,0,117,80,117,115,104,67,111,110,115,116,97,110,116,0,
- 0,0,6,0,5,0,33,0,0,0,0,0,0,0,117,83,99,97,108,101,0,0,6,0,6,0,33,0,0,0,1,0,0,0,117,84,114,97,110,115,108,97,116,101,0,0,5,0,3,0,35,0,0,0,112,99,0,0,71,0,4,0,11,0,0,0,30,0,0,0,0,0,0,
- 0,71,0,4,0,15,0,0,0,30,0,0,0,2,0,0,0,71,0,4,0,21,0,0,0,30,0,0,0,1,0,0,0,71,0,3,0,28,0,0,0,2,0,0,0,72,0,5,0,28,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,72,0,5,0,28,0,0,0,1,0,0,0,11,0,0,0,1,0,
- 0,0,72,0,5,0,28,0,0,0,2,0,0,0,11,0,0,0,3,0,0,0,72,0,5,0,28,0,0,0,3,0,0,0,11,0,0,0,4,0,0,0,71,0,4,0,31,0,0,0,30,0,0,0,0,0,0,0,71,0,3,0,33,0,0,0,2,0,0,0,72,0,5,0,33,0,0,0,0,0,0,0,35,
- 0,0,0,0,0,0,0,72,0,5,0,33,0,0,0,1,0,0,0,35,0,0,0,8,0,0,0,71,0,4,0,35,0,0,0,33,0,0,0,0,0,0,0,71,0,4,0,35,0,0,0,34,0,0,0,1,0,0,0,19,0,2,0,2,0,0,0,33,0,3,0,3,0,0,0,2,0,0,0,22,0,3,0,6,
- 0,0,0,32,0,0,0,23,0,4,0,7,0,0,0,6,0,0,0,4,0,0,0,23,0,4,0,8,0,0,0,6,0,0,0,2,0,0,0,30,0,4,0,9,0,0,0,7,0,0,0,8,0,0,0,32,0,4,0,10,0,0,0,3,0,0,0,9,0,0,0,59,0,4,0,10,0,0,0,11,0,0,0,3,0,0,
- 0,21,0,4,0,12,0,0,0,32,0,0,0,1,0,0,0,43,0,4,0,12,0,0,0,13,0,0,0,0,0,0,0,32,0,4,0,14,0,0,0,1,0,0,0,7,0,0,0,59,0,4,0,14,0,0,0,15,0,0,0,1,0,0,0,32,0,4,0,17,0,0,0,3,0,0,0,7,0,0,0,43,0,
- 4,0,12,0,0,0,19,0,0,0,1,0,0,0,32,0,4,0,20,0,0,0,1,0,0,0,8,0,0,0,59,0,4,0,20,0,0,0,21,0,0,0,1,0,0,0,32,0,4,0,23,0,0,0,3,0,0,0,8,0,0,0,21,0,4,0,25,0,0,0,32,0,0,0,0,0,0,0,43,0,4,0,25,
- 0,0,0,26,0,0,0,1,0,0,0,28,0,4,0,27,0,0,0,6,0,0,0,26,0,0,0,30,0,6,0,28,0,0,0,7,0,0,0,6,0,0,0,27,0,0,0,27,0,0,0,32,0,4,0,29,0,0,0,3,0,0,0,28,0,0,0,59,0,4,0,29,0,0,0,30,0,0,0,3,0,0,0,
- 59,0,4,0,20,0,0,0,31,0,0,0,1,0,0,0,30,0,4,0,33,0,0,0,8,0,0,0,8,0,0,0,32,0,4,0,34,0,0,0,2,0,0,0,33,0,0,0,59,0,4,0,34,0,0,0,35,0,0,0,2,0,0,0,32,0,4,0,36,0,0,0,2,0,0,0,8,0,0,0,43,0,4,
- 0,6,0,0,0,43,0,0,0,0,0,0,0,43,0,4,0,6,0,0,0,44,0,0,0,0,0,128,63,43,0,4,0,6,0,0,0,49,0,0,0,0,0,128,191,32,0,4,0,50,0,0,0,3,0,0,0,6,0,0,0,54,0,5,0,2,0,0,0,4,0,0,0,0,0,0,0,3,0,0,0,248,
- 0,2,0,5,0,0,0,61,0,4,0,7,0,0,0,16,0,0,0,15,0,0,0,65,0,5,0,17,0,0,0,18,0,0,0,11,0,0,0,13,0,0,0,62,0,3,0,18,0,0,0,16,0,0,0,61,0,4,0,8,0,0,0,22,0,0,0,21,0,0,0,65,0,5,0,23,0,0,0,24,0,0,
- 0,11,0,0,0,19,0,0,0,62,0,3,0,24,0,0,0,22,0,0,0,61,0,4,0,8,0,0,0,32,0,0,0,31,0,0,0,65,0,5,0,36,0,0,0,37,0,0,0,35,0,0,0,13,0,0,0,61,0,4,0,8,0,0,0,38,0,0,0,37,0,0,0,133,0,5,0,8,0,0,0,
- 39,0,0,0,32,0,0,0,38,0,0,0,65,0,5,0,36,0,0,0,40,0,0,0,35,0,0,0,19,0,0,0,61,0,4,0,8,0,0,0,41,0,0,0,40,0,0,0,129,0,5,0,8,0,0,0,42,0,0,0,39,0,0,0,41,0,0,0,81,0,5,0,6,0,0,0,45,0,0,0,42,
- 0,0,0,0,0,0,0,81,0,5,0,6,0,0,0,46,0,0,0,42,0,0,0,1,0,0,0,80,0,7,0,7,0,0,0,47,0,0,0,45,0,0,0,46,0,0,0,43,0,0,0,44,0,0,0,65,0,5,0,17,0,0,0,48,0,0,0,30,0,0,0,13,0,0,0,62,0,3,0,48,0,0,
- 0,47,0,0,0,65,0,6,0,50,0,0,0,51,0,0,0,30,0,0,0,13,0,0,0,26,0,0,0,61,0,4,0,6,0,0,0,52,0,0,0,51,0,0,0,133,0,5,0,6,0,0,0,53,0,0,0,52,0,0,0,49,0,0,0,65,0,6,0,50,0,0,0,54,0,0,0,30,0,0,0,
- 13,0,0,0,26,0,0,0,62,0,3,0,54,0,0,0,53,0,0,0,253,0,1,0,56,0,1,0,
-};
-const uint8_t spirv_fragment[844] = {
- 3,2,35,7,0,0,1,0,11,0,13,0,30,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,11,0,6,0,1,0,0,0,71,76,83,76,46,115,116,100,46,52,53,48,0,0,0,0,14,0,3,0,0,0,0,0,1,0,0,0,15,0,7,0,4,0,0,0,4,0,0,0,109,97,
- 105,110,0,0,0,0,9,0,0,0,13,0,0,0,16,0,3,0,4,0,0,0,7,0,0,0,3,0,3,0,2,0,0,0,194,1,0,0,4,0,10,0,71,76,95,71,79,79,71,76,69,95,99,112,112,95,115,116,121,108,101,95,108,105,110,101,95,100,
- 105,114,101,99,116,105,118,101,0,0,4,0,8,0,71,76,95,71,79,79,71,76,69,95,105,110,99,108,117,100,101,95,100,105,114,101,99,116,105,118,101,0,5,0,4,0,4,0,0,0,109,97,105,110,0,0,0,0,5,
- 0,4,0,9,0,0,0,102,67,111,108,111,114,0,0,5,0,3,0,11,0,0,0,0,0,0,0,6,0,5,0,11,0,0,0,0,0,0,0,67,111,108,111,114,0,0,0,6,0,4,0,11,0,0,0,1,0,0,0,85,86,0,0,5,0,3,0,13,0,0,0,73,110,0,0,5,
- 0,5,0,22,0,0,0,115,84,101,120,116,117,114,101,0,0,0,0,71,0,4,0,9,0,0,0,30,0,0,0,0,0,0,0,71,0,4,0,13,0,0,0,30,0,0,0,0,0,0,0,71,0,4,0,22,0,0,0,33,0,0,0,0,0,0,0,71,0,4,0,22,0,0,0,34,0,
- 0,0,2,0,0,0,19,0,2,0,2,0,0,0,33,0,3,0,3,0,0,0,2,0,0,0,22,0,3,0,6,0,0,0,32,0,0,0,23,0,4,0,7,0,0,0,6,0,0,0,4,0,0,0,32,0,4,0,8,0,0,0,3,0,0,0,7,0,0,0,59,0,4,0,8,0,0,0,9,0,0,0,3,0,0,0,23,
- 0,4,0,10,0,0,0,6,0,0,0,2,0,0,0,30,0,4,0,11,0,0,0,7,0,0,0,10,0,0,0,32,0,4,0,12,0,0,0,1,0,0,0,11,0,0,0,59,0,4,0,12,0,0,0,13,0,0,0,1,0,0,0,21,0,4,0,14,0,0,0,32,0,0,0,1,0,0,0,43,0,4,0,
- 14,0,0,0,15,0,0,0,0,0,0,0,32,0,4,0,16,0,0,0,1,0,0,0,7,0,0,0,25,0,9,0,19,0,0,0,6,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,27,0,3,0,20,0,0,0,19,0,0,0,32,0,4,0,21,0,0,0,0,
- 0,0,0,20,0,0,0,59,0,4,0,21,0,0,0,22,0,0,0,0,0,0,0,43,0,4,0,14,0,0,0,24,0,0,0,1,0,0,0,32,0,4,0,25,0,0,0,1,0,0,0,10,0,0,0,54,0,5,0,2,0,0,0,4,0,0,0,0,0,0,0,3,0,0,0,248,0,2,0,5,0,0,0,65,
- 0,5,0,16,0,0,0,17,0,0,0,13,0,0,0,15,0,0,0,61,0,4,0,7,0,0,0,18,0,0,0,17,0,0,0,61,0,4,0,20,0,0,0,23,0,0,0,22,0,0,0,65,0,5,0,25,0,0,0,26,0,0,0,13,0,0,0,24,0,0,0,61,0,4,0,10,0,0,0,27,0,
- 0,0,26,0,0,0,87,0,5,0,7,0,0,0,28,0,0,0,23,0,0,0,27,0,0,0,133,0,5,0,7,0,0,0,29,0,0,0,18,0,0,0,28,0,0,0,62,0,3,0,9,0,0,0,29,0,0,0,253,0,1,0,56,0,1,0,
-};
-
-const uint8_t dxbc_vertex[1064] = {
- 68,88,66,67,32,50,127,204,241,196,165,104,216,114,216,116,220,164,29,45,1,0,0,0,40,4,0,0,5,0,0,0,52,0,0,0,136,1,0,0,236,1,0,0,92,2,0,0,140,3,0,0,82,68,69,70,76,1,0,0,1,0,0,0,116,0,
- 0,0,1,0,0,0,60,0,0,0,1,5,254,255,0,5,0,0,34,1,0,0,19,19,68,37,60,0,0,0,24,0,0,0,40,0,0,0,40,0,0,0,36,0,0,0,12,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
- 0,1,0,0,0,1,0,0,0,0,0,0,0,117,80,117,115,104,67,111,110,115,116,97,110,116,0,171,171,100,0,0,0,2,0,0,0,140,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,220,0,0,0,0,0,0,0,8,0,0,0,2,0,0,0,240,0,0,
- 0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,20,1,0,0,8,0,0,0,8,0,0,0,2,0,0,0,240,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,112,99,95,117,83,99,97,
- 108,101,0,102,108,111,97,116,50,0,171,171,171,1,0,3,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,0,0,112,99,95,117,84,114,97,110,115,108,97,116,101,0,77,105,99,114,
- 111,115,111,102,116,32,40,82,41,32,72,76,83,76,32,83,104,97,100,101,114,32,67,111,109,112,105,108,101,114,32,49,48,46,49,0,171,171,73,83,71,78,92,0,0,0,3,0,0,0,8,0,0,0,80,0,0,0,0,0,
- 0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,3,0,0,80,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,3,3,0,0,80,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,15,15,0,0,84,69,88,67,79,79,82,68,0,171,171,171,79,83,
- 71,78,104,0,0,0,3,0,0,0,8,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,15,0,0,0,80,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,3,12,0,0,89,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,15,0,0,
- 0,84,69,88,67,79,79,82,68,0,83,86,95,80,111,115,105,116,105,111,110,0,171,171,171,83,72,69,88,40,1,0,0,81,0,1,0,74,0,0,0,106,8,0,1,89,0,0,7,70,142,48,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
- 0,0,1,0,0,0,95,0,0,3,50,16,16,0,0,0,0,0,95,0,0,3,50,16,16,0,1,0,0,0,95,0,0,3,242,16,16,0,2,0,0,0,101,0,0,3,242,32,16,0,0,0,0,0,101,0,0,3,50,32,16,0,1,0,0,0,103,0,0,4,242,32,16,0,2,
- 0,0,0,1,0,0,0,104,0,0,2,1,0,0,0,50,0,0,13,50,0,16,0,0,0,0,0,70,16,16,0,0,0,0,0,70,128,48,0,0,0,0,0,0,0,0,0,0,0,0,0,230,138,48,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0,6,34,32,16,0,2,0,0,0,
- 26,0,16,128,65,0,0,0,0,0,0,0,54,0,0,5,242,32,16,0,0,0,0,0,70,30,16,0,2,0,0,0,54,0,0,5,18,32,16,0,2,0,0,0,10,0,16,0,0,0,0,0,54,0,0,8,194,32,16,0,2,0,0,0,2,64,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,128,63,54,0,0,5,50,32,16,0,1,0,0,0,70,16,16,0,1,0,0,0,62,0,0,1,83,84,65,84,148,0,0,0,7,0,0,0,1,0,0,0,0,0,0,0,6,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-const uint8_t dxbc_fragment[744] = {
- 68,88,66,67,235,219,43,109,38,151,39,223,98,41,193,28,215,98,67,110,1,0,0,0,232,2,0,0,5,0,0,0,52,0,0,0,12,1,0,0,88,1,0,0,140,1,0,0,76,2,0,0,82,68,69,70,208,0,0,0,0,0,0,0,0,0,0,0,2,
- 0,0,0,60,0,0,0,1,5,255,255,0,5,0,0,167,0,0,0,19,19,68,37,60,0,0,0,24,0,0,0,40,0,0,0,40,0,0,0,36,0,0,0,12,0,0,0,0,0,0,0,140,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
- 0,0,2,0,0,0,0,0,0,0,158,0,0,0,2,0,0,0,5,0,0,0,4,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,12,0,0,0,2,0,0,0,0,0,0,0,95,115,84,101,120,116,117,114,101,95,115,97,109,112,108,101,114,0,115,
- 84,101,120,116,117,114,101,0,77,105,99,114,111,115,111,102,116,32,40,82,41,32,72,76,83,76,32,83,104,97,100,101,114,32,67,111,109,112,105,108,101,114,32,49,48,46,49,0,171,73,83,71,78,
- 68,0,0,0,2,0,0,0,8,0,0,0,56,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,15,15,0,0,56,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,3,3,0,0,84,69,88,67,79,79,82,68,0,171,171,171,79,83,71,78,44,0,
- 0,0,1,0,0,0,8,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,15,0,0,0,83,86,95,84,97,114,103,101,116,0,171,171,83,72,69,88,184,0,0,0,81,0,0,0,46,0,0,0,106,8,0,1,90,0,0,6,70,110,48,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,88,24,0,7,70,126,48,0,0,0,0,0,0,0,0,0,0,0,0,0,85,85,0,0,2,0,0,0,98,16,0,3,242,16,16,0,0,0,0,0,98,16,0,3,50,16,16,0,1,0,0,0,101,0,0,3,242,32,16,0,0,
- 0,0,0,104,0,0,2,1,0,0,0,69,0,0,11,242,0,16,0,0,0,0,0,70,16,16,0,1,0,0,0,70,126,32,0,0,0,0,0,0,0,0,0,0,96,32,0,0,0,0,0,0,0,0,0,56,0,0,7,242,32,16,0,0,0,0,0,70,14,16,0,0,0,0,0,70,30,
- 16,0,0,0,0,0,62,0,0,1,83,84,65,84,148,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-
-#ifdef __APPLE__
-#include <TargetConditionals.h>
-#if TARGET_OS_MAC
-const uint8_t metallib_vertex[3892] = {
- 77,84,76,66,1,128,2,0,7,0,0,129,14,0,0,0,52,15,0,0,0,0,0,0,88,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,219,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,12,1,0,0,0,0,0,0,8,0,0,0,0,0,0,0,20,1,0,0,0,0,0,0,32,
- 14,0,0,0,0,0,0,1,0,0,0,123,0,0,0,78,65,77,69,6,0,109,97,105,110,48,0,84,89,80,69,1,0,0,72,65,83,72,32,0,62,81,190,157,8,240,236,158,164,213,65,62,170,226,96,136,231,243,238,160,100,
- 26,13,254,254,64,19,129,180,3,149,75,77,68,83,90,8,0,32,14,0,0,0,0,0,0,79,70,70,84,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,69,82,83,8,0,2,0,6,0,3,0,1,0,69,78,68,84,
- 69,78,68,84,45,0,0,0,86,65,84,84,24,0,3,0,97,80,111,115,0,0,128,97,85,86,0,1,128,97,67,111,108,111,114,0,2,128,86,65,84,89,5,0,3,0,4,4,6,69,78,68,84,4,0,0,0,69,78,68,84,222,192,23,
- 11,0,0,0,0,20,0,0,0,8,14,0,0,255,255,255,255,66,67,192,222,53,20,0,0,3,0,0,0,98,12,48,36,128,16,5,200,20,0,0,0,33,12,0,0,74,3,0,0,11,2,33,0,2,0,0,0,22,0,0,0,7,129,35,145,65,200,4,73,
- 6,16,50,57,146,1,132,12,37,5,8,25,30,4,139,98,128,16,69,2,66,146,11,66,132,16,50,20,56,8,24,75,10,50,66,136,72,112,196,33,35,68,18,135,140,16,65,146,2,100,200,8,177,20,32,67,70,136,
- 32,201,1,50,66,132,24,42,40,42,144,49,124,176,92,145,32,196,200,0,0,0,137,32,0,0,24,0,0,0,50,34,8,9,32,98,70,0,33,43,36,152,16,33,37,36,152,16,25,39,12,133,164,144,96,66,100,92,32,
- 36,100,130,224,153,1,24,70,32,128,97,4,1,184,67,72,32,37,77,17,37,76,62,149,82,210,193,57,141,52,1,205,148,4,145,65,4,66,48,197,136,68,145,13,4,204,17,128,129,10,228,28,1,40,12,34,
- 8,194,48,2,145,140,0,0,0,0,0,81,24,0,0,100,0,0,0,27,246,35,248,255,255,255,255,1,48,5,192,15,0,56,0,254,0,144,0,10,232,3,34,28,224,1,30,228,225,29,240,161,13,204,161,30,220,97,28,218,
- 192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,128,48,7,121,8,135,118,40,135,54,128,135,119,72,7,119,160,135,114,144,7,32,28,216,129,29,0,162,29,210,193,29,218,128,29,
- 202,225,28,194,129,29,218,192,30,202,97,28,232,225,29,228,161,13,238,33,29,200,129,30,208,1,136,3,57,192,3,96,112,135,119,104,3,113,168,135,116,96,7,122,72,7,119,152,7,128,112,135,
- 119,104,131,116,112,7,115,152,135,54,48,7,120,104,131,118,8,7,122,64,7,128,30,228,161,30,202,1,32,220,225,29,218,192,29,194,193,29,230,161,13,204,1,30,218,160,29,194,129,30,208,1,160,
- 7,121,168,135,114,0,8,119,120,135,54,152,135,116,56,7,119,40,7,114,104,3,125,40,7,121,120,135,121,104,3,115,128,135,54,104,135,112,160,7,116,0,232,65,30,234,161,28,0,194,29,222,161,
- 13,232,65,30,194,1,30,224,33,29,220,225,28,218,160,29,194,129,30,208,1,160,7,121,168,135,114,0,136,121,160,135,112,24,135,117,104,3,120,144,135,119,160,135,114,24,7,122,120,7,121,104,
- 3,113,168,7,115,48,135,114,144,135,54,152,135,116,208,135,114,0,240,0,32,234,193,29,230,33,28,204,161,28,218,192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,96,195,24,8,
- 4,176,0,164,0,84,65,128,4,105,0,13,225,144,14,242,208,6,226,80,15,230,96,14,229,32,15,109,224,14,239,208,6,225,192,14,233,16,14,243,0,0,0,73,24,0,0,1,0,0,0,19,132,64,0,19,176,112,72,
- 7,121,176,3,58,104,131,112,128,7,120,96,135,114,104,131,118,8,135,113,120,135,121,192,135,56,160,3,55,128,3,55,128,131,13,183,81,14,109,0,15,122,96,7,116,160,7,118,64,7,122,96,7,116,
- 208,6,233,16,7,122,128,7,122,128,7,109,144,14,120,160,7,120,160,7,120,208,6,233,16,7,118,160,7,113,96,7,122,16,7,118,208,6,233,48,7,114,160,7,115,32,7,122,48,7,114,208,6,233,96,7,116,
- 160,7,118,64,7,122,96,7,116,208,6,230,48,7,114,160,7,115,32,7,122,48,7,114,208,6,230,96,7,116,160,7,118,64,7,122,96,7,116,208,6,246,16,7,118,160,7,113,96,7,122,16,7,118,208,6,246,32,
- 7,116,160,7,115,32,7,122,48,7,114,208,6,246,48,7,114,160,7,115,32,7,122,48,7,114,208,6,246,64,7,120,160,7,118,64,7,122,96,7,116,208,6,246,96,7,116,160,7,118,64,7,122,96,7,116,208,6,
- 246,144,7,118,160,7,113,32,7,120,160,7,113,32,7,120,208,6,246,16,7,114,128,7,122,16,7,114,128,7,122,16,7,114,128,7,109,96,15,113,144,7,114,160,7,114,80,7,118,160,7,114,80,7,118,208,
- 6,246,32,7,117,96,7,122,32,7,117,96,7,122,32,7,117,96,7,109,96,15,117,16,7,114,160,7,117,16,7,114,160,7,117,16,7,114,208,6,246,16,7,112,32,7,116,160,7,113,0,7,114,64,7,122,16,7,112,
- 32,7,116,208,6,238,128,7,122,16,7,118,160,7,115,32,7,26,33,12,89,48,0,210,208,67,42,160,48,0,0,8,0,0,0,4,0,0,0,0,0,10,64,98,131,64,81,166,1,0,128,44,16,0,11,0,0,0,50,30,152,16,25,17,
- 76,144,140,9,38,71,198,4,67,202,34,40,129,66,40,135,242,41,64,129,130,40,144,98,24,1,40,3,218,17,0,210,177,132,39,0,0,0,177,24,0,0,165,0,0,0,51,8,128,28,196,225,28,102,20,1,61,136,
- 67,56,132,195,140,66,128,7,121,120,7,115,152,113,12,230,0,15,237,16,14,244,128,14,51,12,66,30,194,193,29,206,161,28,102,48,5,61,136,67,56,132,131,27,204,3,61,200,67,61,140,3,61,204,
- 120,140,116,112,7,123,8,7,121,72,135,112,112,7,122,112,3,118,120,135,112,32,135,25,204,17,14,236,144,14,225,48,15,110,48,15,227,240,14,240,80,14,51,16,196,29,222,33,28,216,33,29,194,
- 97,30,102,48,137,59,188,131,59,208,67,57,180,3,60,188,131,60,132,3,59,204,240,20,118,96,7,123,104,7,55,104,135,114,104,7,55,128,135,112,144,135,112,96,7,118,40,7,118,248,5,118,120,
- 135,119,128,135,95,8,135,113,24,135,114,152,135,121,152,129,44,238,240,14,238,224,14,245,192,14,236,48,3,98,200,161,28,228,161,28,204,161,28,228,161,28,220,97,28,202,33,28,196,129,
- 29,202,97,6,214,144,67,57,200,67,57,152,67,57,200,67,57,184,195,56,148,67,56,136,3,59,148,195,47,188,131,60,252,130,59,212,3,59,176,195,12,199,105,135,112,88,135,114,112,131,116,104,
- 7,120,96,135,116,24,135,116,160,135,25,206,83,15,238,0,15,242,80,14,228,144,14,227,64,15,225,32,14,236,80,14,51,32,40,29,220,193,30,194,65,30,210,33,28,220,129,30,220,224,28,228,225,
- 29,234,1,30,102,24,81,56,176,67,58,156,131,59,204,80,36,118,96,7,123,104,7,55,96,135,119,120,7,120,152,81,76,244,144,15,240,80,14,51,30,106,30,202,97,28,232,33,29,222,193,29,126,1,
- 30,228,161,28,204,33,29,240,97,6,84,133,131,56,204,195,59,176,67,61,208,67,57,252,194,60,228,67,59,136,195,59,176,195,140,197,10,135,121,152,135,119,24,135,116,8,7,122,40,7,114,152,
- 129,92,227,16,14,236,192,14,229,80,14,243,48,35,193,210,65,30,228,225,23,216,225,29,222,1,30,102,72,25,59,176,131,61,180,131,27,132,195,56,140,67,57,204,195,60,184,193,57,200,195,59,
- 212,3,60,204,72,180,113,8,7,118,96,7,113,8,135,113,88,135,25,219,198,14,236,96,15,237,224,6,240,32,15,229,48,15,229,32,15,246,80,14,110,16,14,227,48,14,229,48,15,243,224,6,233,224,
- 14,228,80,14,248,48,35,226,236,97,28,194,129,29,216,225,23,236,33,29,230,33,29,196,33,29,216,33,29,232,33,31,102,32,157,59,188,67,61,184,3,57,148,131,57,204,88,188,112,112,7,119,120,
- 7,122,8,7,122,72,135,119,112,135,25,206,135,14,229,16,14,240,16,14,236,192,14,239,48,14,243,144,14,244,80,14,51,40,48,8,135,116,144,7,55,48,135,122,112,135,113,160,135,116,120,7,119,
- 248,133,115,144,135,119,168,7,120,152,7,0,0,0,0,121,32,0,0,26,1,0,0,114,30,72,32,67,136,12,25,9,114,50,72,32,35,129,140,145,145,209,68,160,16,40,100,60,49,50,66,142,144,33,163,152,
- 6,100,208,82,0,0,0,139,210,88,216,6,109,80,28,20,27,71,6,209,18,25,76,178,24,6,179,64,18,49,24,202,131,68,148,161,68,87,35,0,0,0,0,83,68,75,32,86,101,114,115,105,111,110,119,99,104,
- 97,114,95,115,105,122,101,102,114,97,109,101,45,112,111,105,110,116,101,114,97,105,114,46,109,97,120,95,100,101,118,105,99,101,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,
- 95,99,111,110,115,116,97,110,116,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,104,114,101,97,100,103,114,111,117,112,95,98,117,102,102,101,114,115,97,105,114,46,109,
- 97,120,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,114,101,97,100,95,119,114,105,116,101,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,115,97,109,
- 112,108,101,114,115,65,112,112,108,101,32,109,101,116,97,108,32,118,101,114,115,105,111,110,32,51,50,48,50,51,46,51,54,56,32,40,109,101,116,97,108,102,101,45,51,50,48,50,51,46,51,54,
- 56,41,77,101,116,97,108,97,105,114,46,99,111,109,112,105,108,101,46,100,101,110,111,114,109,115,95,100,105,115,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,97,115,
- 116,95,109,97,116,104,95,101,110,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,114,97,109,101,98,117,102,102,101,114,95,102,101,116,99,104,95,101,110,97,98,108,101,
- 97,105,114,46,118,101,114,116,101,120,95,111,117,116,112,117,116,117,115,101,114,40,108,111,99,110,48,41,97,105,114,46,97,114,103,95,116,121,112,101,95,110,97,109,101,102,108,111,97,
- 116,52,97,105,114,46,97,114,103,95,110,97,109,101,79,117,116,95,67,111,108,111,114,117,115,101,114,40,108,111,99,110,49,41,102,108,111,97,116,50,79,117,116,95,85,86,97,105,114,46,112,
- 111,115,105,116,105,111,110,103,108,95,80,111,115,105,116,105,111,110,97,105,114,46,118,101,114,116,101,120,95,105,110,112,117,116,97,105,114,46,108,111,99,97,116,105,111,110,95,105,
- 110,100,101,120,97,80,111,115,97,85,86,97,67,111,108,111,114,97,105,114,46,98,117,102,102,101,114,97,105,114,46,98,117,102,102,101,114,95,115,105,122,101,97,105,114,46,114,101,97,100,
- 97,105,114,46,97,100,100,114,101,115,115,95,115,112,97,99,101,97,105,114,46,115,116,114,117,99,116,95,116,121,112,101,95,105,110,102,111,117,83,99,97,108,101,117,84,114,97,110,115,
- 108,97,116,101,97,105,114,46,97,114,103,95,116,121,112,101,95,115,105,122,101,97,105,114,46,97,114,103,95,116,121,112,101,95,97,108,105,103,110,95,115,105,122,101,117,80,117,115,104,
- 67,111,110,115,116,97,110,116,112,99,0,0,0,166,119,0,0,0,0,0,0,48,130,144,4,35,8,74,51,130,144,8,35,8,201,48,130,144,16,35,8,73,49,130,144,24,35,8,201,49,130,144,32,35,8,73,50,130,
- 144,40,35,8,201,50,130,112,0,51,12,106,16,172,193,12,3,27,8,109,48,195,224,6,131,26,204,48,184,1,241,6,51,12,110,80,188,193,12,131,27,24,111,48,195,224,6,7,28,204,48,184,1,18,7,51,
- 12,110,144,200,193,12,129,50,195,160,6,115,64,7,51,16,75,29,176,1,29,204,16,48,51,4,205,12,129,51,131,241,64,145,52,81,51,24,79,21,89,211,53,67,129,69,210,148,205,48,152,194,41,160,
- 194,12,9,29,104,27,29,176,65,100,77,220,12,9,27,104,27,27,176,65,100,77,221,12,137,26,104,155,26,176,65,36,77,222,12,10,29,196,1,29,88,100,16,7,113,64,7,86,25,204,64,213,193,7,6,114,
- 176,209,1,27,132,129,24,168,193,24,180,130,25,200,193,25,196,65,132,6,83,26,204,64,168,194,42,176,130,43,204,48,216,65,42,188,194,157,1,192,113,28,199,113,28,199,113,28,199,185,129,
- 27,184,129,27,184,129,27,184,129,27,184,129,69,7,122,96,89,22,29,208,129,27,208,1,46,224,2,46,240,3,122,128,130,140,4,38,40,35,54,54,187,54,151,182,55,178,58,182,50,23,51,182,176,179,
- 185,81,18,59,184,3,60,200,3,61,216,3,62,232,3,63,72,133,141,205,174,205,37,141,172,204,141,110,148,224,15,114,9,75,147,115,177,43,147,155,75,123,115,27,37,0,133,164,194,210,228,92,
- 216,194,220,206,234,194,206,202,190,236,202,228,230,210,222,220,70,9,66,33,167,176,52,57,151,177,183,54,184,52,182,178,175,55,56,186,180,55,183,185,81,6,81,24,5,82,72,37,44,77,206,
- 197,174,76,142,174,12,111,148,224,21,0,0,0,169,24,0,0,37,0,0,0,11,10,114,40,135,119,128,7,122,88,112,152,67,61,184,195,56,176,67,57,208,195,130,230,28,198,161,13,232,65,30,194,193,
- 29,230,33,29,232,33,29,222,193,29,22,52,227,96,14,231,80,15,225,32,15,228,64,15,225,32,15,231,80,14,244,176,128,129,7,121,40,135,112,96,7,118,120,135,113,8,7,122,40,7,114,88,112,156,
- 195,56,180,1,59,164,131,61,148,195,2,107,28,216,33,28,220,225,28,220,32,28,228,97,28,220,32,28,232,129,30,194,97,28,208,161,28,200,97,28,194,129,29,216,97,193,1,15,244,32,15,225,80,
- 15,244,128,14,0,0,0,0,209,16,0,0,6,0,0,0,7,204,60,164,131,59,156,3,59,148,3,61,160,131,60,148,67,56,144,195,1,0,0,0,97,32,0,0,68,0,0,0,19,4,65,44,16,0,0,0,11,0,0,0,148,51,0,180,37,
- 64,61,7,161,72,146,52,7,161,72,9,65,48,26,48,2,48,70,0,130,32,136,127,20,115,16,150,117,97,36,163,1,52,51,0,0,0,0,0,241,48,0,0,32,0,0,0,34,71,200,144,81,18,196,43,0,0,0,0,207,115,89,
- 0,111,109,110,105,112,111,116,101,110,116,32,99,104,97,114,83,105,109,112,108,101,32,67,43,43,32,84,66,65,65,97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,115,40,109,97,105,
- 110,48,41,97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,45,97,114,103,40,51,41,0,19,132,133,89,33,216,194,44,172,24,110,193,22,104,97,67,32,11,27,134,88,192,133,90,216,48,228,
- 66,46,212,194,134,224,22,0,0,157,134,5,146,40,16,130,1,36,254,157,6,103,234,40,16,130,67,0,254,131,12,1,226,12,50,4,138,51,134,48,68,22,128,255,28,195,16,76,179,13,204,5,204,54,4,89,
- 48,219,16,12,194,6,1,49,0,4,0,0,0,91,138,32,200,133,67,23,182,20,68,144,11,135,46,0,0,0,0,0,0,113,32,0,0,3,0,0,0,50,14,16,34,132,0,134,6,0,0,0,0,0,0,0,0,101,12,0,0,31,0,0,0,18,3,148,
- 240,0,0,0,0,3,0,0,0,5,0,0,0,9,0,0,0,76,0,0,0,1,0,0,0,88,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,112,0,0,0,0,0,0,0,14,0,0,0,24,0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,
- 1,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,255,255,255,255,0,36,0,0,0,0,0,0,93,12,0,0,13,0,0,0,18,3,148,102,0,0,0,0,109,97,105,110,48,51,50,48,50,51,46,51,54,56,97,105,114,54,
- 52,45,97,112,112,108,101,45,109,97,99,111,115,120,49,52,46,48,46,48,0,0,0,0,0,0,0,0,0,0,
-};
-const uint8_t metallib_fragment[3787] = {
- 77,84,76,66,1,128,2,0,7,0,0,129,14,0,0,0,203,14,0,0,0,0,0,0,88,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,219,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,227,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,
- 224,13,0,0,0,0,0,0,1,0,0,0,123,0,0,0,78,65,77,69,6,0,109,97,105,110,48,0,84,89,80,69,1,0,1,72,65,83,72,32,0,201,103,233,140,10,95,185,107,79,93,85,82,78,218,248,8,95,184,8,139,191,
- 155,174,56,51,95,203,135,255,117,44,62,77,68,83,90,8,0,224,13,0,0,0,0,0,0,79,70,70,84,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,69,82,83,8,0,2,0,6,0,3,0,1,0,69,78,68,
- 84,69,78,68,84,4,0,0,0,69,78,68,84,4,0,0,0,69,78,68,84,222,192,23,11,0,0,0,0,20,0,0,0,196,13,0,0,255,255,255,255,66,67,192,222,53,20,0,0,3,0,0,0,98,12,48,36,128,16,5,200,20,0,0,0,33,
- 12,0,0,44,3,0,0,11,2,33,0,2,0,0,0,22,0,0,0,7,129,35,145,65,200,4,73,6,16,50,57,146,1,132,12,37,5,8,25,30,4,139,98,128,20,69,2,66,146,11,66,164,16,50,20,56,8,24,75,10,50,82,136,72,112,
- 196,33,35,68,18,135,140,16,65,146,2,100,200,8,177,20,32,67,70,136,32,201,1,50,82,132,24,42,40,42,144,49,124,176,92,145,32,197,200,0,0,0,137,32,0,0,31,0,0,0,50,34,72,9,32,98,70,0,33,
- 43,36,152,20,33,37,36,152,20,25,39,12,133,164,144,96,82,100,92,32,36,101,130,128,154,1,24,70,32,128,27,132,97,4,1,64,74,154,34,74,152,252,127,34,174,137,138,136,223,30,254,105,140,
- 0,24,68,32,2,140,164,41,162,132,201,255,37,128,121,22,34,250,167,49,2,96,16,193,16,76,33,194,40,135,208,28,1,114,132,160,230,8,130,57,2,48,24,70,16,26,163,172,114,6,115,12,128,70,111,
- 32,64,5,218,8,0,0,81,24,0,0,105,0,0,0,27,246,35,248,255,255,255,255,1,104,3,96,13,0,83,0,252,0,144,128,10,232,3,34,28,224,1,30,228,225,29,240,161,13,204,161,30,220,97,28,218,192,28,
- 224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,128,48,7,121,8,135,118,40,135,54,128,135,119,72,7,119,160,135,114,144,7,32,28,216,129,29,0,162,29,210,193,29,218,128,29,202,225,
- 28,194,129,29,218,192,30,202,97,28,232,225,29,228,161,13,238,33,29,200,129,30,208,1,136,3,57,192,3,96,112,135,119,104,3,113,168,135,116,96,7,122,72,7,119,152,7,128,112,135,119,104,
- 131,116,112,7,115,152,135,54,48,7,120,104,131,118,8,7,122,64,7,128,30,228,161,30,202,1,32,220,225,29,218,192,29,194,193,29,230,161,13,204,1,30,218,160,29,194,129,30,208,1,160,7,121,
- 168,135,114,0,8,119,120,135,54,152,135,116,56,7,119,40,7,114,104,3,125,40,7,121,120,135,121,104,3,115,128,135,54,104,135,112,160,7,116,0,232,65,30,234,161,28,0,194,29,222,161,13,232,
- 65,30,194,1,30,224,33,29,220,225,28,218,160,29,194,129,30,208,1,160,7,121,168,135,114,0,136,121,160,135,112,24,135,117,104,3,120,144,135,119,160,135,114,24,7,122,120,7,121,104,3,113,
- 168,7,115,48,135,114,144,135,54,152,135,116,208,135,114,0,240,0,32,234,193,29,230,33,28,204,161,28,218,192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,96,131,33,12,192,
- 2,84,27,140,129,0,22,160,218,0,17,255,255,255,255,63,0,109,0,172,1,96,10,128,31,0,18,80,1,125,176,193,40,2,96,1,170,13,134,33,0,11,80,109,96,142,255,255,255,255,31,128,54,0,214,0,144,
- 128,10,232,3,0,73,24,0,0,4,0,0,0,19,134,64,24,38,12,68,97,76,24,142,194,0,0,0,0,19,176,112,72,7,121,176,3,58,104,131,112,128,7,120,96,135,114,104,131,118,8,135,113,120,135,121,192,
- 135,56,160,3,55,128,3,55,128,131,13,183,81,14,109,0,15,122,96,7,116,160,7,118,64,7,122,96,7,116,208,6,233,16,7,122,128,7,122,128,7,109,144,14,120,160,7,120,160,7,120,208,6,233,16,7,
- 118,160,7,113,96,7,122,16,7,118,208,6,233,48,7,114,160,7,115,32,7,122,48,7,114,208,6,233,96,7,116,160,7,118,64,7,122,96,7,116,208,6,230,48,7,114,160,7,115,32,7,122,48,7,114,208,6,230,
- 96,7,116,160,7,118,64,7,122,96,7,116,208,6,246,16,7,118,160,7,113,96,7,122,16,7,118,208,6,246,32,7,116,160,7,115,32,7,122,48,7,114,208,6,246,48,7,114,160,7,115,32,7,122,48,7,114,208,
- 6,246,64,7,120,160,7,118,64,7,122,96,7,116,208,6,246,96,7,116,160,7,118,64,7,122,96,7,116,208,6,246,144,7,118,160,7,113,32,7,120,160,7,113,32,7,120,208,6,246,16,7,114,128,7,122,16,
- 7,114,128,7,122,16,7,114,128,7,109,96,15,113,144,7,114,160,7,114,80,7,118,160,7,114,80,7,118,208,6,246,32,7,117,96,7,122,32,7,117,96,7,122,32,7,117,96,7,109,96,15,117,16,7,114,160,
- 7,117,16,7,114,160,7,117,16,7,114,208,6,246,16,7,112,32,7,116,160,7,113,0,7,114,64,7,122,16,7,112,32,7,116,208,6,238,128,7,122,16,7,118,160,7,115,32,7,26,33,12,89,48,0,210,208,67,42,
- 160,64,0,0,8,0,0,0,4,0,0,0,0,0,10,96,72,85,108,15,16,0,2,0,0,128,0,0,0,0,0,64,1,72,108,16,40,234,50,0,0,144,5,2,0,0,0,10,0,0,0,50,30,152,16,25,17,76,144,140,9,38,71,198,4,67,106,69,
- 80,2,133,80,14,229,83,128,2,5,81,32,197,48,2,80,6,36,199,18,158,0,0,177,24,0,0,165,0,0,0,51,8,128,28,196,225,28,102,20,1,61,136,67,56,132,195,140,66,128,7,121,120,7,115,152,113,12,
- 230,0,15,237,16,14,244,128,14,51,12,66,30,194,193,29,206,161,28,102,48,5,61,136,67,56,132,131,27,204,3,61,200,67,61,140,3,61,204,120,140,116,112,7,123,8,7,121,72,135,112,112,7,122,
- 112,3,118,120,135,112,32,135,25,204,17,14,236,144,14,225,48,15,110,48,15,227,240,14,240,80,14,51,16,196,29,222,33,28,216,33,29,194,97,30,102,48,137,59,188,131,59,208,67,57,180,3,60,
- 188,131,60,132,3,59,204,240,20,118,96,7,123,104,7,55,104,135,114,104,7,55,128,135,112,144,135,112,96,7,118,40,7,118,248,5,118,120,135,119,128,135,95,8,135,113,24,135,114,152,135,121,
- 152,129,44,238,240,14,238,224,14,245,192,14,236,48,3,98,200,161,28,228,161,28,204,161,28,228,161,28,220,97,28,202,33,28,196,129,29,202,97,6,214,144,67,57,200,67,57,152,67,57,200,67,
- 57,184,195,56,148,67,56,136,3,59,148,195,47,188,131,60,252,130,59,212,3,59,176,195,12,199,105,135,112,88,135,114,112,131,116,104,7,120,96,135,116,24,135,116,160,135,25,206,83,15,238,
- 0,15,242,80,14,228,144,14,227,64,15,225,32,14,236,80,14,51,32,40,29,220,193,30,194,65,30,210,33,28,220,129,30,220,224,28,228,225,29,234,1,30,102,24,81,56,176,67,58,156,131,59,204,80,
- 36,118,96,7,123,104,7,55,96,135,119,120,7,120,152,81,76,244,144,15,240,80,14,51,30,106,30,202,97,28,232,33,29,222,193,29,126,1,30,228,161,28,204,33,29,240,97,6,84,133,131,56,204,195,
- 59,176,67,61,208,67,57,252,194,60,228,67,59,136,195,59,176,195,140,197,10,135,121,152,135,119,24,135,116,8,7,122,40,7,114,152,129,92,227,16,14,236,192,14,229,80,14,243,48,35,193,210,
- 65,30,228,225,23,216,225,29,222,1,30,102,72,25,59,176,131,61,180,131,27,132,195,56,140,67,57,204,195,60,184,193,57,200,195,59,212,3,60,204,72,180,113,8,7,118,96,7,113,8,135,113,88,
- 135,25,219,198,14,236,96,15,237,224,6,240,32,15,229,48,15,229,32,15,246,80,14,110,16,14,227,48,14,229,48,15,243,224,6,233,224,14,228,80,14,248,48,35,226,236,97,28,194,129,29,216,225,
- 23,236,33,29,230,33,29,196,33,29,216,33,29,232,33,31,102,32,157,59,188,67,61,184,3,57,148,131,57,204,88,188,112,112,7,119,120,7,122,8,7,122,72,135,119,112,135,25,206,135,14,229,16,
- 14,240,16,14,236,192,14,239,48,14,243,144,14,244,80,14,51,40,48,8,135,116,144,7,55,48,135,122,112,135,113,160,135,116,120,7,119,248,133,115,144,135,119,168,7,120,152,7,0,0,0,0,121,
- 32,0,0,252,0,0,0,114,30,72,32,67,136,12,25,9,114,50,72,32,35,129,140,145,145,209,68,160,16,40,100,60,49,50,66,142,144,33,163,56,6,220,41,1,0,0,0,139,210,88,216,6,109,80,28,20,27,71,
- 6,81,100,48,134,180,40,15,178,24,197,34,41,24,178,28,13,83,68,75,32,86,101,114,115,105,111,110,119,99,104,97,114,95,115,105,122,101,102,114,97,109,101,45,112,111,105,110,116,101,114,
- 97,105,114,46,109,97,120,95,100,101,118,105,99,101,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,99,111,110,115,116,97,110,116,95,98,117,102,102,101,114,115,97,105,114,
- 46,109,97,120,95,116,104,114,101,97,100,103,114,111,117,112,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,114,
- 101,97,100,95,119,114,105,116,101,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,115,97,109,112,108,101,114,115,65,112,112,108,101,32,109,101,116,97,108,32,118,101,
- 114,115,105,111,110,32,51,50,48,50,51,46,51,54,56,32,40,109,101,116,97,108,102,101,45,51,50,48,50,51,46,51,54,56,41,77,101,116,97,108,97,105,114,46,99,111,109,112,105,108,101,46,100,
- 101,110,111,114,109,115,95,100,105,115,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,97,115,116,95,109,97,116,104,95,101,110,97,98,108,101,97,105,114,46,99,111,109,
- 112,105,108,101,46,102,114,97,109,101,98,117,102,102,101,114,95,102,101,116,99,104,95,101,110,97,98,108,101,97,105,114,46,114,101,110,100,101,114,95,116,97,114,103,101,116,97,105,114,
- 46,97,114,103,95,116,121,112,101,95,110,97,109,101,102,108,111,97,116,52,97,105,114,46,97,114,103,95,110,97,109,101,102,67,111,108,111,114,97,105,114,46,102,114,97,103,109,101,110,
- 116,95,105,110,112,117,116,117,115,101,114,40,108,111,99,110,48,41,97,105,114,46,99,101,110,116,101,114,97,105,114,46,112,101,114,115,112,101,99,116,105,118,101,73,110,95,67,111,108,
- 111,114,117,115,101,114,40,108,111,99,110,49,41,102,108,111,97,116,50,73,110,95,85,86,97,105,114,46,116,101,120,116,117,114,101,97,105,114,46,108,111,99,97,116,105,111,110,95,105,110,
- 100,101,120,97,105,114,46,115,97,109,112,108,101,116,101,120,116,117,114,101,50,100,60,102,108,111,97,116,44,32,115,97,109,112,108,101,62,115,84,101,120,116,117,114,101,97,105,114,
- 46,115,97,109,112,108,101,114,115,97,109,112,108,101,114,115,84,101,120,116,117,114,101,83,109,112,108,114,0,198,96,0,0,0,0,0,0,48,130,208,8,35,8,82,51,130,208,12,35,8,13,49,130,208,
- 20,35,8,141,49,130,208,28,35,8,13,50,130,208,36,35,8,141,50,130,208,44,35,8,13,51,130,144,0,51,12,100,16,148,193,12,131,25,8,103,48,195,128,6,3,25,204,48,160,1,145,6,51,12,104,80,164,
- 193,12,3,26,24,105,48,195,128,6,135,26,204,48,160,1,178,6,51,12,104,144,176,193,12,129,50,195,64,6,109,224,6,51,16,203,27,152,129,27,204,16,48,51,4,205,12,129,51,195,241,184,129,27,
- 64,145,52,205,16,128,194,12,137,27,80,149,117,65,145,132,205,144,152,1,149,89,23,164,73,219,12,10,25,112,157,27,152,129,7,125,18,24,204,144,188,65,24,116,110,96,6,144,24,72,99,48,3,
- 33,10,163,64,10,165,48,195,0,7,161,96,10,71,6,0,199,113,28,199,113,28,199,113,28,231,6,110,224,6,110,224,6,110,224,6,110,224,6,22,29,232,129,101,89,166,192,177,2,43,144,131,58,128,
- 130,140,4,38,40,35,54,54,187,54,151,182,55,178,58,182,50,23,51,182,176,179,185,81,18,56,136,3,57,152,3,58,168,3,59,184,3,60,72,133,141,205,174,205,37,141,172,204,141,110,148,32,15,
- 114,9,75,147,115,177,43,147,155,75,123,115,27,37,208,131,164,194,210,228,92,216,194,220,206,234,194,206,202,190,236,202,228,230,210,222,220,70,9,246,32,167,176,52,57,151,177,183,54,
- 184,52,182,178,175,55,56,186,180,55,183,185,81,6,62,232,3,63,72,38,44,77,206,197,76,46,236,172,173,204,141,110,148,192,20,0,0,0,0,169,24,0,0,37,0,0,0,11,10,114,40,135,119,128,7,122,
- 88,112,152,67,61,184,195,56,176,67,57,208,195,130,230,28,198,161,13,232,65,30,194,193,29,230,33,29,232,33,29,222,193,29,22,52,227,96,14,231,80,15,225,32,15,228,64,15,225,32,15,231,
- 80,14,244,176,128,129,7,121,40,135,112,96,7,118,120,135,113,8,7,122,40,7,114,88,112,156,195,56,180,1,59,164,131,61,148,195,2,107,28,216,33,28,220,225,28,220,32,28,228,97,28,220,32,
- 28,232,129,30,194,97,28,208,161,28,200,97,28,194,129,29,216,97,193,1,15,244,32,15,225,80,15,244,128,14,0,0,0,0,209,16,0,0,6,0,0,0,7,204,60,164,131,59,156,3,59,148,3,61,160,131,60,148,
- 67,56,144,195,1,0,0,0,97,32,0,0,49,0,0,0,19,4,65,44,16,0,0,0,4,0,0,0,196,106,96,4,128,220,8,0,129,17,0,18,51,0,0,0,241,48,0,0,28,0,0,0,34,71,200,144,81,14,196,42,0,0,0,0,23,134,1,0,
- 97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,115,40,109,97,105,110,48,41,97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,45,115,97,109,112,108,101,114,115,97,105,114,
- 45,97,108,105,97,115,45,115,99,111,112,101,45,116,101,120,116,117,114,101,115,0,43,132,85,64,133,21,3,43,172,66,42,172,24,90,97,21,84,97,131,208,10,172,0,0,35,6,205,16,130,96,240,88,
- 135,129,20,3,33,8,204,104,66,0,96,176,136,255,108,3,17,0,27,4,196,0,0,0,2,0,0,0,91,6,224,104,5,0,0,0,0,0,0,0,113,32,0,0,3,0,0,0,50,14,16,34,132,0,251,5,0,0,0,0,0,0,0,0,101,12,0,0,37,
- 0,0,0,18,3,148,40,1,0,0,0,3,0,0,0,32,0,0,0,9,0,0,0,76,0,0,0,1,0,0,0,88,0,0,0,0,0,0,0,88,0,0,0,2,0,0,0,136,0,0,0,0,0,0,0,41,0,0,0,24,0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,136,0,0,0,
- 0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,255,255,255,255,0,36,0,0,5,0,0,0,27,0,0,0,5,0,0,0,27,0,0,0,255,255,255,255,8,36,0,0,0,0,0,0,93,12,0,0,20,0,0,0,18,3,
- 148,161,0,0,0,0,109,97,105,110,48,97,105,114,46,115,97,109,112,108,101,95,116,101,120,116,117,114,101,95,50,100,46,118,52,102,51,50,51,50,48,50,51,46,51,54,56,97,105,114,54,52,45,97,
- 112,112,108,101,45,109,97,99,111,115,120,49,52,46,48,46,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-#elif TARGET_OS_IPHONE
-const uint8_t metallib_vertex[3876] = {
- 77,84,76,66,1,0,2,0,7,0,0,130,18,0,1,0,36,15,0,0,0,0,0,0,88,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,219,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,12,1,0,0,0,0,0,0,8,0,0,0,0,0,0,0,20,1,0,0,0,0,0,0,16,
- 14,0,0,0,0,0,0,1,0,0,0,123,0,0,0,78,65,77,69,6,0,109,97,105,110,48,0,84,89,80,69,1,0,0,72,65,83,72,32,0,240,54,230,217,232,66,102,78,35,5,77,235,101,252,229,192,148,96,126,162,111,
- 77,253,247,211,52,17,198,182,137,68,244,77,68,83,90,8,0,16,14,0,0,0,0,0,0,79,70,70,84,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,69,82,83,8,0,2,0,7,0,3,0,2,0,69,78,68,
- 84,69,78,68,84,45,0,0,0,86,65,84,84,24,0,3,0,97,80,111,115,0,0,128,97,85,86,0,1,128,97,67,111,108,111,114,0,2,128,86,65,84,89,5,0,3,0,4,4,6,69,78,68,84,4,0,0,0,69,78,68,84,222,192,
- 23,11,0,0,0,0,20,0,0,0,252,13,0,0,255,255,255,255,66,67,192,222,53,20,0,0,3,0,0,0,98,12,48,36,128,16,5,200,20,0,0,0,33,12,0,0,72,3,0,0,11,2,33,0,2,0,0,0,22,0,0,0,7,129,35,145,65,200,
- 4,73,6,16,50,57,146,1,132,12,37,5,8,25,30,4,139,98,128,16,69,2,66,146,11,66,132,16,50,20,56,8,24,75,10,50,66,136,72,112,196,33,35,68,18,135,140,16,65,146,2,100,200,8,177,20,32,67,70,
- 136,32,201,1,50,66,132,24,42,40,42,144,49,124,176,92,145,32,196,200,0,0,0,137,32,0,0,24,0,0,0,50,34,8,9,32,98,70,0,33,43,36,152,16,33,37,36,152,16,25,39,12,133,164,144,96,66,100,92,
- 32,36,100,130,224,153,1,24,70,32,128,97,4,1,184,67,72,32,37,77,17,37,76,62,149,82,210,193,57,141,52,1,205,148,4,145,65,4,66,48,197,136,68,145,13,4,204,17,128,129,10,228,28,1,40,12,
- 34,8,194,48,2,145,140,0,0,0,0,0,81,24,0,0,100,0,0,0,27,246,35,248,255,255,255,255,1,48,5,192,15,0,56,0,254,0,144,0,10,232,3,34,28,224,1,30,228,225,29,240,161,13,204,161,30,220,97,28,
- 218,192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,128,48,7,121,8,135,118,40,135,54,128,135,119,72,7,119,160,135,114,144,7,32,28,216,129,29,0,162,29,210,193,29,218,128,
- 29,202,225,28,194,129,29,218,192,30,202,97,28,232,225,29,228,161,13,238,33,29,200,129,30,208,1,136,3,57,192,3,96,112,135,119,104,3,113,168,135,116,96,7,122,72,7,119,152,7,128,112,135,
- 119,104,131,116,112,7,115,152,135,54,48,7,120,104,131,118,8,7,122,64,7,128,30,228,161,30,202,1,32,220,225,29,218,192,29,194,193,29,230,161,13,204,1,30,218,160,29,194,129,30,208,1,160,
- 7,121,168,135,114,0,8,119,120,135,54,152,135,116,56,7,119,40,7,114,104,3,125,40,7,121,120,135,121,104,3,115,128,135,54,104,135,112,160,7,116,0,232,65,30,234,161,28,0,194,29,222,161,
- 13,232,65,30,194,1,30,224,33,29,220,225,28,218,160,29,194,129,30,208,1,160,7,121,168,135,114,0,136,121,160,135,112,24,135,117,104,3,120,144,135,119,160,135,114,24,7,122,120,7,121,104,
- 3,113,168,7,115,48,135,114,144,135,54,152,135,116,208,135,114,0,240,0,32,234,193,29,230,33,28,204,161,28,218,192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,96,195,24,8,
- 4,176,0,164,0,84,65,128,4,105,0,13,225,144,14,242,208,6,226,80,15,230,96,14,229,32,15,109,224,14,239,208,6,225,192,14,233,16,14,243,0,0,0,73,24,0,0,1,0,0,0,19,132,64,0,19,170,112,72,
- 7,121,176,3,58,104,131,112,128,7,120,96,135,114,104,131,116,120,135,121,136,3,60,112,131,56,112,3,56,216,112,27,229,208,6,240,160,7,118,64,7,122,96,7,116,160,7,118,64,7,109,144,14,
- 113,160,7,120,160,7,120,208,6,233,128,7,122,128,7,122,128,7,109,144,14,113,96,7,122,16,7,118,160,7,113,96,7,109,144,14,115,32,7,122,48,7,114,160,7,115,32,7,109,144,14,118,64,7,122,
- 96,7,116,160,7,118,64,7,109,96,14,115,32,7,122,48,7,114,160,7,115,32,7,109,96,14,118,64,7,122,96,7,116,160,7,118,64,7,109,96,15,113,96,7,122,16,7,118,160,7,113,96,7,109,96,15,114,64,
- 7,122,48,7,114,160,7,115,32,7,109,96,15,115,32,7,122,48,7,114,160,7,115,32,7,109,96,15,116,128,7,122,96,7,116,160,7,118,64,7,109,96,15,118,64,7,122,96,7,116,160,7,118,64,7,109,96,15,
- 121,96,7,122,16,7,114,128,7,122,16,7,114,128,7,109,96,15,113,32,7,120,160,7,113,32,7,120,160,7,113,32,7,120,208,6,246,16,7,121,32,7,122,32,7,117,96,7,122,32,7,117,96,7,109,96,15,114,
- 80,7,118,160,7,114,80,7,118,160,7,114,80,7,118,208,6,246,80,7,113,32,7,122,80,7,113,32,7,122,80,7,113,32,7,109,96,15,113,0,7,114,64,7,122,16,7,112,32,7,116,160,7,113,0,7,114,64,7,109,
- 224,14,120,160,7,113,96,7,122,48,7,114,160,17,194,144,5,3,32,13,61,164,2,10,3,0,128,0,0,0,64,0,0,0,0,0,160,0,36,54,8,20,85,26,0,0,200,2,1,0,11,0,0,0,50,30,152,16,25,17,76,144,140,9,
- 38,71,198,4,67,202,34,40,129,66,40,135,242,41,64,129,130,40,144,17,128,50,160,29,1,32,29,75,144,2,0,0,0,0,177,24,0,0,165,0,0,0,51,8,128,28,196,225,28,102,20,1,61,136,67,56,132,195,
- 140,66,128,7,121,120,7,115,152,113,12,230,0,15,237,16,14,244,128,14,51,12,66,30,194,193,29,206,161,28,102,48,5,61,136,67,56,132,131,27,204,3,61,200,67,61,140,3,61,204,120,140,116,112,
- 7,123,8,7,121,72,135,112,112,7,122,112,3,118,120,135,112,32,135,25,204,17,14,236,144,14,225,48,15,110,48,15,227,240,14,240,80,14,51,16,196,29,222,33,28,216,33,29,194,97,30,102,48,137,
- 59,188,131,59,208,67,57,180,3,60,188,131,60,132,3,59,204,240,20,118,96,7,123,104,7,55,104,135,114,104,7,55,128,135,112,144,135,112,96,7,118,40,7,118,248,5,118,120,135,119,128,135,95,
- 8,135,113,24,135,114,152,135,121,152,129,44,238,240,14,238,224,14,245,192,14,236,48,3,98,200,161,28,228,161,28,204,161,28,228,161,28,220,97,28,202,33,28,196,129,29,202,97,6,214,144,
- 67,57,200,67,57,152,67,57,200,67,57,184,195,56,148,67,56,136,3,59,148,195,47,188,131,60,252,130,59,212,3,59,176,195,12,199,105,135,112,88,135,114,112,131,116,104,7,120,96,135,116,24,
- 135,116,160,135,25,206,83,15,238,0,15,242,80,14,228,144,14,227,64,15,225,32,14,236,80,14,51,32,40,29,220,193,30,194,65,30,210,33,28,220,129,30,220,224,28,228,225,29,234,1,30,102,24,
- 81,56,176,67,58,156,131,59,204,80,36,118,96,7,123,104,7,55,96,135,119,120,7,120,152,81,76,244,144,15,240,80,14,51,30,106,30,202,97,28,232,33,29,222,193,29,126,1,30,228,161,28,204,33,
- 29,240,97,6,84,133,131,56,204,195,59,176,67,61,208,67,57,252,194,60,228,67,59,136,195,59,176,195,140,197,10,135,121,152,135,119,24,135,116,8,7,122,40,7,114,152,129,92,227,16,14,236,
- 192,14,229,80,14,243,48,35,193,210,65,30,228,225,23,216,225,29,222,1,30,102,72,25,59,176,131,61,180,131,27,132,195,56,140,67,57,204,195,60,184,193,57,200,195,59,212,3,60,204,72,180,
- 113,8,7,118,96,7,113,8,135,113,88,135,25,219,198,14,236,96,15,237,224,6,240,32,15,229,48,15,229,32,15,246,80,14,110,16,14,227,48,14,229,48,15,243,224,6,233,224,14,228,80,14,248,48,
- 35,226,236,97,28,194,129,29,216,225,23,236,33,29,230,33,29,196,33,29,216,33,29,232,33,31,102,32,157,59,188,67,61,184,3,57,148,131,57,204,88,188,112,112,7,119,120,7,122,8,7,122,72,135,
- 119,112,135,25,206,135,14,229,16,14,240,16,14,236,192,14,239,48,14,243,144,14,244,80,14,51,40,48,8,135,116,144,7,55,48,135,122,112,135,113,160,135,116,120,7,119,248,133,115,144,135,
- 119,168,7,120,152,7,0,0,0,0,121,32,0,0,25,1,0,0,114,30,72,32,67,136,12,25,9,114,50,72,32,35,129,140,145,145,209,68,160,16,40,100,60,49,50,66,142,144,33,163,152,6,100,208,82,0,0,0,139,
- 210,88,216,6,109,80,28,20,27,71,6,209,18,25,76,178,24,6,179,64,18,49,24,202,131,68,148,161,68,87,35,0,0,0,0,83,68,75,32,86,101,114,115,105,111,110,119,99,104,97,114,95,115,105,122,
- 101,102,114,97,109,101,45,112,111,105,110,116,101,114,97,105,114,46,109,97,120,95,100,101,118,105,99,101,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,99,111,110,115,116,
- 97,110,116,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,104,114,101,97,100,103,114,111,117,112,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,101,120,
- 116,117,114,101,115,97,105,114,46,109,97,120,95,114,101,97,100,95,119,114,105,116,101,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,115,97,109,112,108,101,114,115,
- 65,112,112,108,101,32,109,101,116,97,108,32,118,101,114,115,105,111,110,32,51,50,48,50,51,46,51,54,56,32,40,109,101,116,97,108,102,101,45,51,50,48,50,51,46,51,54,56,41,77,101,116,97,
- 108,97,105,114,46,99,111,109,112,105,108,101,46,100,101,110,111,114,109,115,95,100,105,115,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,97,115,116,95,109,97,116,104,
- 95,101,110,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,114,97,109,101,98,117,102,102,101,114,95,102,101,116,99,104,95,101,110,97,98,108,101,97,105,114,46,118,101,
- 114,116,101,120,95,111,117,116,112,117,116,117,115,101,114,40,108,111,99,110,48,41,97,105,114,46,97,114,103,95,116,121,112,101,95,110,97,109,101,102,108,111,97,116,52,97,105,114,46,
- 97,114,103,95,110,97,109,101,79,117,116,95,67,111,108,111,114,117,115,101,114,40,108,111,99,110,49,41,102,108,111,97,116,50,79,117,116,95,85,86,97,105,114,46,112,111,115,105,116,105,
- 111,110,103,108,95,80,111,115,105,116,105,111,110,97,105,114,46,118,101,114,116,101,120,95,105,110,112,117,116,97,105,114,46,108,111,99,97,116,105,111,110,95,105,110,100,101,120,97,
- 80,111,115,97,85,86,97,67,111,108,111,114,97,105,114,46,98,117,102,102,101,114,97,105,114,46,98,117,102,102,101,114,95,115,105,122,101,97,105,114,46,114,101,97,100,97,105,114,46,97,
- 100,100,114,101,115,115,95,115,112,97,99,101,97,105,114,46,115,116,114,117,99,116,95,116,121,112,101,95,105,110,102,111,117,83,99,97,108,101,117,84,114,97,110,115,108,97,116,101,97,
- 105,114,46,97,114,103,95,116,121,112,101,95,115,105,122,101,97,105,114,46,97,114,103,95,116,121,112,101,95,97,108,105,103,110,95,115,105,122,101,117,80,117,115,104,67,111,110,115,116,
- 97,110,116,112,99,0,0,0,230,117,0,0,0,0,0,0,48,130,144,4,35,8,10,51,130,144,8,35,8,201,48,130,144,16,35,8,73,49,130,144,24,35,8,201,49,130,144,32,35,8,73,50,130,144,40,35,8,7,48,195,
- 160,6,193,26,204,48,176,129,208,6,51,12,110,48,168,193,12,131,27,16,111,48,195,224,6,197,27,204,48,184,129,241,6,51,12,110,112,192,193,12,131,27,32,113,48,195,224,6,137,28,204,16,40,
- 51,12,106,224,6,115,48,3,177,208,129,26,204,193,12,1,51,67,208,204,16,56,51,24,15,20,73,19,53,131,241,84,145,53,93,51,20,88,36,77,217,12,67,41,152,194,41,204,144,204,129,182,205,1,
- 27,68,214,196,205,144,176,129,182,177,1,27,68,214,212,205,144,168,129,182,169,1,27,68,210,228,205,160,204,65,28,204,129,69,6,113,16,7,115,96,149,193,12,20,29,124,96,32,7,219,28,176,
- 65,24,136,129,26,140,1,43,152,129,28,156,65,28,68,104,48,165,193,12,68,42,168,194,42,180,194,12,67,29,160,130,43,156,25,0,28,199,113,28,199,113,28,199,113,110,224,6,110,224,6,110,224,
- 6,110,224,6,110,96,209,129,30,88,150,69,7,116,224,6,116,128,11,184,128,11,252,128,30,160,32,35,129,9,202,136,141,205,174,205,165,237,141,172,142,173,204,197,140,45,236,108,110,148,
- 164,14,236,224,14,240,32,15,244,96,15,248,160,15,82,97,99,179,107,115,73,35,43,115,163,27,37,240,131,92,194,210,228,92,236,202,228,230,210,222,220,70,9,254,32,169,176,52,57,23,182,
- 48,183,179,186,176,179,178,47,187,50,185,185,180,55,183,81,2,80,200,41,44,77,206,101,236,173,13,46,141,173,236,235,13,142,46,237,205,109,110,148,33,20,68,97,20,82,9,75,147,115,177,
- 43,147,163,43,195,27,37,112,5,0,0,0,169,24,0,0,37,0,0,0,11,10,114,40,135,119,128,7,122,88,112,152,67,61,184,195,56,176,67,57,208,195,130,230,28,198,161,13,232,65,30,194,193,29,230,
- 33,29,232,33,29,222,193,29,22,52,227,96,14,231,80,15,225,32,15,228,64,15,225,32,15,231,80,14,244,176,128,129,7,121,40,135,112,96,7,118,120,135,113,8,7,122,40,7,114,88,112,156,195,56,
- 180,1,59,164,131,61,148,195,2,107,28,216,33,28,220,225,28,220,32,28,228,97,28,220,32,28,232,129,30,194,97,28,208,161,28,200,97,28,194,129,29,216,97,193,1,15,244,32,15,225,80,15,244,
- 128,14,0,0,0,0,209,16,0,0,6,0,0,0,7,204,60,164,131,59,156,3,59,148,3,61,160,131,60,148,67,56,144,195,1,0,0,0,97,32,0,0,68,0,0,0,19,4,65,44,16,0,0,0,11,0,0,0,148,51,0,197,64,91,2,212,
- 115,16,73,20,69,115,16,73,36,17,4,163,1,35,0,99,4,32,8,130,248,71,49,7,97,89,23,70,50,26,64,51,3,0,0,0,241,48,0,0,32,0,0,0,34,71,200,144,81,18,196,43,0,0,0,0,207,115,89,0,111,109,110,
- 105,112,111,116,101,110,116,32,99,104,97,114,83,105,109,112,108,101,32,67,43,43,32,84,66,65,65,97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,115,40,109,97,105,110,48,41,97,
- 105,114,45,97,108,105,97,115,45,115,99,111,112,101,45,97,114,103,40,51,41,0,19,132,101,89,33,212,130,44,172,24,108,161,22,102,97,67,16,11,27,6,88,184,5,90,216,48,224,2,46,208,194,134,
- 192,22,0,0,157,6,38,154,40,16,130,65,36,254,157,134,135,234,40,16,130,67,0,254,131,12,1,226,12,50,4,138,51,134,48,68,22,128,255,28,195,16,76,179,13,12,6,204,54,4,90,48,219,16,12,194,
- 6,1,49,0,4,0,0,0,91,138,32,192,133,35,23,182,20,68,128,11,71,46,0,0,0,0,0,0,113,32,0,0,3,0,0,0,50,14,16,34,132,0,132,6,0,0,0,0,0,0,0,0,101,12,0,0,31,0,0,0,18,3,148,240,0,0,0,0,3,0,
- 0,0,5,0,0,0,9,0,0,0,76,0,0,0,1,0,0,0,88,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,112,0,0,0,0,0,0,0,14,0,0,0,21,0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
- 0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,255,255,255,255,0,36,0,0,0,0,0,0,93,12,0,0,12,0,0,0,18,3,148,99,0,0,0,0,109,97,105,110,48,51,50,48,50,51,46,51,54,56,97,105,114,54,52,45,97,112,112,
- 108,101,45,105,111,115,49,56,46,49,46,48,0,0,0,0,0,
-};
-const uint8_t metallib_fragment[3771] = {
- 77,84,76,66,1,0,2,0,7,0,0,130,18,0,1,0,187,14,0,0,0,0,0,0,88,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,219,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,227,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,208,
- 13,0,0,0,0,0,0,1,0,0,0,123,0,0,0,78,65,77,69,6,0,109,97,105,110,48,0,84,89,80,69,1,0,1,72,65,83,72,32,0,167,26,51,31,140,153,203,226,66,149,243,47,185,58,96,202,28,176,71,121,86,159,
- 244,234,235,69,155,58,121,67,241,212,77,68,83,90,8,0,208,13,0,0,0,0,0,0,79,70,70,84,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,69,82,83,8,0,2,0,7,0,3,0,2,0,69,78,68,84,
- 69,78,68,84,4,0,0,0,69,78,68,84,4,0,0,0,69,78,68,84,222,192,23,11,0,0,0,0,20,0,0,0,180,13,0,0,255,255,255,255,66,67,192,222,53,20,0,0,3,0,0,0,98,12,48,36,128,16,5,200,20,0,0,0,33,12,
- 0,0,41,3,0,0,11,2,33,0,2,0,0,0,22,0,0,0,7,129,35,145,65,200,4,73,6,16,50,57,146,1,132,12,37,5,8,25,30,4,139,98,128,20,69,2,66,146,11,66,164,16,50,20,56,8,24,75,10,50,82,136,72,112,
- 196,33,35,68,18,135,140,16,65,146,2,100,200,8,177,20,32,67,70,136,32,201,1,50,82,132,24,42,40,42,144,49,124,176,92,145,32,197,200,0,0,0,137,32,0,0,31,0,0,0,50,34,72,9,32,98,70,0,33,
- 43,36,152,20,33,37,36,152,20,25,39,12,133,164,144,96,82,100,92,32,36,101,130,128,154,1,24,70,32,128,27,132,97,4,1,64,74,154,34,74,152,252,127,34,174,137,138,136,223,30,254,105,140,
- 0,24,68,32,2,140,164,41,162,132,201,255,37,128,121,22,34,250,167,49,2,96,16,193,16,76,33,194,40,135,208,28,1,114,132,160,230,8,130,57,2,48,24,70,16,26,163,172,114,6,115,12,128,70,111,
- 32,64,5,218,8,0,0,81,24,0,0,105,0,0,0,27,246,35,248,255,255,255,255,1,104,3,96,13,0,83,0,252,0,144,128,10,232,3,34,28,224,1,30,228,225,29,240,161,13,204,161,30,220,97,28,218,192,28,
- 224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,128,48,7,121,8,135,118,40,135,54,128,135,119,72,7,119,160,135,114,144,7,32,28,216,129,29,0,162,29,210,193,29,218,128,29,202,225,
- 28,194,129,29,218,192,30,202,97,28,232,225,29,228,161,13,238,33,29,200,129,30,208,1,136,3,57,192,3,96,112,135,119,104,3,113,168,135,116,96,7,122,72,7,119,152,7,128,112,135,119,104,
- 131,116,112,7,115,152,135,54,48,7,120,104,131,118,8,7,122,64,7,128,30,228,161,30,202,1,32,220,225,29,218,192,29,194,193,29,230,161,13,204,1,30,218,160,29,194,129,30,208,1,160,7,121,
- 168,135,114,0,8,119,120,135,54,152,135,116,56,7,119,40,7,114,104,3,125,40,7,121,120,135,121,104,3,115,128,135,54,104,135,112,160,7,116,0,232,65,30,234,161,28,0,194,29,222,161,13,232,
- 65,30,194,1,30,224,33,29,220,225,28,218,160,29,194,129,30,208,1,160,7,121,168,135,114,0,136,121,160,135,112,24,135,117,104,3,120,144,135,119,160,135,114,24,7,122,120,7,121,104,3,113,
- 168,7,115,48,135,114,144,135,54,152,135,116,208,135,114,0,240,0,32,234,193,29,230,33,28,204,161,28,218,192,28,224,161,13,218,33,28,232,1,29,0,122,144,135,122,40,7,96,131,33,12,192,
- 2,84,27,140,129,0,22,160,218,0,17,255,255,255,255,63,0,109,0,172,1,96,10,128,31,0,18,80,1,125,176,193,40,2,96,1,170,13,134,33,0,11,80,109,96,142,255,255,255,255,31,128,54,0,214,0,144,
- 128,10,232,3,0,73,24,0,0,4,0,0,0,19,134,64,24,38,12,68,97,76,24,142,194,0,0,0,0,19,170,112,72,7,121,176,3,58,104,131,112,128,7,120,96,135,114,104,131,116,120,135,121,136,3,60,112,131,
- 56,112,3,56,216,112,27,229,208,6,240,160,7,118,64,7,122,96,7,116,160,7,118,64,7,109,144,14,113,160,7,120,160,7,120,208,6,233,128,7,122,128,7,122,128,7,109,144,14,113,96,7,122,16,7,
- 118,160,7,113,96,7,109,144,14,115,32,7,122,48,7,114,160,7,115,32,7,109,144,14,118,64,7,122,96,7,116,160,7,118,64,7,109,96,14,115,32,7,122,48,7,114,160,7,115,32,7,109,96,14,118,64,7,
- 122,96,7,116,160,7,118,64,7,109,96,15,113,96,7,122,16,7,118,160,7,113,96,7,109,96,15,114,64,7,122,48,7,114,160,7,115,32,7,109,96,15,115,32,7,122,48,7,114,160,7,115,32,7,109,96,15,116,
- 128,7,122,96,7,116,160,7,118,64,7,109,96,15,118,64,7,122,96,7,116,160,7,118,64,7,109,96,15,121,96,7,122,16,7,114,128,7,122,16,7,114,128,7,109,96,15,113,32,7,120,160,7,113,32,7,120,
- 160,7,113,32,7,120,208,6,246,16,7,121,32,7,122,32,7,117,96,7,122,32,7,117,96,7,109,96,15,114,80,7,118,160,7,114,80,7,118,160,7,114,80,7,118,208,6,246,80,7,113,32,7,122,80,7,113,32,
- 7,122,80,7,113,32,7,109,96,15,113,0,7,114,64,7,122,16,7,112,32,7,116,160,7,113,0,7,114,64,7,109,224,14,120,160,7,113,96,7,122,48,7,114,160,17,194,144,5,3,32,13,61,164,2,10,4,0,128,
- 0,0,0,64,0,0,0,0,0,160,0,134,84,197,246,0,1,32,0,0,0,8,0,0,0,0,0,20,128,196,6,129,162,43,3,0,0,89,32,10,0,0,0,50,30,152,16,25,17,76,144,140,9,38,71,198,4,67,106,69,80,2,133,80,14,229,
- 83,128,2,5,81,32,35,0,101,64,114,44,65,10,0,0,0,177,24,0,0,165,0,0,0,51,8,128,28,196,225,28,102,20,1,61,136,67,56,132,195,140,66,128,7,121,120,7,115,152,113,12,230,0,15,237,16,14,244,
- 128,14,51,12,66,30,194,193,29,206,161,28,102,48,5,61,136,67,56,132,131,27,204,3,61,200,67,61,140,3,61,204,120,140,116,112,7,123,8,7,121,72,135,112,112,7,122,112,3,118,120,135,112,32,
- 135,25,204,17,14,236,144,14,225,48,15,110,48,15,227,240,14,240,80,14,51,16,196,29,222,33,28,216,33,29,194,97,30,102,48,137,59,188,131,59,208,67,57,180,3,60,188,131,60,132,3,59,204,
- 240,20,118,96,7,123,104,7,55,104,135,114,104,7,55,128,135,112,144,135,112,96,7,118,40,7,118,248,5,118,120,135,119,128,135,95,8,135,113,24,135,114,152,135,121,152,129,44,238,240,14,
- 238,224,14,245,192,14,236,48,3,98,200,161,28,228,161,28,204,161,28,228,161,28,220,97,28,202,33,28,196,129,29,202,97,6,214,144,67,57,200,67,57,152,67,57,200,67,57,184,195,56,148,67,
- 56,136,3,59,148,195,47,188,131,60,252,130,59,212,3,59,176,195,12,199,105,135,112,88,135,114,112,131,116,104,7,120,96,135,116,24,135,116,160,135,25,206,83,15,238,0,15,242,80,14,228,
- 144,14,227,64,15,225,32,14,236,80,14,51,32,40,29,220,193,30,194,65,30,210,33,28,220,129,30,220,224,28,228,225,29,234,1,30,102,24,81,56,176,67,58,156,131,59,204,80,36,118,96,7,123,104,
- 7,55,96,135,119,120,7,120,152,81,76,244,144,15,240,80,14,51,30,106,30,202,97,28,232,33,29,222,193,29,126,1,30,228,161,28,204,33,29,240,97,6,84,133,131,56,204,195,59,176,67,61,208,67,
- 57,252,194,60,228,67,59,136,195,59,176,195,140,197,10,135,121,152,135,119,24,135,116,8,7,122,40,7,114,152,129,92,227,16,14,236,192,14,229,80,14,243,48,35,193,210,65,30,228,225,23,216,
- 225,29,222,1,30,102,72,25,59,176,131,61,180,131,27,132,195,56,140,67,57,204,195,60,184,193,57,200,195,59,212,3,60,204,72,180,113,8,7,118,96,7,113,8,135,113,88,135,25,219,198,14,236,
- 96,15,237,224,6,240,32,15,229,48,15,229,32,15,246,80,14,110,16,14,227,48,14,229,48,15,243,224,6,233,224,14,228,80,14,248,48,35,226,236,97,28,194,129,29,216,225,23,236,33,29,230,33,
- 29,196,33,29,216,33,29,232,33,31,102,32,157,59,188,67,61,184,3,57,148,131,57,204,88,188,112,112,7,119,120,7,122,8,7,122,72,135,119,112,135,25,206,135,14,229,16,14,240,16,14,236,192,
- 14,239,48,14,243,144,14,244,80,14,51,40,48,8,135,116,144,7,55,48,135,122,112,135,113,160,135,116,120,7,119,248,133,115,144,135,119,168,7,120,152,7,0,0,0,0,121,32,0,0,251,0,0,0,114,
- 30,72,32,67,136,12,25,9,114,50,72,32,35,129,140,145,145,209,68,160,16,40,100,60,49,50,66,142,144,33,163,56,6,220,41,1,0,0,0,139,210,88,216,6,109,80,28,20,27,71,6,81,100,48,134,180,
- 40,15,178,24,197,34,41,24,178,28,13,83,68,75,32,86,101,114,115,105,111,110,119,99,104,97,114,95,115,105,122,101,102,114,97,109,101,45,112,111,105,110,116,101,114,97,105,114,46,109,
- 97,120,95,100,101,118,105,99,101,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,99,111,110,115,116,97,110,116,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,
- 104,114,101,97,100,103,114,111,117,112,95,98,117,102,102,101,114,115,97,105,114,46,109,97,120,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,114,101,97,100,95,119,114,
- 105,116,101,95,116,101,120,116,117,114,101,115,97,105,114,46,109,97,120,95,115,97,109,112,108,101,114,115,65,112,112,108,101,32,109,101,116,97,108,32,118,101,114,115,105,111,110,32,
- 51,50,48,50,51,46,51,54,56,32,40,109,101,116,97,108,102,101,45,51,50,48,50,51,46,51,54,56,41,77,101,116,97,108,97,105,114,46,99,111,109,112,105,108,101,46,100,101,110,111,114,109,115,
- 95,100,105,115,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,97,115,116,95,109,97,116,104,95,101,110,97,98,108,101,97,105,114,46,99,111,109,112,105,108,101,46,102,114,
- 97,109,101,98,117,102,102,101,114,95,102,101,116,99,104,95,101,110,97,98,108,101,97,105,114,46,114,101,110,100,101,114,95,116,97,114,103,101,116,97,105,114,46,97,114,103,95,116,121,
- 112,101,95,110,97,109,101,102,108,111,97,116,52,97,105,114,46,97,114,103,95,110,97,109,101,102,67,111,108,111,114,97,105,114,46,102,114,97,103,109,101,110,116,95,105,110,112,117,116,
- 117,115,101,114,40,108,111,99,110,48,41,97,105,114,46,99,101,110,116,101,114,97,105,114,46,112,101,114,115,112,101,99,116,105,118,101,73,110,95,67,111,108,111,114,117,115,101,114,40,
- 108,111,99,110,49,41,102,108,111,97,116,50,73,110,95,85,86,97,105,114,46,116,101,120,116,117,114,101,97,105,114,46,108,111,99,97,116,105,111,110,95,105,110,100,101,120,97,105,114,46,
- 115,97,109,112,108,101,116,101,120,116,117,114,101,50,100,60,102,108,111,97,116,44,32,115,97,109,112,108,101,62,115,84,101,120,116,117,114,101,97,105,114,46,115,97,109,112,108,101,
- 114,115,97,109,112,108,101,114,115,84,101,120,116,117,114,101,83,109,112,108,114,0,6,95,0,0,0,0,0,0,48,130,208,8,35,8,18,51,130,208,12,35,8,13,49,130,208,20,35,8,141,49,130,208,28,
- 35,8,13,50,130,208,36,35,8,141,50,130,208,44,35,8,9,48,195,64,6,65,25,204,48,152,129,112,6,51,12,104,48,144,193,12,3,26,16,105,48,195,128,6,69,26,204,48,160,129,145,6,51,12,104,112,
- 168,193,12,3,26,32,107,48,195,128,6,9,27,204,16,40,51,12,100,128,6,109,48,3,177,184,1,25,180,193,12,1,51,67,208,204,16,56,51,28,79,27,180,1,20,73,211,12,193,31,204,144,180,1,85,89,
- 23,20,73,216,12,137,25,80,153,117,65,154,180,205,160,144,1,215,181,129,25,120,208,39,129,193,12,137,27,132,65,215,6,102,0,137,129,52,6,51,16,161,32,10,163,64,10,51,12,111,0,10,165,
- 112,99,0,112,28,199,113,28,199,113,28,199,185,129,27,184,129,27,184,129,27,184,129,27,184,129,69,7,122,96,89,150,41,112,172,192,10,228,160,14,160,32,35,129,9,202,136,141,205,174,205,
- 165,237,141,172,142,173,204,197,140,45,236,108,110,148,228,13,224,32,14,228,96,14,232,160,14,236,224,14,82,97,99,179,107,115,73,35,43,115,163,27,37,192,131,92,194,210,228,92,236,202,
- 228,230,210,222,220,70,9,242,32,169,176,52,57,23,182,48,183,179,186,176,179,178,47,187,50,185,185,180,55,183,81,2,61,200,41,44,77,206,101,236,173,13,46,141,173,236,235,13,142,46,237,
- 205,109,110,148,97,15,248,160,15,146,9,75,147,115,49,147,11,59,107,43,115,163,27,37,40,5,0,0,0,0,169,24,0,0,37,0,0,0,11,10,114,40,135,119,128,7,122,88,112,152,67,61,184,195,56,176,
- 67,57,208,195,130,230,28,198,161,13,232,65,30,194,193,29,230,33,29,232,33,29,222,193,29,22,52,227,96,14,231,80,15,225,32,15,228,64,15,225,32,15,231,80,14,244,176,128,129,7,121,40,135,
- 112,96,7,118,120,135,113,8,7,122,40,7,114,88,112,156,195,56,180,1,59,164,131,61,148,195,2,107,28,216,33,28,220,225,28,220,32,28,228,97,28,220,32,28,232,129,30,194,97,28,208,161,28,
- 200,97,28,194,129,29,216,97,193,1,15,244,32,15,225,80,15,244,128,14,0,0,0,0,209,16,0,0,6,0,0,0,7,204,60,164,131,59,156,3,59,148,3,61,160,131,60,148,67,56,144,195,1,0,0,0,97,32,0,0,
- 49,0,0,0,19,4,65,44,16,0,0,0,4,0,0,0,196,106,96,4,128,220,8,0,129,17,0,18,51,0,0,0,241,48,0,0,28,0,0,0,34,71,200,144,81,14,196,42,0,0,0,0,23,134,1,0,97,105,114,45,97,108,105,97,115,
- 45,115,99,111,112,101,115,40,109,97,105,110,48,41,97,105,114,45,97,108,105,97,115,45,115,99,111,112,101,45,115,97,109,112,108,101,114,115,97,105,114,45,97,108,105,97,115,45,115,99,
- 111,112,101,45,116,101,120,116,117,114,101,115,0,43,4,85,56,133,21,195,42,168,2,42,172,24,88,65,21,82,97,131,192,10,171,0,0,35,6,205,16,130,96,240,84,135,129,20,3,33,8,204,104,66,0,
- 96,176,136,255,108,3,17,0,27,4,196,0,0,0,2,0,0,0,91,6,224,96,5,0,0,0,0,0,0,0,113,32,0,0,3,0,0,0,50,14,16,34,132,0,248,5,0,0,0,0,0,0,0,0,101,12,0,0,37,0,0,0,18,3,148,40,1,0,0,0,3,0,
- 0,0,32,0,0,0,9,0,0,0,76,0,0,0,1,0,0,0,88,0,0,0,0,0,0,0,88,0,0,0,2,0,0,0,136,0,0,0,0,0,0,0,41,0,0,0,21,0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,136,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
- 0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,255,255,255,255,0,36,0,0,5,0,0,0,27,0,0,0,5,0,0,0,27,0,0,0,255,255,255,255,8,36,0,0,0,0,0,0,93,12,0,0,19,0,0,0,18,3,148,126,0,0,0,0,109,97,105,110,
- 48,97,105,114,46,115,97,109,112,108,101,95,116,101,120,116,117,114,101,95,50,100,46,118,52,102,51,50,51,50,48,50,51,46,51,54,56,97,105,114,54,52,45,97,112,112,108,101,45,105,111,115,
- 49,56,46,49,46,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-#elif TARGET_IPHONE_SIMULATOR
-#error "SDL_GPU does not support the iphone simulator"
-#endif
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.cpp b/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.cpp
deleted file mode 100644
index a39360f..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.cpp
+++ /dev/null
@@ -1,300 +0,0 @@
-// dear imgui: Renderer Backend for SDL_Renderer for SDL2
-// (Requires: SDL 2.0.17+)
-
-// Note that SDL_Renderer is an _optional_ component of SDL2, which IMHO is now largely obsolete.
-// For a multi-platform app consider using other technologies:
-// - SDL3+SDL_GPU: SDL_GPU is SDL3 new graphics abstraction API. You will need to update to SDL3.
-// - SDL2+DirectX, SDL2+OpenGL, SDL2+Vulkan: combine SDL with dedicated renderers.
-// If your application wants to render any non trivial amount of graphics other than UI,
-// please be aware that SDL_Renderer currently offers a limited graphic API to the end-user
-// and it might be difficult to step out of those boundaries.
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'SDL_Texture*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// You can copy and 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
-
-// CHANGELOG
-// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLRenderer2_CreateFontsTexture() and ImGui_ImplSDLRenderer2_DestroyFontsTexture().
-// 2025-01-18: Use endian-dependent RGBA32 texture format, to match SDL_Color.
-// 2024-10-09: Expose selected render state in ImGui_ImplSDLRenderer2_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-05-14: *BREAKING CHANGE* ImGui_ImplSDLRenderer3_RenderDrawData() requires SDL_Renderer* passed as parameter.
-// 2023-05-30: Renamed imgui_impl_sdlrenderer.h/.cpp to imgui_impl_sdlrenderer2.h/.cpp to accommodate for upcoming SDL3.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-12-21: Update SDL_RenderGeometryRaw() format to work with SDL 2.0.19.
-// 2021-12-03: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2021-10-06: Backup and restore modified ClipRect/Viewport.
-// 2021-09-21: Initial version.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_sdlrenderer2.h"
-#include <stdint.h> // intptr_t
-
-// Clang warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#elif defined(__GNUC__)
-#pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe
-#endif
-
-// SDL
-#include <SDL.h>
-#if !SDL_VERSION_ATLEAST(2,0,17)
-#error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function
-#endif
-
-// SDL_Renderer data
-struct ImGui_ImplSDLRenderer2_Data
-{
- SDL_Renderer* Renderer; // Main viewport's renderer
-
- ImGui_ImplSDLRenderer2_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplSDLRenderer2_Data* ImGui_ImplSDLRenderer2_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplSDLRenderer2_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Functions
-bool ImGui_ImplSDLRenderer2_Init(SDL_Renderer* renderer)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
- IM_ASSERT(renderer != nullptr && "SDL_Renderer not initialized!");
-
- // Setup backend capabilities flags
- ImGui_ImplSDLRenderer2_Data* bd = IM_NEW(ImGui_ImplSDLRenderer2_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_sdlrenderer2";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- bd->Renderer = renderer;
-
- return true;
-}
-
-void ImGui_ImplSDLRenderer2_Shutdown()
-{
- ImGui_ImplSDLRenderer2_Data* bd = ImGui_ImplSDLRenderer2_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplSDLRenderer2_DestroyDeviceObjects();
-
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-static void ImGui_ImplSDLRenderer2_SetupRenderState(SDL_Renderer* renderer)
-{
- // Clear out any viewports and cliprect set by the user
- // FIXME: Technically speaking there are lots of other things we could backup/setup/restore during our render process.
- SDL_RenderSetViewport(renderer, nullptr);
- SDL_RenderSetClipRect(renderer, nullptr);
-}
-
-void ImGui_ImplSDLRenderer2_NewFrame()
-{
- ImGui_ImplSDLRenderer2_Data* bd = ImGui_ImplSDLRenderer2_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLRenderer2_Init()?");
- IM_UNUSED(bd);
-}
-
-void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data, SDL_Renderer* renderer)
-{
- // If there's a scale factor set by the user, use that instead
- // If the user has specified a scale factor to SDL_Renderer already via SDL_RenderSetScale(), SDL will scale whatever we pass
- // to SDL_RenderGeometryRaw() by that scale factor. In that case we don't want to be also scaling it ourselves here.
- float rsx = 1.0f;
- float rsy = 1.0f;
- SDL_RenderGetScale(renderer, &rsx, &rsy);
- ImVec2 render_scale;
- render_scale.x = (rsx == 1.0f) ? draw_data->FramebufferScale.x : 1.0f;
- render_scale.y = (rsy == 1.0f) ? draw_data->FramebufferScale.y : 1.0f;
-
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * render_scale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * render_scale.y);
- if (fb_width == 0 || fb_height == 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplSDLRenderer2_UpdateTexture(tex);
-
- // Backup SDL_Renderer state that will be modified to restore it afterwards
- struct BackupSDLRendererState
- {
- SDL_Rect Viewport;
- bool ClipEnabled;
- SDL_Rect ClipRect;
- };
- BackupSDLRendererState old = {};
- old.ClipEnabled = SDL_RenderIsClipEnabled(renderer) == SDL_TRUE;
- SDL_RenderGetViewport(renderer, &old.Viewport);
- SDL_RenderGetClipRect(renderer, &old.ClipRect);
-
- // Setup desired state
- ImGui_ImplSDLRenderer2_SetupRenderState(renderer);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplSDLRenderer2_RenderState render_state;
- render_state.Renderer = renderer;
- platform_io.Renderer_RenderState = &render_state;
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = render_scale;
-
- // Render command lists
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- const ImDrawVert* vtx_buffer = draw_list->VtxBuffer.Data;
- const ImDrawIdx* idx_buffer = draw_list->IdxBuffer.Data;
-
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplSDLRenderer2_SetupRenderState(renderer);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > (float)fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > (float)fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- SDL_Rect r = { (int)(clip_min.x), (int)(clip_min.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y) };
- SDL_RenderSetClipRect(renderer, &r);
-
- const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, pos));
- const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, uv));
-#if SDL_VERSION_ATLEAST(2,0,19)
- const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.19+
-#else
- const int* color = (const int*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18
-#endif
-
- // Bind texture, Draw
- SDL_Texture* tex = (SDL_Texture*)pcmd->GetTexID();
- SDL_RenderGeometryRaw(renderer, tex,
- xy, (int)sizeof(ImDrawVert),
- color, (int)sizeof(ImDrawVert),
- uv, (int)sizeof(ImDrawVert),
- draw_list->VtxBuffer.Size - pcmd->VtxOffset,
- idx_buffer + pcmd->IdxOffset, pcmd->ElemCount, sizeof(ImDrawIdx));
- }
- }
- }
- platform_io.Renderer_RenderState = nullptr;
-
- // Restore modified SDL_Renderer state
- SDL_RenderSetViewport(renderer, &old.Viewport);
- SDL_RenderSetClipRect(renderer, old.ClipEnabled ? &old.ClipRect : nullptr);
-}
-
-void ImGui_ImplSDLRenderer2_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplSDLRenderer2_Data* bd = ImGui_ImplSDLRenderer2_GetBackendData();
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // Create texture
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- SDL_Texture* sdl_texture = SDL_CreateTexture(bd->Renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_STATIC, tex->Width, tex->Height);
- IM_ASSERT(sdl_texture != nullptr && "Backend failed to create texture!");
- SDL_UpdateTexture(sdl_texture, nullptr, tex->GetPixels(), tex->GetPitch());
- SDL_SetTextureBlendMode(sdl_texture, SDL_BLENDMODE_BLEND);
- SDL_SetTextureScaleMode(sdl_texture, SDL_ScaleModeLinear);
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)sdl_texture);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- SDL_Texture* sdl_texture = (SDL_Texture*)(intptr_t)tex->TexID;
- for (ImTextureRect& r : tex->Updates)
- {
- SDL_Rect sdl_r = { r.x, r.y, r.w, r.h };
- SDL_UpdateTexture(sdl_texture, &sdl_r, tex->GetPixelsAt(r.x, r.y), tex->GetPitch());
- }
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantDestroy)
- {
- SDL_Texture* sdl_texture = (SDL_Texture*)(intptr_t)tex->TexID;
- if (sdl_texture == nullptr)
- return;
- SDL_DestroyTexture(sdl_texture);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- }
-}
-
-void ImGui_ImplSDLRenderer2_CreateDeviceObjects()
-{
-}
-
-void ImGui_ImplSDLRenderer2_DestroyDeviceObjects()
-{
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- {
- tex->SetStatus(ImTextureStatus_WantDestroy);
- ImGui_ImplSDLRenderer2_UpdateTexture(tex);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.h b/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.h
deleted file mode 100644
index a62e609..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer2.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// dear imgui: Renderer Backend for SDL_Renderer for SDL2
-// (Requires: SDL 2.0.17+)
-
-// Note that SDL_Renderer is an _optional_ component of SDL2, which IMHO is now largely obsolete.
-// For a multi-platform app consider using other technologies:
-// - SDL3+SDL_GPU: SDL_GPU is SDL3 new graphics abstraction API. You will need to update to SDL3.
-// - SDL2+DirectX, SDL2+OpenGL, SDL2+Vulkan: combine SDL with dedicated renderers.
-// If your application wants to render any non trivial amount of graphics other than UI,
-// please be aware that SDL_Renderer currently offers a limited graphic API to the end-user
-// and it might be difficult to step out of those boundaries.
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'SDL_Texture*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// 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
-#ifndef IMGUI_DISABLE
-#include "imgui.h" // IMGUI_IMPL_API
-
-struct SDL_Renderer;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplSDLRenderer2_Init(SDL_Renderer* renderer);
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data, SDL_Renderer* renderer);
-
-// Called by Init/NewFrame/Shutdown
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplSDLRenderer2_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplSDLRenderer2_RenderState
-{
- SDL_Renderer* Renderer;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.cpp b/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.cpp
deleted file mode 100644
index f629491..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// dear imgui: Renderer Backend for SDL_Renderer for SDL3
-// (Requires: SDL 3.1.8+)
-
-// Note that SDL_Renderer is an _optional_ component of SDL3, which IMHO is now largely obsolete.
-// For a multi-platform app consider using other technologies:
-// - SDL3+SDL_GPU: SDL_GPU is SDL3 new graphics abstraction API.
-// - SDL3+DirectX, SDL3+OpenGL, SDL3+Vulkan: combine SDL with dedicated renderers.
-// If your application wants to render any non trivial amount of graphics other than UI,
-// please be aware that SDL_Renderer currently offers a limited graphic API to the end-user
-// and it might be difficult to step out of those boundaries.
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'SDL_Texture*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// You can copy and 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
-
-// CHANGELOG
-// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLRenderer3_CreateFontsTexture() and ImGui_ImplSDLRenderer3_DestroyFontsTexture().
-// 2025-01-18: Use endian-dependent RGBA32 texture format, to match SDL_Color.
-// 2024-10-09: Expose selected render state in ImGui_ImplSDLRenderer3_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-07-01: Update for SDL3 api changes: SDL_RenderGeometryRaw() uint32 version was removed (SDL#9009).
-// 2024-05-14: *BREAKING CHANGE* ImGui_ImplSDLRenderer3_RenderDrawData() requires SDL_Renderer* passed as parameter.
-// 2024-02-12: Amend to query SDL_RenderViewportSet() and restore viewport accordingly.
-// 2023-05-30: Initial version.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_sdlrenderer3.h"
-#include <stdint.h> // intptr_t
-
-// Clang warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
-#elif defined(__GNUC__)
-#pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe
-#endif
-
-// SDL
-#include <SDL3/SDL.h>
-#if !SDL_VERSION_ATLEAST(3,0,0)
-#error This backend requires SDL 3.0.0+
-#endif
-
-// SDL_Renderer data
-struct ImGui_ImplSDLRenderer3_Data
-{
- SDL_Renderer* Renderer; // Main viewport's renderer
- ImVector<SDL_FColor> ColorBuffer;
-
- ImGui_ImplSDLRenderer3_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplSDLRenderer3_Data* ImGui_ImplSDLRenderer3_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplSDLRenderer3_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-// Functions
-bool ImGui_ImplSDLRenderer3_Init(SDL_Renderer* renderer)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
- IM_ASSERT(renderer != nullptr && "SDL_Renderer not initialized!");
-
- // Setup backend capabilities flags
- ImGui_ImplSDLRenderer3_Data* bd = IM_NEW(ImGui_ImplSDLRenderer3_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_sdlrenderer3";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- bd->Renderer = renderer;
-
- return true;
-}
-
-void ImGui_ImplSDLRenderer3_Shutdown()
-{
- ImGui_ImplSDLRenderer3_Data* bd = ImGui_ImplSDLRenderer3_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplSDLRenderer3_DestroyDeviceObjects();
-
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-static void ImGui_ImplSDLRenderer3_SetupRenderState(SDL_Renderer* renderer)
-{
- // Clear out any viewports and cliprect set by the user
- // FIXME: Technically speaking there are lots of other things we could backup/setup/restore during our render process.
- SDL_SetRenderViewport(renderer, nullptr);
- SDL_SetRenderClipRect(renderer, nullptr);
-}
-
-void ImGui_ImplSDLRenderer3_NewFrame()
-{
- ImGui_ImplSDLRenderer3_Data* bd = ImGui_ImplSDLRenderer3_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLRenderer3_Init()?");
- IM_UNUSED(bd);
-}
-
-// https://github.com/libsdl-org/SDL/issues/9009
-static int SDL_RenderGeometryRaw8BitColor(SDL_Renderer* renderer, ImVector<SDL_FColor>& colors_out, SDL_Texture* texture, const float* xy, int xy_stride, const SDL_Color* color, int color_stride, const float* uv, int uv_stride, int num_vertices, const void* indices, int num_indices, int size_indices)
-{
- const Uint8* color2 = (const Uint8*)color;
- colors_out.resize(num_vertices);
- SDL_FColor* color3 = colors_out.Data;
- for (int i = 0; i < num_vertices; i++)
- {
- color3[i].r = color->r / 255.0f;
- color3[i].g = color->g / 255.0f;
- color3[i].b = color->b / 255.0f;
- color3[i].a = color->a / 255.0f;
- color2 += color_stride;
- color = (const SDL_Color*)color2;
- }
- return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color3, sizeof(*color3), uv, uv_stride, num_vertices, indices, num_indices, size_indices);
-}
-
-void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data, SDL_Renderer* renderer)
-{
- ImGui_ImplSDLRenderer3_Data* bd = ImGui_ImplSDLRenderer3_GetBackendData();
-
- // If there's a scale factor set by the user, use that instead
- // If the user has specified a scale factor to SDL_Renderer already via SDL_RenderSetScale(), SDL will scale whatever we pass
- // to SDL_RenderGeometryRaw() by that scale factor. In that case we don't want to be also scaling it ourselves here.
- float rsx = 1.0f;
- float rsy = 1.0f;
- SDL_GetRenderScale(renderer, &rsx, &rsy);
- ImVec2 render_scale;
- render_scale.x = (rsx == 1.0f) ? draw_data->FramebufferScale.x : 1.0f;
- render_scale.y = (rsy == 1.0f) ? draw_data->FramebufferScale.y : 1.0f;
-
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * render_scale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * render_scale.y);
- if (fb_width == 0 || fb_height == 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplSDLRenderer3_UpdateTexture(tex);
-
- // Backup SDL_Renderer state that will be modified to restore it afterwards
- struct BackupSDLRendererState
- {
- SDL_Rect Viewport;
- bool ViewportEnabled;
- bool ClipEnabled;
- SDL_Rect ClipRect;
- };
- BackupSDLRendererState old = {};
- old.ViewportEnabled = SDL_RenderViewportSet(renderer);
- old.ClipEnabled = SDL_RenderClipEnabled(renderer);
- SDL_GetRenderViewport(renderer, &old.Viewport);
- SDL_GetRenderClipRect(renderer, &old.ClipRect);
-
- // Setup desired state
- ImGui_ImplSDLRenderer3_SetupRenderState(renderer);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplSDLRenderer3_RenderState render_state;
- render_state.Renderer = renderer;
- platform_io.Renderer_RenderState = &render_state;
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = render_scale;
-
- // Render command lists
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- const ImDrawVert* vtx_buffer = draw_list->VtxBuffer.Data;
- const ImDrawIdx* idx_buffer = draw_list->IdxBuffer.Data;
-
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplSDLRenderer3_SetupRenderState(renderer);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > (float)fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > (float)fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- SDL_Rect r = { (int)(clip_min.x), (int)(clip_min.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y) };
- SDL_SetRenderClipRect(renderer, &r);
-
- const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, pos));
- const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, uv));
- const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.19+
-
- // Bind texture, Draw
- SDL_Texture* tex = (SDL_Texture*)pcmd->GetTexID();
- SDL_RenderGeometryRaw8BitColor(renderer, bd->ColorBuffer, tex,
- xy, (int)sizeof(ImDrawVert),
- color, (int)sizeof(ImDrawVert),
- uv, (int)sizeof(ImDrawVert),
- draw_list->VtxBuffer.Size - pcmd->VtxOffset,
- idx_buffer + pcmd->IdxOffset, pcmd->ElemCount, sizeof(ImDrawIdx));
- }
- }
- }
- platform_io.Renderer_RenderState = nullptr;
-
- // Restore modified SDL_Renderer state
- SDL_SetRenderViewport(renderer, old.ViewportEnabled ? &old.Viewport : nullptr);
- SDL_SetRenderClipRect(renderer, old.ClipEnabled ? &old.ClipRect : nullptr);
-}
-
-void ImGui_ImplSDLRenderer3_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplSDLRenderer3_Data* bd = ImGui_ImplSDLRenderer3_GetBackendData();
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == 0 && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // Create texture
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- SDL_Texture* sdl_texture = SDL_CreateTexture(bd->Renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_STATIC, tex->Width, tex->Height);
- IM_ASSERT(sdl_texture != nullptr && "Backend failed to create texture!");
- SDL_UpdateTexture(sdl_texture, nullptr, tex->GetPixels(), tex->GetPitch());
- SDL_SetTextureBlendMode(sdl_texture, SDL_BLENDMODE_BLEND);
- SDL_SetTextureScaleMode(sdl_texture, SDL_SCALEMODE_LINEAR);
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)sdl_texture);
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Update selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
- SDL_Texture* sdl_texture = (SDL_Texture*)(intptr_t)tex->TexID;
- for (ImTextureRect& r : tex->Updates)
- {
- SDL_Rect sdl_r = { r.x, r.y, r.w, r.h };
- SDL_UpdateTexture(sdl_texture, &sdl_r, tex->GetPixelsAt(r.x, r.y), tex->GetPitch());
- }
- tex->SetStatus(ImTextureStatus_OK);
- }
- else if (tex->Status == ImTextureStatus_WantDestroy)
- {
- SDL_Texture* sdl_texture = (SDL_Texture*)(intptr_t)tex->TexID;
- if (sdl_texture == nullptr)
- return;
- SDL_DestroyTexture(sdl_texture);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- }
-}
-
-void ImGui_ImplSDLRenderer3_CreateDeviceObjects()
-{
-}
-
-void ImGui_ImplSDLRenderer3_DestroyDeviceObjects()
-{
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- {
- tex->SetStatus(ImTextureStatus_WantDestroy);
- ImGui_ImplSDLRenderer3_UpdateTexture(tex);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.h b/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.h
deleted file mode 100644
index 618cc24..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_sdlrenderer3.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// dear imgui: Renderer Backend for SDL_Renderer for SDL3
-// (Requires: SDL 3.1.8+)
-
-// Note that SDL_Renderer is an _optional_ component of SDL3, which IMHO is now largely obsolete.
-// For a multi-platform app consider using other technologies:
-// - SDL3+SDL_GPU: SDL_GPU is SDL3 new graphics abstraction API.
-// - SDL3+DirectX, SDL3+OpenGL, SDL3+Vulkan: combine SDL with dedicated renderers.
-// If your application wants to render any non trivial amount of graphics other than UI,
-// please be aware that SDL_Renderer currently offers a limited graphic API to the end-user
-// and it might be difficult to step out of those boundaries.
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'SDL_Texture*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// You can copy and 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
-
-struct SDL_Renderer;
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplSDLRenderer3_Init(SDL_Renderer* renderer);
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data, SDL_Renderer* renderer);
-
-// Called by Init/NewFrame/Shutdown
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_DestroyDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplSDLRenderer3_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplSDLRenderer3_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplSDLRenderer3_RenderState
-{
- SDL_Renderer* Renderer;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_vulkan.cpp b/libs/imgui-1.92.1/backends/imgui_impl_vulkan.cpp
deleted file mode 100644
index a5dd75c..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_vulkan.cpp
+++ /dev/null
@@ -1,1849 +0,0 @@
-// dear imgui: Renderer Backend for Vulkan
-// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
-
-// Implemented features:
-// [!] Renderer: User texture binding. Use 'VkDescriptorSet' as texture identifier. Call ImGui_ImplVulkan_AddTexture() to register one. Read the FAQ about ImTextureID/ImTextureRef + https://github.com/ocornut/imgui/pull/914 for discussions.
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// The aim of imgui_impl_vulkan.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-07-07: Vulkan: Fixed texture synchronization issue introduced on 2025-06-11. (#8772)
-// 2025-06-27: Vulkan: Fixed validation errors during texture upload/update by aligning upload size to 'nonCoherentAtomSize'. (#8743, #8744)
-// 2025-06-11: Vulkan: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplVulkan_CreateFontsTexture() and ImGui_ImplVulkan_DestroyFontsTexture().
-// 2025-05-07: Vulkan: Fixed validation errors during window detach in multi-viewport mode. (#8600, #8176)
-// 2025-05-07: Vulkan: Load dynamic rendering functions using vkGetDeviceProcAddr() + try both non-KHR and KHR versions. (#8600, #8326, #8365)
-// 2025-04-07: Vulkan: Deep-copy ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo's pColorAttachmentFormats buffer when set, in order to reduce common user-error of specifying a pointer to data that gets out of scope. (#8282)
-// 2025-02-14: *BREAKING CHANGE*: Added uint32_t api_version to ImGui_ImplVulkan_LoadFunctions().
-// 2025-02-13: Vulkan: Added ApiVersion field in ImGui_ImplVulkan_InitInfo. Default to header version if unspecified. Dynamic rendering path loads "vkCmdBeginRendering/vkCmdEndRendering" (without -KHR suffix) on API 1.3. (#8326)
-// 2025-01-09: Vulkan: Added IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE to clarify how many image sampler descriptors are expected to be available in descriptor pool. (#6642)
-// 2025-01-06: Vulkan: Added more ImGui_ImplVulkanH_XXXX helper functions to simplify our examples.
-// 2024-12-11: Vulkan: Fixed setting VkSwapchainCreateInfoKHR::preTransform for platforms not supporting VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR. (#8222)
-// 2024-11-27: Vulkan: Make user-provided descriptor pool optional. As a convenience, when setting init_info->DescriptorPoolSize the backend will create one itself. (#8172, #4867)
-// 2024-10-07: Vulkan: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-10-07: Vulkan: Expose selected render state in ImGui_ImplVulkan_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-10-07: Vulkan: Compiling with '#define ImTextureID=ImU64' is unnecessary now that dear imgui defaults ImTextureID to u64 instead of void*.
-// 2024-04-19: Vulkan: Added convenience support for Volk via IMGUI_IMPL_VULKAN_USE_VOLK define (you can also use IMGUI_IMPL_VULKAN_NO_PROTOTYPES + wrap Volk via ImGui_ImplVulkan_LoadFunctions().)
-// 2024-02-14: *BREAKING CHANGE*: Moved RenderPass parameter from ImGui_ImplVulkan_Init() function to ImGui_ImplVulkan_InitInfo structure. Not required when using dynamic rendering.
-// 2024-02-12: *BREAKING CHANGE*: Dynamic rendering now require filling PipelineRenderingCreateInfo structure.
-// 2024-01-19: Vulkan: Fixed vkAcquireNextImageKHR() validation errors in VulkanSDK 1.3.275 by allocating one extra semaphore than in-flight frames. (#7236)
-// 2024-01-11: Vulkan: Fixed vkMapMemory() calls unnecessarily using full buffer size (#3957). Fixed MinAllocationSize handing (#7189).
-// 2024-01-03: Vulkan: Added MinAllocationSize field in ImGui_ImplVulkan_InitInfo to workaround zealous "best practice" validation layer. (#7189, #4238)
-// 2024-01-03: Vulkan: Stopped creating command pools with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT as we don't reset them.
-// 2023-11-29: Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs vkDestroyCommandPool(). (#7075)
-// 2023-11-10: *BREAKING CHANGE*: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own command-buffer to upload fonts.
-// *BREAKING CHANGE*: Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unnecessary as we create and destroy those objects in the backend.
-// ImGui_ImplVulkan_CreateFontsTexture() is automatically called by NewFrame() the first time.
-// You can call ImGui_ImplVulkan_CreateFontsTexture() again to recreate the font atlas texture.
-// Added ImGui_ImplVulkan_DestroyFontsTexture() but you probably never need to call this.
-// 2023-07-04: Vulkan: Added optional support for VK_KHR_dynamic_rendering. User needs to set init_info->UseDynamicRendering = true and init_info->ColorAttachmentFormat.
-// 2023-01-02: Vulkan: Fixed sampler passed to ImGui_ImplVulkan_AddTexture() not being honored + removed a bunch of duplicate code.
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2022-10-04: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symmetry. (#914, #5738).
-// 2022-01-20: Vulkan: Added support for ImTextureID as VkDescriptorSet. User need to call ImGui_ImplVulkan_AddTexture(). Building for 32-bit targets requires '#define ImTextureID ImU64'. (#914).
-// 2021-10-15: Vulkan: Call vkCmdSetScissor() at the end of render a full-viewport to reduce likelihood of issues with people using VK_DYNAMIC_STATE_SCISSOR in their app without calling vkCmdSetScissor() explicitly every frame.
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-03-22: Vulkan: Fix mapped memory validation error when buffer sizes are not multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize.
-// 2021-02-18: Vulkan: Change blending equation to preserve alpha in output buffer.
-// 2021-01-27: Vulkan: Added support for custom function load and IMGUI_IMPL_VULKAN_NO_PROTOTYPES by using ImGui_ImplVulkan_LoadFunctions().
-// 2020-11-11: Vulkan: Added support for specifying which subpass to reference during VkPipeline creation.
-// 2020-09-07: Vulkan: Added VkPipeline parameter to ImGui_ImplVulkan_RenderDrawData (default to one passed to ImGui_ImplVulkan_Init).
-// 2020-05-04: Vulkan: Fixed crash if initial frame has no vertices.
-// 2020-04-26: Vulkan: Fixed edge case where render callbacks wouldn't be called if the ImDrawData didn't have vertices.
-// 2019-08-01: Vulkan: Added support for specifying multisample count. Set ImGui_ImplVulkan_InitInfo::MSAASamples to one of the VkSampleCountFlagBits values to use, default is non-multisampled as before.
-// 2019-05-29: Vulkan: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
-// 2019-04-30: Vulkan: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
-// 2019-04-04: *BREAKING CHANGE*: Vulkan: Added ImageCount/MinImageCount fields in ImGui_ImplVulkan_InitInfo, required for initialization (was previously a hard #define IMGUI_VK_QUEUED_FRAMES 2). Added ImGui_ImplVulkan_SetMinImageCount().
-// 2019-04-04: Vulkan: Added VkInstance argument to ImGui_ImplVulkanH_CreateWindow() optional helper.
-// 2019-04-04: Vulkan: Avoid passing negative coordinates to vkCmdSetScissor, which debug validation layers do not like.
-// 2019-04-01: Vulkan: Support for 32-bit index buffer (#define ImDrawIdx unsigned int).
-// 2019-02-16: Vulkan: Viewport and clipping rectangles correctly using draw_data->FramebufferScale to allow retina display.
-// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
-// 2018-08-25: Vulkan: Fixed mishandled VkSurfaceCapabilitiesKHR::maxImageCount=0 case.
-// 2018-06-22: Inverted the parameters to ImGui_ImplVulkan_RenderDrawData() to be consistent with other backends.
-// 2018-06-08: Misc: Extracted imgui_impl_vulkan.cpp/.h away from the old combined GLFW+Vulkan example.
-// 2018-06-08: Vulkan: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
-// 2018-03-03: Vulkan: Various refactor, created a couple of ImGui_ImplVulkanH_XXX helper that the example can use and that viewport support will use.
-// 2018-03-01: Vulkan: Renamed ImGui_ImplVulkan_Init_Info to ImGui_ImplVulkan_InitInfo and fields to match more closely Vulkan terminology.
-// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback, ImGui_ImplVulkan_Render() calls ImGui_ImplVulkan_RenderDrawData() itself.
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2017-05-15: Vulkan: Fix scissor offset being negative. Fix new Vulkan validation warnings. Set required depth member for buffer image copy.
-// 2016-11-13: Vulkan: Fix validation layer warnings and errors and redeclare gl_PerVertex.
-// 2016-10-18: Vulkan: Add location decorators & change to use structs as in/out in glsl, update embedded spv (produced with glslangValidator -x). Null the released resources.
-// 2016-08-27: Vulkan: Fix Vulkan example for use when a depth buffer is active.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_vulkan.h"
-#include <stdio.h>
-#ifndef IM_MAX
-#define IM_MAX(A, B) (((A) >= (B)) ? (A) : (B))
-#endif
-#undef Status // X11 headers are leaking this.
-
-// Visual Studio warnings
-#ifdef _MSC_VER
-#pragma warning (disable: 4127) // condition expression is constant
-#endif
-
-// Forward Declarations
-struct ImGui_ImplVulkan_FrameRenderBuffers;
-struct ImGui_ImplVulkan_WindowRenderBuffers;
-bool ImGui_ImplVulkan_CreateDeviceObjects();
-void ImGui_ImplVulkan_DestroyDeviceObjects();
-void ImGui_ImplVulkan_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkan_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator);
-void ImGui_ImplVulkan_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkan_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator);
-void ImGui_ImplVulkanH_DestroyFrame(VkDevice device, ImGui_ImplVulkanH_Frame* fd, const VkAllocationCallbacks* allocator);
-void ImGui_ImplVulkanH_DestroyFrameSemaphores(VkDevice device, ImGui_ImplVulkanH_FrameSemaphores* fsd, const VkAllocationCallbacks* allocator);
-void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count);
-void ImGui_ImplVulkanH_CreateWindowCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, uint32_t queue_family, const VkAllocationCallbacks* allocator);
-
-// Vulkan prototypes for use with custom loaders
-// (see description of IMGUI_IMPL_VULKAN_NO_PROTOTYPES in imgui_impl_vulkan.h
-#if defined(VK_NO_PROTOTYPES) && !defined(VOLK_H_)
-#define IMGUI_IMPL_VULKAN_USE_LOADER
-static bool g_FunctionsLoaded = false;
-#else
-static bool g_FunctionsLoaded = true;
-#endif
-#ifdef IMGUI_IMPL_VULKAN_USE_LOADER
-#define IMGUI_VULKAN_FUNC_MAP(IMGUI_VULKAN_FUNC_MAP_MACRO) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateCommandBuffers) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateDescriptorSets) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkBeginCommandBuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkBindBufferMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkBindImageMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindDescriptorSets) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindIndexBuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindPipeline) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindVertexBuffers) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdCopyBufferToImage) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdDrawIndexed) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdPipelineBarrier) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdPushConstants) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdSetScissor) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdSetViewport) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateBuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateCommandPool) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateDescriptorPool) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateDescriptorSetLayout) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateFence) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateFramebuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateGraphicsPipelines) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateImage) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateImageView) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreatePipelineLayout) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateRenderPass) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateSampler) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateSemaphore) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateShaderModule) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkCreateSwapchainKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyBuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyCommandPool) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyDescriptorPool) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyDescriptorSetLayout) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyFence) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyFramebuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyImage) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyImageView) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyPipeline) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyPipelineLayout) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyRenderPass) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySampler) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySemaphore) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroyShaderModule) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySurfaceKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySwapchainKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkDeviceWaitIdle) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkEnumeratePhysicalDevices) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkEndCommandBuffer) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkFlushMappedMemoryRanges) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkFreeCommandBuffers) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkFreeDescriptorSets) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkFreeMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetBufferMemoryRequirements) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetDeviceQueue) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetImageMemoryRequirements) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceProperties) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceMemoryProperties) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceQueueFamilyProperties) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceFormatsKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfacePresentModesKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetSwapchainImagesKHR) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkMapMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkQueueSubmit) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkQueueWaitIdle) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkResetCommandPool) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkResetFences) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkUnmapMemory) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkUpdateDescriptorSets) \
- IMGUI_VULKAN_FUNC_MAP_MACRO(vkWaitForFences)
-
-// Define function pointers
-#define IMGUI_VULKAN_FUNC_DEF(func) static PFN_##func func;
-IMGUI_VULKAN_FUNC_MAP(IMGUI_VULKAN_FUNC_DEF)
-#undef IMGUI_VULKAN_FUNC_DEF
-#endif // IMGUI_IMPL_VULKAN_USE_LOADER
-
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
-static PFN_vkCmdBeginRenderingKHR ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR;
-static PFN_vkCmdEndRenderingKHR ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR;
-#endif
-
-// Reusable buffers used for rendering 1 current in-flight frame, for ImGui_ImplVulkan_RenderDrawData()
-// [Please zero-clear before use!]
-struct ImGui_ImplVulkan_FrameRenderBuffers
-{
- VkDeviceMemory VertexBufferMemory;
- VkDeviceMemory IndexBufferMemory;
- VkDeviceSize VertexBufferSize;
- VkDeviceSize IndexBufferSize;
- VkBuffer VertexBuffer;
- VkBuffer IndexBuffer;
-};
-
-// Each viewport will hold 1 ImGui_ImplVulkanH_WindowRenderBuffers
-// [Please zero-clear before use!]
-struct ImGui_ImplVulkan_WindowRenderBuffers
-{
- uint32_t Index;
- uint32_t Count;
- ImVector<ImGui_ImplVulkan_FrameRenderBuffers> FrameRenderBuffers;
-};
-
-struct ImGui_ImplVulkan_Texture
-{
- VkDeviceMemory Memory;
- VkImage Image;
- VkImageView ImageView;
- VkDescriptorSet DescriptorSet;
-
- ImGui_ImplVulkan_Texture() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Vulkan data
-struct ImGui_ImplVulkan_Data
-{
- ImGui_ImplVulkan_InitInfo VulkanInitInfo;
- VkDeviceSize BufferMemoryAlignment;
- VkDeviceSize NonCoherentAtomSize;
- VkPipelineCreateFlags PipelineCreateFlags;
- VkDescriptorSetLayout DescriptorSetLayout;
- VkPipelineLayout PipelineLayout;
- VkPipeline Pipeline;
- VkShaderModule ShaderModuleVert;
- VkShaderModule ShaderModuleFrag;
- VkDescriptorPool DescriptorPool;
-
- // Texture management
- VkSampler TexSampler;
- VkCommandPool TexCommandPool;
- VkCommandBuffer TexCommandBuffer;
-
- // Render buffers for main window
- ImGui_ImplVulkan_WindowRenderBuffers MainWindowRenderBuffers;
-
- ImGui_ImplVulkan_Data()
- {
- memset((void*)this, 0, sizeof(*this));
- BufferMemoryAlignment = 256;
- NonCoherentAtomSize = 64;
- }
-};
-
-//-----------------------------------------------------------------------------
-// SHADERS
-//-----------------------------------------------------------------------------
-
-// backends/vulkan/glsl_shader.vert, compiled with:
-// # glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert
-/*
-#version 450 core
-layout(location = 0) in vec2 aPos;
-layout(location = 1) in vec2 aUV;
-layout(location = 2) in vec4 aColor;
-layout(push_constant) uniform uPushConstant { vec2 uScale; vec2 uTranslate; } pc;
-
-out gl_PerVertex { vec4 gl_Position; };
-layout(location = 0) out struct { vec4 Color; vec2 UV; } Out;
-
-void main()
-{
- Out.Color = aColor;
- Out.UV = aUV;
- gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1);
-}
-*/
-static uint32_t __glsl_shader_vert_spv[] =
-{
- 0x07230203,0x00010000,0x00080001,0x0000002e,0x00000000,0x00020011,0x00000001,0x0006000b,
- 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
- 0x000a000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000b,0x0000000f,0x00000015,
- 0x0000001b,0x0000001c,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d,
- 0x00000000,0x00030005,0x00000009,0x00000000,0x00050006,0x00000009,0x00000000,0x6f6c6f43,
- 0x00000072,0x00040006,0x00000009,0x00000001,0x00005655,0x00030005,0x0000000b,0x0074754f,
- 0x00040005,0x0000000f,0x6c6f4361,0x0000726f,0x00030005,0x00000015,0x00565561,0x00060005,
- 0x00000019,0x505f6c67,0x65567265,0x78657472,0x00000000,0x00060006,0x00000019,0x00000000,
- 0x505f6c67,0x7469736f,0x006e6f69,0x00030005,0x0000001b,0x00000000,0x00040005,0x0000001c,
- 0x736f5061,0x00000000,0x00060005,0x0000001e,0x73755075,0x6e6f4368,0x6e617473,0x00000074,
- 0x00050006,0x0000001e,0x00000000,0x61635375,0x0000656c,0x00060006,0x0000001e,0x00000001,
- 0x61725475,0x616c736e,0x00006574,0x00030005,0x00000020,0x00006370,0x00040047,0x0000000b,
- 0x0000001e,0x00000000,0x00040047,0x0000000f,0x0000001e,0x00000002,0x00040047,0x00000015,
- 0x0000001e,0x00000001,0x00050048,0x00000019,0x00000000,0x0000000b,0x00000000,0x00030047,
- 0x00000019,0x00000002,0x00040047,0x0000001c,0x0000001e,0x00000000,0x00050048,0x0000001e,
- 0x00000000,0x00000023,0x00000000,0x00050048,0x0000001e,0x00000001,0x00000023,0x00000008,
- 0x00030047,0x0000001e,0x00000002,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,
- 0x00030016,0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040017,
- 0x00000008,0x00000006,0x00000002,0x0004001e,0x00000009,0x00000007,0x00000008,0x00040020,
- 0x0000000a,0x00000003,0x00000009,0x0004003b,0x0000000a,0x0000000b,0x00000003,0x00040015,
- 0x0000000c,0x00000020,0x00000001,0x0004002b,0x0000000c,0x0000000d,0x00000000,0x00040020,
- 0x0000000e,0x00000001,0x00000007,0x0004003b,0x0000000e,0x0000000f,0x00000001,0x00040020,
- 0x00000011,0x00000003,0x00000007,0x0004002b,0x0000000c,0x00000013,0x00000001,0x00040020,
- 0x00000014,0x00000001,0x00000008,0x0004003b,0x00000014,0x00000015,0x00000001,0x00040020,
- 0x00000017,0x00000003,0x00000008,0x0003001e,0x00000019,0x00000007,0x00040020,0x0000001a,
- 0x00000003,0x00000019,0x0004003b,0x0000001a,0x0000001b,0x00000003,0x0004003b,0x00000014,
- 0x0000001c,0x00000001,0x0004001e,0x0000001e,0x00000008,0x00000008,0x00040020,0x0000001f,
- 0x00000009,0x0000001e,0x0004003b,0x0000001f,0x00000020,0x00000009,0x00040020,0x00000021,
- 0x00000009,0x00000008,0x0004002b,0x00000006,0x00000028,0x00000000,0x0004002b,0x00000006,
- 0x00000029,0x3f800000,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
- 0x00000005,0x0004003d,0x00000007,0x00000010,0x0000000f,0x00050041,0x00000011,0x00000012,
- 0x0000000b,0x0000000d,0x0003003e,0x00000012,0x00000010,0x0004003d,0x00000008,0x00000016,
- 0x00000015,0x00050041,0x00000017,0x00000018,0x0000000b,0x00000013,0x0003003e,0x00000018,
- 0x00000016,0x0004003d,0x00000008,0x0000001d,0x0000001c,0x00050041,0x00000021,0x00000022,
- 0x00000020,0x0000000d,0x0004003d,0x00000008,0x00000023,0x00000022,0x00050085,0x00000008,
- 0x00000024,0x0000001d,0x00000023,0x00050041,0x00000021,0x00000025,0x00000020,0x00000013,
- 0x0004003d,0x00000008,0x00000026,0x00000025,0x00050081,0x00000008,0x00000027,0x00000024,
- 0x00000026,0x00050051,0x00000006,0x0000002a,0x00000027,0x00000000,0x00050051,0x00000006,
- 0x0000002b,0x00000027,0x00000001,0x00070050,0x00000007,0x0000002c,0x0000002a,0x0000002b,
- 0x00000028,0x00000029,0x00050041,0x00000011,0x0000002d,0x0000001b,0x0000000d,0x0003003e,
- 0x0000002d,0x0000002c,0x000100fd,0x00010038
-};
-
-// backends/vulkan/glsl_shader.frag, compiled with:
-// # glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag
-/*
-#version 450 core
-layout(location = 0) out vec4 fColor;
-layout(set=0, binding=0) uniform sampler2D sTexture;
-layout(location = 0) in struct { vec4 Color; vec2 UV; } In;
-void main()
-{
- fColor = In.Color * texture(sTexture, In.UV.st);
-}
-*/
-static uint32_t __glsl_shader_frag_spv[] =
-{
- 0x07230203,0x00010000,0x00080001,0x0000001e,0x00000000,0x00020011,0x00000001,0x0006000b,
- 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
- 0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000009,0x0000000d,0x00030010,
- 0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d,
- 0x00000000,0x00040005,0x00000009,0x6c6f4366,0x0000726f,0x00030005,0x0000000b,0x00000000,
- 0x00050006,0x0000000b,0x00000000,0x6f6c6f43,0x00000072,0x00040006,0x0000000b,0x00000001,
- 0x00005655,0x00030005,0x0000000d,0x00006e49,0x00050005,0x00000016,0x78655473,0x65727574,
- 0x00000000,0x00040047,0x00000009,0x0000001e,0x00000000,0x00040047,0x0000000d,0x0000001e,
- 0x00000000,0x00040047,0x00000016,0x00000022,0x00000000,0x00040047,0x00000016,0x00000021,
- 0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,
- 0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040020,0x00000008,0x00000003,
- 0x00000007,0x0004003b,0x00000008,0x00000009,0x00000003,0x00040017,0x0000000a,0x00000006,
- 0x00000002,0x0004001e,0x0000000b,0x00000007,0x0000000a,0x00040020,0x0000000c,0x00000001,
- 0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,0x00040015,0x0000000e,0x00000020,
- 0x00000001,0x0004002b,0x0000000e,0x0000000f,0x00000000,0x00040020,0x00000010,0x00000001,
- 0x00000007,0x00090019,0x00000013,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,
- 0x00000001,0x00000000,0x0003001b,0x00000014,0x00000013,0x00040020,0x00000015,0x00000000,
- 0x00000014,0x0004003b,0x00000015,0x00000016,0x00000000,0x0004002b,0x0000000e,0x00000018,
- 0x00000001,0x00040020,0x00000019,0x00000001,0x0000000a,0x00050036,0x00000002,0x00000004,
- 0x00000000,0x00000003,0x000200f8,0x00000005,0x00050041,0x00000010,0x00000011,0x0000000d,
- 0x0000000f,0x0004003d,0x00000007,0x00000012,0x00000011,0x0004003d,0x00000014,0x00000017,
- 0x00000016,0x00050041,0x00000019,0x0000001a,0x0000000d,0x00000018,0x0004003d,0x0000000a,
- 0x0000001b,0x0000001a,0x00050057,0x00000007,0x0000001c,0x00000017,0x0000001b,0x00050085,
- 0x00000007,0x0000001d,0x00000012,0x0000001c,0x0003003e,0x00000009,0x0000001d,0x000100fd,
- 0x00010038
-};
-
-//-----------------------------------------------------------------------------
-// FUNCTIONS
-//-----------------------------------------------------------------------------
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support is not tested and probably dysfunctional in this backend.
-static ImGui_ImplVulkan_Data* ImGui_ImplVulkan_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplVulkan_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-static uint32_t ImGui_ImplVulkan_MemoryType(VkMemoryPropertyFlags properties, uint32_t type_bits)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkPhysicalDeviceMemoryProperties prop;
- vkGetPhysicalDeviceMemoryProperties(v->PhysicalDevice, &prop);
- for (uint32_t i = 0; i < prop.memoryTypeCount; i++)
- if ((prop.memoryTypes[i].propertyFlags & properties) == properties && type_bits & (1 << i))
- return i;
- return 0xFFFFFFFF; // Unable to find memoryType
-}
-
-static void check_vk_result(VkResult err)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- if (!bd)
- return;
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- if (v->CheckVkResultFn)
- v->CheckVkResultFn(err);
-}
-
-// Same as IM_MEMALIGN(). 'alignment' must be a power of two.
-static inline VkDeviceSize AlignBufferSize(VkDeviceSize size, VkDeviceSize alignment)
-{
- return (size + alignment - 1) & ~(alignment - 1);
-}
-
-static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory, VkDeviceSize& buffer_size, VkDeviceSize new_size, VkBufferUsageFlagBits usage)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkResult err;
- if (buffer != VK_NULL_HANDLE)
- vkDestroyBuffer(v->Device, buffer, v->Allocator);
- if (buffer_memory != VK_NULL_HANDLE)
- vkFreeMemory(v->Device, buffer_memory, v->Allocator);
-
- VkDeviceSize buffer_size_aligned = AlignBufferSize(IM_MAX(v->MinAllocationSize, new_size), bd->BufferMemoryAlignment);
- VkBufferCreateInfo buffer_info = {};
- buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
- buffer_info.size = buffer_size_aligned;
- buffer_info.usage = usage;
- buffer_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
- err = vkCreateBuffer(v->Device, &buffer_info, v->Allocator, &buffer);
- check_vk_result(err);
-
- VkMemoryRequirements req;
- vkGetBufferMemoryRequirements(v->Device, buffer, &req);
- bd->BufferMemoryAlignment = (bd->BufferMemoryAlignment > req.alignment) ? bd->BufferMemoryAlignment : req.alignment;
- VkMemoryAllocateInfo alloc_info = {};
- alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
- alloc_info.allocationSize = req.size;
- alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, req.memoryTypeBits);
- err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &buffer_memory);
- check_vk_result(err);
-
- err = vkBindBufferMemory(v->Device, buffer, buffer_memory, 0);
- check_vk_result(err);
- buffer_size = buffer_size_aligned;
-}
-
-static void ImGui_ImplVulkan_SetupRenderState(ImDrawData* draw_data, VkPipeline pipeline, VkCommandBuffer command_buffer, ImGui_ImplVulkan_FrameRenderBuffers* rb, int fb_width, int fb_height)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
-
- // Bind pipeline:
- {
- vkCmdBindPipeline(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
- }
-
- // Bind Vertex And Index Buffer:
- if (draw_data->TotalVtxCount > 0)
- {
- VkBuffer vertex_buffers[1] = { rb->VertexBuffer };
- VkDeviceSize vertex_offset[1] = { 0 };
- vkCmdBindVertexBuffers(command_buffer, 0, 1, vertex_buffers, vertex_offset);
- vkCmdBindIndexBuffer(command_buffer, rb->IndexBuffer, 0, sizeof(ImDrawIdx) == 2 ? VK_INDEX_TYPE_UINT16 : VK_INDEX_TYPE_UINT32);
- }
-
- // Setup viewport:
- {
- VkViewport viewport;
- viewport.x = 0;
- viewport.y = 0;
- viewport.width = (float)fb_width;
- viewport.height = (float)fb_height;
- viewport.minDepth = 0.0f;
- viewport.maxDepth = 1.0f;
- vkCmdSetViewport(command_buffer, 0, 1, &viewport);
- }
-
- // Setup scale and translation:
- // Our visible imgui space lies from draw_data->DisplayPps (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
- {
- float scale[2];
- scale[0] = 2.0f / draw_data->DisplaySize.x;
- scale[1] = 2.0f / draw_data->DisplaySize.y;
- float translate[2];
- translate[0] = -1.0f - draw_data->DisplayPos.x * scale[0];
- translate[1] = -1.0f - draw_data->DisplayPos.y * scale[1];
- vkCmdPushConstants(command_buffer, bd->PipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, sizeof(float) * 0, sizeof(float) * 2, scale);
- vkCmdPushConstants(command_buffer, bd->PipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, sizeof(float) * 2, sizeof(float) * 2, translate);
- }
-}
-
-// Render function
-void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer, VkPipeline pipeline)
-{
- // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplVulkan_UpdateTexture(tex);
-
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- if (pipeline == VK_NULL_HANDLE)
- pipeline = bd->Pipeline;
-
- // Allocate array to store enough vertex/index buffers
- ImGui_ImplVulkan_WindowRenderBuffers* wrb = &bd->MainWindowRenderBuffers;
- if (wrb->FrameRenderBuffers.Size == 0)
- {
- wrb->Index = 0;
- wrb->Count = v->ImageCount;
- wrb->FrameRenderBuffers.resize(wrb->Count);
- memset((void*)wrb->FrameRenderBuffers.Data, 0, wrb->FrameRenderBuffers.size_in_bytes());
- }
- IM_ASSERT(wrb->Count == v->ImageCount);
- wrb->Index = (wrb->Index + 1) % wrb->Count;
- ImGui_ImplVulkan_FrameRenderBuffers* rb = &wrb->FrameRenderBuffers[wrb->Index];
-
- if (draw_data->TotalVtxCount > 0)
- {
- // Create or resize the vertex/index buffers
- VkDeviceSize vertex_size = AlignBufferSize(draw_data->TotalVtxCount * sizeof(ImDrawVert), bd->BufferMemoryAlignment);
- VkDeviceSize index_size = AlignBufferSize(draw_data->TotalIdxCount * sizeof(ImDrawIdx), bd->BufferMemoryAlignment);
- if (rb->VertexBuffer == VK_NULL_HANDLE || rb->VertexBufferSize < vertex_size)
- CreateOrResizeBuffer(rb->VertexBuffer, rb->VertexBufferMemory, rb->VertexBufferSize, vertex_size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT);
- if (rb->IndexBuffer == VK_NULL_HANDLE || rb->IndexBufferSize < index_size)
- CreateOrResizeBuffer(rb->IndexBuffer, rb->IndexBufferMemory, rb->IndexBufferSize, index_size, VK_BUFFER_USAGE_INDEX_BUFFER_BIT);
-
- // Upload vertex/index data into a single contiguous GPU buffer
- ImDrawVert* vtx_dst = nullptr;
- ImDrawIdx* idx_dst = nullptr;
- VkResult err = vkMapMemory(v->Device, rb->VertexBufferMemory, 0, vertex_size, 0, (void**)&vtx_dst);
- check_vk_result(err);
- err = vkMapMemory(v->Device, rb->IndexBufferMemory, 0, index_size, 0, (void**)&idx_dst);
- check_vk_result(err);
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
- VkMappedMemoryRange range[2] = {};
- range[0].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
- range[0].memory = rb->VertexBufferMemory;
- range[0].size = VK_WHOLE_SIZE;
- range[1].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
- range[1].memory = rb->IndexBufferMemory;
- range[1].size = VK_WHOLE_SIZE;
- err = vkFlushMappedMemoryRanges(v->Device, 2, range);
- check_vk_result(err);
- vkUnmapMemory(v->Device, rb->VertexBufferMemory);
- vkUnmapMemory(v->Device, rb->IndexBufferMemory);
- }
-
- // Setup desired Vulkan state
- ImGui_ImplVulkan_SetupRenderState(draw_data, pipeline, command_buffer, rb, fb_width, fb_height);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplVulkan_RenderState render_state;
- render_state.CommandBuffer = command_buffer;
- render_state.Pipeline = pipeline;
- render_state.PipelineLayout = bd->PipelineLayout;
- platform_io.Renderer_RenderState = &render_state;
-
- // Will project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
- ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplVulkan_SetupRenderState(draw_data, pipeline, command_buffer, rb, fb_width, fb_height);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
-
- // Clamp to viewport as vkCmdSetScissor() won't accept values that are off bounds
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle
- VkRect2D scissor;
- scissor.offset.x = (int32_t)(clip_min.x);
- scissor.offset.y = (int32_t)(clip_min.y);
- scissor.extent.width = (uint32_t)(clip_max.x - clip_min.x);
- scissor.extent.height = (uint32_t)(clip_max.y - clip_min.y);
- vkCmdSetScissor(command_buffer, 0, 1, &scissor);
-
- // Bind DescriptorSet with font or user texture
- VkDescriptorSet desc_set = (VkDescriptorSet)pcmd->GetTexID();
- vkCmdBindDescriptorSets(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, bd->PipelineLayout, 0, 1, &desc_set, 0, nullptr);
-
- // Draw
- vkCmdDrawIndexed(command_buffer, pcmd->ElemCount, 1, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset, 0);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
- platform_io.Renderer_RenderState = nullptr;
-
- // Note: at this point both vkCmdSetViewport() and vkCmdSetScissor() have been called.
- // Our last values will leak into user/application rendering IF:
- // - Your app uses a pipeline with VK_DYNAMIC_STATE_VIEWPORT or VK_DYNAMIC_STATE_SCISSOR dynamic state
- // - And you forgot to call vkCmdSetViewport() and vkCmdSetScissor() yourself to explicitly set that state.
- // If you use VK_DYNAMIC_STATE_VIEWPORT or VK_DYNAMIC_STATE_SCISSOR you are responsible for setting the values before rendering.
- // In theory we should aim to backup/restore those values but I am not sure this is possible.
- // We perform a call to vkCmdSetScissor() to set back a full viewport which is likely to fix things for 99% users but technically this is not perfect. (See github #4644)
- VkRect2D scissor = { { 0, 0 }, { (uint32_t)fb_width, (uint32_t)fb_height } };
- vkCmdSetScissor(command_buffer, 0, 1, &scissor);
-}
-
-static void ImGui_ImplVulkan_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplVulkan_Texture* backend_tex = (ImGui_ImplVulkan_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
- IM_ASSERT(backend_tex->DescriptorSet == (VkDescriptorSet)tex->TexID);
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- ImGui_ImplVulkan_RemoveTexture(backend_tex->DescriptorSet);
- vkDestroyImageView(v->Device, backend_tex->ImageView, v->Allocator);
- vkDestroyImage(v->Device, backend_tex->Image, v->Allocator);
- vkFreeMemory(v->Device, backend_tex->Memory, v->Allocator);
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex)
-{
- if (tex->Status == ImTextureStatus_OK)
- return;
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkResult err;
-
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- ImGui_ImplVulkan_Texture* backend_tex = IM_NEW(ImGui_ImplVulkan_Texture)();
-
- // Create the Image:
- {
- VkImageCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
- info.imageType = VK_IMAGE_TYPE_2D;
- info.format = VK_FORMAT_R8G8B8A8_UNORM;
- info.extent.width = tex->Width;
- info.extent.height = tex->Height;
- info.extent.depth = 1;
- info.mipLevels = 1;
- info.arrayLayers = 1;
- info.samples = VK_SAMPLE_COUNT_1_BIT;
- info.tiling = VK_IMAGE_TILING_OPTIMAL;
- info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
- info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
- info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- err = vkCreateImage(v->Device, &info, v->Allocator, &backend_tex->Image);
- check_vk_result(err);
- VkMemoryRequirements req;
- vkGetImageMemoryRequirements(v->Device, backend_tex->Image, &req);
- VkMemoryAllocateInfo alloc_info = {};
- alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
- alloc_info.allocationSize = IM_MAX(v->MinAllocationSize, req.size);
- alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, req.memoryTypeBits);
- err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &backend_tex->Memory);
- check_vk_result(err);
- err = vkBindImageMemory(v->Device, backend_tex->Image, backend_tex->Memory, 0);
- check_vk_result(err);
- }
-
- // Create the Image View:
- {
- VkImageViewCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
- info.image = backend_tex->Image;
- info.viewType = VK_IMAGE_VIEW_TYPE_2D;
- info.format = VK_FORMAT_R8G8B8A8_UNORM;
- info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- info.subresourceRange.levelCount = 1;
- info.subresourceRange.layerCount = 1;
- err = vkCreateImageView(v->Device, &info, v->Allocator, &backend_tex->ImageView);
- check_vk_result(err);
- }
-
- // Create the Descriptor Set
- backend_tex->DescriptorSet = ImGui_ImplVulkan_AddTexture(bd->TexSampler, backend_tex->ImageView, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
-
- // Store identifiers
- tex->SetTexID((ImTextureID)backend_tex->DescriptorSet);
- tex->BackendUserData = backend_tex;
- }
-
- if (tex->Status == ImTextureStatus_WantCreate || tex->Status == ImTextureStatus_WantUpdates)
- {
- ImGui_ImplVulkan_Texture* backend_tex = (ImGui_ImplVulkan_Texture*)tex->BackendUserData;
-
- // Update full texture or selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->UpdateRect but you can use tex->Updates[] to upload individual regions.
- // We could use the smaller rect on _WantCreate but using the full rect allows us to clear the texture.
- const int upload_x = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.x;
- const int upload_y = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.y;
- const int upload_w = (tex->Status == ImTextureStatus_WantCreate) ? tex->Width : tex->UpdateRect.w;
- const int upload_h = (tex->Status == ImTextureStatus_WantCreate) ? tex->Height : tex->UpdateRect.h;
-
- // Create the Upload Buffer:
- VkDeviceMemory upload_buffer_memory;
-
- VkBuffer upload_buffer;
- VkDeviceSize upload_pitch = upload_w * tex->BytesPerPixel;
- VkDeviceSize upload_size = AlignBufferSize(upload_h * upload_pitch, bd->NonCoherentAtomSize);
- {
- VkBufferCreateInfo buffer_info = {};
- buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
- buffer_info.size = upload_size;
- buffer_info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
- buffer_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
- err = vkCreateBuffer(v->Device, &buffer_info, v->Allocator, &upload_buffer);
- check_vk_result(err);
- VkMemoryRequirements req;
- vkGetBufferMemoryRequirements(v->Device, upload_buffer, &req);
- bd->BufferMemoryAlignment = (bd->BufferMemoryAlignment > req.alignment) ? bd->BufferMemoryAlignment : req.alignment;
- VkMemoryAllocateInfo alloc_info = {};
- alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
- alloc_info.allocationSize = IM_MAX(v->MinAllocationSize, req.size);
- alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, req.memoryTypeBits);
- err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &upload_buffer_memory);
- check_vk_result(err);
- err = vkBindBufferMemory(v->Device, upload_buffer, upload_buffer_memory, 0);
- check_vk_result(err);
- }
-
- // Upload to Buffer:
- {
- char* map = nullptr;
- err = vkMapMemory(v->Device, upload_buffer_memory, 0, upload_size, 0, (void**)(&map));
- check_vk_result(err);
- for (int y = 0; y < upload_h; y++)
- memcpy(map + upload_pitch * y, tex->GetPixelsAt(upload_x, upload_y + y), (size_t)upload_pitch);
- VkMappedMemoryRange range[1] = {};
- range[0].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
- range[0].memory = upload_buffer_memory;
- range[0].size = upload_size;
- err = vkFlushMappedMemoryRanges(v->Device, 1, range);
- check_vk_result(err);
- vkUnmapMemory(v->Device, upload_buffer_memory);
- }
-
- // Start command buffer
- {
- err = vkResetCommandPool(v->Device, bd->TexCommandPool, 0);
- check_vk_result(err);
- VkCommandBufferBeginInfo begin_info = {};
- begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(bd->TexCommandBuffer, &begin_info);
- check_vk_result(err);
- }
-
- // Copy to Image:
- {
- VkBufferMemoryBarrier upload_barrier[1] = {};
- upload_barrier[0].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
- upload_barrier[0].srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
- upload_barrier[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- upload_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- upload_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- upload_barrier[0].buffer = upload_buffer;
- upload_barrier[0].offset = 0;
- upload_barrier[0].size = upload_size;
-
- VkImageMemoryBarrier copy_barrier[1] = {};
- copy_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
- copy_barrier[0].dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- copy_barrier[0].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- copy_barrier[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
- copy_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- copy_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- copy_barrier[0].image = backend_tex->Image;
- copy_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- copy_barrier[0].subresourceRange.levelCount = 1;
- copy_barrier[0].subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(bd->TexCommandBuffer, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 1, upload_barrier, 1, copy_barrier);
-
- VkBufferImageCopy region = {};
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- region.imageSubresource.layerCount = 1;
- region.imageExtent.width = upload_w;
- region.imageExtent.height = upload_h;
- region.imageExtent.depth = 1;
- region.imageOffset.x = upload_x;
- region.imageOffset.y = upload_y;
- vkCmdCopyBufferToImage(bd->TexCommandBuffer, upload_buffer, backend_tex->Image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &region);
-
- VkImageMemoryBarrier use_barrier[1] = {};
- use_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
- use_barrier[0].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- use_barrier[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
- use_barrier[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
- use_barrier[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
- use_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- use_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- use_barrier[0].image = backend_tex->Image;
- use_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- use_barrier[0].subresourceRange.levelCount = 1;
- use_barrier[0].subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(bd->TexCommandBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, use_barrier);
- }
-
- // End command buffer
- {
- VkSubmitInfo end_info = {};
- end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- end_info.commandBufferCount = 1;
- end_info.pCommandBuffers = &bd->TexCommandBuffer;
- err = vkEndCommandBuffer(bd->TexCommandBuffer);
- check_vk_result(err);
- err = vkQueueSubmit(v->Queue, 1, &end_info, VK_NULL_HANDLE);
- check_vk_result(err);
- }
-
- err = vkQueueWaitIdle(v->Queue); // FIXME-OPT: Suboptimal!
- check_vk_result(err);
- vkDestroyBuffer(v->Device, upload_buffer, v->Allocator);
- vkFreeMemory(v->Device, upload_buffer_memory, v->Allocator);
-
- tex->SetStatus(ImTextureStatus_OK);
- }
-
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames >= (int)bd->VulkanInitInfo.ImageCount)
- ImGui_ImplVulkan_DestroyTexture(tex);
-}
-
-static void ImGui_ImplVulkan_CreateShaderModules(VkDevice device, const VkAllocationCallbacks* allocator)
-{
- // Create the shader modules
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- if (bd->ShaderModuleVert == VK_NULL_HANDLE)
- {
- VkShaderModuleCreateInfo vert_info = {};
- vert_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
- vert_info.codeSize = sizeof(__glsl_shader_vert_spv);
- vert_info.pCode = (uint32_t*)__glsl_shader_vert_spv;
- VkResult err = vkCreateShaderModule(device, &vert_info, allocator, &bd->ShaderModuleVert);
- check_vk_result(err);
- }
- if (bd->ShaderModuleFrag == VK_NULL_HANDLE)
- {
- VkShaderModuleCreateInfo frag_info = {};
- frag_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
- frag_info.codeSize = sizeof(__glsl_shader_frag_spv);
- frag_info.pCode = (uint32_t*)__glsl_shader_frag_spv;
- VkResult err = vkCreateShaderModule(device, &frag_info, allocator, &bd->ShaderModuleFrag);
- check_vk_result(err);
- }
-}
-
-static void ImGui_ImplVulkan_CreatePipeline(VkDevice device, const VkAllocationCallbacks* allocator, VkPipelineCache pipelineCache, VkRenderPass renderPass, VkSampleCountFlagBits MSAASamples, VkPipeline* pipeline, uint32_t subpass)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_CreateShaderModules(device, allocator);
-
- VkPipelineShaderStageCreateInfo stage[2] = {};
- stage[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
- stage[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
- stage[0].module = bd->ShaderModuleVert;
- stage[0].pName = "main";
- stage[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
- stage[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
- stage[1].module = bd->ShaderModuleFrag;
- stage[1].pName = "main";
-
- VkVertexInputBindingDescription binding_desc[1] = {};
- binding_desc[0].stride = sizeof(ImDrawVert);
- binding_desc[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
-
- VkVertexInputAttributeDescription attribute_desc[3] = {};
- attribute_desc[0].location = 0;
- attribute_desc[0].binding = binding_desc[0].binding;
- attribute_desc[0].format = VK_FORMAT_R32G32_SFLOAT;
- attribute_desc[0].offset = offsetof(ImDrawVert, pos);
- attribute_desc[1].location = 1;
- attribute_desc[1].binding = binding_desc[0].binding;
- attribute_desc[1].format = VK_FORMAT_R32G32_SFLOAT;
- attribute_desc[1].offset = offsetof(ImDrawVert, uv);
- attribute_desc[2].location = 2;
- attribute_desc[2].binding = binding_desc[0].binding;
- attribute_desc[2].format = VK_FORMAT_R8G8B8A8_UNORM;
- attribute_desc[2].offset = offsetof(ImDrawVert, col);
-
- VkPipelineVertexInputStateCreateInfo vertex_info = {};
- vertex_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
- vertex_info.vertexBindingDescriptionCount = 1;
- vertex_info.pVertexBindingDescriptions = binding_desc;
- vertex_info.vertexAttributeDescriptionCount = 3;
- vertex_info.pVertexAttributeDescriptions = attribute_desc;
-
- VkPipelineInputAssemblyStateCreateInfo ia_info = {};
- ia_info.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
- ia_info.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-
- VkPipelineViewportStateCreateInfo viewport_info = {};
- viewport_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
- viewport_info.viewportCount = 1;
- viewport_info.scissorCount = 1;
-
- VkPipelineRasterizationStateCreateInfo raster_info = {};
- raster_info.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
- raster_info.polygonMode = VK_POLYGON_MODE_FILL;
- raster_info.cullMode = VK_CULL_MODE_NONE;
- raster_info.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
- raster_info.lineWidth = 1.0f;
-
- VkPipelineMultisampleStateCreateInfo ms_info = {};
- ms_info.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
- ms_info.rasterizationSamples = (MSAASamples != 0) ? MSAASamples : VK_SAMPLE_COUNT_1_BIT;
-
- VkPipelineColorBlendAttachmentState color_attachment[1] = {};
- color_attachment[0].blendEnable = VK_TRUE;
- color_attachment[0].srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
- color_attachment[0].dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
- color_attachment[0].colorBlendOp = VK_BLEND_OP_ADD;
- color_attachment[0].srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
- color_attachment[0].dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
- color_attachment[0].alphaBlendOp = VK_BLEND_OP_ADD;
- color_attachment[0].colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
-
- VkPipelineDepthStencilStateCreateInfo depth_info = {};
- depth_info.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
-
- VkPipelineColorBlendStateCreateInfo blend_info = {};
- blend_info.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
- blend_info.attachmentCount = 1;
- blend_info.pAttachments = color_attachment;
-
- VkDynamicState dynamic_states[2] = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
- VkPipelineDynamicStateCreateInfo dynamic_state = {};
- dynamic_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
- dynamic_state.dynamicStateCount = (uint32_t)IM_ARRAYSIZE(dynamic_states);
- dynamic_state.pDynamicStates = dynamic_states;
-
- VkGraphicsPipelineCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
- info.flags = bd->PipelineCreateFlags;
- info.stageCount = 2;
- info.pStages = stage;
- info.pVertexInputState = &vertex_info;
- info.pInputAssemblyState = &ia_info;
- info.pViewportState = &viewport_info;
- info.pRasterizationState = &raster_info;
- info.pMultisampleState = &ms_info;
- info.pDepthStencilState = &depth_info;
- info.pColorBlendState = &blend_info;
- info.pDynamicState = &dynamic_state;
- info.layout = bd->PipelineLayout;
- info.renderPass = renderPass;
- info.subpass = subpass;
-
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
- if (bd->VulkanInitInfo.UseDynamicRendering)
- {
- IM_ASSERT(bd->VulkanInitInfo.PipelineRenderingCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR && "PipelineRenderingCreateInfo sType must be VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR");
- IM_ASSERT(bd->VulkanInitInfo.PipelineRenderingCreateInfo.pNext == nullptr && "PipelineRenderingCreateInfo pNext must be nullptr");
- info.pNext = &bd->VulkanInitInfo.PipelineRenderingCreateInfo;
- info.renderPass = VK_NULL_HANDLE; // Just make sure it's actually nullptr.
- }
-#endif
-
- VkResult err = vkCreateGraphicsPipelines(device, pipelineCache, 1, &info, allocator, pipeline);
- check_vk_result(err);
-}
-
-bool ImGui_ImplVulkan_CreateDeviceObjects()
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkResult err;
-
- if (!bd->TexSampler)
- {
- // Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling.
- VkSamplerCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
- info.magFilter = VK_FILTER_LINEAR;
- info.minFilter = VK_FILTER_LINEAR;
- info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
- info.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
- info.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
- info.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
- info.minLod = -1000;
- info.maxLod = 1000;
- info.maxAnisotropy = 1.0f;
- err = vkCreateSampler(v->Device, &info, v->Allocator, &bd->TexSampler);
- check_vk_result(err);
- }
-
- if (!bd->DescriptorSetLayout)
- {
- VkDescriptorSetLayoutBinding binding[1] = {};
- binding[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
- binding[0].descriptorCount = 1;
- binding[0].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
- VkDescriptorSetLayoutCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
- info.bindingCount = 1;
- info.pBindings = binding;
- err = vkCreateDescriptorSetLayout(v->Device, &info, v->Allocator, &bd->DescriptorSetLayout);
- check_vk_result(err);
- }
-
- if (v->DescriptorPoolSize != 0)
- {
- IM_ASSERT(v->DescriptorPoolSize >= IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE);
- VkDescriptorPoolSize pool_size = { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, v->DescriptorPoolSize };
- VkDescriptorPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
- pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
- pool_info.maxSets = v->DescriptorPoolSize;
- pool_info.poolSizeCount = 1;
- pool_info.pPoolSizes = &pool_size;
-
- err = vkCreateDescriptorPool(v->Device, &pool_info, v->Allocator, &bd->DescriptorPool);
- check_vk_result(err);
- }
-
- if (!bd->PipelineLayout)
- {
- // Constants: we are using 'vec2 offset' and 'vec2 scale' instead of a full 3d projection matrix
- VkPushConstantRange push_constants[1] = {};
- push_constants[0].stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
- push_constants[0].offset = sizeof(float) * 0;
- push_constants[0].size = sizeof(float) * 4;
- VkDescriptorSetLayout set_layout[1] = { bd->DescriptorSetLayout };
- VkPipelineLayoutCreateInfo layout_info = {};
- layout_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
- layout_info.setLayoutCount = 1;
- layout_info.pSetLayouts = set_layout;
- layout_info.pushConstantRangeCount = 1;
- layout_info.pPushConstantRanges = push_constants;
- err = vkCreatePipelineLayout(v->Device, &layout_info, v->Allocator, &bd->PipelineLayout);
- check_vk_result(err);
- }
-
- ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, v->PipelineCache, v->RenderPass, v->MSAASamples, &bd->Pipeline, v->Subpass);
-
- // Create command pool/buffer for texture upload
- if (!bd->TexCommandPool)
- {
- VkCommandPoolCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
- info.flags = 0;
- info.queueFamilyIndex = v->QueueFamily;
- err = vkCreateCommandPool(v->Device, &info, v->Allocator, &bd->TexCommandPool);
- check_vk_result(err);
- }
- if (!bd->TexCommandBuffer)
- {
- VkCommandBufferAllocateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
- info.commandPool = bd->TexCommandPool;
- info.commandBufferCount = 1;
- err = vkAllocateCommandBuffers(v->Device, &info, &bd->TexCommandBuffer);
- check_vk_result(err);
- }
-
- return true;
-}
-
-void ImGui_ImplVulkan_DestroyDeviceObjects()
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- ImGui_ImplVulkan_DestroyWindowRenderBuffers(v->Device, &bd->MainWindowRenderBuffers, v->Allocator);
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplVulkan_DestroyTexture(tex);
-
- if (bd->TexCommandBuffer) { vkFreeCommandBuffers(v->Device, bd->TexCommandPool, 1, &bd->TexCommandBuffer); bd->TexCommandBuffer = VK_NULL_HANDLE; }
- if (bd->TexCommandPool) { vkDestroyCommandPool(v->Device, bd->TexCommandPool, v->Allocator); bd->TexCommandPool = VK_NULL_HANDLE; }
- if (bd->TexSampler) { vkDestroySampler(v->Device, bd->TexSampler, v->Allocator); bd->TexSampler = VK_NULL_HANDLE; }
- if (bd->ShaderModuleVert) { vkDestroyShaderModule(v->Device, bd->ShaderModuleVert, v->Allocator); bd->ShaderModuleVert = VK_NULL_HANDLE; }
- if (bd->ShaderModuleFrag) { vkDestroyShaderModule(v->Device, bd->ShaderModuleFrag, v->Allocator); bd->ShaderModuleFrag = VK_NULL_HANDLE; }
- if (bd->DescriptorSetLayout) { vkDestroyDescriptorSetLayout(v->Device, bd->DescriptorSetLayout, v->Allocator); bd->DescriptorSetLayout = VK_NULL_HANDLE; }
- if (bd->PipelineLayout) { vkDestroyPipelineLayout(v->Device, bd->PipelineLayout, v->Allocator); bd->PipelineLayout = VK_NULL_HANDLE; }
- if (bd->Pipeline) { vkDestroyPipeline(v->Device, bd->Pipeline, v->Allocator); bd->Pipeline = VK_NULL_HANDLE; }
- if (bd->DescriptorPool) { vkDestroyDescriptorPool(v->Device, bd->DescriptorPool, v->Allocator); bd->DescriptorPool = VK_NULL_HANDLE; }
-}
-
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
-static void ImGui_ImplVulkan_LoadDynamicRenderingFunctions(uint32_t api_version, PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data)
-{
- IM_UNUSED(api_version);
-
- // Manually load those two (see #5446, #8326, #8365, #8600)
- // - Try loading core (non-KHR) versions first (this will work for Vulkan 1.3+ and the device supports dynamic rendering)
- ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR = reinterpret_cast<PFN_vkCmdBeginRenderingKHR>(loader_func("vkCmdBeginRendering", user_data));
- ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR = reinterpret_cast<PFN_vkCmdEndRenderingKHR>(loader_func("vkCmdEndRendering", user_data));
-
- // - Fallback to KHR versions if core not available (this will work if KHR extension is available and enabled and also the device supports dynamic rendering)
- if (ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR == nullptr || ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR == nullptr)
- {
- ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR = reinterpret_cast<PFN_vkCmdBeginRenderingKHR>(loader_func("vkCmdBeginRenderingKHR", user_data));
- ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR = reinterpret_cast<PFN_vkCmdEndRenderingKHR>(loader_func("vkCmdEndRenderingKHR", user_data));
- }
-}
-#endif
-
-// If unspecified by user, assume that ApiVersion == HeaderVersion
- // We don't care about other versions than 1.3 for our checks, so don't need to make this exhaustive (e.g. with all #ifdef VK_VERSION_1_X checks)
-static uint32_t ImGui_ImplVulkan_GetDefaultApiVersion()
-{
-#ifdef VK_HEADER_VERSION_COMPLETE
- return VK_HEADER_VERSION_COMPLETE;
-#else
- return VK_API_VERSION_1_0;
-#endif
-}
-
-bool ImGui_ImplVulkan_LoadFunctions(uint32_t api_version, PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data)
-{
- // Load function pointers
- // You can use the default Vulkan loader using:
- // ImGui_ImplVulkan_LoadFunctions(VK_API_VERSION_1_3, [](const char* function_name, void*) { return vkGetInstanceProcAddr(your_vk_isntance, function_name); });
- // But this would be roughly equivalent to not setting VK_NO_PROTOTYPES.
- if (api_version == 0)
- api_version = ImGui_ImplVulkan_GetDefaultApiVersion();
-
-#ifdef IMGUI_IMPL_VULKAN_USE_LOADER
-#define IMGUI_VULKAN_FUNC_LOAD(func) \
- func = reinterpret_cast<decltype(func)>(loader_func(#func, user_data)); \
- if (func == nullptr) \
- return false;
- IMGUI_VULKAN_FUNC_MAP(IMGUI_VULKAN_FUNC_LOAD)
-#undef IMGUI_VULKAN_FUNC_LOAD
-
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
- ImGui_ImplVulkan_LoadDynamicRenderingFunctions(api_version, loader_func, user_data);
-#endif
-#else
- IM_UNUSED(loader_func);
- IM_UNUSED(user_data);
-#endif
-
- g_FunctionsLoaded = true;
- return true;
-}
-
-bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info)
-{
- IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!");
-
- if (info->ApiVersion == 0)
- info->ApiVersion = ImGui_ImplVulkan_GetDefaultApiVersion();
-
- if (info->UseDynamicRendering)
- {
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
-#ifndef IMGUI_IMPL_VULKAN_USE_LOADER
- ImGui_ImplVulkan_LoadDynamicRenderingFunctions(info->ApiVersion, [](const char* function_name, void* user_data) { return vkGetDeviceProcAddr((VkDevice)user_data, function_name); }, (void*)info->Device);
-#endif
- IM_ASSERT(ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR != nullptr);
- IM_ASSERT(ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR != nullptr);
-#else
- IM_ASSERT(0 && "Can't use dynamic rendering when neither VK_VERSION_1_3 or VK_KHR_dynamic_rendering is defined.");
-#endif
- }
-
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplVulkan_Data* bd = IM_NEW(ImGui_ImplVulkan_Data)();
- io.BackendRendererUserData = (void*)bd;
- io.BackendRendererName = "imgui_impl_vulkan";
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- IM_ASSERT(info->Instance != VK_NULL_HANDLE);
- IM_ASSERT(info->PhysicalDevice != VK_NULL_HANDLE);
- IM_ASSERT(info->Device != VK_NULL_HANDLE);
- IM_ASSERT(info->Queue != VK_NULL_HANDLE);
- if (info->DescriptorPool != VK_NULL_HANDLE) // Either DescriptorPool or DescriptorPoolSize must be set, not both!
- IM_ASSERT(info->DescriptorPoolSize == 0);
- else
- IM_ASSERT(info->DescriptorPoolSize > 0);
- IM_ASSERT(info->MinImageCount >= 2);
- IM_ASSERT(info->ImageCount >= info->MinImageCount);
- if (info->UseDynamicRendering == false)
- IM_ASSERT(info->RenderPass != VK_NULL_HANDLE);
-
- bd->VulkanInitInfo = *info;
-
- VkPhysicalDeviceProperties properties;
- vkGetPhysicalDeviceProperties(info->PhysicalDevice, &properties);
- bd->NonCoherentAtomSize = properties.limits.nonCoherentAtomSize;
-
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- if (v->PipelineRenderingCreateInfo.pColorAttachmentFormats != NULL)
- {
- // Deep copy buffer to reduce error-rate for end user (#8282)
- VkFormat* formats_copy = (VkFormat*)IM_ALLOC(sizeof(VkFormat) * v->PipelineRenderingCreateInfo.colorAttachmentCount);
- memcpy(formats_copy, v->PipelineRenderingCreateInfo.pColorAttachmentFormats, sizeof(VkFormat) * v->PipelineRenderingCreateInfo.colorAttachmentCount);
- v->PipelineRenderingCreateInfo.pColorAttachmentFormats = formats_copy;
- }
-#endif
-
- if (!ImGui_ImplVulkan_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplVulkan_CreateDeviceObjects() failed!"); // <- Can't be hit yet.
-
- return true;
-}
-
-void ImGui_ImplVulkan_Shutdown()
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplVulkan_DestroyDeviceObjects();
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
- IM_FREE((void*)const_cast<VkFormat*>(bd->VulkanInitInfo.PipelineRenderingCreateInfo.pColorAttachmentFormats));
-#endif
-
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplVulkan_NewFrame()
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplVulkan_Init()?");
- IM_UNUSED(bd);
-}
-
-void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- IM_ASSERT(min_image_count >= 2);
- if (bd->VulkanInitInfo.MinImageCount == min_image_count)
- return;
-
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkResult err = vkDeviceWaitIdle(v->Device);
- check_vk_result(err);
- ImGui_ImplVulkan_DestroyWindowRenderBuffers(v->Device, &bd->MainWindowRenderBuffers, v->Allocator);
- bd->VulkanInitInfo.MinImageCount = min_image_count;
-}
-
-// Register a texture by creating a descriptor
-// FIXME: This is experimental in the sense that we are unsure how to best design/tackle this problem, please post to https://github.com/ocornut/imgui/pull/914 if you have suggestions.
-VkDescriptorSet ImGui_ImplVulkan_AddTexture(VkSampler sampler, VkImageView image_view, VkImageLayout image_layout)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkDescriptorPool pool = bd->DescriptorPool ? bd->DescriptorPool : v->DescriptorPool;
-
- // Create Descriptor Set:
- VkDescriptorSet descriptor_set;
- {
- VkDescriptorSetAllocateInfo alloc_info = {};
- alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
- alloc_info.descriptorPool = pool;
- alloc_info.descriptorSetCount = 1;
- alloc_info.pSetLayouts = &bd->DescriptorSetLayout;
- VkResult err = vkAllocateDescriptorSets(v->Device, &alloc_info, &descriptor_set);
- check_vk_result(err);
- }
-
- // Update the Descriptor Set:
- {
- VkDescriptorImageInfo desc_image[1] = {};
- desc_image[0].sampler = sampler;
- desc_image[0].imageView = image_view;
- desc_image[0].imageLayout = image_layout;
- VkWriteDescriptorSet write_desc[1] = {};
- write_desc[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
- write_desc[0].dstSet = descriptor_set;
- write_desc[0].descriptorCount = 1;
- write_desc[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
- write_desc[0].pImageInfo = desc_image;
- vkUpdateDescriptorSets(v->Device, 1, write_desc, 0, nullptr);
- }
- return descriptor_set;
-}
-
-void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set)
-{
- ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
- ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
- VkDescriptorPool pool = bd->DescriptorPool ? bd->DescriptorPool : v->DescriptorPool;
- vkFreeDescriptorSets(v->Device, pool, 1, &descriptor_set);
-}
-
-void ImGui_ImplVulkan_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkan_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator)
-{
- if (buffers->VertexBuffer) { vkDestroyBuffer(device, buffers->VertexBuffer, allocator); buffers->VertexBuffer = VK_NULL_HANDLE; }
- if (buffers->VertexBufferMemory) { vkFreeMemory(device, buffers->VertexBufferMemory, allocator); buffers->VertexBufferMemory = VK_NULL_HANDLE; }
- if (buffers->IndexBuffer) { vkDestroyBuffer(device, buffers->IndexBuffer, allocator); buffers->IndexBuffer = VK_NULL_HANDLE; }
- if (buffers->IndexBufferMemory) { vkFreeMemory(device, buffers->IndexBufferMemory, allocator); buffers->IndexBufferMemory = VK_NULL_HANDLE; }
- buffers->VertexBufferSize = 0;
- buffers->IndexBufferSize = 0;
-}
-
-void ImGui_ImplVulkan_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkan_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator)
-{
- for (uint32_t n = 0; n < buffers->Count; n++)
- ImGui_ImplVulkan_DestroyFrameRenderBuffers(device, &buffers->FrameRenderBuffers[n], allocator);
- buffers->FrameRenderBuffers.clear();
- buffers->Index = 0;
- buffers->Count = 0;
-}
-
-//-------------------------------------------------------------------------
-// Internal / Miscellaneous Vulkan Helpers
-// (Used by example's main.cpp. Used by multi-viewport features. PROBABLY NOT used by your own app.)
-//-------------------------------------------------------------------------
-// You probably do NOT need to use or care about those functions.
-// Those functions only exist because:
-// 1) they facilitate the readability and maintenance of the multiple main.cpp examples files.
-// 2) the upcoming multi-viewport feature will need them internally.
-// Generally we avoid exposing any kind of superfluous high-level helpers in the backends,
-// but it is too much code to duplicate everywhere so we exceptionally expose them.
-//
-// Your engine/app will likely _already_ have code to setup all that stuff (swap chain, render pass, frame buffers, etc.).
-// You may read this code to learn about Vulkan, but it is recommended you use you own custom tailored code to do equivalent work.
-// (The ImGui_ImplVulkanH_XXX functions do not interact with any of the state used by the regular ImGui_ImplVulkan_XXX functions)
-//-------------------------------------------------------------------------
-
-VkSurfaceFormatKHR ImGui_ImplVulkanH_SelectSurfaceFormat(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkFormat* request_formats, int request_formats_count, VkColorSpaceKHR request_color_space)
-{
- IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!");
- IM_ASSERT(request_formats != nullptr);
- IM_ASSERT(request_formats_count > 0);
-
- // Per Spec Format and View Format are expected to be the same unless VK_IMAGE_CREATE_MUTABLE_BIT was set at image creation
- // Assuming that the default behavior is without setting this bit, there is no need for separate Swapchain image and image view format
- // Additionally several new color spaces were introduced with Vulkan Spec v1.0.40,
- // hence we must make sure that a format with the mostly available color space, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, is found and used.
- uint32_t avail_count;
- vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &avail_count, nullptr);
- ImVector<VkSurfaceFormatKHR> avail_format;
- avail_format.resize((int)avail_count);
- vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &avail_count, avail_format.Data);
-
- // First check if only one format, VK_FORMAT_UNDEFINED, is available, which would imply that any format is available
- if (avail_count == 1)
- {
- if (avail_format[0].format == VK_FORMAT_UNDEFINED)
- {
- VkSurfaceFormatKHR ret;
- ret.format = request_formats[0];
- ret.colorSpace = request_color_space;
- return ret;
- }
- else
- {
- // No point in searching another format
- return avail_format[0];
- }
- }
- else
- {
- // Request several formats, the first found will be used
- for (int request_i = 0; request_i < request_formats_count; request_i++)
- for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
- if (avail_format[avail_i].format == request_formats[request_i] && avail_format[avail_i].colorSpace == request_color_space)
- return avail_format[avail_i];
-
- // If none of the requested image formats could be found, use the first available
- return avail_format[0];
- }
-}
-
-VkPresentModeKHR ImGui_ImplVulkanH_SelectPresentMode(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkPresentModeKHR* request_modes, int request_modes_count)
-{
- IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!");
- IM_ASSERT(request_modes != nullptr);
- IM_ASSERT(request_modes_count > 0);
-
- // Request a certain mode and confirm that it is available. If not use VK_PRESENT_MODE_FIFO_KHR which is mandatory
- uint32_t avail_count = 0;
- vkGetPhysicalDeviceSurfacePresentModesKHR(physical_device, surface, &avail_count, nullptr);
- ImVector<VkPresentModeKHR> avail_modes;
- avail_modes.resize((int)avail_count);
- vkGetPhysicalDeviceSurfacePresentModesKHR(physical_device, surface, &avail_count, avail_modes.Data);
- //for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
- // printf("[vulkan] avail_modes[%d] = %d\n", avail_i, avail_modes[avail_i]);
-
- for (int request_i = 0; request_i < request_modes_count; request_i++)
- for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
- if (request_modes[request_i] == avail_modes[avail_i])
- return request_modes[request_i];
-
- return VK_PRESENT_MODE_FIFO_KHR; // Always available
-}
-
-VkPhysicalDevice ImGui_ImplVulkanH_SelectPhysicalDevice(VkInstance instance)
-{
- uint32_t gpu_count;
- VkResult err = vkEnumeratePhysicalDevices(instance, &gpu_count, nullptr);
- check_vk_result(err);
- IM_ASSERT(gpu_count > 0);
-
- ImVector<VkPhysicalDevice> gpus;
- gpus.resize(gpu_count);
- err = vkEnumeratePhysicalDevices(instance, &gpu_count, gpus.Data);
- check_vk_result(err);
-
- // If a number >1 of GPUs got reported, find discrete GPU if present, or use first one available. This covers
- // most common cases (multi-gpu/integrated+dedicated graphics). Handling more complicated setups (multiple
- // dedicated GPUs) is out of scope of this sample.
- for (VkPhysicalDevice& device : gpus)
- {
- VkPhysicalDeviceProperties properties;
- vkGetPhysicalDeviceProperties(device, &properties);
- if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
- return device;
- }
-
- // Use first GPU (Integrated) is a Discrete one is not available.
- if (gpu_count > 0)
- return gpus[0];
- return VK_NULL_HANDLE;
-}
-
-
-uint32_t ImGui_ImplVulkanH_SelectQueueFamilyIndex(VkPhysicalDevice physical_device)
-{
- uint32_t count;
- vkGetPhysicalDeviceQueueFamilyProperties(physical_device, &count, nullptr);
- ImVector<VkQueueFamilyProperties> queues_properties;
- queues_properties.resize((int)count);
- vkGetPhysicalDeviceQueueFamilyProperties(physical_device, &count, queues_properties.Data);
- for (uint32_t i = 0; i < count; i++)
- if (queues_properties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
- return i;
- return (uint32_t)-1;
-}
-
-void ImGui_ImplVulkanH_CreateWindowCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, uint32_t queue_family, const VkAllocationCallbacks* allocator)
-{
- IM_ASSERT(physical_device != VK_NULL_HANDLE && device != VK_NULL_HANDLE);
- IM_UNUSED(physical_device);
-
- // Create Command Buffers
- VkResult err;
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- {
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[i];
- {
- VkCommandPoolCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
- info.flags = 0;
- info.queueFamilyIndex = queue_family;
- err = vkCreateCommandPool(device, &info, allocator, &fd->CommandPool);
- check_vk_result(err);
- }
- {
- VkCommandBufferAllocateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
- info.commandPool = fd->CommandPool;
- info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
- info.commandBufferCount = 1;
- err = vkAllocateCommandBuffers(device, &info, &fd->CommandBuffer);
- check_vk_result(err);
- }
- {
- VkFenceCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
- info.flags = VK_FENCE_CREATE_SIGNALED_BIT;
- err = vkCreateFence(device, &info, allocator, &fd->Fence);
- check_vk_result(err);
- }
- }
-
- for (uint32_t i = 0; i < wd->SemaphoreCount; i++)
- {
- ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[i];
- {
- VkSemaphoreCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
- err = vkCreateSemaphore(device, &info, allocator, &fsd->ImageAcquiredSemaphore);
- check_vk_result(err);
- err = vkCreateSemaphore(device, &info, allocator, &fsd->RenderCompleteSemaphore);
- check_vk_result(err);
- }
- }
-}
-
-int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKHR present_mode)
-{
- if (present_mode == VK_PRESENT_MODE_MAILBOX_KHR)
- return 3;
- if (present_mode == VK_PRESENT_MODE_FIFO_KHR || present_mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR)
- return 2;
- if (present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR)
- return 1;
- IM_ASSERT(0);
- return 1;
-}
-
-// Also destroy old swap chain and in-flight frames data, if any.
-void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count)
-{
- VkResult err;
- VkSwapchainKHR old_swapchain = wd->Swapchain;
- wd->Swapchain = VK_NULL_HANDLE;
- err = vkDeviceWaitIdle(device);
- check_vk_result(err);
-
- // We don't use ImGui_ImplVulkanH_DestroyWindow() because we want to preserve the old swapchain to create the new one.
- // Destroy old Framebuffer
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- ImGui_ImplVulkanH_DestroyFrame(device, &wd->Frames[i], allocator);
- for (uint32_t i = 0; i < wd->SemaphoreCount; i++)
- ImGui_ImplVulkanH_DestroyFrameSemaphores(device, &wd->FrameSemaphores[i], allocator);
- wd->Frames.clear();
- wd->FrameSemaphores.clear();
- wd->ImageCount = 0;
- if (wd->RenderPass)
- vkDestroyRenderPass(device, wd->RenderPass, allocator);
- if (wd->Pipeline)
- vkDestroyPipeline(device, wd->Pipeline, allocator);
-
- // If min image count was not specified, request different count of images dependent on selected present mode
- if (min_image_count == 0)
- min_image_count = ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(wd->PresentMode);
-
- // Create Swapchain
- {
- VkSurfaceCapabilitiesKHR cap;
- err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, wd->Surface, &cap);
- check_vk_result(err);
-
- VkSwapchainCreateInfoKHR info = {};
- info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
- info.surface = wd->Surface;
- info.minImageCount = min_image_count;
- info.imageFormat = wd->SurfaceFormat.format;
- info.imageColorSpace = wd->SurfaceFormat.colorSpace;
- info.imageArrayLayers = 1;
- info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
- info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; // Assume that graphics family == present family
- info.preTransform = (cap.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) ? VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR : cap.currentTransform;
- info.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
- info.presentMode = wd->PresentMode;
- info.clipped = VK_TRUE;
- info.oldSwapchain = old_swapchain;
- if (info.minImageCount < cap.minImageCount)
- info.minImageCount = cap.minImageCount;
- else if (cap.maxImageCount != 0 && info.minImageCount > cap.maxImageCount)
- info.minImageCount = cap.maxImageCount;
- if (cap.currentExtent.width == 0xffffffff)
- {
- info.imageExtent.width = wd->Width = w;
- info.imageExtent.height = wd->Height = h;
- }
- else
- {
- info.imageExtent.width = wd->Width = cap.currentExtent.width;
- info.imageExtent.height = wd->Height = cap.currentExtent.height;
- }
- err = vkCreateSwapchainKHR(device, &info, allocator, &wd->Swapchain);
- check_vk_result(err);
- err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->ImageCount, nullptr);
- check_vk_result(err);
- VkImage backbuffers[16] = {};
- IM_ASSERT(wd->ImageCount >= min_image_count);
- IM_ASSERT(wd->ImageCount < IM_ARRAYSIZE(backbuffers));
- err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->ImageCount, backbuffers);
- check_vk_result(err);
-
- wd->SemaphoreCount = wd->ImageCount + 1;
- wd->Frames.resize(wd->ImageCount);
- wd->FrameSemaphores.resize(wd->SemaphoreCount);
- memset(wd->Frames.Data, 0, wd->Frames.size_in_bytes());
- memset(wd->FrameSemaphores.Data, 0, wd->FrameSemaphores.size_in_bytes());
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- wd->Frames[i].Backbuffer = backbuffers[i];
- }
- if (old_swapchain)
- vkDestroySwapchainKHR(device, old_swapchain, allocator);
-
- // Create the Render Pass
- if (wd->UseDynamicRendering == false)
- {
- VkAttachmentDescription attachment = {};
- attachment.format = wd->SurfaceFormat.format;
- attachment.samples = VK_SAMPLE_COUNT_1_BIT;
- attachment.loadOp = wd->ClearEnable ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
- attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
- attachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- attachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
- VkAttachmentReference color_attachment = {};
- color_attachment.attachment = 0;
- color_attachment.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- VkSubpassDescription subpass = {};
- subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
- subpass.colorAttachmentCount = 1;
- subpass.pColorAttachments = &color_attachment;
- VkSubpassDependency dependency = {};
- dependency.srcSubpass = VK_SUBPASS_EXTERNAL;
- dependency.dstSubpass = 0;
- dependency.srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- dependency.dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- dependency.srcAccessMask = 0;
- dependency.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
- VkRenderPassCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
- info.attachmentCount = 1;
- info.pAttachments = &attachment;
- info.subpassCount = 1;
- info.pSubpasses = &subpass;
- info.dependencyCount = 1;
- info.pDependencies = &dependency;
- err = vkCreateRenderPass(device, &info, allocator, &wd->RenderPass);
- check_vk_result(err);
-
- // We do not create a pipeline by default as this is also used by examples' main.cpp,
- // but secondary viewport in multi-viewport mode may want to create one with:
- //ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->Pipeline, v->Subpass);
- }
-
- // Create The Image Views
- {
- VkImageViewCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
- info.viewType = VK_IMAGE_VIEW_TYPE_2D;
- info.format = wd->SurfaceFormat.format;
- info.components.r = VK_COMPONENT_SWIZZLE_R;
- info.components.g = VK_COMPONENT_SWIZZLE_G;
- info.components.b = VK_COMPONENT_SWIZZLE_B;
- info.components.a = VK_COMPONENT_SWIZZLE_A;
- VkImageSubresourceRange image_range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 };
- info.subresourceRange = image_range;
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- {
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[i];
- info.image = fd->Backbuffer;
- err = vkCreateImageView(device, &info, allocator, &fd->BackbufferView);
- check_vk_result(err);
- }
- }
-
- // Create Framebuffer
- if (wd->UseDynamicRendering == false)
- {
- VkImageView attachment[1];
- VkFramebufferCreateInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
- info.renderPass = wd->RenderPass;
- info.attachmentCount = 1;
- info.pAttachments = attachment;
- info.width = wd->Width;
- info.height = wd->Height;
- info.layers = 1;
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- {
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[i];
- attachment[0] = fd->BackbufferView;
- err = vkCreateFramebuffer(device, &info, allocator, &fd->Framebuffer);
- check_vk_result(err);
- }
- }
-}
-
-// Create or resize window
-void ImGui_ImplVulkanH_CreateOrResizeWindow(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, uint32_t queue_family, const VkAllocationCallbacks* allocator, int width, int height, uint32_t min_image_count)
-{
- IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!");
- (void)instance;
- ImGui_ImplVulkanH_CreateWindowSwapChain(physical_device, device, wd, allocator, width, height, min_image_count);
- ImGui_ImplVulkanH_CreateWindowCommandBuffers(physical_device, device, wd, queue_family, allocator);
-
- // FIXME: to submit the command buffer, we need a queue. In the examples folder, the ImGui_ImplVulkanH_CreateOrResizeWindow function is called
- // before the ImGui_ImplVulkan_Init function, so we don't have access to the queue yet. Here we have the queue_family that we can use to grab
- // a queue from the device and submit the command buffer. It would be better to have access to the queue as suggested in the FIXME below.
- VkCommandPool command_pool;
- VkCommandPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
- pool_info.queueFamilyIndex = queue_family;
- pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
- VkResult err = vkCreateCommandPool(device, &pool_info, allocator, &command_pool);
- check_vk_result(err);
-
- VkFenceCreateInfo fence_info = {};
- fence_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
- VkFence fence;
- err = vkCreateFence(device, &fence_info, allocator, &fence);
- check_vk_result(err);
-
- VkCommandBufferAllocateInfo alloc_info = {};
- alloc_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
- alloc_info.commandPool = command_pool;
- alloc_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
- alloc_info.commandBufferCount = 1;
- VkCommandBuffer command_buffer;
- err = vkAllocateCommandBuffers(device, &alloc_info, &command_buffer);
- check_vk_result(err);
-
- VkCommandBufferBeginInfo begin_info = {};
- begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(command_buffer, &begin_info);
- check_vk_result(err);
-
- // Transition the images to the correct layout for rendering
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- {
- VkImageMemoryBarrier barrier = {};
- barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
- barrier.image = wd->Frames[i].Backbuffer;
- barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- barrier.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
- barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- barrier.subresourceRange.levelCount = 1;
- barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, 0, 0, nullptr, 0, nullptr, 1, &barrier);
- }
-
- err = vkEndCommandBuffer(command_buffer);
- check_vk_result(err);
- VkSubmitInfo submit_info = {};
- submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- submit_info.commandBufferCount = 1;
- submit_info.pCommandBuffers = &command_buffer;
-
- VkQueue queue;
- vkGetDeviceQueue(device, queue_family, 0, &queue);
- err = vkQueueSubmit(queue, 1, &submit_info, fence);
- check_vk_result(err);
- err = vkWaitForFences(device, 1, &fence, VK_TRUE, UINT64_MAX);
- check_vk_result(err);
- err = vkResetFences(device, 1, &fence);
- check_vk_result(err);
-
- err = vkResetCommandPool(device, command_pool, 0);
- check_vk_result(err);
-
- // Destroy command buffer and fence and command pool
- vkFreeCommandBuffers(device, command_pool, 1, &command_buffer);
- vkDestroyCommandPool(device, command_pool, allocator);
- vkDestroyFence(device, fence, allocator);
- command_pool = VK_NULL_HANDLE;
- command_buffer = VK_NULL_HANDLE;
- fence = VK_NULL_HANDLE;
- queue = VK_NULL_HANDLE;
-}
-
-void ImGui_ImplVulkanH_DestroyWindow(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator)
-{
- vkDeviceWaitIdle(device); // FIXME: We could wait on the Queue if we had the queue in wd-> (otherwise VulkanH functions can't use globals)
- //vkQueueWaitIdle(bd->Queue);
-
- for (uint32_t i = 0; i < wd->ImageCount; i++)
- ImGui_ImplVulkanH_DestroyFrame(device, &wd->Frames[i], allocator);
- for (uint32_t i = 0; i < wd->SemaphoreCount; i++)
- ImGui_ImplVulkanH_DestroyFrameSemaphores(device, &wd->FrameSemaphores[i], allocator);
- wd->Frames.clear();
- wd->FrameSemaphores.clear();
- vkDestroyPipeline(device, wd->Pipeline, allocator);
- vkDestroyRenderPass(device, wd->RenderPass, allocator);
- vkDestroySwapchainKHR(device, wd->Swapchain, allocator);
- vkDestroySurfaceKHR(instance, wd->Surface, allocator);
-
- *wd = ImGui_ImplVulkanH_Window();
-}
-
-void ImGui_ImplVulkanH_DestroyFrame(VkDevice device, ImGui_ImplVulkanH_Frame* fd, const VkAllocationCallbacks* allocator)
-{
- vkDestroyFence(device, fd->Fence, allocator);
- vkFreeCommandBuffers(device, fd->CommandPool, 1, &fd->CommandBuffer);
- vkDestroyCommandPool(device, fd->CommandPool, allocator);
- fd->Fence = VK_NULL_HANDLE;
- fd->CommandBuffer = VK_NULL_HANDLE;
- fd->CommandPool = VK_NULL_HANDLE;
-
- vkDestroyImageView(device, fd->BackbufferView, allocator);
- vkDestroyFramebuffer(device, fd->Framebuffer, allocator);
-}
-
-void ImGui_ImplVulkanH_DestroyFrameSemaphores(VkDevice device, ImGui_ImplVulkanH_FrameSemaphores* fsd, const VkAllocationCallbacks* allocator)
-{
- vkDestroySemaphore(device, fsd->ImageAcquiredSemaphore, allocator);
- vkDestroySemaphore(device, fsd->RenderCompleteSemaphore, allocator);
- fsd->ImageAcquiredSemaphore = fsd->RenderCompleteSemaphore = VK_NULL_HANDLE;
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_vulkan.h b/libs/imgui-1.92.1/backends/imgui_impl_vulkan.h
deleted file mode 100644
index 4baa983..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_vulkan.h
+++ /dev/null
@@ -1,223 +0,0 @@
-// dear imgui: Renderer Backend for Vulkan
-// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
-
-// Implemented features:
-// [!] Renderer: User texture binding. Use 'VkDescriptorSet' as texture identifier. Call ImGui_ImplVulkan_AddTexture() to register one. Read the FAQ about ImTextureID/ImTextureRef + https://github.com/ocornut/imgui/pull/914 for discussions.
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-
-// The aim of imgui_impl_vulkan.h/.cpp is to be usable in your engine without any modification.
-// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-#pragma once
-#ifndef IMGUI_DISABLE
-#include "imgui.h" // IMGUI_IMPL_API
-
-// [Configuration] in order to use a custom Vulkan function loader:
-// (1) You'll need to disable default Vulkan function prototypes.
-// We provide a '#define IMGUI_IMPL_VULKAN_NO_PROTOTYPES' convenience configuration flag.
-// In order to make sure this is visible from the imgui_impl_vulkan.cpp compilation unit:
-// - Add '#define IMGUI_IMPL_VULKAN_NO_PROTOTYPES' in your imconfig.h file
-// - Or as a compilation flag in your build system
-// - Or uncomment here (not recommended because you'd be modifying imgui sources!)
-// - Do not simply add it in a .cpp file!
-// (2) Call ImGui_ImplVulkan_LoadFunctions() before ImGui_ImplVulkan_Init() with your custom function.
-// If you have no idea what this is, leave it alone!
-//#define IMGUI_IMPL_VULKAN_NO_PROTOTYPES
-
-// Convenience support for Volk
-// (you can also technically use IMGUI_IMPL_VULKAN_NO_PROTOTYPES + wrap Volk via ImGui_ImplVulkan_LoadFunctions().)
-//#define IMGUI_IMPL_VULKAN_USE_VOLK
-
-#if defined(IMGUI_IMPL_VULKAN_NO_PROTOTYPES) && !defined(VK_NO_PROTOTYPES)
-#define VK_NO_PROTOTYPES
-#endif
-#if defined(VK_USE_PLATFORM_WIN32_KHR) && !defined(NOMINMAX)
-#define NOMINMAX
-#endif
-
-// Vulkan includes
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
-#include <volk.h>
-#else
-#include <vulkan/vulkan.h>
-#endif
-#if defined(VK_VERSION_1_3) || defined(VK_KHR_dynamic_rendering)
-#define IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
-#endif
-
-// Backend uses a small number of descriptors per font atlas + as many as additional calls done to ImGui_ImplVulkan_AddTexture().
-#define IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE (8) // Minimum per atlas
-
-// Initialization data, for ImGui_ImplVulkan_Init()
-// [Please zero-clear before use!]
-// - About descriptor pool:
-// - A VkDescriptorPool should be created with VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
-// and must contain a pool size large enough to hold a small number of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors.
-// - As an convenience, by setting DescriptorPoolSize > 0 the backend will create one for you.
-// - About dynamic rendering:
-// - When using dynamic rendering, set UseDynamicRendering=true and fill PipelineRenderingCreateInfo structure.
-struct ImGui_ImplVulkan_InitInfo
-{
- 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)
- VkInstance Instance;
- VkPhysicalDevice PhysicalDevice;
- VkDevice Device;
- uint32_t QueueFamily;
- VkQueue Queue;
- VkDescriptorPool DescriptorPool; // See requirements in note above; ignored if using DescriptorPoolSize > 0
- VkRenderPass RenderPass; // Ignored if using dynamic rendering
- uint32_t MinImageCount; // >= 2
- uint32_t ImageCount; // >= MinImageCount
- VkSampleCountFlagBits MSAASamples; // 0 defaults to VK_SAMPLE_COUNT_1_BIT
-
- // (Optional)
- VkPipelineCache PipelineCache;
- uint32_t Subpass;
-
- // (Optional) Set to create internal descriptor pool instead of using DescriptorPool
- uint32_t DescriptorPoolSize;
-
- // (Optional) Dynamic Rendering
- // Need to explicitly enable VK_KHR_dynamic_rendering extension to use this, even for Vulkan 1.3.
- bool UseDynamicRendering;
-#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
- VkPipelineRenderingCreateInfoKHR PipelineRenderingCreateInfo;
-#endif
-
- // (Optional) Allocation, Debugging
- const VkAllocationCallbacks* Allocator;
- void (*CheckVkResultFn)(VkResult err);
- VkDeviceSize MinAllocationSize; // Minimum allocation size. Set to 1024*1024 to satisfy zealous best practices validation layer and waste a little memory.
-};
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info);
-IMGUI_IMPL_API void ImGui_ImplVulkan_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplVulkan_NewFrame();
-IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer, VkPipeline pipeline = VK_NULL_HANDLE);
-IMGUI_IMPL_API void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count); // To override MinImageCount after initialization (e.g. if swap chain is recreated)
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex);
-
-// Register a texture (VkDescriptorSet == ImTextureID)
-// FIXME: This is experimental in the sense that we are unsure how to best design/tackle this problem
-// Please post to https://github.com/ocornut/imgui/pull/914 if you have suggestions.
-IMGUI_IMPL_API VkDescriptorSet ImGui_ImplVulkan_AddTexture(VkSampler sampler, VkImageView image_view, VkImageLayout image_layout);
-IMGUI_IMPL_API void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set);
-
-// Optional: load Vulkan functions with a custom function loader
-// This is only useful with IMGUI_IMPL_VULKAN_NO_PROTOTYPES / VK_NO_PROTOTYPES
-IMGUI_IMPL_API bool ImGui_ImplVulkan_LoadFunctions(uint32_t api_version, PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data = nullptr);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplVulkan_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplVulkan_RenderState
-{
- VkCommandBuffer CommandBuffer;
- VkPipeline Pipeline;
- VkPipelineLayout PipelineLayout;
-};
-
-//-------------------------------------------------------------------------
-// Internal / Miscellaneous Vulkan Helpers
-//-------------------------------------------------------------------------
-// Used by example's main.cpp. Used by multi-viewport features. PROBABLY NOT used by your own engine/app.
-//
-// You probably do NOT need to use or care about those functions.
-// Those functions only exist because:
-// 1) they facilitate the readability and maintenance of the multiple main.cpp examples files.
-// 2) the multi-viewport / platform window implementation needs them internally.
-// Generally we avoid exposing any kind of superfluous high-level helpers in the backends,
-// but it is too much code to duplicate everywhere so we exceptionally expose them.
-//
-// Your engine/app will likely _already_ have code to setup all that stuff (swap chain,
-// render pass, frame buffers, etc.). You may read this code if you are curious, but
-// it is recommended you use you own custom tailored code to do equivalent work.
-//
-// We don't provide a strong guarantee that we won't change those functions API.
-//
-// The ImGui_ImplVulkanH_XXX functions should NOT interact with any of the state used
-// by the regular ImGui_ImplVulkan_XXX functions).
-//-------------------------------------------------------------------------
-
-struct ImGui_ImplVulkanH_Frame;
-struct ImGui_ImplVulkanH_Window;
-
-// Helpers
-IMGUI_IMPL_API void ImGui_ImplVulkanH_CreateOrResizeWindow(VkInstance instance, VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wnd, uint32_t queue_family, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count);
-IMGUI_IMPL_API void ImGui_ImplVulkanH_DestroyWindow(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_Window* wnd, const VkAllocationCallbacks* allocator);
-IMGUI_IMPL_API VkSurfaceFormatKHR ImGui_ImplVulkanH_SelectSurfaceFormat(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkFormat* request_formats, int request_formats_count, VkColorSpaceKHR request_color_space);
-IMGUI_IMPL_API VkPresentModeKHR ImGui_ImplVulkanH_SelectPresentMode(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkPresentModeKHR* request_modes, int request_modes_count);
-IMGUI_IMPL_API VkPhysicalDevice ImGui_ImplVulkanH_SelectPhysicalDevice(VkInstance instance);
-IMGUI_IMPL_API uint32_t ImGui_ImplVulkanH_SelectQueueFamilyIndex(VkPhysicalDevice physical_device);
-IMGUI_IMPL_API int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKHR present_mode);
-
-// Helper structure to hold the data needed by one rendering frame
-// (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.)
-// [Please zero-clear before use!]
-struct ImGui_ImplVulkanH_Frame
-{
- VkCommandPool CommandPool;
- VkCommandBuffer CommandBuffer;
- VkFence Fence;
- VkImage Backbuffer;
- VkImageView BackbufferView;
- VkFramebuffer Framebuffer;
-};
-
-struct ImGui_ImplVulkanH_FrameSemaphores
-{
- VkSemaphore ImageAcquiredSemaphore;
- VkSemaphore RenderCompleteSemaphore;
-};
-
-// Helper structure to hold the data needed by one rendering context into one OS window
-// (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.)
-struct ImGui_ImplVulkanH_Window
-{
- int Width;
- int Height;
- VkSwapchainKHR Swapchain;
- VkSurfaceKHR Surface;
- VkSurfaceFormatKHR SurfaceFormat;
- VkPresentModeKHR PresentMode;
- VkRenderPass RenderPass;
- VkPipeline Pipeline; // The window pipeline may uses a different VkRenderPass than the one passed in ImGui_ImplVulkan_InitInfo
- bool UseDynamicRendering;
- bool ClearEnable;
- VkClearValue ClearValue;
- uint32_t FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount)
- uint32_t ImageCount; // Number of simultaneous in-flight frames (returned by vkGetSwapchainImagesKHR, usually derived from min_image_count)
- uint32_t SemaphoreCount; // Number of simultaneous in-flight frames + 1, to be able to use it in vkAcquireNextImageKHR
- uint32_t SemaphoreIndex; // Current set of swapchain wait semaphores we're using (needs to be distinct from per frame data)
- ImVector<ImGui_ImplVulkanH_Frame> Frames;
- ImVector<ImGui_ImplVulkanH_FrameSemaphores> FrameSemaphores;
-
- ImGui_ImplVulkanH_Window()
- {
- memset((void*)this, 0, sizeof(*this));
- PresentMode = (VkPresentModeKHR)~0; // Ensure we get an error if user doesn't set this.
- ClearEnable = true;
- }
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_wgpu.cpp b/libs/imgui-1.92.1/backends/imgui_impl_wgpu.cpp
deleted file mode 100644
index c0ec2e3..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_wgpu.cpp
+++ /dev/null
@@ -1,910 +0,0 @@
-// 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.)
-
-// Implemented features:
-// [X] Renderer: User texture binding. Use 'WGPUTextureView' as ImTextureID. Read the FAQ about ImTextureID/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-// [X] Renderer: Texture updates support for dynamic font system (ImGuiBackendFlags_RendererHasTextures).
-
-// 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
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-06-12: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. (#8465)
-// 2025-02-26: Recreate image bind groups during render. (#8426, #8046, #7765, #8027) + Update for latest webgpu-native changes.
-// 2024-10-14: Update Dawn support for change of string usages. (#8082, #8083)
-// 2024-10-07: Expose selected render state in ImGui_ImplWGPU_RenderState, which you can access in 'void* platform_io.Renderer_RenderState' during draw callbacks.
-// 2024-10-07: Changed default texture sampler to Clamp instead of Repeat/Wrap.
-// 2024-09-16: Added support for optional IMGUI_IMPL_WEBGPU_BACKEND_DAWN / IMGUI_IMPL_WEBGPU_BACKEND_WGPU define to handle ever-changing native implementations. (#7977)
-// 2024-01-22: Added configurable PipelineMultisampleState struct. (#7240)
-// 2024-01-22: (Breaking) ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure instead of variety of parameters, allowing for easier further changes.
-// 2024-01-22: Fixed pipeline layout leak. (#7245)
-// 2024-01-17: Explicitly fill all of WGPUDepthStencilState since standard removed defaults.
-// 2023-07-13: Use WGPUShaderModuleWGSLDescriptor's code instead of source. use WGPUMipmapFilterMode_Linear instead of WGPUFilterMode_Linear. (#6602)
-// 2023-04-11: Align buffer sizes. Use WGSL shaders instead of precompiled SPIR-V.
-// 2023-04-11: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2023-01-25: Revert automatic pipeline layout generation (see https://github.com/gpuweb/gpuweb/issues/2470)
-// 2022-11-24: Fixed validation error with default depth buffer settings.
-// 2022-11-10: Fixed rendering when a depth buffer is enabled. Added 'WGPUTextureFormat depth_format' parameter to ImGui_ImplWGPU_Init().
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2021-11-29: Passing explicit buffer sizes to wgpuRenderPassEncoderSetVertexBuffer()/wgpuRenderPassEncoderSetIndexBuffer().
-// 2021-08-24: Fixed for latest specs.
-// 2021-05-24: Add support for draw_data->FramebufferScale.
-// 2021-05-19: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
-// 2021-05-16: Update to latest WebGPU specs (compatible with Emscripten 2.0.20 and Chrome Canary 92).
-// 2021-02-18: Change blending equation to preserve alpha in output buffer.
-// 2021-01-28: Initial version.
-
-#include "imgui.h"
-
-// When targeting native platforms (i.e. NOT emscripten), one of IMGUI_IMPL_WEBGPU_BACKEND_DAWN
-// or IMGUI_IMPL_WEBGPU_BACKEND_WGPU must be provided. See imgui_impl_wgpu.h for more details.
-#ifndef __EMSCRIPTEN__
- #if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) == defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- #error exactly one of IMGUI_IMPL_WEBGPU_BACKEND_DAWN or IMGUI_IMPL_WEBGPU_BACKEND_WGPU must be defined!
- #endif
-#else
- #if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- #error neither IMGUI_IMPL_WEBGPU_BACKEND_DAWN nor IMGUI_IMPL_WEBGPU_BACKEND_WGPU may be defined if targeting emscripten!
- #endif
-#endif
-
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_wgpu.h"
-#include <limits.h>
-#include <webgpu/webgpu.h>
-
-#ifdef IMGUI_IMPL_WEBGPU_BACKEND_DAWN
-// Dawn renamed WGPUProgrammableStageDescriptor to WGPUComputeState (see: https://github.com/webgpu-native/webgpu-headers/pull/413)
-// Using type alias until WGPU adopts the same naming convention (#8369)
-using WGPUProgrammableStageDescriptor = WGPUComputeState;
-#endif
-
-// Dear ImGui prototypes from imgui_internal.h
-extern ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed);
-#define MEMALIGN(_SIZE,_ALIGN) (((_SIZE) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1)) // Memory align (copied from IM_ALIGN() macro).
-
-// WebGPU data
-struct ImGui_ImplWGPU_Texture
-{
- WGPUTexture Texture = nullptr;
- WGPUTextureView TextureView = nullptr;
-};
-
-struct RenderResources
-{
- WGPUSampler Sampler = nullptr; // Sampler for textures
- WGPUBuffer Uniforms = nullptr; // Shader uniforms
- WGPUBindGroup CommonBindGroup = nullptr; // Resources bind-group to bind the common resources to pipeline
- ImGuiStorage ImageBindGroups; // Resources bind-group to bind the font/image resources to pipeline (this is a key->value map)
- WGPUBindGroupLayout ImageBindGroupLayout = nullptr; // Cache layout used for the image bind group. Avoids allocating unnecessary JS objects when working with WebASM
-};
-
-struct FrameResources
-{
- WGPUBuffer IndexBuffer;
- WGPUBuffer VertexBuffer;
- ImDrawIdx* IndexBufferHost;
- ImDrawVert* VertexBufferHost;
- int IndexBufferSize;
- int VertexBufferSize;
-};
-
-struct Uniforms
-{
- float MVP[4][4];
- float Gamma;
-};
-
-struct ImGui_ImplWGPU_Data
-{
- ImGui_ImplWGPU_InitInfo initInfo;
- WGPUDevice wgpuDevice = nullptr;
- WGPUQueue defaultQueue = nullptr;
- WGPUTextureFormat renderTargetFormat = WGPUTextureFormat_Undefined;
- WGPUTextureFormat depthStencilFormat = WGPUTextureFormat_Undefined;
- WGPURenderPipeline pipelineState = nullptr;
-
- RenderResources renderResources;
- FrameResources* pFrameResources = nullptr;
- unsigned int numFramesInFlight = 0;
- unsigned int frameIndex = UINT_MAX;
-};
-
-// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-static ImGui_ImplWGPU_Data* ImGui_ImplWGPU_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplWGPU_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
-}
-
-//-----------------------------------------------------------------------------
-// SHADERS
-//-----------------------------------------------------------------------------
-
-static const char __shader_vert_wgsl[] = R"(
-struct VertexInput {
- @location(0) position: vec2<f32>,
- @location(1) uv: vec2<f32>,
- @location(2) color: vec4<f32>,
-};
-
-struct VertexOutput {
- @builtin(position) position: vec4<f32>,
- @location(0) color: vec4<f32>,
- @location(1) uv: vec2<f32>,
-};
-
-struct Uniforms {
- mvp: mat4x4<f32>,
- gamma: f32,
-};
-
-@group(0) @binding(0) var<uniform> uniforms: Uniforms;
-
-@vertex
-fn main(in: VertexInput) -> VertexOutput {
- var out: VertexOutput;
- out.position = uniforms.mvp * vec4<f32>(in.position, 0.0, 1.0);
- out.color = in.color;
- out.uv = in.uv;
- return out;
-}
-)";
-
-static const char __shader_frag_wgsl[] = R"(
-struct VertexOutput {
- @builtin(position) position: vec4<f32>,
- @location(0) color: vec4<f32>,
- @location(1) uv: vec2<f32>,
-};
-
-struct Uniforms {
- mvp: mat4x4<f32>,
- gamma: f32,
-};
-
-@group(0) @binding(0) var<uniform> uniforms: Uniforms;
-@group(0) @binding(1) var s: sampler;
-@group(1) @binding(0) var t: texture_2d<f32>;
-
-@fragment
-fn main(in: VertexOutput) -> @location(0) vec4<f32> {
- let color = in.color * textureSample(t, s, in.uv);
- let corrected_color = pow(color.rgb, vec3<f32>(uniforms.gamma));
- return vec4<f32>(corrected_color, color.a);
-}
-)";
-
-static void SafeRelease(ImDrawIdx*& res)
-{
- if (res)
- delete[] res;
- res = nullptr;
-}
-static void SafeRelease(ImDrawVert*& res)
-{
- if (res)
- delete[] res;
- res = nullptr;
-}
-static void SafeRelease(WGPUBindGroupLayout& res)
-{
- if (res)
- wgpuBindGroupLayoutRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPUBindGroup& res)
-{
- if (res)
- wgpuBindGroupRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPUBuffer& res)
-{
- if (res)
- wgpuBufferRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPUPipelineLayout& res)
-{
- if (res)
- wgpuPipelineLayoutRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPURenderPipeline& res)
-{
- if (res)
- wgpuRenderPipelineRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPUSampler& res)
-{
- if (res)
- wgpuSamplerRelease(res);
- res = nullptr;
-}
-static void SafeRelease(WGPUShaderModule& res)
-{
- if (res)
- wgpuShaderModuleRelease(res);
- res = nullptr;
-}
-static void SafeRelease(RenderResources& res)
-{
- SafeRelease(res.Sampler);
- SafeRelease(res.Uniforms);
- SafeRelease(res.CommonBindGroup);
- SafeRelease(res.ImageBindGroupLayout);
-};
-
-static void SafeRelease(FrameResources& res)
-{
- SafeRelease(res.IndexBuffer);
- SafeRelease(res.VertexBuffer);
- SafeRelease(res.IndexBufferHost);
- SafeRelease(res.VertexBufferHost);
-}
-
-static WGPUProgrammableStageDescriptor ImGui_ImplWGPU_CreateShaderModule(const char* wgsl_source)
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
-
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPUShaderSourceWGSL wgsl_desc = {};
- wgsl_desc.chain.sType = WGPUSType_ShaderSourceWGSL;
- wgsl_desc.code = { wgsl_source, WGPU_STRLEN };
-#else
- WGPUShaderModuleWGSLDescriptor wgsl_desc = {};
- wgsl_desc.chain.sType = WGPUSType_ShaderModuleWGSLDescriptor;
- wgsl_desc.code = wgsl_source;
-#endif
-
- WGPUShaderModuleDescriptor desc = {};
- desc.nextInChain = reinterpret_cast<WGPUChainedStruct*>(&wgsl_desc);
-
- WGPUProgrammableStageDescriptor stage_desc = {};
- stage_desc.module = wgpuDeviceCreateShaderModule(bd->wgpuDevice, &desc);
-
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- stage_desc.entryPoint = { "main", WGPU_STRLEN };
-#else
- stage_desc.entryPoint = "main";
-#endif
- return stage_desc;
-}
-
-static WGPUBindGroup ImGui_ImplWGPU_CreateImageBindGroup(WGPUBindGroupLayout layout, WGPUTextureView texture)
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- WGPUBindGroupEntry image_bg_entries[] = { { nullptr, 0, 0, 0, 0, 0, texture } };
-
- WGPUBindGroupDescriptor image_bg_descriptor = {};
- image_bg_descriptor.layout = layout;
- image_bg_descriptor.entryCount = sizeof(image_bg_entries) / sizeof(WGPUBindGroupEntry);
- image_bg_descriptor.entries = image_bg_entries;
- return wgpuDeviceCreateBindGroup(bd->wgpuDevice, &image_bg_descriptor);
-}
-
-static void ImGui_ImplWGPU_SetupRenderState(ImDrawData* draw_data, WGPURenderPassEncoder ctx, FrameResources* fr)
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
-
- // Setup orthographic projection matrix into our constant buffer
- // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
- {
- float L = draw_data->DisplayPos.x;
- float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
- float T = draw_data->DisplayPos.y;
- float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
- float mvp[4][4] =
- {
- { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
- { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
- { 0.0f, 0.0f, 0.5f, 0.0f },
- { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
- };
- wgpuQueueWriteBuffer(bd->defaultQueue, bd->renderResources.Uniforms, offsetof(Uniforms, MVP), mvp, sizeof(Uniforms::MVP));
- float gamma;
- switch (bd->renderTargetFormat)
- {
- case WGPUTextureFormat_ASTC10x10UnormSrgb:
- case WGPUTextureFormat_ASTC10x5UnormSrgb:
- case WGPUTextureFormat_ASTC10x6UnormSrgb:
- case WGPUTextureFormat_ASTC10x8UnormSrgb:
- case WGPUTextureFormat_ASTC12x10UnormSrgb:
- case WGPUTextureFormat_ASTC12x12UnormSrgb:
- case WGPUTextureFormat_ASTC4x4UnormSrgb:
- case WGPUTextureFormat_ASTC5x5UnormSrgb:
- case WGPUTextureFormat_ASTC6x5UnormSrgb:
- case WGPUTextureFormat_ASTC6x6UnormSrgb:
- case WGPUTextureFormat_ASTC8x5UnormSrgb:
- case WGPUTextureFormat_ASTC8x6UnormSrgb:
- case WGPUTextureFormat_ASTC8x8UnormSrgb:
- case WGPUTextureFormat_BC1RGBAUnormSrgb:
- case WGPUTextureFormat_BC2RGBAUnormSrgb:
- case WGPUTextureFormat_BC3RGBAUnormSrgb:
- case WGPUTextureFormat_BC7RGBAUnormSrgb:
- case WGPUTextureFormat_BGRA8UnormSrgb:
- case WGPUTextureFormat_ETC2RGB8A1UnormSrgb:
- case WGPUTextureFormat_ETC2RGB8UnormSrgb:
- case WGPUTextureFormat_ETC2RGBA8UnormSrgb:
- case WGPUTextureFormat_RGBA8UnormSrgb:
- gamma = 2.2f;
- break;
- default:
- gamma = 1.0f;
- }
- wgpuQueueWriteBuffer(bd->defaultQueue, bd->renderResources.Uniforms, offsetof(Uniforms, Gamma), &gamma, sizeof(Uniforms::Gamma));
- }
-
- // Setup viewport
- wgpuRenderPassEncoderSetViewport(ctx, 0, 0, draw_data->FramebufferScale.x * draw_data->DisplaySize.x, draw_data->FramebufferScale.y * draw_data->DisplaySize.y, 0, 1);
-
- // Bind shader and vertex buffers
- wgpuRenderPassEncoderSetVertexBuffer(ctx, 0, fr->VertexBuffer, 0, fr->VertexBufferSize * sizeof(ImDrawVert));
- wgpuRenderPassEncoderSetIndexBuffer(ctx, fr->IndexBuffer, sizeof(ImDrawIdx) == 2 ? WGPUIndexFormat_Uint16 : WGPUIndexFormat_Uint32, 0, fr->IndexBufferSize * sizeof(ImDrawIdx));
- wgpuRenderPassEncoderSetPipeline(ctx, bd->pipelineState);
- wgpuRenderPassEncoderSetBindGroup(ctx, 0, bd->renderResources.CommonBindGroup, 0, nullptr);
-
- // Setup blend factor
- WGPUColor blend_color = { 0.f, 0.f, 0.f, 0.f };
- wgpuRenderPassEncoderSetBlendConstant(ctx, &blend_color);
-}
-
-// Render function
-// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
-void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder)
-{
- // Avoid rendering when minimized
- int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- if (fb_width <= 0 || fb_height <= 0 || draw_data->CmdListsCount == 0)
- return;
-
- // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- ImGui_ImplWGPU_UpdateTexture(tex);
-
- // FIXME: Assuming that this only gets called once per frame!
- // If not, we can't just re-allocate the IB or VB, we'll have to do a proper allocator.
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- bd->frameIndex = bd->frameIndex + 1;
- FrameResources* fr = &bd->pFrameResources[bd->frameIndex % bd->numFramesInFlight];
-
- // Create and grow vertex/index buffers if needed
- if (fr->VertexBuffer == nullptr || fr->VertexBufferSize < draw_data->TotalVtxCount)
- {
- if (fr->VertexBuffer)
- {
- wgpuBufferDestroy(fr->VertexBuffer);
- wgpuBufferRelease(fr->VertexBuffer);
- }
- SafeRelease(fr->VertexBufferHost);
- fr->VertexBufferSize = draw_data->TotalVtxCount + 5000;
-
- WGPUBufferDescriptor vb_desc =
- {
- nullptr,
- "Dear ImGui Vertex buffer",
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPU_STRLEN,
-#endif
- WGPUBufferUsage_CopyDst | WGPUBufferUsage_Vertex,
- MEMALIGN(fr->VertexBufferSize * sizeof(ImDrawVert), 4),
- false
- };
- fr->VertexBuffer = wgpuDeviceCreateBuffer(bd->wgpuDevice, &vb_desc);
- if (!fr->VertexBuffer)
- return;
-
- fr->VertexBufferHost = new ImDrawVert[fr->VertexBufferSize];
- }
- if (fr->IndexBuffer == nullptr || fr->IndexBufferSize < draw_data->TotalIdxCount)
- {
- if (fr->IndexBuffer)
- {
- wgpuBufferDestroy(fr->IndexBuffer);
- wgpuBufferRelease(fr->IndexBuffer);
- }
- SafeRelease(fr->IndexBufferHost);
- fr->IndexBufferSize = draw_data->TotalIdxCount + 10000;
-
- WGPUBufferDescriptor ib_desc =
- {
- nullptr,
- "Dear ImGui Index buffer",
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPU_STRLEN,
-#endif
- WGPUBufferUsage_CopyDst | WGPUBufferUsage_Index,
- MEMALIGN(fr->IndexBufferSize * sizeof(ImDrawIdx), 4),
- false
- };
- fr->IndexBuffer = wgpuDeviceCreateBuffer(bd->wgpuDevice, &ib_desc);
- if (!fr->IndexBuffer)
- return;
-
- fr->IndexBufferHost = new ImDrawIdx[fr->IndexBufferSize];
- }
-
- // Upload vertex/index data into a single contiguous GPU buffer
- ImDrawVert* vtx_dst = (ImDrawVert*)fr->VertexBufferHost;
- ImDrawIdx* idx_dst = (ImDrawIdx*)fr->IndexBufferHost;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- memcpy(vtx_dst, draw_list->VtxBuffer.Data, draw_list->VtxBuffer.Size * sizeof(ImDrawVert));
- memcpy(idx_dst, draw_list->IdxBuffer.Data, draw_list->IdxBuffer.Size * sizeof(ImDrawIdx));
- vtx_dst += draw_list->VtxBuffer.Size;
- idx_dst += draw_list->IdxBuffer.Size;
- }
- int64_t vb_write_size = MEMALIGN((char*)vtx_dst - (char*)fr->VertexBufferHost, 4);
- int64_t ib_write_size = MEMALIGN((char*)idx_dst - (char*)fr->IndexBufferHost, 4);
- wgpuQueueWriteBuffer(bd->defaultQueue, fr->VertexBuffer, 0, fr->VertexBufferHost, vb_write_size);
- wgpuQueueWriteBuffer(bd->defaultQueue, fr->IndexBuffer, 0, fr->IndexBufferHost, ib_write_size);
-
- // Setup desired render state
- ImGui_ImplWGPU_SetupRenderState(draw_data, pass_encoder, fr);
-
- // Setup render state structure (for callbacks and custom texture bindings)
- ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
- ImGui_ImplWGPU_RenderState render_state;
- render_state.Device = bd->wgpuDevice;
- render_state.RenderPassEncoder = pass_encoder;
- platform_io.Renderer_RenderState = &render_state;
-
- // Render command lists
- // (Because we merged all buffers into a single one, we maintain our own offset into them)
- int global_vtx_offset = 0;
- int global_idx_offset = 0;
- ImVec2 clip_scale = draw_data->FramebufferScale;
- ImVec2 clip_off = draw_data->DisplayPos;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* draw_list = draw_data->CmdLists[n];
- for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback != nullptr)
- {
- // User callback, registered via ImDrawList::AddCallback()
- // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- ImGui_ImplWGPU_SetupRenderState(draw_data, pass_encoder, fr);
- else
- pcmd->UserCallback(draw_list, pcmd);
- }
- else
- {
- // Bind custom texture
- ImTextureID tex_id = pcmd->GetTexID();
- ImGuiID tex_id_hash = ImHashData(&tex_id, sizeof(tex_id), 0);
- WGPUBindGroup bind_group = (WGPUBindGroup)bd->renderResources.ImageBindGroups.GetVoidPtr(tex_id_hash);
- if (!bind_group)
- {
- bind_group = ImGui_ImplWGPU_CreateImageBindGroup(bd->renderResources.ImageBindGroupLayout, (WGPUTextureView)tex_id);
- bd->renderResources.ImageBindGroups.SetVoidPtr(tex_id_hash, bind_group);
- }
- wgpuRenderPassEncoderSetBindGroup(pass_encoder, 1, (WGPUBindGroup)bind_group, 0, nullptr);
-
- // Project scissor/clipping rectangles into framebuffer space
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
-
- // Clamp to viewport as wgpuRenderPassEncoderSetScissorRect() won't accept values that are off bounds
- if (clip_min.x < 0.0f) { clip_min.x = 0.0f; }
- if (clip_min.y < 0.0f) { clip_min.y = 0.0f; }
- if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; }
- if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; }
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // Apply scissor/clipping rectangle, Draw
- wgpuRenderPassEncoderSetScissorRect(pass_encoder, (uint32_t)clip_min.x, (uint32_t)clip_min.y, (uint32_t)(clip_max.x - clip_min.x), (uint32_t)(clip_max.y - clip_min.y));
- wgpuRenderPassEncoderDrawIndexed(pass_encoder, pcmd->ElemCount, 1, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset, 0);
- }
- }
- global_idx_offset += draw_list->IdxBuffer.Size;
- global_vtx_offset += draw_list->VtxBuffer.Size;
- }
-
- // Remove all ImageBindGroups
- ImGuiStorage& image_bind_groups = bd->renderResources.ImageBindGroups;
- for (int i = 0; i < image_bind_groups.Data.Size; i++)
- {
- WGPUBindGroup bind_group = (WGPUBindGroup)image_bind_groups.Data[i].val_p;
- SafeRelease(bind_group);
- }
- image_bind_groups.Data.resize(0);
-
- platform_io.Renderer_RenderState = nullptr;
-}
-
-static void ImGui_ImplWGPU_DestroyTexture(ImTextureData* tex)
-{
- ImGui_ImplWGPU_Texture* backend_tex = (ImGui_ImplWGPU_Texture*)tex->BackendUserData;
- if (backend_tex == nullptr)
- return;
-
- IM_ASSERT(backend_tex->TextureView == (WGPUTextureView)(intptr_t)tex->TexID);
- wgpuTextureViewRelease(backend_tex->TextureView);
- wgpuTextureRelease(backend_tex->Texture);
- IM_DELETE(backend_tex);
-
- // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- tex->BackendUserData = nullptr;
-}
-
-void ImGui_ImplWGPU_UpdateTexture(ImTextureData* tex)
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create and upload new texture to graphics system
- //IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
- IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
- ImGui_ImplWGPU_Texture* backend_tex = IM_NEW(ImGui_ImplWGPU_Texture)();
-
- // Create texture
- WGPUTextureDescriptor tex_desc = {};
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- tex_desc.label = { "Dear ImGui Texture", WGPU_STRLEN };
-#else
- tex_desc.label = "Dear ImGui Texture";
-#endif
- tex_desc.dimension = WGPUTextureDimension_2D;
- tex_desc.size.width = tex->Width;
- tex_desc.size.height = tex->Height;
- tex_desc.size.depthOrArrayLayers = 1;
- tex_desc.sampleCount = 1;
- tex_desc.format = WGPUTextureFormat_RGBA8Unorm;
- tex_desc.mipLevelCount = 1;
- tex_desc.usage = WGPUTextureUsage_CopyDst | WGPUTextureUsage_TextureBinding;
- backend_tex->Texture = wgpuDeviceCreateTexture(bd->wgpuDevice, &tex_desc);
-
- // Create texture view
- WGPUTextureViewDescriptor tex_view_desc = {};
- tex_view_desc.format = WGPUTextureFormat_RGBA8Unorm;
- tex_view_desc.dimension = WGPUTextureViewDimension_2D;
- tex_view_desc.baseMipLevel = 0;
- tex_view_desc.mipLevelCount = 1;
- tex_view_desc.baseArrayLayer = 0;
- tex_view_desc.arrayLayerCount = 1;
- tex_view_desc.aspect = WGPUTextureAspect_All;
- backend_tex->TextureView = wgpuTextureCreateView(backend_tex->Texture, &tex_view_desc);
-
- // Store identifiers
- tex->SetTexID((ImTextureID)(intptr_t)backend_tex->TextureView);
- tex->BackendUserData = backend_tex;
- // We don't set tex->Status to ImTextureStatus_OK to let the code fallthrough below.
- }
-
- if (tex->Status == ImTextureStatus_WantCreate || tex->Status == ImTextureStatus_WantUpdates)
- {
- ImGui_ImplWGPU_Texture* backend_tex = (ImGui_ImplWGPU_Texture*)tex->BackendUserData;
- IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
-
- // We could use the smaller rect on _WantCreate but using the full rect allows us to clear the texture.
- const int upload_x = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.x;
- const int upload_y = (tex->Status == ImTextureStatus_WantCreate) ? 0 : tex->UpdateRect.y;
- const int upload_w = (tex->Status == ImTextureStatus_WantCreate) ? tex->Width : tex->UpdateRect.w;
- const int upload_h = (tex->Status == ImTextureStatus_WantCreate) ? tex->Height : tex->UpdateRect.h;
-
- // Update full texture or selected blocks. We only ever write to textures regions which have never been used before!
- // This backend choose to use tex->UpdateRect but you can use tex->Updates[] to upload individual regions.
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPUTexelCopyTextureInfo dst_view = {};
-#else
- WGPUImageCopyTexture dst_view = {};
-#endif
- dst_view.texture = backend_tex->Texture;
- dst_view.mipLevel = 0;
- dst_view.origin = { (uint32_t)upload_x, (uint32_t)upload_y, 0 };
- dst_view.aspect = WGPUTextureAspect_All;
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPUTexelCopyBufferLayout layout = {};
-#else
- WGPUTextureDataLayout layout = {};
-#endif
- layout.offset = 0;
- layout.bytesPerRow = tex->Width * tex->BytesPerPixel;
- layout.rowsPerImage = upload_h;
- WGPUExtent3D write_size = { (uint32_t)upload_w, (uint32_t)upload_h, 1 };
- wgpuQueueWriteTexture(bd->defaultQueue, &dst_view, tex->GetPixelsAt(upload_x, upload_y), (uint32_t)(tex->Width * upload_h * tex->BytesPerPixel), &layout, &write_size);
- tex->SetStatus(ImTextureStatus_OK);
- }
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- ImGui_ImplWGPU_DestroyTexture(tex);
-}
-
-static void ImGui_ImplWGPU_CreateUniformBuffer()
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- WGPUBufferDescriptor ub_desc =
- {
- nullptr,
- "Dear ImGui Uniform buffer",
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- WGPU_STRLEN,
-#endif
- WGPUBufferUsage_CopyDst | WGPUBufferUsage_Uniform,
- MEMALIGN(sizeof(Uniforms), 16),
- false
- };
- bd->renderResources.Uniforms = wgpuDeviceCreateBuffer(bd->wgpuDevice, &ub_desc);
-}
-
-bool ImGui_ImplWGPU_CreateDeviceObjects()
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- if (!bd->wgpuDevice)
- return false;
- if (bd->pipelineState)
- ImGui_ImplWGPU_InvalidateDeviceObjects();
-
- // Create render pipeline
- WGPURenderPipelineDescriptor graphics_pipeline_desc = {};
- graphics_pipeline_desc.primitive.topology = WGPUPrimitiveTopology_TriangleList;
- graphics_pipeline_desc.primitive.stripIndexFormat = WGPUIndexFormat_Undefined;
- graphics_pipeline_desc.primitive.frontFace = WGPUFrontFace_CW;
- graphics_pipeline_desc.primitive.cullMode = WGPUCullMode_None;
- graphics_pipeline_desc.multisample = bd->initInfo.PipelineMultisampleState;
-
- // Bind group layouts
- WGPUBindGroupLayoutEntry common_bg_layout_entries[2] = {};
- common_bg_layout_entries[0].binding = 0;
- common_bg_layout_entries[0].visibility = WGPUShaderStage_Vertex | WGPUShaderStage_Fragment;
- common_bg_layout_entries[0].buffer.type = WGPUBufferBindingType_Uniform;
- common_bg_layout_entries[1].binding = 1;
- common_bg_layout_entries[1].visibility = WGPUShaderStage_Fragment;
- common_bg_layout_entries[1].sampler.type = WGPUSamplerBindingType_Filtering;
-
- WGPUBindGroupLayoutEntry image_bg_layout_entries[1] = {};
- image_bg_layout_entries[0].binding = 0;
- image_bg_layout_entries[0].visibility = WGPUShaderStage_Fragment;
- image_bg_layout_entries[0].texture.sampleType = WGPUTextureSampleType_Float;
- image_bg_layout_entries[0].texture.viewDimension = WGPUTextureViewDimension_2D;
-
- WGPUBindGroupLayoutDescriptor common_bg_layout_desc = {};
- common_bg_layout_desc.entryCount = 2;
- common_bg_layout_desc.entries = common_bg_layout_entries;
-
- WGPUBindGroupLayoutDescriptor image_bg_layout_desc = {};
- image_bg_layout_desc.entryCount = 1;
- image_bg_layout_desc.entries = image_bg_layout_entries;
-
- WGPUBindGroupLayout bg_layouts[2];
- bg_layouts[0] = wgpuDeviceCreateBindGroupLayout(bd->wgpuDevice, &common_bg_layout_desc);
- bg_layouts[1] = wgpuDeviceCreateBindGroupLayout(bd->wgpuDevice, &image_bg_layout_desc);
-
- WGPUPipelineLayoutDescriptor layout_desc = {};
- layout_desc.bindGroupLayoutCount = 2;
- layout_desc.bindGroupLayouts = bg_layouts;
- graphics_pipeline_desc.layout = wgpuDeviceCreatePipelineLayout(bd->wgpuDevice, &layout_desc);
-
- // Create the vertex shader
- WGPUProgrammableStageDescriptor vertex_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_vert_wgsl);
- graphics_pipeline_desc.vertex.module = vertex_shader_desc.module;
- graphics_pipeline_desc.vertex.entryPoint = vertex_shader_desc.entryPoint;
-
- // Vertex input configuration
- WGPUVertexAttribute attribute_desc[] =
- {
-#ifdef IMGUI_IMPL_WEBGPU_BACKEND_DAWN
- { nullptr, WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, pos), 0 },
- { nullptr, WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, uv), 1 },
- { nullptr, WGPUVertexFormat_Unorm8x4, (uint64_t)offsetof(ImDrawVert, col), 2 },
-#else
- { WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, pos), 0 },
- { WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, uv), 1 },
- { WGPUVertexFormat_Unorm8x4, (uint64_t)offsetof(ImDrawVert, col), 2 },
-#endif
- };
-
- WGPUVertexBufferLayout buffer_layouts[1];
- buffer_layouts[0].arrayStride = sizeof(ImDrawVert);
- buffer_layouts[0].stepMode = WGPUVertexStepMode_Vertex;
- buffer_layouts[0].attributeCount = 3;
- buffer_layouts[0].attributes = attribute_desc;
-
- graphics_pipeline_desc.vertex.bufferCount = 1;
- graphics_pipeline_desc.vertex.buffers = buffer_layouts;
-
- // Create the pixel shader
- WGPUProgrammableStageDescriptor pixel_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_frag_wgsl);
-
- // Create the blending setup
- WGPUBlendState blend_state = {};
- blend_state.alpha.operation = WGPUBlendOperation_Add;
- blend_state.alpha.srcFactor = WGPUBlendFactor_One;
- blend_state.alpha.dstFactor = WGPUBlendFactor_OneMinusSrcAlpha;
- blend_state.color.operation = WGPUBlendOperation_Add;
- blend_state.color.srcFactor = WGPUBlendFactor_SrcAlpha;
- blend_state.color.dstFactor = WGPUBlendFactor_OneMinusSrcAlpha;
-
- WGPUColorTargetState color_state = {};
- color_state.format = bd->renderTargetFormat;
- color_state.blend = &blend_state;
- color_state.writeMask = WGPUColorWriteMask_All;
-
- WGPUFragmentState fragment_state = {};
- fragment_state.module = pixel_shader_desc.module;
- fragment_state.entryPoint = pixel_shader_desc.entryPoint;
- fragment_state.targetCount = 1;
- fragment_state.targets = &color_state;
-
- graphics_pipeline_desc.fragment = &fragment_state;
-
- // Create depth-stencil State
- WGPUDepthStencilState depth_stencil_state = {};
- depth_stencil_state.format = bd->depthStencilFormat;
-#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- depth_stencil_state.depthWriteEnabled = WGPUOptionalBool_False;
-#else
- depth_stencil_state.depthWriteEnabled = false;
-#endif
- depth_stencil_state.depthCompare = WGPUCompareFunction_Always;
- depth_stencil_state.stencilFront.compare = WGPUCompareFunction_Always;
- depth_stencil_state.stencilFront.failOp = WGPUStencilOperation_Keep;
- depth_stencil_state.stencilFront.depthFailOp = WGPUStencilOperation_Keep;
- depth_stencil_state.stencilFront.passOp = WGPUStencilOperation_Keep;
- depth_stencil_state.stencilBack.compare = WGPUCompareFunction_Always;
- depth_stencil_state.stencilBack.failOp = WGPUStencilOperation_Keep;
- depth_stencil_state.stencilBack.depthFailOp = WGPUStencilOperation_Keep;
- depth_stencil_state.stencilBack.passOp = WGPUStencilOperation_Keep;
-
- // Configure disabled depth-stencil state
- graphics_pipeline_desc.depthStencil = (bd->depthStencilFormat == WGPUTextureFormat_Undefined) ? nullptr : &depth_stencil_state;
-
- bd->pipelineState = wgpuDeviceCreateRenderPipeline(bd->wgpuDevice, &graphics_pipeline_desc);
-
- ImGui_ImplWGPU_CreateUniformBuffer();
-
- // Create sampler
- // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
- WGPUSamplerDescriptor sampler_desc = {};
- sampler_desc.minFilter = WGPUFilterMode_Linear;
- sampler_desc.magFilter = WGPUFilterMode_Linear;
- sampler_desc.mipmapFilter = WGPUMipmapFilterMode_Linear;
- sampler_desc.addressModeU = WGPUAddressMode_ClampToEdge;
- sampler_desc.addressModeV = WGPUAddressMode_ClampToEdge;
- sampler_desc.addressModeW = WGPUAddressMode_ClampToEdge;
- sampler_desc.maxAnisotropy = 1;
- bd->renderResources.Sampler = wgpuDeviceCreateSampler(bd->wgpuDevice, &sampler_desc);
-
- // Create resource bind group
- WGPUBindGroupEntry common_bg_entries[] =
- {
- { nullptr, 0, bd->renderResources.Uniforms, 0, MEMALIGN(sizeof(Uniforms), 16), 0, 0 },
- { nullptr, 1, 0, 0, 0, bd->renderResources.Sampler, 0 },
- };
- WGPUBindGroupDescriptor common_bg_descriptor = {};
- common_bg_descriptor.layout = bg_layouts[0];
- common_bg_descriptor.entryCount = sizeof(common_bg_entries) / sizeof(WGPUBindGroupEntry);
- common_bg_descriptor.entries = common_bg_entries;
- bd->renderResources.CommonBindGroup = wgpuDeviceCreateBindGroup(bd->wgpuDevice, &common_bg_descriptor);
- bd->renderResources.ImageBindGroupLayout = bg_layouts[1];
-
- SafeRelease(vertex_shader_desc.module);
- SafeRelease(pixel_shader_desc.module);
- SafeRelease(graphics_pipeline_desc.layout);
- SafeRelease(bg_layouts[0]);
-
- return true;
-}
-
-void ImGui_ImplWGPU_InvalidateDeviceObjects()
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- if (!bd->wgpuDevice)
- return;
-
- SafeRelease(bd->pipelineState);
- SafeRelease(bd->renderResources);
-
- // Destroy all textures
- for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
- if (tex->RefCount == 1)
- ImGui_ImplWGPU_DestroyTexture(tex);
-
- for (unsigned int i = 0; i < bd->numFramesInFlight; i++)
- SafeRelease(bd->pFrameResources[i]);
-}
-
-bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
-
- // Setup backend capabilities flags
- ImGui_ImplWGPU_Data* bd = IM_NEW(ImGui_ImplWGPU_Data)();
- io.BackendRendererUserData = (void*)bd;
-#if defined(__EMSCRIPTEN__)
- io.BackendRendererName = "imgui_impl_webgpu_emscripten";
-#elif defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)
- io.BackendRendererName = "imgui_impl_webgpu_dawn";
-#elif defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
- io.BackendRendererName = "imgui_impl_webgpu_wgpu";
-#else
- io.BackendRendererName = "imgui_impl_webgpu";
-#endif
- io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
-
- bd->initInfo = *init_info;
- bd->wgpuDevice = init_info->Device;
- bd->defaultQueue = wgpuDeviceGetQueue(bd->wgpuDevice);
- bd->renderTargetFormat = init_info->RenderTargetFormat;
- bd->depthStencilFormat = init_info->DepthStencilFormat;
- bd->numFramesInFlight = init_info->NumFramesInFlight;
- bd->frameIndex = UINT_MAX;
-
- bd->renderResources.Sampler = nullptr;
- bd->renderResources.Uniforms = nullptr;
- bd->renderResources.CommonBindGroup = nullptr;
- bd->renderResources.ImageBindGroups.Data.reserve(100);
- bd->renderResources.ImageBindGroupLayout = nullptr;
-
- // Create buffers with a default size (they will later be grown as needed)
- bd->pFrameResources = new FrameResources[bd->numFramesInFlight];
- for (unsigned int i = 0; i < bd->numFramesInFlight; i++)
- {
- FrameResources* fr = &bd->pFrameResources[i];
- fr->IndexBuffer = nullptr;
- fr->VertexBuffer = nullptr;
- fr->IndexBufferHost = nullptr;
- fr->VertexBufferHost = nullptr;
- fr->IndexBufferSize = 10000;
- fr->VertexBufferSize = 5000;
- }
-
- return true;
-}
-
-void ImGui_ImplWGPU_Shutdown()
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- ImGui_ImplWGPU_InvalidateDeviceObjects();
- delete[] bd->pFrameResources;
- bd->pFrameResources = nullptr;
- wgpuQueueRelease(bd->defaultQueue);
- bd->wgpuDevice = nullptr;
- bd->numFramesInFlight = 0;
- bd->frameIndex = UINT_MAX;
-
- io.BackendRendererName = nullptr;
- io.BackendRendererUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures);
- IM_DELETE(bd);
-}
-
-void ImGui_ImplWGPU_NewFrame()
-{
- ImGui_ImplWGPU_Data* bd = ImGui_ImplWGPU_GetBackendData();
- if (!bd->pipelineState)
- if (!ImGui_ImplWGPU_CreateDeviceObjects())
- IM_ASSERT(0 && "ImGui_ImplWGPU_CreateDeviceObjects() failed!");
-}
-
-//-----------------------------------------------------------------------------
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_wgpu.h b/libs/imgui-1.92.1/backends/imgui_impl_wgpu.h
deleted file mode 100644
index 61d2d23..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_wgpu.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// 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/ImTextureRef!
-// [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
-// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'.
-// [X] Renderer: Texture updates support for dynamic font system (ImGuiBackendFlags_RendererHasTextures).
-
-// 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 bool ImGui_ImplWGPU_CreateDeviceObjects();
-IMGUI_IMPL_API void ImGui_ImplWGPU_InvalidateDeviceObjects();
-
-// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
-IMGUI_IMPL_API void ImGui_ImplWGPU_UpdateTexture(ImTextureData* tex);
-
-// [BETA] Selected render state data shared with callbacks.
-// This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplWGPU_RenderDrawData() call.
-// (Please open an issue if you feel you need access to more data)
-struct ImGui_ImplWGPU_RenderState
-{
- WGPUDevice Device;
- WGPURenderPassEncoder RenderPassEncoder;
-};
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_win32.cpp b/libs/imgui-1.92.1/backends/imgui_impl_win32.cpp
deleted file mode 100644
index d7206b9..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_win32.cpp
+++ /dev/null
@@ -1,969 +0,0 @@
-// dear imgui: Platform Backend for Windows (standard windows API for 32-bits AND 64-bits applications)
-// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
-
-// Implemented features:
-// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
-// [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 VK_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-
-// 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
-
-// Configuration flags to add in your imconfig file:
-//#define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD // Disable gamepad support. This was meaningful before <1.81 but we now load XInput dynamically so the option is now less relevant.
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025-04-30: Inputs: Fixed an issue where externally losing mouse capture (due to e.g. focus loss) would fail to claim it again the next subsequent click. (#8594)
-// 2025-03-10: When dealing with OEM keys, use scancodes instead of translated keycodes to choose ImGuiKey values. (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
-// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
-// 2024-07-08: Inputs: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN. (#7768)
-// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys.
-// 2023-09-25: Inputs: Synthesize key-down event on key-up for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit it (same behavior as GLFW/SDL).
-// 2023-09-07: Inputs: Added support for keyboard codepage conversion for when application is compiled in MBCS mode and using a non-Unicode window.
-// 2023-04-19: Added ImGui_ImplWin32_InitForOpenGL() to facilitate combining raw Win32/Winapi with OpenGL. (#3218)
-// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen/ImGuiMouseSource_Pen. (#2702)
-// 2023-02-15: Inputs: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse position over non-client area (e.g. OS decorations) when app is not focused. (#6045, #6162)
-// 2023-02-02: Inputs: Flipping WM_MOUSEHWHEEL (horizontal mouse-wheel) value to match other backends and offer consistent horizontal scrolling direction. (#4019, #6096, #1463)
-// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
-// 2022-09-28: Inputs: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode).
-// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
-// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
-// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
-// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
-// 2022-01-17: Inputs: always update key mods next and before a key event (not in NewFrame) to fix input queue with very low framerates.
-// 2022-01-12: Inputs: Update mouse inputs using WM_MOUSEMOVE/WM_MOUSELEAVE + fallback to provide it when focused but not hovered/captured. More standard and will allow us to pass it to future input queue API.
-// 2022-01-12: Inputs: Maintain our own copy of MouseButtonsDown mask instead of using ImGui::IsAnyMouseDown() which will be obsoleted.
-// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
-// 2021-12-16: Inputs: Fill VK_LCONTROL/VK_RCONTROL/VK_LSHIFT/VK_RSHIFT/VK_LMENU/VK_RMENU for completeness.
-// 2021-08-17: Calling io.AddFocusEvent() on WM_SETFOCUS/WM_KILLFOCUS messages.
-// 2021-08-02: Inputs: Fixed keyboard modifiers being reported when host window doesn't have focus.
-// 2021-07-29: Inputs: MousePos is correctly reported when the host platform window is hovered but not focused (using TrackMouseEvent() to receive WM_MOUSELEAVE events).
-// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
-// 2021-06-08: Fixed ImGui_ImplWin32_EnableDpiAwareness() and ImGui_ImplWin32_GetDpiScaleForMonitor() to handle Windows 8.1/10 features without a manifest (per-monitor DPI, and properly calls SetProcessDpiAwareness() on 8.1).
-// 2021-03-23: Inputs: Clearing keyboard down array when losing focus (WM_KILLFOCUS).
-// 2021-02-18: Added ImGui_ImplWin32_EnableAlphaCompositing(). Non Visual Studio users will need to link with dwmapi.lib (MinGW/gcc: use -ldwmapi).
-// 2021-02-17: Fixed ImGui_ImplWin32_EnableDpiAwareness() attempting to get SetProcessDpiAwareness from shcore.dll on Windows 8 whereas it is only supported on Windows 8.1.
-// 2021-01-25: Inputs: Dynamically loading XInput DLL.
-// 2020-12-04: Misc: Fixed setting of io.DisplaySize to invalid/uninitialized data when after hwnd has been closed.
-// 2020-03-03: Inputs: Calling AddInputCharacterUTF16() to support surrogate pairs leading to codepoint >= 0x10000 (for more complete CJK inputs)
-// 2020-02-17: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), ImGui_ImplWin32_GetDpiScaleForMonitor() helper functions.
-// 2020-01-14: Inputs: Added support for #define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD/IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT.
-// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
-// 2019-05-11: Inputs: Don't filter value from WM_CHAR before calling AddInputCharacter().
-// 2019-01-17: Misc: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created in a different thread or parent.
-// 2019-01-17: Inputs: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages.
-// 2019-01-15: Inputs: Added support for XInput gamepads (if ImGuiConfigFlags_NavEnableGamepad is set by user application).
-// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
-// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
-// 2018-06-10: Inputs: Fixed handling of mouse wheel messages to support fine position messages (typically sent by track-pads).
-// 2018-06-08: Misc: Extracted imgui_impl_win32.cpp/.h away from the old combined DX9/DX10/DX11/DX12 examples.
-// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors and ImGuiBackendFlags_HasSetMousePos flags + honor ImGuiConfigFlags_NoMouseCursorChange flag.
-// 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value and WM_SETCURSOR message handling).
-// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
-// 2018-02-06: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set).
-// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
-// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
-// 2018-01-08: Inputs: Added mapping for ImGuiKey_Insert.
-// 2018-01-05: Inputs: Added WM_LBUTTONDBLCLK double-click handlers for window classes with the CS_DBLCLKS flag.
-// 2017-10-23: Inputs: Added WM_SYSKEYDOWN / WM_SYSKEYUP handlers so e.g. the VK_MENU key can be read.
-// 2017-10-23: Inputs: Using Win32 ::SetCapture/::GetCapture() to retrieve mouse positions outside the client area when dragging.
-// 2016-11-12: Inputs: Only call Win32 ::SetCursor(nullptr) when io.MouseDrawCursor is set.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_impl_win32.h"
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <windowsx.h> // GET_X_LPARAM(), GET_Y_LPARAM()
-#include <tchar.h>
-#include <dwmapi.h>
-
-// Using XInput for gamepad (will load DLL dynamically)
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
-#include <xinput.h>
-typedef DWORD(WINAPI* PFN_XInputGetCapabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
-typedef DWORD(WINAPI* PFN_XInputGetState)(DWORD, XINPUT_STATE*);
-#endif
-
-// Clang/GCC warnings with -Weverything
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
-#endif
-#if defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
-#pragma GCC diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
-#endif
-
-struct ImGui_ImplWin32_Data
-{
- HWND hWnd;
- HWND MouseHwnd;
- int MouseTrackedArea; // 0: not tracked, 1: client area, 2: non-client area
- int MouseButtonsDown;
- INT64 Time;
- INT64 TicksPerSecond;
- ImGuiMouseCursor LastMouseCursor;
- UINT32 KeyboardCodePage;
-
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- bool HasGamepad;
- bool WantUpdateHasGamepad;
- HMODULE XInputDLL;
- PFN_XInputGetCapabilities XInputGetCapabilities;
- PFN_XInputGetState XInputGetState;
-#endif
-
- ImGui_ImplWin32_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts
-// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
-// FIXME: multi-context support is not well tested and probably dysfunctional in this backend.
-// FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context.
-static ImGui_ImplWin32_Data* ImGui_ImplWin32_GetBackendData()
-{
- return ImGui::GetCurrentContext() ? (ImGui_ImplWin32_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr;
-}
-static ImGui_ImplWin32_Data* ImGui_ImplWin32_GetBackendData(ImGuiIO& io)
-{
- return (ImGui_ImplWin32_Data*)io.BackendPlatformUserData;
-}
-
-// Functions
-static void ImGui_ImplWin32_UpdateKeyboardCodePage(ImGuiIO& io)
-{
- // Retrieve keyboard code page, required for handling of non-Unicode Windows.
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(io);
- HKL keyboard_layout = ::GetKeyboardLayout(0);
- LCID keyboard_lcid = MAKELCID(HIWORD(keyboard_layout), SORT_DEFAULT);
- if (::GetLocaleInfoA(keyboard_lcid, (LOCALE_RETURN_NUMBER | LOCALE_IDEFAULTANSICODEPAGE), (LPSTR)&bd->KeyboardCodePage, sizeof(bd->KeyboardCodePage)) == 0)
- bd->KeyboardCodePage = CP_ACP; // Fallback to default ANSI code page when fails.
-}
-
-static bool ImGui_ImplWin32_InitEx(void* hwnd, bool platform_has_own_dc)
-{
- ImGuiIO& io = ImGui::GetIO();
- IMGUI_CHECKVERSION();
- IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
-
- INT64 perf_frequency, perf_counter;
- if (!::QueryPerformanceFrequency((LARGE_INTEGER*)&perf_frequency))
- return false;
- if (!::QueryPerformanceCounter((LARGE_INTEGER*)&perf_counter))
- return false;
-
- // Setup backend capabilities flags
- ImGui_ImplWin32_Data* bd = IM_NEW(ImGui_ImplWin32_Data)();
- io.BackendPlatformUserData = (void*)bd;
- io.BackendPlatformName = "imgui_impl_win32";
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
- io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
-
- bd->hWnd = (HWND)hwnd;
- bd->TicksPerSecond = perf_frequency;
- bd->Time = perf_counter;
- bd->LastMouseCursor = ImGuiMouseCursor_COUNT;
- ImGui_ImplWin32_UpdateKeyboardCodePage(io);
-
- // Set platform dependent data in viewport
- ImGuiViewport* main_viewport = ImGui::GetMainViewport();
- main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (void*)bd->hWnd;
- IM_UNUSED(platform_has_own_dc); // Used in 'docking' branch
-
- // Dynamically load XInput library
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- bd->WantUpdateHasGamepad = true;
- const char* xinput_dll_names[] =
- {
- "xinput1_4.dll", // Windows 8+
- "xinput1_3.dll", // DirectX SDK
- "xinput9_1_0.dll", // Windows Vista, Windows 7
- "xinput1_2.dll", // DirectX SDK
- "xinput1_1.dll" // DirectX SDK
- };
- for (int n = 0; n < IM_ARRAYSIZE(xinput_dll_names); n++)
- if (HMODULE dll = ::LoadLibraryA(xinput_dll_names[n]))
- {
- bd->XInputDLL = dll;
- bd->XInputGetCapabilities = (PFN_XInputGetCapabilities)::GetProcAddress(dll, "XInputGetCapabilities");
- bd->XInputGetState = (PFN_XInputGetState)::GetProcAddress(dll, "XInputGetState");
- break;
- }
-#endif // IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
-
- return true;
-}
-
-IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd)
-{
- return ImGui_ImplWin32_InitEx(hwnd, false);
-}
-
-IMGUI_IMPL_API bool ImGui_ImplWin32_InitForOpenGL(void* hwnd)
-{
- // OpenGL needs CS_OWNDC
- return ImGui_ImplWin32_InitEx(hwnd, true);
-}
-
-void ImGui_ImplWin32_Shutdown()
-{
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
- IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Unload XInput library
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- if (bd->XInputDLL)
- ::FreeLibrary(bd->XInputDLL);
-#endif // IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
-
- io.BackendPlatformName = nullptr;
- io.BackendPlatformUserData = nullptr;
- io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_HasSetMousePos | ImGuiBackendFlags_HasGamepad);
- IM_DELETE(bd);
-}
-
-static bool ImGui_ImplWin32_UpdateMouseCursor(ImGuiIO& io, ImGuiMouseCursor imgui_cursor)
-{
- if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
- return false;
-
- if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
- {
- // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
- ::SetCursor(nullptr);
- }
- else
- {
- // Show OS mouse cursor
- LPTSTR win32_cursor = IDC_ARROW;
- switch (imgui_cursor)
- {
- case ImGuiMouseCursor_Arrow: win32_cursor = IDC_ARROW; break;
- case ImGuiMouseCursor_TextInput: win32_cursor = IDC_IBEAM; break;
- case ImGuiMouseCursor_ResizeAll: win32_cursor = IDC_SIZEALL; break;
- case ImGuiMouseCursor_ResizeEW: win32_cursor = IDC_SIZEWE; break;
- case ImGuiMouseCursor_ResizeNS: win32_cursor = IDC_SIZENS; break;
- case ImGuiMouseCursor_ResizeNESW: win32_cursor = IDC_SIZENESW; break;
- case ImGuiMouseCursor_ResizeNWSE: win32_cursor = IDC_SIZENWSE; break;
- case ImGuiMouseCursor_Hand: win32_cursor = IDC_HAND; break;
- case ImGuiMouseCursor_Wait: win32_cursor = IDC_WAIT; break;
- case ImGuiMouseCursor_Progress: win32_cursor = IDC_APPSTARTING; break;
- case ImGuiMouseCursor_NotAllowed: win32_cursor = IDC_NO; break;
- }
- ::SetCursor(::LoadCursor(nullptr, win32_cursor));
- }
- return true;
-}
-
-static bool IsVkDown(int vk)
-{
- return (::GetKeyState(vk) & 0x8000) != 0;
-}
-
-static void ImGui_ImplWin32_AddKeyEvent(ImGuiIO& io, ImGuiKey key, bool down, int native_keycode, int native_scancode = -1)
-{
- io.AddKeyEvent(key, down);
- io.SetKeyEventNativeData(key, native_keycode, native_scancode); // To support legacy indexing (<1.87 user code)
- IM_UNUSED(native_scancode);
-}
-
-static void ImGui_ImplWin32_ProcessKeyEventsWorkarounds(ImGuiIO& io)
-{
- // Left & right Shift keys: when both are pressed together, Windows tend to not generate the WM_KEYUP event for the first released one.
- if (ImGui::IsKeyDown(ImGuiKey_LeftShift) && !IsVkDown(VK_LSHIFT))
- ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_LeftShift, false, VK_LSHIFT);
- if (ImGui::IsKeyDown(ImGuiKey_RightShift) && !IsVkDown(VK_RSHIFT))
- ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_RightShift, false, VK_RSHIFT);
-
- // Sometimes WM_KEYUP for Win key is not passed down to the app (e.g. for Win+V on some setups, according to GLFW).
- if (ImGui::IsKeyDown(ImGuiKey_LeftSuper) && !IsVkDown(VK_LWIN))
- ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_LeftSuper, false, VK_LWIN);
- if (ImGui::IsKeyDown(ImGuiKey_RightSuper) && !IsVkDown(VK_RWIN))
- ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_RightSuper, false, VK_RWIN);
-}
-
-static void ImGui_ImplWin32_UpdateKeyModifiers(ImGuiIO& io)
-{
- io.AddKeyEvent(ImGuiMod_Ctrl, IsVkDown(VK_CONTROL));
- io.AddKeyEvent(ImGuiMod_Shift, IsVkDown(VK_SHIFT));
- io.AddKeyEvent(ImGuiMod_Alt, IsVkDown(VK_MENU));
- io.AddKeyEvent(ImGuiMod_Super, IsVkDown(VK_LWIN) || IsVkDown(VK_RWIN));
-}
-
-static void ImGui_ImplWin32_UpdateMouseData(ImGuiIO& io)
-{
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(io);
- IM_ASSERT(bd->hWnd != 0);
-
- HWND focused_window = ::GetForegroundWindow();
- const bool is_app_focused = (focused_window == bd->hWnd);
- if (is_app_focused)
- {
- // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when io.ConfigNavMoveSetMousePos is enabled by user)
- if (io.WantSetMousePos)
- {
- POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
- if (::ClientToScreen(bd->hWnd, &pos))
- ::SetCursorPos(pos.x, pos.y);
- }
-
- // (Optional) Fallback to provide mouse position when focused (WM_MOUSEMOVE already provides this when hovered or captured)
- // This also fills a short gap when clicking non-client area: WM_NCMOUSELEAVE -> modal OS move -> gap -> WM_NCMOUSEMOVE
- if (!io.WantSetMousePos && bd->MouseTrackedArea == 0)
- {
- POINT pos;
- if (::GetCursorPos(&pos) && ::ScreenToClient(bd->hWnd, &pos))
- io.AddMousePosEvent((float)pos.x, (float)pos.y);
- }
- }
-}
-
-// Gamepad navigation mapping
-static void ImGui_ImplWin32_UpdateGamepads(ImGuiIO& io)
-{
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(io);
-
- // Calling XInputGetState() every frame on disconnected gamepads is unfortunately too slow.
- // Instead we refresh gamepad availability by calling XInputGetCapabilities() _only_ after receiving WM_DEVICECHANGE.
- if (bd->WantUpdateHasGamepad)
- {
- XINPUT_CAPABILITIES caps = {};
- bd->HasGamepad = bd->XInputGetCapabilities ? (bd->XInputGetCapabilities(0, XINPUT_FLAG_GAMEPAD, &caps) == ERROR_SUCCESS) : false;
- bd->WantUpdateHasGamepad = false;
- }
-
- io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
- XINPUT_STATE xinput_state;
- XINPUT_GAMEPAD& gamepad = xinput_state.Gamepad;
- if (!bd->HasGamepad || bd->XInputGetState == nullptr || bd->XInputGetState(0, &xinput_state) != ERROR_SUCCESS)
- return;
- io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
-
- #define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V)
- #define MAP_BUTTON(KEY_NO, BUTTON_ENUM) { io.AddKeyEvent(KEY_NO, (gamepad.wButtons & BUTTON_ENUM) != 0); }
- #define MAP_ANALOG(KEY_NO, VALUE, V0, V1) { float vn = (float)(VALUE - V0) / (float)(V1 - V0); io.AddKeyAnalogEvent(KEY_NO, vn > 0.10f, IM_SATURATE(vn)); }
- MAP_BUTTON(ImGuiKey_GamepadStart, XINPUT_GAMEPAD_START);
- MAP_BUTTON(ImGuiKey_GamepadBack, XINPUT_GAMEPAD_BACK);
- MAP_BUTTON(ImGuiKey_GamepadFaceLeft, XINPUT_GAMEPAD_X);
- MAP_BUTTON(ImGuiKey_GamepadFaceRight, XINPUT_GAMEPAD_B);
- MAP_BUTTON(ImGuiKey_GamepadFaceUp, XINPUT_GAMEPAD_Y);
- MAP_BUTTON(ImGuiKey_GamepadFaceDown, XINPUT_GAMEPAD_A);
- MAP_BUTTON(ImGuiKey_GamepadDpadLeft, XINPUT_GAMEPAD_DPAD_LEFT);
- MAP_BUTTON(ImGuiKey_GamepadDpadRight, XINPUT_GAMEPAD_DPAD_RIGHT);
- MAP_BUTTON(ImGuiKey_GamepadDpadUp, XINPUT_GAMEPAD_DPAD_UP);
- MAP_BUTTON(ImGuiKey_GamepadDpadDown, XINPUT_GAMEPAD_DPAD_DOWN);
- MAP_BUTTON(ImGuiKey_GamepadL1, XINPUT_GAMEPAD_LEFT_SHOULDER);
- MAP_BUTTON(ImGuiKey_GamepadR1, XINPUT_GAMEPAD_RIGHT_SHOULDER);
- MAP_ANALOG(ImGuiKey_GamepadL2, gamepad.bLeftTrigger, XINPUT_GAMEPAD_TRIGGER_THRESHOLD, 255);
- MAP_ANALOG(ImGuiKey_GamepadR2, gamepad.bRightTrigger, XINPUT_GAMEPAD_TRIGGER_THRESHOLD, 255);
- MAP_BUTTON(ImGuiKey_GamepadL3, XINPUT_GAMEPAD_LEFT_THUMB);
- MAP_BUTTON(ImGuiKey_GamepadR3, XINPUT_GAMEPAD_RIGHT_THUMB);
- MAP_ANALOG(ImGuiKey_GamepadLStickLeft, gamepad.sThumbLX, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
- MAP_ANALOG(ImGuiKey_GamepadLStickRight, gamepad.sThumbLX, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
- MAP_ANALOG(ImGuiKey_GamepadLStickUp, gamepad.sThumbLY, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
- MAP_ANALOG(ImGuiKey_GamepadLStickDown, gamepad.sThumbLY, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
- MAP_ANALOG(ImGuiKey_GamepadRStickLeft, gamepad.sThumbRX, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
- MAP_ANALOG(ImGuiKey_GamepadRStickRight, gamepad.sThumbRX, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
- MAP_ANALOG(ImGuiKey_GamepadRStickUp, gamepad.sThumbRY, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
- MAP_ANALOG(ImGuiKey_GamepadRStickDown, gamepad.sThumbRY, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
- #undef MAP_BUTTON
- #undef MAP_ANALOG
-#else // #ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- IM_UNUSED(io);
-#endif
-}
-
-void ImGui_ImplWin32_NewFrame()
-{
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
- IM_ASSERT(bd != nullptr && "Context or backend not initialized? Did you call ImGui_ImplWin32_Init()?");
- ImGuiIO& io = ImGui::GetIO();
-
- // Setup display size (every frame to accommodate for window resizing)
- RECT rect = { 0, 0, 0, 0 };
- ::GetClientRect(bd->hWnd, &rect);
- io.DisplaySize = ImVec2((float)(rect.right - rect.left), (float)(rect.bottom - rect.top));
-
- // Setup time step
- INT64 current_time = 0;
- ::QueryPerformanceCounter((LARGE_INTEGER*)&current_time);
- io.DeltaTime = (float)(current_time - bd->Time) / bd->TicksPerSecond;
- bd->Time = current_time;
-
- // Update OS mouse position
- ImGui_ImplWin32_UpdateMouseData(io);
-
- // Process workarounds for known Windows key handling issues
- ImGui_ImplWin32_ProcessKeyEventsWorkarounds(io);
-
- // Update OS mouse cursor with the cursor requested by imgui
- ImGuiMouseCursor mouse_cursor = io.MouseDrawCursor ? ImGuiMouseCursor_None : ImGui::GetMouseCursor();
- if (bd->LastMouseCursor != mouse_cursor)
- {
- bd->LastMouseCursor = mouse_cursor;
- ImGui_ImplWin32_UpdateMouseCursor(io, mouse_cursor);
- }
-
- // Update game controllers (if enabled and available)
- ImGui_ImplWin32_UpdateGamepads(io);
-}
-
-// Map VK_xxx to ImGuiKey_xxx.
-// Not static to allow third-party code to use that if they want to (but undocumented)
-ImGuiKey ImGui_ImplWin32_KeyEventToImGuiKey(WPARAM wParam, LPARAM lParam);
-ImGuiKey ImGui_ImplWin32_KeyEventToImGuiKey(WPARAM wParam, LPARAM lParam)
-{
- // There is no distinct VK_xxx for keypad enter, instead it is VK_RETURN + KF_EXTENDED.
- if ((wParam == VK_RETURN) && (HIWORD(lParam) & KF_EXTENDED))
- return ImGuiKey_KeypadEnter;
-
- const int scancode = (int)LOBYTE(HIWORD(lParam));
- //IMGUI_DEBUG_LOG("scancode %3d, keycode = 0x%02X\n", scancode, wParam);
- switch (wParam)
- {
- case VK_TAB: return ImGuiKey_Tab;
- case VK_LEFT: return ImGuiKey_LeftArrow;
- case VK_RIGHT: return ImGuiKey_RightArrow;
- case VK_UP: return ImGuiKey_UpArrow;
- case VK_DOWN: return ImGuiKey_DownArrow;
- case VK_PRIOR: return ImGuiKey_PageUp;
- case VK_NEXT: return ImGuiKey_PageDown;
- case VK_HOME: return ImGuiKey_Home;
- case VK_END: return ImGuiKey_End;
- case VK_INSERT: return ImGuiKey_Insert;
- case VK_DELETE: return ImGuiKey_Delete;
- case VK_BACK: return ImGuiKey_Backspace;
- case VK_SPACE: return ImGuiKey_Space;
- case VK_RETURN: return ImGuiKey_Enter;
- case VK_ESCAPE: return ImGuiKey_Escape;
- //case VK_OEM_7: return ImGuiKey_Apostrophe;
- case VK_OEM_COMMA: return ImGuiKey_Comma;
- //case VK_OEM_MINUS: return ImGuiKey_Minus;
- case VK_OEM_PERIOD: return ImGuiKey_Period;
- //case VK_OEM_2: return ImGuiKey_Slash;
- //case VK_OEM_1: return ImGuiKey_Semicolon;
- //case VK_OEM_PLUS: return ImGuiKey_Equal;
- //case VK_OEM_4: return ImGuiKey_LeftBracket;
- //case VK_OEM_5: return ImGuiKey_Backslash;
- //case VK_OEM_6: return ImGuiKey_RightBracket;
- //case VK_OEM_3: return ImGuiKey_GraveAccent;
- case VK_CAPITAL: return ImGuiKey_CapsLock;
- case VK_SCROLL: return ImGuiKey_ScrollLock;
- case VK_NUMLOCK: return ImGuiKey_NumLock;
- case VK_SNAPSHOT: return ImGuiKey_PrintScreen;
- case VK_PAUSE: return ImGuiKey_Pause;
- case VK_NUMPAD0: return ImGuiKey_Keypad0;
- case VK_NUMPAD1: return ImGuiKey_Keypad1;
- case VK_NUMPAD2: return ImGuiKey_Keypad2;
- case VK_NUMPAD3: return ImGuiKey_Keypad3;
- case VK_NUMPAD4: return ImGuiKey_Keypad4;
- case VK_NUMPAD5: return ImGuiKey_Keypad5;
- case VK_NUMPAD6: return ImGuiKey_Keypad6;
- case VK_NUMPAD7: return ImGuiKey_Keypad7;
- case VK_NUMPAD8: return ImGuiKey_Keypad8;
- case VK_NUMPAD9: return ImGuiKey_Keypad9;
- case VK_DECIMAL: return ImGuiKey_KeypadDecimal;
- case VK_DIVIDE: return ImGuiKey_KeypadDivide;
- case VK_MULTIPLY: return ImGuiKey_KeypadMultiply;
- case VK_SUBTRACT: return ImGuiKey_KeypadSubtract;
- case VK_ADD: return ImGuiKey_KeypadAdd;
- case VK_LSHIFT: return ImGuiKey_LeftShift;
- case VK_LCONTROL: return ImGuiKey_LeftCtrl;
- case VK_LMENU: return ImGuiKey_LeftAlt;
- case VK_LWIN: return ImGuiKey_LeftSuper;
- case VK_RSHIFT: return ImGuiKey_RightShift;
- case VK_RCONTROL: return ImGuiKey_RightCtrl;
- case VK_RMENU: return ImGuiKey_RightAlt;
- case VK_RWIN: return ImGuiKey_RightSuper;
- case VK_APPS: return ImGuiKey_Menu;
- case '0': return ImGuiKey_0;
- case '1': return ImGuiKey_1;
- case '2': return ImGuiKey_2;
- case '3': return ImGuiKey_3;
- case '4': return ImGuiKey_4;
- case '5': return ImGuiKey_5;
- case '6': return ImGuiKey_6;
- case '7': return ImGuiKey_7;
- case '8': return ImGuiKey_8;
- case '9': return ImGuiKey_9;
- case 'A': return ImGuiKey_A;
- case 'B': return ImGuiKey_B;
- case 'C': return ImGuiKey_C;
- case 'D': return ImGuiKey_D;
- case 'E': return ImGuiKey_E;
- case 'F': return ImGuiKey_F;
- case 'G': return ImGuiKey_G;
- case 'H': return ImGuiKey_H;
- case 'I': return ImGuiKey_I;
- case 'J': return ImGuiKey_J;
- case 'K': return ImGuiKey_K;
- case 'L': return ImGuiKey_L;
- case 'M': return ImGuiKey_M;
- case 'N': return ImGuiKey_N;
- case 'O': return ImGuiKey_O;
- case 'P': return ImGuiKey_P;
- case 'Q': return ImGuiKey_Q;
- case 'R': return ImGuiKey_R;
- case 'S': return ImGuiKey_S;
- case 'T': return ImGuiKey_T;
- case 'U': return ImGuiKey_U;
- case 'V': return ImGuiKey_V;
- case 'W': return ImGuiKey_W;
- case 'X': return ImGuiKey_X;
- case 'Y': return ImGuiKey_Y;
- case 'Z': return ImGuiKey_Z;
- case VK_F1: return ImGuiKey_F1;
- case VK_F2: return ImGuiKey_F2;
- case VK_F3: return ImGuiKey_F3;
- case VK_F4: return ImGuiKey_F4;
- case VK_F5: return ImGuiKey_F5;
- case VK_F6: return ImGuiKey_F6;
- case VK_F7: return ImGuiKey_F7;
- case VK_F8: return ImGuiKey_F8;
- case VK_F9: return ImGuiKey_F9;
- case VK_F10: return ImGuiKey_F10;
- case VK_F11: return ImGuiKey_F11;
- case VK_F12: return ImGuiKey_F12;
- case VK_F13: return ImGuiKey_F13;
- case VK_F14: return ImGuiKey_F14;
- case VK_F15: return ImGuiKey_F15;
- case VK_F16: return ImGuiKey_F16;
- case VK_F17: return ImGuiKey_F17;
- case VK_F18: return ImGuiKey_F18;
- case VK_F19: return ImGuiKey_F19;
- case VK_F20: return ImGuiKey_F20;
- case VK_F21: return ImGuiKey_F21;
- case VK_F22: return ImGuiKey_F22;
- case VK_F23: return ImGuiKey_F23;
- case VK_F24: return ImGuiKey_F24;
- case VK_BROWSER_BACK: return ImGuiKey_AppBack;
- case VK_BROWSER_FORWARD: return ImGuiKey_AppForward;
- default: break;
- }
-
- // Fallback to scancode
- // https://handmade.network/forums/t/2011-keyboard_inputs_-_scancodes,_raw_input,_text_input,_key_names
- switch (scancode)
- {
- case 41: return ImGuiKey_GraveAccent; // VK_OEM_8 in EN-UK, VK_OEM_3 in EN-US, VK_OEM_7 in FR, VK_OEM_5 in DE, etc.
- case 12: return ImGuiKey_Minus;
- case 13: return ImGuiKey_Equal;
- case 26: return ImGuiKey_LeftBracket;
- case 27: return ImGuiKey_RightBracket;
- case 86: return ImGuiKey_Oem102;
- case 43: return ImGuiKey_Backslash;
- case 39: return ImGuiKey_Semicolon;
- case 40: return ImGuiKey_Apostrophe;
- case 51: return ImGuiKey_Comma;
- case 52: return ImGuiKey_Period;
- case 53: return ImGuiKey_Slash;
- default: break;
- }
-
- return ImGuiKey_None;
-}
-
-// Allow compilation with old Windows SDK. MinGW doesn't have default _WIN32_WINNT/WINVER versions.
-#ifndef WM_MOUSEHWHEEL
-#define WM_MOUSEHWHEEL 0x020E
-#endif
-#ifndef DBT_DEVNODES_CHANGED
-#define DBT_DEVNODES_CHANGED 0x0007
-#endif
-
-// Helper to obtain the source of mouse messages.
-// See https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages
-// Prefer to call this at the top of the message handler to avoid the possibility of other Win32 calls interfering with this.
-static ImGuiMouseSource ImGui_ImplWin32_GetMouseSourceFromMessageExtraInfo()
-{
- LPARAM extra_info = ::GetMessageExtraInfo();
- if ((extra_info & 0xFFFFFF80) == 0xFF515700)
- return ImGuiMouseSource_Pen;
- if ((extra_info & 0xFFFFFF80) == 0xFF515780)
- return ImGuiMouseSource_TouchScreen;
- return ImGuiMouseSource_Mouse;
-}
-
-// Win32 message handler (process Win32 mouse/keyboard inputs, etc.)
-// Call from your application's message handler. Keep calling your message handler unless this function returns TRUE.
-// When implementing your own backend, you can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if Dear ImGui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to Dear ImGui, and hide them from your application based on those two flags.
-// PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag.
-
-// Copy either line into your .cpp file to forward declare the function:
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); // Use ImGui::GetCurrentContext()
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandlerEx(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, ImGuiIO& io); // Doesn't use ImGui::GetCurrentContext()
-
-IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- // Most backends don't have silent checks like this one, but we need it because WndProc are called early in CreateWindow().
- // We silently allow both context or just only backend data to be nullptr.
- if (ImGui::GetCurrentContext() == nullptr)
- return 0;
- return ImGui_ImplWin32_WndProcHandlerEx(hwnd, msg, wParam, lParam, ImGui::GetIO());
-}
-
-// This version is in theory thread-safe in the sense that no path should access ImGui::GetCurrentContext().
-IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandlerEx(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, ImGuiIO& io)
-{
- ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(io);
- if (bd == nullptr)
- return 0;
- switch (msg)
- {
- case WM_MOUSEMOVE:
- case WM_NCMOUSEMOVE:
- {
- // We need to call TrackMouseEvent in order to receive WM_MOUSELEAVE events
- ImGuiMouseSource mouse_source = ImGui_ImplWin32_GetMouseSourceFromMessageExtraInfo();
- const int area = (msg == WM_MOUSEMOVE) ? 1 : 2;
- bd->MouseHwnd = hwnd;
- if (bd->MouseTrackedArea != area)
- {
- TRACKMOUSEEVENT tme_cancel = { sizeof(tme_cancel), TME_CANCEL, hwnd, 0 };
- TRACKMOUSEEVENT tme_track = { sizeof(tme_track), (DWORD)((area == 2) ? (TME_LEAVE | TME_NONCLIENT) : TME_LEAVE), hwnd, 0 };
- if (bd->MouseTrackedArea != 0)
- ::TrackMouseEvent(&tme_cancel);
- ::TrackMouseEvent(&tme_track);
- bd->MouseTrackedArea = area;
- }
- POINT mouse_pos = { (LONG)GET_X_LPARAM(lParam), (LONG)GET_Y_LPARAM(lParam) };
- if (msg == WM_NCMOUSEMOVE && ::ScreenToClient(hwnd, &mouse_pos) == FALSE) // WM_NCMOUSEMOVE are provided in absolute coordinates.
- return 0;
- io.AddMouseSourceEvent(mouse_source);
- io.AddMousePosEvent((float)mouse_pos.x, (float)mouse_pos.y);
- return 0;
- }
- case WM_MOUSELEAVE:
- case WM_NCMOUSELEAVE:
- {
- const int area = (msg == WM_MOUSELEAVE) ? 1 : 2;
- if (bd->MouseTrackedArea == area)
- {
- if (bd->MouseHwnd == hwnd)
- bd->MouseHwnd = nullptr;
- bd->MouseTrackedArea = 0;
- io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
- }
- return 0;
- }
- case WM_DESTROY:
- if (bd->MouseHwnd == hwnd && bd->MouseTrackedArea != 0)
- {
- TRACKMOUSEEVENT tme_cancel = { sizeof(tme_cancel), TME_CANCEL, hwnd, 0 };
- ::TrackMouseEvent(&tme_cancel);
- bd->MouseHwnd = nullptr;
- bd->MouseTrackedArea = 0;
- io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
- }
- return 0;
- case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK:
- case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK:
- case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK:
- case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK:
- {
- ImGuiMouseSource mouse_source = ImGui_ImplWin32_GetMouseSourceFromMessageExtraInfo();
- int button = 0;
- if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) { button = 0; }
- if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
- if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
- if (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONDBLCLK) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
- HWND hwnd_with_capture = ::GetCapture();
- if (bd->MouseButtonsDown != 0 && hwnd_with_capture != hwnd) // Did we externally lost capture?
- bd->MouseButtonsDown = 0;
- if (bd->MouseButtonsDown == 0 && hwnd_with_capture == nullptr)
- ::SetCapture(hwnd); // Allow us to read mouse coordinates when dragging mouse outside of our window bounds.
- bd->MouseButtonsDown |= 1 << button;
- io.AddMouseSourceEvent(mouse_source);
- io.AddMouseButtonEvent(button, true);
- return 0;
- }
- case WM_LBUTTONUP:
- case WM_RBUTTONUP:
- case WM_MBUTTONUP:
- case WM_XBUTTONUP:
- {
- ImGuiMouseSource mouse_source = ImGui_ImplWin32_GetMouseSourceFromMessageExtraInfo();
- int button = 0;
- if (msg == WM_LBUTTONUP) { button = 0; }
- if (msg == WM_RBUTTONUP) { button = 1; }
- if (msg == WM_MBUTTONUP) { button = 2; }
- if (msg == WM_XBUTTONUP) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
- bd->MouseButtonsDown &= ~(1 << button);
- if (bd->MouseButtonsDown == 0 && ::GetCapture() == hwnd)
- ::ReleaseCapture();
- io.AddMouseSourceEvent(mouse_source);
- io.AddMouseButtonEvent(button, false);
- return 0;
- }
- case WM_MOUSEWHEEL:
- io.AddMouseWheelEvent(0.0f, (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA);
- return 0;
- case WM_MOUSEHWHEEL:
- io.AddMouseWheelEvent(-(float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA, 0.0f);
- return 0;
- case WM_KEYDOWN:
- case WM_KEYUP:
- case WM_SYSKEYDOWN:
- case WM_SYSKEYUP:
- {
- const bool is_key_down = (msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN);
- if (wParam < 256)
- {
- // Submit modifiers
- ImGui_ImplWin32_UpdateKeyModifiers(io);
-
- // Obtain virtual key code and convert to ImGuiKey
- const ImGuiKey key = ImGui_ImplWin32_KeyEventToImGuiKey(wParam, lParam);
- const int vk = (int)wParam;
- const int scancode = (int)LOBYTE(HIWORD(lParam));
-
- // Special behavior for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit the key down event.
- if (key == ImGuiKey_PrintScreen && !is_key_down)
- ImGui_ImplWin32_AddKeyEvent(io, key, true, vk, scancode);
-
- // Submit key event
- if (key != ImGuiKey_None)
- ImGui_ImplWin32_AddKeyEvent(io, key, is_key_down, vk, scancode);
-
- // Submit individual left/right modifier events
- if (vk == VK_SHIFT)
- {
- // Important: Shift keys tend to get stuck when pressed together, missing key-up events are corrected in ImGui_ImplWin32_ProcessKeyEventsWorkarounds()
- if (IsVkDown(VK_LSHIFT) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_LeftShift, is_key_down, VK_LSHIFT, scancode); }
- if (IsVkDown(VK_RSHIFT) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_RightShift, is_key_down, VK_RSHIFT, scancode); }
- }
- else if (vk == VK_CONTROL)
- {
- if (IsVkDown(VK_LCONTROL) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_LeftCtrl, is_key_down, VK_LCONTROL, scancode); }
- if (IsVkDown(VK_RCONTROL) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_RightCtrl, is_key_down, VK_RCONTROL, scancode); }
- }
- else if (vk == VK_MENU)
- {
- if (IsVkDown(VK_LMENU) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_LeftAlt, is_key_down, VK_LMENU, scancode); }
- if (IsVkDown(VK_RMENU) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(io, ImGuiKey_RightAlt, is_key_down, VK_RMENU, scancode); }
- }
- }
- return 0;
- }
- case WM_SETFOCUS:
- case WM_KILLFOCUS:
- io.AddFocusEvent(msg == WM_SETFOCUS);
- return 0;
- case WM_INPUTLANGCHANGE:
- ImGui_ImplWin32_UpdateKeyboardCodePage(io);
- return 0;
- case WM_CHAR:
- if (::IsWindowUnicode(hwnd))
- {
- // You can also use ToAscii()+GetKeyboardState() to retrieve characters.
- if (wParam > 0 && wParam < 0x10000)
- io.AddInputCharacterUTF16((unsigned short)wParam);
- }
- else
- {
- wchar_t wch = 0;
- ::MultiByteToWideChar(bd->KeyboardCodePage, MB_PRECOMPOSED, (char*)&wParam, 1, &wch, 1);
- io.AddInputCharacter(wch);
- }
- return 0;
- case WM_SETCURSOR:
- // This is required to restore cursor when transitioning from e.g resize borders to client area.
- if (LOWORD(lParam) == HTCLIENT && ImGui_ImplWin32_UpdateMouseCursor(io, bd->LastMouseCursor))
- return 1;
- return 0;
- case WM_DEVICECHANGE:
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
- if ((UINT)wParam == DBT_DEVNODES_CHANGED)
- bd->WantUpdateHasGamepad = true;
-#endif
- return 0;
- }
- return 0;
-}
-
-
-//--------------------------------------------------------------------------------------------------------
-// DPI-related helpers (optional)
-//--------------------------------------------------------------------------------------------------------
-// - Use to enable DPI awareness without having to create an application manifest.
-// - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps.
-// - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc.
-// but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime,
-// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies.
-//---------------------------------------------------------------------------------------------------------
-// This is the scheme successfully used by GLFW (from which we borrowed some of the code) and other apps aiming to be highly portable.
-// ImGui_ImplWin32_EnableDpiAwareness() is just a helper called by main.cpp, we don't call it automatically.
-// If you are trying to implement your own backend for your own engine, you may ignore that noise.
-//---------------------------------------------------------------------------------------------------------
-
-// Perform our own check with RtlVerifyVersionInfo() instead of using functions from <VersionHelpers.h> as they
-// require a manifest to be functional for checks above 8.1. See https://github.com/ocornut/imgui/issues/4200
-static BOOL _IsWindowsVersionOrGreater(WORD major, WORD minor, WORD)
-{
- typedef LONG(WINAPI* PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*, ULONG, ULONGLONG);
- static PFN_RtlVerifyVersionInfo RtlVerifyVersionInfoFn = nullptr;
- if (RtlVerifyVersionInfoFn == nullptr)
- if (HMODULE ntdllModule = ::GetModuleHandleA("ntdll.dll"))
- RtlVerifyVersionInfoFn = (PFN_RtlVerifyVersionInfo)GetProcAddress(ntdllModule, "RtlVerifyVersionInfo");
- if (RtlVerifyVersionInfoFn == nullptr)
- return FALSE;
-
- RTL_OSVERSIONINFOEXW versionInfo = { };
- ULONGLONG conditionMask = 0;
- versionInfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
- versionInfo.dwMajorVersion = major;
- versionInfo.dwMinorVersion = minor;
- VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
- VER_SET_CONDITION(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
- return (RtlVerifyVersionInfoFn(&versionInfo, VER_MAJORVERSION | VER_MINORVERSION, conditionMask) == 0) ? TRUE : FALSE;
-}
-
-#define _IsWindowsVistaOrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0600), LOBYTE(0x0600), 0) // _WIN32_WINNT_VISTA
-#define _IsWindows8OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0602), LOBYTE(0x0602), 0) // _WIN32_WINNT_WIN8
-#define _IsWindows8Point1OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0603), LOBYTE(0x0603), 0) // _WIN32_WINNT_WINBLUE
-#define _IsWindows10OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0A00), LOBYTE(0x0A00), 0) // _WIN32_WINNT_WINTHRESHOLD / _WIN32_WINNT_WIN10
-
-#ifndef DPI_ENUMS_DECLARED
-typedef enum { PROCESS_DPI_UNAWARE = 0, PROCESS_SYSTEM_DPI_AWARE = 1, PROCESS_PER_MONITOR_DPI_AWARE = 2 } PROCESS_DPI_AWARENESS;
-typedef enum { MDT_EFFECTIVE_DPI = 0, MDT_ANGULAR_DPI = 1, MDT_RAW_DPI = 2, MDT_DEFAULT = MDT_EFFECTIVE_DPI } MONITOR_DPI_TYPE;
-#endif
-#ifndef _DPI_AWARENESS_CONTEXTS_
-DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
-#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE (DPI_AWARENESS_CONTEXT)-3
-#endif
-#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
-#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 (DPI_AWARENESS_CONTEXT)-4
-#endif
-typedef HRESULT(WINAPI* PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS); // Shcore.lib + dll, Windows 8.1+
-typedef HRESULT(WINAPI* PFN_GetDpiForMonitor)(HMONITOR, MONITOR_DPI_TYPE, UINT*, UINT*); // Shcore.lib + dll, Windows 8.1+
-typedef DPI_AWARENESS_CONTEXT(WINAPI* PFN_SetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT); // User32.lib + dll, Windows 10 v1607+ (Creators Update)
-
-// Helper function to enable DPI awareness without setting up a manifest
-void ImGui_ImplWin32_EnableDpiAwareness()
-{
- if (_IsWindows10OrGreater())
- {
- static HINSTANCE user32_dll = ::LoadLibraryA("user32.dll"); // Reference counted per-process
- if (PFN_SetThreadDpiAwarenessContext SetThreadDpiAwarenessContextFn = (PFN_SetThreadDpiAwarenessContext)::GetProcAddress(user32_dll, "SetThreadDpiAwarenessContext"))
- {
- SetThreadDpiAwarenessContextFn(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
- return;
- }
- }
- if (_IsWindows8Point1OrGreater())
- {
- static HINSTANCE shcore_dll = ::LoadLibraryA("shcore.dll"); // Reference counted per-process
- if (PFN_SetProcessDpiAwareness SetProcessDpiAwarenessFn = (PFN_SetProcessDpiAwareness)::GetProcAddress(shcore_dll, "SetProcessDpiAwareness"))
- {
- SetProcessDpiAwarenessFn(PROCESS_PER_MONITOR_DPI_AWARE);
- return;
- }
- }
-#if _WIN32_WINNT >= 0x0600
- ::SetProcessDPIAware();
-#endif
-}
-
-#if defined(_MSC_VER) && !defined(NOGDI)
-#pragma comment(lib, "gdi32") // Link with gdi32.lib for GetDeviceCaps(). MinGW will require linking with '-lgdi32'
-#endif
-
-float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor)
-{
- UINT xdpi = 96, ydpi = 96;
- if (_IsWindows8Point1OrGreater())
- {
- static HINSTANCE shcore_dll = ::LoadLibraryA("shcore.dll"); // Reference counted per-process
- static PFN_GetDpiForMonitor GetDpiForMonitorFn = nullptr;
- if (GetDpiForMonitorFn == nullptr && shcore_dll != nullptr)
- GetDpiForMonitorFn = (PFN_GetDpiForMonitor)::GetProcAddress(shcore_dll, "GetDpiForMonitor");
- if (GetDpiForMonitorFn != nullptr)
- {
- GetDpiForMonitorFn((HMONITOR)monitor, MDT_EFFECTIVE_DPI, &xdpi, &ydpi);
- IM_ASSERT(xdpi == ydpi); // Please contact me if you hit this assert!
- return xdpi / 96.0f;
- }
- }
-#ifndef NOGDI
- const HDC dc = ::GetDC(nullptr);
- xdpi = ::GetDeviceCaps(dc, LOGPIXELSX);
- ydpi = ::GetDeviceCaps(dc, LOGPIXELSY);
- IM_ASSERT(xdpi == ydpi); // Please contact me if you hit this assert!
- ::ReleaseDC(nullptr, dc);
-#endif
- return xdpi / 96.0f;
-}
-
-float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd)
-{
- HMONITOR monitor = ::MonitorFromWindow((HWND)hwnd, MONITOR_DEFAULTTONEAREST);
- return ImGui_ImplWin32_GetDpiScaleForMonitor(monitor);
-}
-
-//---------------------------------------------------------------------------------------------------------
-// Transparency related helpers (optional)
-//--------------------------------------------------------------------------------------------------------
-
-#if defined(_MSC_VER)
-#pragma comment(lib, "dwmapi") // Link with dwmapi.lib. MinGW will require linking with '-ldwmapi'
-#endif
-
-// [experimental]
-// Borrowed from GLFW's function updateFramebufferTransparency() in src/win32_window.c
-// (the Dwm* functions are Vista era functions but we are borrowing logic from GLFW)
-void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd)
-{
- if (!_IsWindowsVistaOrGreater())
- return;
-
- BOOL composition;
- if (FAILED(::DwmIsCompositionEnabled(&composition)) || !composition)
- return;
-
- BOOL opaque;
- DWORD color;
- if (_IsWindows8OrGreater() || (SUCCEEDED(::DwmGetColorizationColor(&color, &opaque)) && !opaque))
- {
- HRGN region = ::CreateRectRgn(0, 0, -1, -1);
- DWM_BLURBEHIND bb = {};
- bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
- bb.hRgnBlur = region;
- bb.fEnable = TRUE;
- ::DwmEnableBlurBehindWindow((HWND)hwnd, &bb);
- ::DeleteObject(region);
- }
- else
- {
- DWM_BLURBEHIND bb = {};
- bb.dwFlags = DWM_BB_ENABLE;
- ::DwmEnableBlurBehindWindow((HWND)hwnd, &bb);
- }
-}
-
-//---------------------------------------------------------------------------------------------------------
-
-#if defined(__GNUC__)
-#pragma GCC diagnostic pop
-#endif
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/imgui_impl_win32.h b/libs/imgui-1.92.1/backends/imgui_impl_win32.h
deleted file mode 100644
index 5ae399e..0000000
--- a/libs/imgui-1.92.1/backends/imgui_impl_win32.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// dear imgui: Platform Backend for Windows (standard windows API for 32-bits AND 64-bits applications)
-// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
-
-// Implemented features:
-// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
-// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
-// [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 VK_* values are obsolete since 1.87 and not supported since 1.91.5]
-// [X] Platform: Gamepad support.
-// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
-
-// 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
-
-// Follow "Getting Started" link and check examples/ folder to learn about using backends!
-IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd);
-IMGUI_IMPL_API bool ImGui_ImplWin32_InitForOpenGL(void* hwnd);
-IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown();
-IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame();
-
-// Win32 message handler your application need to call.
-// - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on <windows.h> from this helper.
-// - You should COPY the line below into your .cpp code to forward declare the function and then you can call it.
-// - Call from your application's message handler. Keep calling your message handler unless this function returns TRUE.
-
-#if 0
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-#endif
-
-// DPI-related helpers (optional)
-// - Use to enable DPI awareness without having to create an application manifest.
-// - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps.
-// - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc.
-// but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime,
-// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies.
-IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness();
-IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd
-IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor
-
-// Transparency related helpers (optional) [experimental]
-// - Use to enable alpha compositing transparency with the desktop.
-// - Use together with e.g. clearing your framebuffer with zero-alpha.
-IMGUI_IMPL_API void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd); // HWND hwnd
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/backends/sdlgpu3/build_instructions.txt b/libs/imgui-1.92.1/backends/sdlgpu3/build_instructions.txt
deleted file mode 100644
index 25f4a5d..0000000
--- a/libs/imgui-1.92.1/backends/sdlgpu3/build_instructions.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-
-Instructions to rebuild imgui_impl_sdlgpu3_shaders.h
-(You don't need to copy this folder if you are using the backend as-is)
-
-1) Compile the raw shader files to SPIRV:
-
- glslc -o vertex.spv -c shader.vert
- glslc -o fragment.spv -c shader.frag
-
-
-2) Build SDL_shadercross (https://github.com/libsdl-org/SDL_shadercross)
-
-
-3-A) Compiling for the Vulkan Driver:
-
- Nothing to do, you just need the previous vertex.spv/fragment.spv, proceed to step 4
-
-
-3-B) Compiling for the DirectX 12 Driver:
-
- ./shadercross vertex.spv -s SPIRV -d DXBC -t vertex -e main -o vertex.dxbc
- ./shadercross fragment.spv -s SPIRV -d DXBC -t fragment -e main -o fragment.dxbc
-
- Proceed to step 4
-
-
-3-C) Compiling for Metal (On windows you'll need the Metal Developer Tools for Windows, on linux you might use wine, but I never tested it):
-
- ./shadercross vertex.spv -s SPIRV -d MSL -t vertex -e main -o vertex.metal
- ./shadercross fragment.spv -s SPIRV -d MSL -t fragment -e main -o fragment.metal
-
- xcrun -sdk macosx metal -o vertex.ir -c vertex.metal
- xcrun -sdk macosx metal -o fragment.ir -c fragment.metal
- xcrun -sdk macosx metallib -o vertex.metallib -c vertex.ir
- xcrun -sdk macosx metallib -o fragment.metallib -c fragment.ir
-
- Proceed to step 4
-
-
-4) Use a tool like https://notisrac.github.io/FileToCArray/ or misc/fonts/binary_to_compressed_c.cpp in imgui repository to convert the file to a uint8_t array.
diff --git a/libs/imgui-1.92.1/backends/sdlgpu3/shader.frag b/libs/imgui-1.92.1/backends/sdlgpu3/shader.frag
deleted file mode 100644
index ab9ce18..0000000
--- a/libs/imgui-1.92.1/backends/sdlgpu3/shader.frag
+++ /dev/null
@@ -1,15 +0,0 @@
-#version 450 core
-layout(location = 0) out vec4 fColor;
-
-layout(set=2, binding=0) uniform sampler2D sTexture;
-
-layout(location = 0) in struct
-{
- vec4 Color;
- vec2 UV;
-} In;
-
-void main()
-{
- fColor = In.Color * texture(sTexture, In.UV.st);
-}
diff --git a/libs/imgui-1.92.1/backends/sdlgpu3/shader.vert b/libs/imgui-1.92.1/backends/sdlgpu3/shader.vert
deleted file mode 100644
index 3a85a90..0000000
--- a/libs/imgui-1.92.1/backends/sdlgpu3/shader.vert
+++ /dev/null
@@ -1,24 +0,0 @@
-#version 450 core
-layout(location = 0) in vec2 aPos;
-layout(location = 1) in vec2 aUV;
-layout(location = 2) in vec4 aColor;
-
-layout(set=1,binding=0) uniform UBO
-{
- vec2 uScale;
- vec2 uTranslate;
-} ubo;
-
-layout(location = 0) out struct
-{
- vec4 Color;
- vec2 UV;
-} Out;
-
-void main()
-{
- Out.Color = aColor;
- Out.UV = aUV;
- gl_Position = vec4(aPos * ubo.uScale + ubo.uTranslate, 0, 1);
- gl_Position.y *= -1.0f;
-}
diff --git a/libs/imgui-1.92.1/backends/vulkan/build_instructions.txt b/libs/imgui-1.92.1/backends/vulkan/build_instructions.txt
deleted file mode 100644
index 1f028d9..0000000
--- a/libs/imgui-1.92.1/backends/vulkan/build_instructions.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Script to rebuild shaders stored inside imgui_impl_vulkan.h
-(You don't need to copy this folder if you are using the backend as-is)
-
diff --git a/libs/imgui-1.92.1/backends/vulkan/generate_spv.sh b/libs/imgui-1.92.1/backends/vulkan/generate_spv.sh
deleted file mode 100644
index 948ef77..0000000
--- a/libs/imgui-1.92.1/backends/vulkan/generate_spv.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-## -V: create SPIR-V binary
-## -x: save binary output as text-based 32-bit hexadecimal numbers
-## -o: output file
-glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag
-glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert
diff --git a/libs/imgui-1.92.1/backends/vulkan/glsl_shader.frag b/libs/imgui-1.92.1/backends/vulkan/glsl_shader.frag
deleted file mode 100644
index ce7e6f7..0000000
--- a/libs/imgui-1.92.1/backends/vulkan/glsl_shader.frag
+++ /dev/null
@@ -1,14 +0,0 @@
-#version 450 core
-layout(location = 0) out vec4 fColor;
-
-layout(set=0, binding=0) uniform sampler2D sTexture;
-
-layout(location = 0) in struct {
- vec4 Color;
- vec2 UV;
-} In;
-
-void main()
-{
- fColor = In.Color * texture(sTexture, In.UV.st);
-}
diff --git a/libs/imgui-1.92.1/backends/vulkan/glsl_shader.vert b/libs/imgui-1.92.1/backends/vulkan/glsl_shader.vert
deleted file mode 100644
index 9425365..0000000
--- a/libs/imgui-1.92.1/backends/vulkan/glsl_shader.vert
+++ /dev/null
@@ -1,25 +0,0 @@
-#version 450 core
-layout(location = 0) in vec2 aPos;
-layout(location = 1) in vec2 aUV;
-layout(location = 2) in vec4 aColor;
-
-layout(push_constant) uniform uPushConstant {
- vec2 uScale;
- vec2 uTranslate;
-} pc;
-
-out gl_PerVertex {
- vec4 gl_Position;
-};
-
-layout(location = 0) out struct {
- vec4 Color;
- vec2 UV;
-} Out;
-
-void main()
-{
- Out.Color = aColor;
- Out.UV = aUV;
- gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1);
-}
diff --git a/libs/imgui-1.92.1/docs/BACKENDS.md b/libs/imgui-1.92.1/docs/BACKENDS.md
deleted file mode 100644
index fa05d55..0000000
--- a/libs/imgui-1.92.1/docs/BACKENDS.md
+++ /dev/null
@@ -1,378 +0,0 @@
-_(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md or view this file with any Markdown viewer)_
-
-# Dear ImGui: Backends
-
-## Index
-
-- [Introduction](#introduction)
- - [Getting Started](#getting-started)
- - [What are Backends?](#what-are-backends)
-- [Using standard Backends](#using-standard-backends)
-- [Using third-party Backends](#using-third-party-backends)
-- [Writing your own Backend](#writing-your-own-backend)
- - [Using a custom engine?](#using-a-custom-engine)
- - [Platform: Implementing your Platform Backend](#platform-implementing-your-platform-backend)
- - [Rendering: Implementing your RenderDrawData function](#rendering-implementing-your-renderdrawdata-function)
- - [Rendering: Adding support for `ImGuiBackendFlags_RendererHasTextures` (1.92+)](#rendering-adding-support-for-imguibackendflags_rendererhastextures-192)
-
-## Introduction
-
-### Getting Started
-
-💡 The **[Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) wiki guide** has examples of how to integrate Dear ImGui into an existing application.
-<BR> The [EXAMPLES.MD](https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md) documentation may also be worth a read.
-
-### What are Backends?
-
-Dear ImGui is highly portable and only requires a few things to run and render, typically:
-
- - Required: providing mouse/keyboard inputs (fed into the `ImGuiIO` structure).
- - Required: creating, updating and destroying textures.
- - Required: rendering indexed textured triangles with a clipping rectangle.
-
- Extra features are opt-in, our backends try to support as many as possible:
-
- - Optional: custom texture binding support.
- - Optional: clipboard support.
- - Optional: gamepad support.
- - Optional: mouse cursor shape support.
- - Optional: IME support.
- - Optional: multi-viewports support.
- etc.
-
-This is essentially what each backend is doing + obligatory portability cruft. Using standard backends ensure you can get all those features including the ones that would be harder to implement on your side (e.g. multi-viewports support).
-
-It is important to understand the difference between the core Dear ImGui library (files in the root folder)
-and the backends which we are describing here (backends/ folder).
-
-- Some issues may only be backend or platform specific.
-- You should be able to write backends for pretty much any platform and any 3D graphics API.
- e.g. you can get creative and use software rendering or render remotely on a different machine.
-
-## Using standard Backends
-
-**The [backends/](https://github.com/ocornut/imgui/blob/master/backends) folder contains backends for popular platforms/graphics API, which you can use in
-your application or engine to easily integrate Dear ImGui.** Each backend is typically self-contained in a pair of files: imgui_impl_XXXX.cpp + imgui_impl_XXXX.h.
-
-- The 'Platform' backends are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, and windowing.<BR>
- e.g. Windows ([imgui_impl_win32.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_win32.cpp)), SDL3 ([imgui_impl_sdl3.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_sdl3.cpp)), GLFW ([imgui_impl_glfw.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_glfw.cpp)), etc.
-
-- The 'Renderer' backends are in charge of: creating atlas texture, and rendering imgui draw data.<BR>
- e.g. DirectX11 ([imgui_impl_dx11.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp)), OpenGL/WebGL ([imgui_impl_opengl3.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_opengl3.cpp)), Vulkan ([imgui_impl_vulkan.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_vulkan.cpp)), etc.
-
-- For some high-level frameworks, a single backend usually handles both 'Platform' and 'Renderer' parts.<BR>
- e.g. Allegro 5 ([imgui_impl_allegro5.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_allegro5.cpp)). If you end up creating a custom backend for your engine, you may want to do the same.
-
-An application usually combines one Platform backend + one Renderer backend + main Dear ImGui sources.
-For example, the [example_win32_directx11](https://github.com/ocornut/imgui/tree/master/examples/example_win32_directx11) application combines imgui_impl_win32.cpp + imgui_impl_dx11.cpp. There are 20+ examples in the [examples/](https://github.com/ocornut/imgui/blob/master/examples/) folder. See [EXAMPLES.MD](https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md) for details.
-
-**Once Dear ImGui is setup and running, run and refer to `ImGui::ShowDemoWindow()` in imgui_demo.cpp for usage of the end-user API.**
-
-### List of standard Backends
-
-In the [backends/](https://github.com/ocornut/imgui/blob/master/backends) folder:
-
-List of Platforms Backends:
-
- imgui_impl_android.cpp ; Android native app API
- imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
- imgui_impl_osx.mm ; macOS native API (not as feature complete as glfw/sdl backends)
- imgui_impl_sdl2.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
- imgui_impl_sdl3.cpp ; SDL3 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
- imgui_impl_win32.cpp ; Win32 native API (Windows)
- imgui_impl_glut.cpp ; GLUT/FreeGLUT (this is prehistoric software and absolutely not recommended today!)
-
-List of Renderer Backends:
-
- imgui_impl_dx9.cpp ; DirectX9
- imgui_impl_dx10.cpp ; DirectX10
- imgui_impl_dx11.cpp ; DirectX11
- imgui_impl_dx12.cpp ; DirectX12
- imgui_impl_metal.mm ; Metal (ObjC or C++)
- imgui_impl_opengl2.cpp ; OpenGL 2 (legacy fixed pipeline. Don't use with modern OpenGL code!)
- imgui_impl_opengl3.cpp ; OpenGL 3/4, OpenGL ES 2/3, WebGL
- imgui_impl_sdlgpu3.cpp ; SDL_GPU (portable 3D graphics API of SDL3)
- imgui_impl_sdlrenderer2.cpp ; SDL_Renderer (optional component of SDL2 available from SDL 2.0.18+)
- imgui_impl_sdlrenderer3.cpp ; SDL_Renderer (optional component of SDL3. Prefer using SDL_GPU!).
- imgui_impl_vulkan.cpp ; Vulkan
- imgui_impl_wgpu.cpp ; WebGPU (web + desktop)
-
-List of high-level Frameworks Backends (combining Platform + Renderer):
-
- imgui_impl_allegro5.cpp
-
-Emscripten is also supported!
-The SDL2+GL, SDL3+GL, GLFW+GL and GLFW+WebGPU examples are all ready to build and run with Emscripten.
-
-### Recommended Backends
-
-If you are not sure which backend to use, the recommended platform/frameworks for portable applications:
-
-|Library |Website |Backend |Note |
-|--------|--------|--------|-----|
-| SDL3 | https://www.libsdl.org | imgui_impl_sdl3.cpp | Recommended |
-| SDL2 | https://www.libsdl.org | imgui_impl_sdl2.cpp | |
-| GLFW | https://github.com/glfw/glfw | imgui_impl_glfw.cpp | |
-| Sokol | https://github.com/floooh/sokol | [util/sokol_imgui.h](https://github.com/floooh/sokol/blob/master/util/sokol_imgui.h) | Lower-level than GLFW/SDL |
-
-If your application runs on Windows or if you are using multi-viewport, the win32 backend handles some details a little better than other backends.
-
-## Using third-party Backends
-
-See https://github.com/ocornut/imgui/wiki/Bindings for the full list (e.g. Adventure Game Studio, Cinder, Cocos2d-x, Game Maker Studio2, Godot, LÖVE+LUA, Magnum, Monogame, Ogre, openFrameworks, OpenSceneGraph, SFML, Sokol, Unity, Unreal Engine and many others).
-
-## Writing your own Backend
-
-### Using a custom engine?
-
-You will likely be tempted to start by rewrite your own backend using your own custom/high-level facilities...<BR>
-Think twice!
-
-TL;DR;
-- Writing your own Renderer Backend is easy.
-- Writing your own Platform Backend is harder and you are more likely to introduce bugs.
-- **It is unlikely you will add value to your project by creating your own backend.**
-
-**Consider using the existing backends as-is**.
-You will save lots of time integrating the library.
-Standard backends are battle-tested and handle subtleties that you are likely to implement incorrectly.
-You can LATER decide to rewrite yourself a custom backend if you really need to.
-In most situations, custom backends have fewer features and more bugs than the standard backends we provide.
-If you want portability, you can use multiple backends and choose between them either at compile time
-or at runtime.
-
-**Example A**: your engine is built over Windows + DirectX11 but you have your own high-level rendering
-system layered over DirectX11.<BR>
-Suggestion: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
-Once it works, if you really need it, you can replace the imgui_impl_dx11.cpp code with a
-custom renderer using your own rendering functions, and keep using the standard Win32 code etc.
-
-**Example B**: your engine runs on Windows, Mac, Linux and uses DirectX11, Metal, and Vulkan respectively.<BR>
-Suggestion: use multiple generic backends!
-Once it works, if you really need it, you can replace parts of backends with your own abstractions.
-
-**Example C**: your engine runs on platforms we can't provide public backends for (e.g. PS4/PS5, Switch),
-and you have high-level systems everywhere.<BR>
-Suggestion: try using a non-portable backend first (e.g. win32 + underlying graphics API) to get
-your desktop builds working first. This will get you running faster and get your acquainted with
-how Dear ImGui works and is setup. You can then rewrite a custom backend using your own engine API...
-
-Also:
-The [multi-viewports feature](https://github.com/ocornut/imgui/wiki/Multi-Viewports) of the 'docking' branch allows
-Dear ImGui windows to be seamlessly detached from the main application window. This is achieved using an
-extra layer to the Platform and Renderer backends, which allows Dear ImGui to communicate platform-specific
-requests such as: "create an additional OS window", "create a render context", "get the OS position of this
-window", but some things are more difficult "find OS window under mouse position BUT with some windows marked as passthrough". See 'ImGuiPlatformIO' for details.
-Supporting the multi-viewports feature correctly using 100% of your own abstractions is more difficult
-than supporting single-viewport.
-If you decide to use unmodified imgui_impl_XXXX.cpp files, you can automatically benefit from
-improvements and fixes related to viewports and platform windows without extra work on your side.
-
-### Platform: Implementing your Platform Backend
-
-The Platform backends in impl_impl_XXX.cpp files contain many implementations.
-
-**In your `ImGui_ImplXXX_Init()` function:**
-- You can allocate your backend data and use `io.BackendPlatformUserData` to store/retrieve it later.
-- Set `io.BackendPlatformName` to a name `"imgui_impl_xxxx"` which will be available in e.g. About box.
-- Set `io.BackendPlatformUserData` to your backend data.
-- Set `io.BackendFlags` with supported optional features:
- - `ImGuiBackendFlags_HasGamepad`: supports gamepad and currently has one connected.
- - `ImGuiBackendFlags_HasMouseCursors`: supports honoring GetMouseCursor() value to change the OS cursor shape.
- - `ImGuiBackendFlags_HasSetMousePos`: supports io.WantSetMousePos requests to reposition the OS mouse position (only used if io.ConfigNavMoveSetMousePos is set).
- - `ImGuiBackendFlags_PlatformHasViewports` supports multiple viewports. (multi-viewports only)
- - `ImGuiBackendFlags_HasMouseHoveredViewport` supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag. If this cannot be done, Dear ImGui needs to use a flawed heuristic to find the viewport under mouse position, as it doesn't know about foreign windows. (multi-viewports only)
-
-**In your `ImGui_ImplXXX_NewFrame()` function:**
-- Set `io.DeltaTime` to the time elapsed (in seconds) since last frame.
-- Set `io.DisplaySize` to your window size.
-- Set `io.DisplayFrameBufferSize` to your window pixel density (macOS/iOS only).
-- Update mouse cursor shape is supported.
-
-**In your `ImGui_ImplXXX_NewFrame()` function or event handlers:**
-- **Mouse Support**
- - Use `io.AddMousePosEvent()`, `io.AddMouseButtonEvent()`, `io.AddMouseWheelEvent()` to pass mouse events.
- - Use `io.AddMouseSourceEvent()` if you are able to distinguish Mouse from TouchScreen from Pen inputs. TouchScreen and Pen inputs requires different logic for some Dear ImGui features.
- - Use `io.AddMouseViewportEvent()` to specify which viewport/OS window is being hovered by the mouse. Read instructions carefully as this is not as simple as it seems! (multi-viewports only)
-- **Keyboard Support**
- - Use `io.AddKeyEvent()` to pass key events.
- - Use `io.AddInputCharacter()` to pass text/character events.
-- **Gamepad Support**
- - Use `io.AddKeyEvent()` and `io.AddKeyAnalogEvent()` to pass gamepad events, using `ImGuiKey_GamepadXXX` values.
-- **Miscellaneous**
- - Clipboard Support: setup `Platform_GetClipboardTextFn()`, `Platform_SetClipboardTextFn()` handlers in `ImGuiPlatformIO`.
- - Open in Shell support: setup `Platform_OpenInShellFn()` handler in `ImGuiPlatformIO`.
- - IME Support: setup `Platform_SetImeDataFn()` handler in `ImGuiPlatformIO`.
- - Use `io.AddFocusEvent()` to notify when application window gets focused/unfocused.
-- **Multi-viewport Support**
- - Update monitor list if supported.
- - Setup all required handlers in `ImGuiPlatformIO` to create/destroy/move/resize/title/focus/etc. windows.
-
-### Rendering: Implementing your RenderDrawData function
-
-Note: set `ImGuiBackendFlags_RendererHasVtxOffset` to signify your backend can handle rendering with a vertex offset (`ImDrawCmd::VtxOffset` field).
-Otherwise, rendering will be limited to 64K vertices per window, which may be limiting for advanced plot.
-As an alternative, you may also use `#define ImDrawIdx unsigned int` in your `imconfig.h` file to support 32-bit indices.
-
-```cpp
-void MyImGuiBackend_RenderDrawData(ImDrawData* draw_data)
-{
- // TODO: Update textures.
- // - Most of the times, the list will have 1 element with an OK status, aka nothing to do.
- // - This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates.
- if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- MyImGuiBackend_UpdateTexture(tex);
-
- // TODO: Setup render state:
- // - Alpha-blending enabled
- // - No backface culling
- // - No depth testing, no depth writing
- // - Scissor enabled
- MyEngineSetupenderState();
-
- // TODO: Setup texture sampling state
- // - Sample with bilinear filtering (NOT point/nearest filtering).
- // - Use 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines;' to allow point/nearest filtering.
-
- // TODO: Setup viewport covering draw_data->DisplayPos to draw_data->DisplayPos + draw_data->DisplaySize
-
- // TODO: Setup orthographic projection matrix cover draw_data->DisplayPos to draw_data->DisplayPos + draw_data->DisplaySize
-
- // TODO: Setup shader: vertex { float2 pos, float2 uv, u32 color }, fragment shader sample color from 1 texture, multiply by vertex color.
-
- // Render command lists
- ImVec2 clip_off = draw_data->DisplayPos;
- ImVec2 clip_scale = draw_data->FramebufferScale;
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- const ImDrawList* cmd_list = draw_data->CmdLists[n];
- const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; // vertex buffer generated by Dear ImGui
- const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; // index buffer generated by Dear ImGui
- for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
- {
- const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
- if (pcmd->UserCallback)
- {
- if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
- MyEngineSetupenderState();
- else
- pcmd->UserCallback(cmd_list, pcmd);
- }
- else
- {
- // Project scissor/clipping rectangles into framebuffer space
- // - Clipping coordinates are provided in imgui coordinates space:
- // - For a given viewport, draw_data->DisplayPos == viewport->Pos and draw_data->DisplaySize == viewport->Size
- // - In a single viewport application, draw_data->DisplayPos == (0,0) and draw_data->DisplaySize == io.DisplaySize, but always use GetMainViewport()->Pos/Size instead of hardcoding those values.
- // - In the interest of supporting multi-viewport applications (see 'docking' branch on github),
- // always subtract draw_data->DisplayPos from clipping bounds to convert them to your viewport space.
- // - Note that pcmd->ClipRect contains Min+Max bounds. Some graphics API may use Min+Max, other may use Min+Size (size being Max-Min)
- ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
- ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
- if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
- // We are using scissoring to clip some objects. All low-level graphics API should support it.
- // - If your engine doesn't support scissoring yet, you may ignore this at first. You will get some small glitches
- // (some elements visible outside their bounds) but you can fix that once everything else works!
- MyEngineSetScissor(clip_min.x, clip_min.y, clip_max.x, clip_max.y);
-
- // The texture for the draw call is specified by pcmd->GetTexID().
- // The vast majority of draw calls will use the Dear ImGui texture atlas, which value you have set yourself during initialization.
- MyEngineBindTexture((MyTexture*)pcmd->GetTexID());
-
- // Render 'pcmd->ElemCount/3' indexed triangles.
- // By default the indices ImDrawIdx are 16-bit, you can change them to 32-bit in imconfig.h if your engine doesn't support 16-bit indices.
- MyEngineDrawIndexedTriangles(pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer + pcmd->IdxOffset, vtx_buffer, pcmd->VtxOffset);
- }
- }
- }
-}
-```
-
-### Rendering: Adding support for `ImGuiBackendFlags_RendererHasTextures` (1.92+)
-
-Version [1.92.0](https://github.com/ocornut/imgui/releases/tag/v1.92.0) (June 2025), added texture support in Rendering Backends, which is the backbone for supporting dynamic font scaling among other things.
-
-**In order to move forward and take advantage of all new features, support for `ImGuiBackendFlags_RendererHasTextures` will likely be REQUIRED for all backends before June 2026.**
-
-`ImFontAtlas` functions such as `Build()`, `GetTexDataAsRGBA32()`, `GetTexDataAsAlpha8()`, `SetTexID()`, `IsBuilt()` were obsoleted in favor if iterating a `Textures[]` array and updating their state when requested by Dear ImGui.
-
-**TD;DR: List of commits which added support for `ImGuiBackendFlags_RendererHasTextures` in standard backends:**
-
-- Allegro5: [ee8941e](https://github.com/ocornut/imgui/commit/ee8941e) (+35 lines)
-- DirectX9: [75efba7](https://github.com/ocornut/imgui/commit/75efba7) (+48 lines)
-- DirectX10: [2d2b1bc](https://github.com/ocornut/imgui/commit/2d2b1bc) (+40 lines)
-- DirectX11: [372fd27](https://github.com/ocornut/imgui/commit/372fd27) (+40 lines)
-- DirectX12: [eefe5d5](https://github.com/ocornut/imgui/commit/eefe5d5) (+87 lines)
-- Metal: [26c017d](https://github.com/ocornut/imgui/commit/26c017d) (+55 lines)
-- OpenGL Legacy: [0430c55](https://github.com/ocornut/imgui/commit/0430c55) (+25 lines)
-- OpenGL3/WebGL/ES: [dbb91a5](https://github.com/ocornut/imgui/commit/dbb91a5) (+47 lines)
-- SDL_Renderer2: [9fa65cd](https://github.com/ocornut/imgui/commit/9fa65cd) (+20 lines)
-- SDL_Renderer3: [e538883](https://github.com/ocornut/imgui/commit/e538883) (+19 lines)
-- SDL_GPU: [16fe666](https://github.com/ocornut/imgui/commit/16fe666) (+41 lines)
-- Vulkan: [abe294b](https://github.com/ocornut/imgui/commit/abe294b) (+33 lines)
-- WGPU: [571dae9](https://github.com/ocornut/imgui/commit/571dae9) (+30 lines)
-
-**Instructions:**
-
-- Set `ImGuiBackendFlags_RendererHasTextures` to signify your backend can handle the feature.
-- During rendering, e.g. in your RenderDrawData function, iterate `ImDrawData->Textures` array and process all textures.
-- During shutdown, iterate the `ImGui::GetPlatformIO().Textures` and destroy all textures.
-- (Both arrays are `ImVector<ImTextureData*>`. They are only in different location because: to allow advanced users to perform multi-threaded rendering, we store a pointer to the texture list in ImDrawData, with the aim that multi-threaded rendering users replace it with their own pointer.)
-
-Pseudo-code for processing a texture:
-```cpp
-if (draw_data->Textures != nullptr)
- for (ImTextureData* tex : *draw_data->Textures)
- if (tex->Status != ImTextureStatus_OK)
- MyImGuiBackend_UpdateTexture(tex);
-```
-```cpp
-void MyImGuiBackend_UpdateTexture(ImTextureData* tex)
-{
- if (tex->Status == ImTextureStatus_WantCreate)
- {
- // Create texture based on tex->Width, tex->Height.
- // - Most backends only support tex->Format == ImTextureFormat_RGBA32.
- // - Backends for particularly memory constrainted platforms may support tex->Format == ImTextureFormat_Alpha8.
-
- // Upload all texture pixels
- // - Read from our CPU-side copy of the texture and copy to your graphics API.
- // - Use tex->Width, tex->Height, tex->GetPixels(), tex->GetPixelsAt(), tex->GetPitch() as needed.
-
- // Store your data, and acknowledge creation.
- tex->SetTexID(xxxx); // Specify backend-specific ImTextureID identifier which will be stored in ImDrawCmd.
- tex->SetStatus(ImTextureStatus_OK);
- tex->BackendUserData = xxxx; // Store more backend data if needed (most backend allocate a small texture to store data in there)
- }
- if (tex->Status == ImTextureStatus_WantUpdates)
- {
- // Upload a rectangle of pixels to the existing texture
- // - We only ever write to textures regions which have never been used before!
- // - Use tex->TexID or tex->BackendUserData to retrieve your stored data.
- // - Use tex->UpdateRect.x/y, tex->UpdateRect.w/h to obtain the block position and size.
- // - Use tex->Updates[] to obtain individual sub-regions within tex->UpdateRect. Not recommended.
- // - Read from our CPU-side copy of the texture and copy to your graphics API.
- // - Use tex->Width, tex->Height, tex->GetPixels(), tex->GetPixelsAt(), tex->GetPitch() as needed.
-
- // Acknowledge update
- tex->SetStatus(ImTextureStatus_OK);
- }
- if (tex->Status == ImTextureStatus_WantDestroy && tex->UnusedFrames > 0)
- {
- // If you use staged rendering and have in-flight renders, changed tex->UnusedFrames > 0 check to higher count as needed e.g. > 2
-
- // Destroy texture
- // - Use tex->TexID or tex->BackendUserData to retrieve your stored data.
- // - Destroy texture in your graphics API.
-
- // Acknowledge destruction
- tex->SetTexID(ImTextureID_Invalid);
- tex->SetStatus(ImTextureStatus_Destroyed);
- }
-}
-```
-Refer to "List of commits which added support for `ImGuiBackendFlags_RendererHasTextures` in standard backends" above for concrete examples of this.
diff --git a/libs/imgui-1.92.1/docs/CHANGELOG.txt b/libs/imgui-1.92.1/docs/CHANGELOG.txt
deleted file mode 100644
index 2241825..0000000
--- a/libs/imgui-1.92.1/docs/CHANGELOG.txt
+++ /dev/null
@@ -1,7573 +0,0 @@
-dear imgui
-CHANGELOG
-
-This document holds the user-facing changelog that we also use in release notes.
-We generally fold multiple commits pertaining to the same topic as a single entry.
-Changes to backends are also included within the individual .cpp files of each backend.
-
-FAQ https://www.dearimgui.com/faq/
-RELEASE NOTES: https://github.com/ocornut/imgui/releases
-WIKI https://github.com/ocornut/imgui/wiki
-GETTING STARTED https://github.com/ocornut/imgui/wiki/Getting-Started
-GLOSSARY https://github.com/ocornut/imgui/wiki/Glossary
-ISSUES & SUPPORT https://github.com/ocornut/imgui/issues
-
-WHEN TO UPDATE?
-
-- Keeping your copy of Dear ImGui updated regularly is recommended.
-- It is generally safe and recommended to sync to the latest commit in 'master' or 'docking'
- branches. The library is fairly stable and regressions tends to be fixed fast when reported.
-
-HOW TO UPDATE?
-
-- Update submodule or copy/overwrite every file.
-- About imconfig.h:
- - You may modify your copy of imconfig.h, in this case don't overwrite it.
- - or you may locally branch to modify imconfig.h and merge/rebase latest.
- - or you may '#define IMGUI_USER_CONFIG "my_config_file.h"' globally from your build system to
- specify a custom path for your imconfig.h file and instead not have to modify the default one.
-- Read the `Breaking Changes` section (in imgui.cpp or here in the Changelog).
-- If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it.
-- If you are copying this repository in your codebase, please leave the demo and documentations files in there, they will be useful.
-- You may diff your previous Changelog with the one you just copied and read that diff.
-- You may enable `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in imconfig.h to forcefully disable legacy names and symbols.
- Doing it every once in a while is a good way to make sure you are not using obsolete symbols. Dear ImGui is in active development,
- and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
-- Please report any issue!
-
------------------------------------------------------------------------
- VERSION 1.92.1 (Released 2025-07-09)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.1
-
-Changes:
-
-- Fonts: added ImFontAtlas::SetFontLoader() to dynamically change font
- loader at runtime without using internal API. (#8752, #8465)
-- Fonts: fixed a bug where dynamically changing font loader would lose
- the Fallback and Ellipsis glyphs under some circumstance. (#8763)
-- Fonts: for large size fonts, layout/size calculation only load glyphs metrics.
- Actual glyphs are renderer+packed when used by drawing functions. (#8758, #8465)
-- Fonts: set a maximum font size of 512.0f at ImGui:: API level to reduce
- edge cases (e.g. out of memory errors). ImDrawList:: API doesn't have the
- constraint. (#8758)
-- Fonts: Restore ImFontConfig::FontNo being a 32-bits value as this is needed
- to pass full range of information into e.g. FreeType's face_index, as higher
- bits are used from FreeType 2.6.1. (#8775) [@Valakor]
- (the field has been erroneously reduced from 32-bits to 8-bit in 1.92.0)
-- Textures: Fixed support for `#define ImTextureID_Invalid` to non-zero value:
- ImTextureData() was incorrectly cleared with zeroes. (#8745) [@rachit7645]
-- Demo: Added "Text -> Font Size" demo section. (#8738) [@Demonese]
-- CI: Fixed dllimport/dllexport tests. (#8757) [@AidanSun05]
-- CI: Updated to use latest Windows image + VS2022.
-- Debug Tools: added IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS to detect
- id conflicts _before_ hovering. This is very slow and should only be used
- temporarily. (#8651, #7961, #7669)
-- Examples: GLFW+OpenGL3, GLFW+WGPU: Emscripten Makefiles uses GLFW port
- 'contrib.glfw3' which offers better HiDPI support. (#8742) [@pthom]
-- Backends: GLFW, SDL2 made ImGui_ImplGLFW_GetContentScaleXXX() and
- ImGui_ImplSDL2_GetContentScaleXXXX() helpers return 1.0f on Emscripten
- and Android platforms, matching macOS logic. (#8742, #8733) [@pthom]
-- Backends: SDL3: avoid calling SDL_StartTextInput() again if already active.
- (fixes e.g.: an issue on iOS where the keyboard animation will popup every
- time the user types a key + probably other things) (#8727) [@morrazzzz]
-- Backends: OSX: added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress
- mouse cursor support. (#8739) [@cfillion]
-- Backends: Allegro5: fixed texture update broken on some platforms where
- ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten. (#8770)
-- Backends: Vulkan: use nonCoherentAtomSize to align upload_size, fixing
- validation error on some setups. (#8743, #8744) [@tquante]
-- Backends: Vulkan: fixed texture synchronization issue introduced in 1.92.0,
- leading to validation layers reacting. (#8772) [@Majora320]
-
-
------------------------------------------------------------------------
- VERSION 1.92.0 (Released 2025-06-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.0
-
-THIS VERSION CONTAINS THE LARGEST AMOUNT OF BREAKING CHANGES SINCE 2015!
-I TRIED REALLY HARD TO KEEP THEM TO A MINIMUM, REDUCE THE AMOUNT OF INTERFERENCE,
-BUT INEVITABLY SOME USERS OR THIRD-PARTY EXTENSIONS WILL BE AFFECTED.
-
-For instructions to upgrade your custom backend:
---> See https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md
-
-IN ORDER TO HELP US IMPROVE THE TRANSITION PROCESS, INCL. DOCUMENTATION AND COMMENTS,
-PLEASE REPORT **ANY** DOUBT, CONFUSION, QUESTIONS, FEEDBACK TO:
- https://github.com/ocornut/imgui/issues/
-If you are using custom widgets, internals or third-party extension that are somehow
-breaking and aren't obvious how to solve, please post in Issues so we can gather
-data and share solutions that may help others.
-
-As part of the plan to reduce impact of API breaking changes, several unfinished
-changes/features/refactors related to font and text systems and scaling will be
-part of subsequent releases (1.92.1+).
-
-If you are updating from an old version, and expecting a massive or difficult update,
-consider first updating to 1.91.9 to reduce the amount of changes.
-
-Breaking changes:
-
-- Fonts: **IMPORTANT**: if your app was solving the OSX/iOS Retina screen specific
- logical vs display scale problem by setting io.DisplayFramebufferScale (e.g. to 2.0f)
- + setting io.FontGlobalScale (e.g. to 1.0f/2.0f) + loading fonts at scaled sizes (e.g. size X * 2.0f):
- - This WILL NOT map correctly to the new system! Because font will rasterize as requested size.
- - With a legacy backend (< 1.92):
- - Instead of setting io.FontGlobalScale = 1.0f/N -> set ImFontCfg::RasterizerDensity = N.
- - This already worked before, but is now pretty much required.
- - With a new backend (1.92+),
- - This should be all automatic.
- - FramebufferScale is automatically used to set current font RasterizerDensity.
- - FramebufferScale is a per-viewport property provided by backend through the
- Platform_GetWindowFramebufferScale() handler in 'docking' branch.
-- Fonts: **IMPORTANT** on Font Sizing:
- - Before 1.92, fonts were of a single size. They can now be dynamically sized.
- - PushFont() API now has a REQUIRED size parameter.
- void PushFont(ImFont* font) --> void PushFont(ImFont* font, float size);
- - PushFont(font, 0.0f) // Change font and keep current size
- - PushFont(NULL, 20.0f) // Keep font and change current size
- - PushFont(font, 20.0f) // Change font and set size to 20.0f
- - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
- - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior, for fixed size fonts.
- - To use old behavior use 'ImGui::PushFont(font, font->LegacySize)' at call site.
- We intentionally didn't add a default parameter because it would make the long-term
- transition more difficult.
- - Kept inline redirection font. Will obsolete.
- - Global scale factors may be applied over the provided size.
- This is why it is called 'FontSizeBase' in the style structure.
- - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
- - ImFont::FontSize was removed and does not make sense anymore.
- - ImFont::LegacySize is the size passed to AddFont().
- - Removed support for old PushFont(NULL) which was a shortcut for "revert to default font".
- `PushFont(NULL, some_size)` now keeps current change and changes size.
- - Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'.
-- Fonts: **IMPORTANT** on Font Merging:
- - When searching for a glyph in multiple merged fonts: we search for the FIRST font source
- which contains the desired glyph. Because the user doesn't need to provide glyph ranges
- any more, it is possible that a glyph that you expected to fetch from a secondary/merged
- icon font may be erroneously fetched from the primary font.
- - We added `ImFontConfig::GlyphExcludeRanges[]` to specify ranges to exclude from a given font source:
- // Add Font Source 1 but ignore ICON_MIN_FA..ICON_MAX_FA range
- static ImWchar exclude_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
- ImFontConfig cfg1;
- cfg1.GlyphExcludeRanges = exclude_ranges;
- io.Fonts->AddFontFromFileTTF("segoeui.ttf", 0.0f, &cfg1);
- // Add Font Source 2, which expects to use the range above
- ImFontConfig cfg2;
- cfg2.MergeMode = true;
- io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
- - You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to
- see list of glyphs available in multiple font sources. This can facilitate understanding
- which font input is providing which glyph.
-
-- Textures:
- - All API functions taking a 'ImTextureID' parameter are now taking a 'ImTextureRef':
- - ImTextureRef ais small composite structure which may be constructed from a ImTextureID.
- (or constructed from a ImTextureData* which represent a texture which will generally
- be ready by the time of rendering).
- - Affected functions are:
- - ImGui::Image(), ImGui::ImageWithBg(), ImGui::ImageButton(),
- - ImDrawList::AddImage(), ImDrawList::AddImageQuad(), ImDrawList::AddImageRounded().
- - We suggest that C users and any higher-level language bindings generators may
- facilitate converting this in some way, aka emulating the trivial C++ constructor.
-- Fonts: obsoleted ImFontAtlas::GetTexDataAsRGBA32(), GetTexDataAsAlpha8(), Build(), SetTexID()
- and IsBuilt() functions. The new protocol for backends to handle textures doesn't need them.
- Kept redirection functions (will obsolete).
- - A majority of old backends should still work with new code (behaving like they did before).
- - For instructions to upgrade your custom backend:
- https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md
- - Calling ImFontAtlas::Build() before initializing new backends will erroneously trigger
- preloading all glyphs. Will be detected with an assertion after the backend is initialized.
-- Fonts: ImFontConfig::OversampleH/OversampleV default to automatic (== 0)
- since v1.91.8. It is quite important you keep it automatic until we decide if we want
- to provide a way to express finer policy, otherwise you will likely waste texture space
- when using large glyphs. Note that the imgui_freetype backend doesn't use and does not
- need oversampling.
-- Fonts: specifying glyph ranges is now unnecessary.
- - The value of ImFontConfig::GlyphRanges[] is only useful for legacy backends.
- - All GetGlyphRangesXXXX() functions are now marked obsolete:
- - GetGlyphRangesDefault(), GetGlyphRangesGreek(), GetGlyphRangesKorean(),
- GetGlyphRangesJapanese(), GetGlyphRangesChineseSimplifiedCommon(),
- GetGlyphRangesChineseFull(), GetGlyphRangesCyrillic(),
- GetGlyphRangesThai(), GetGlyphRangesVietnamese().
-- Fonts: removed ImFontAtlas::TexDesiredWidth to enforce a texture width. (#327)
- (it vaguely made sense with the old system as if unspecified textures width maxed up
- to 4096 but that limit isn't necessary anymore, and Renderer_TextureMaxWidth covers this)
- However you may set TexMinWidth = TexMaxWidth for the same effect.
-- Fonts: if you create and manage ImFontAtlas instances yourself (instead of relying on
- ImGuiContext to create one, you'll need to call ImFontAtlasUpdateNewFrame() yourself.
- An assert will trigger if you don't.
-- Fonts: obsoleted ImGui::SetWindowFontScale() which is not useful anymore. Prefer using
- PushFont(NULL, style.FontSizeBase * factor) or to manipulate other scaling factors.
-- Fonts: obsoleted ImFont::Scale which is not useful anymore.
-- Fonts: changed ImFont::CalcWordWrapPositionA() to ImFont::CalcWordWrapPosition():
- - old: const char* CalcWordWrapPositionA(float scale, const char* text, ....);
- - new: const char* CalcWordWrapPosition (float size, const char* text, ....);
- The leading 'float scale' parameters was changed to 'float size'.
- This was necessary as 'scale' is assuming a unique font size.
- Kept inline redirection function assuming using font->LegacySize.
-- Fonts: generally reworked Internals of ImFontAtlas and ImFont.
- While in theory a vast majority of users shouldn't be affected, some use cases or
- extensions might be. Among other things:
- - ImDrawCmd::TextureId has been changed to ImDrawCmd::TexRef.
- - ImFontAtlas::TexID has been changed to ImFontAtlas::TexRef.
- - ImFontAtlas::ConfigData[] has been renamed to ImFontAtlas::Sources[].
- - ImFont::ConfigData[], ConfigDataCount has been renamed to Sources[], SourceCount.
- - Each ImFont has a number of ImFontBaked instances corresponding to actively used
- sizes. ImFont::GetFontBaked(size) retrieves the one for a given size.
- - Fields moved from ImFont to ImFontBaked:
- - ImFont::IndexAdvanceX[] -> ImFontBaked::IndexAdvanceX[]
- - ImFont::Glyphs[] -> ImFontBaked::Glyphs[]
- - ImFont::Ascent, Descent -> ImFontBaked::Ascent, Descent
- - ImFont::FindGlyph() -> ImFontBaked::FindGlyph()
- - ImFont::FindGlyphNoFallback() -> ImFontBaked::FindGlyphNoFallback()
- - ImFont::GetCharAdvance() -> ImFontBaked::GetCharAdvance()
- - Widget code may use ImGui::GetFontBaked() instead of ImGui::GetFont() to
- access font data for current font at current font size.
- (and you may use font->GetFontBaked(size) to access it for any other size.)
- g.Font == ImGui::GetFont()
- g.FontSize == ImGui::GetFontSize()
- g.FontBaked == ImGui::GetFontBaked() == ImGui::GetFont()->GetFontBaked(ImGui::GetFontSize())
- - Fields moved from ImFontAtlas to ImTextureData
- - ImFontAtlas->TexWidth -> ImFontAtlas->TexData->Width
- - ImFontAtlas->TexHeight -> ImFontAtlas->TexData->Height
- - ImFontAtlas->TexPixelsAlpha8 -> ImFontAtlas->TexData->GetPixels() (when ImFontAtlas::TexDesiredFormat == ImTextureFormat_Alpha8)
- - ImFontAtlas->TexPixelsRGBA32 -> ImFontAtlas->TexData->GetPixels() (when ImFontAtlas::TexDesiredFormat == ImTextureFormat_RGBA32)
- Please report if you are affected!
-- Fonts: (users of imgui_freetype)
- - renamed ImFontAtlas::FontBuilderFlags to ImFontAtlas::FontLoaderFlags.
- - renamed ImFontConfig::FontBuilderFlags to ImFontConfig::FontLoaderFlags.
- - renamed ImGuiFreeTypeBuilderFlags to ImGuiFreeTypeLoaderFlags.
- - if you used runtime imgui_freetype selection rather than the default compile-time
- option provided by IMGUI_ENABLE_FREETYPE:
- - renamed/reworked ImFontBuilderIO into ImFontLoader,
- - renamed ImGuiFreeType::GetBuilderForFreeType() to ImGuiFreeType::GetFontLoader()
- - old: io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()
- - new: io.Fonts->FontLoader = ImGuiFreeType::GetFontLoader()
-- DrawList: Renamed ImDrawList::PushTextureID()/PopTextureID() to PushTexture()/PopTexture().
-- Fonts: (users of custom rectangles)
- - Renamed AddCustomRectRegular() to AddCustomRect(). (#8466)
- - Added GetCustomRect() as a replacement for GetCustomRectByIndex() + CalcCustomRectUV(). (#8466)
- - The output type of GetCustomRect() is now ImFontAtlasRect, which include UV coordinates.
- - ImFontAtlasCustomRect::X --> ImFontAtlasRect::x
- - ImFontAtlasCustomRect::Y --> ImFontAtlasRect::y
- - ImFontAtlasCustomRect::Width --> ImFontAtlasRect::w
- - ImFontAtlasCustomRect::Height --> ImFontAtlasRect::h
- Before:
- const ImFontAtlasCustomRect* r = atlas->GetCustomRectByIndex(custom_rect_id);
- ImVec2 uv0, uv1;
- atlas->GetCustomRectUV(r, &uv0, &uv1);
- ImGui::Image(atlas->TexRef, ImVec2(r->w, r->h), uv0, uv1);
- After:
- ImFontAtlasRect r;
- atlas->GetCustomRect(custom_rect_id, &r);
- ImGui::Image(atlas->TexRef, ImVec2(r.w, r.h), r.uv0, r.uv1);
- We added a redirecting typedef but haven't attempted to magically redirect
- the field names, as this API is rarely used and the fix is simple.
- - Obsoleted AddCustomRectFontGlyph() as the API does not make sense for scalable fonts:
- - Kept existing function which uses the font "default size" (Sources[0]->LegacySize).
- - Added a helper AddCustomRectFontGlyphForSize() which is immediately marked obsolete,
- but can facilitate transitioning old code.
- - Prefer adding a font source (ImFontConfig) using a custom/procedural loader.
-- Backends: removed ImGui_ImplXXXX_CreateFontsTexture()/ImGui_ImplXXXX_DestroyFontsTexture()
- for all backends that had them. They should not be necessary any more.
- - removed ImGui_ImplMetal_CreateFontsTexture(), ImGui_ImplMetal_DestroyFontsTexture().
- - removed ImGui_ImplOpenGL2_CreateFontsTexture(), ImGui_ImplOpenGL2_DestroyFontsTexture().
- - removed ImGui_ImplOpenGL3_CreateFontsTexture(), ImGui_ImplOpenGL3_DestroyFontsTexture().
- - removed ImGui_ImplSDLGPU3_CreateFontsTexture(), ImGui_ImplSDLGPU3_DestroyFontsTexture().
- - removed ImGui_ImplSDLRenderer2_CreateFontsTexture(), ImGui_ImplSDLRenderer2_DestroyFontsTexture().
- - removed ImGui_ImplSDLRenderer3_CreateFontsTexture(), ImGui_ImplSDLRenderer3_DestroyFontsTexture().
- - removed ImGui_ImplVulkan_CreateFontsTexture(), ImGui_ImplVulkan_DestroyFontsTexture().
-- Layout: commented out legacy ErrorCheckUsingSetCursorPosToExtendParentBoundaries() fallback
- obsoleted in 1.89 (August 2022) which allowed a SetCursorPos()/SetCursorScreenPos() call WITHOUT AN ITEM
- to extend parent window/cell boundaries. Replaced with assert/tooltip that would already happens if
- previously using IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#5548, #4510, #3355, #1760, #1490, #4152, #150)
- - Incorrect way to make a window content size 200x200:
- Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
- - Correct ways to make a window content size 200x200:
- Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + Dummy(ImVec2(0,0)) + End();
- Begin(...) + Dummy(ImVec2(200,200)) + End();
- - TL;DR; if the assert triggers, you can add a Dummy({0,0}) call to validate extending parent boundaries.
-- TreeNode: renamed ImGuiTreeNodeFlags_NavLeftJumpsBackHere to ImGuiTreeNodeFlags_NavLeftJumpsToParent
- for clarity. Kept inline redirection enum (will obsolete). (#1079, #8639)
-- Commented out PushAllowKeyboardFocus()/PopAllowKeyboardFocus() which was obsoleted
- in 1.89.4 (March 2023). (#3092)
- - PushAllowKeyboardFocus(bool tab_stop) --> PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop);
- - PopAllowKeyboardFocus() --> PopItemFlag().
-- Commented out ImGuiListClipper::ForceDisplayRangeByIndices() which was obsoleted
- in 1.89.6 (June 2023).
- - ForceDisplayRangeByIndices() --> IncludeItemsByIndex()
-- Backends: SDL3: Fixed casing typo in function name: (#8509, #8163, #7998, #7988) [@puugz]
- - Imgui_ImplSDLGPU3_PrepareDrawData() --> ImGui_ImplSDLGPU3_PrepareDrawData()
-- Internals: RenderTextEllipsis() function removed the 'float clip_max_x' parameter directly
- preceding 'float ellipsis_max_x'. Values were identical for a vast majority of users. (#8387)
-
-Non-breaking Fonts/Textures related changes:
-
-- Textures: added partial texture update protocol. (#8465, #3761)
- - The Renderer Backend needs to set io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures
- and handle texture updates requests.
- - New structs: ImTextureData, ImTextureRect.
- - New enums: ImTextureStatus, ImTextureFormat.
- - During its ImGui_ImplXXXX_RenderDrawData() call, the backend can now access a texture list
- in ImDrawData::Textures[]. Textures may have four distinct states:
- - ImTextureStatus_WantCreate: requesting backend to create a texture.
- - ImTextureStatus_WantUpdates: requesting backend to copy given blocks from the CPU side
- copy of the texture to your graphics pipeline.
- A 'tex->Updates[]' list of update is provided as well as a single 'tex->UpdatesRect' bounding box.
- - ImTextureStatus_WantDestroy: requesting backend to destroy the texture.
- - A 'int UnusedFrames' value is provided to conveniently defer destroying.
- - Backend is generally free to destroy textures whenever they like.
- - ImTextureStatus_OK: nothing to do.
- - Almost all standard backends have been updated to support this.
- - Backends have allowed to destroy textures at any time if they desire so.
- A list is available in platform_io.Textures[] for this purpose and for backend shutdown.
- - Both stb_truetype and FreeType backends have been updated to work with the new
- system, and they now share more code than before.
- - Added '#define IMGUI_HAS_TEXTURES' to facilitate compile-time checks for third-party
- extensions until this is merged with a definitive version number to check.
-- Fonts: font backend/loader may easily be changed dynamically, allowing users to compare
- rasterizers outputs and features. imgui_freetype is generally beneficial.
-- Fonts: ImFontAtlas::AddFontXXX() functions may be called at any time during the frame.
-- Fonts: ImFontAtlas::AddFontXXX() can fail more gracefully if error handling is configured
- to not assert (this will be better exposed via future font flags).
-- Fonts: added style.FontScaleBase scaling factor (previously called io.FontGlobalScale).
-- Fonts: added style.FontScaleDpi scaling factor. This is designed to be be changed on
- per-monitor/per-viewport basis, which `io.ConfigDpiScaleFonts` does automatically.
- (which is why it is separate from FontScaleBase).
-- Fonts: added optional font_size parameter to ImGui::PushFont() function.
-- Fonts: added ImFontAtlas::RemoveFont() function.
-- Fonts: added ImFontAtlas::CompactCache() function.
-- Fonts: added ImFontAtlas::TexDesiredFormat field (default to ImTextureFormat_RGBA32,
- can be changed to ImTextureFormat_Alpha8).
-- Fonts: added ImFontAtlas::TexMinWidth, TexMinHeight, TexMaxWidth, TexMaxHeight fields.
-- Fonts: added ImFontConfig::PixelSnapV to align scaled GlyphOffset.y to pixel boundaries.
-- Fonts: added ImFontConfig::GlyphExcludeRanges[], which behave similarly to
- ImFontConfig::GlyphRanges[], but has the opposite meaning. It is tailored to situations
- where merged fonts have overlapping characters.
-- Fonts: added "Input Glyphs Overlap Detection Tool" which dumps a list of glyphs
- provided by merged sources, which may help setting up a GlyphExcludeRanges[] filter.
-- Fonts: added ImFontAtlas::FontBackendName (which is surfaced in the "About Dear ImGui"
- window and other locations).
-- Fonts: added ImFontFlags (currently needs to be passed through ImFontConfig until
- we revamp font loading API):
- - ImFontFlags_NoLoadError: disable erroring/assert when calling AddFontXXX()
- with missing file/data. Calling code is expected to check AddFontXXX() return value.
- - ImFontFlags_NoLoadGlyphs: disable loading new glyphs.
- - ImFontFlags_LockBakedSizes: disable loading new baked sizes, disable garbage
- collecting current ones. e.g. if you want to lock a font to a single size.
-- Fonts: the general design has changed toward meaning that a ImFont doesn't have
- have a specific size: it may be bound and drawn with any size.
- - We store ImFontBaked structures internally, which are a cache of information
- for a given size being drawn. You should not need to deal with ImFontBaked directly.
- - ImFontBaked structures may be cleaned up between frames when unused, pointers
- to them are only valid for the current frame.
- - Added ImFontBaked::IsGlyphLoaded() function.
-- Fonts: Custom Rect packing has generally been reworked. (#8107, #7962, #1282)
- - ImFontAtlas::AddCustomRect() (previously AddCustomRectRegular()/AddCustomRectFontGlyph())
- functions will immediately return a packed rectangle identifier, and you can write your
- pixels immediately - previously had to wait for Build() to be called.
- This is also the case when using a legacy backend.
- - Custom packed rectangles may be moved during a texture change, aka practically anytime.
- Always refer to latest uvs/position returned by GetCustomRect().
- - AddCustomRect() returns ImFontAtlasRectId_Invalid on failure.
- - Added ImFontAtlas::RemoveCustomRect() function.
- - GetCustomRect() can safely return false and not crash when passed an invalid or removed id.
-- Fonts: texture is now stored in a single format CPU side (save ~25% when using RGBA).
-- Fonts: changing current font to one from a different atlas is supported. (#8080)
-- Fonts: automatic baking of an "..." ellipsis works better with monospace fonts.
-- Fonts: each ImFontConfig font source may provide a custom backend/loader.
-- Fonts: added platform_io.Renderer_TextureMaxWidth/Renderer_TextureMaxHeight fields
- for Renderer Backend to specify if there is a maximum accepted texture size (not yet used).
-- Fonts: added compile-time overridable '#define ImTextureID_Invalid 0' if you need 0
- to be a valid low-level texture identifier.
-- Fonts: reworked text ellipsis logic to ensure a "..." is always displayed instead
- of a single character. (#7024)
-- Fonts: word-wrapping code handle ideographic comma & full stop (U+3001, U+3002). (#8540)
-- Fonts: fixed CalcWordWrapPosition() fallback when width is too small to wrap:
- would use a +1 offset instead of advancing to the next UTF-8 codepoint. (#8540)
-- Debug Tools: Fonts section: add font preview, add "Remove" button, add "Load all glyphs"
- button, add selection to change font backend when both are compiled in.
-- Renderer Backends:
- - Backends: DX9/DX10/DX11/DX12, Vulkan, OpenGL2/3, Metal, SDLGPU3, SDLRenderer2/3, WebGPU, Allegro5:
- - Added ImGuiBackendFlags_RendererHasTextures support for all backends. (#8465, #3761, #3471)
- [@ocornut, @ShironekoBen, @thedmd]
- - Added ImGui_ImplXXXX_UpdateTexture(ImTextureData* tex) functions for all backends.
- Available if you want to start uploading textures right after ImGui::Render() and without
- waiting for the call to ImGui_ImplXXXX_RenderDrawData(). Also useful if you use a staged or
- multi-threaded rendering schemes, where you might want to set ImDrawData::Textures = NULL. (#8597, #1860)
-- Special thanks for fonts/texture related feedback to: @thedmd, @ShironekoBen, @rodrigorc,
- @pathogendavid, @itamago, @rokups, @DucaRii, @Aarkham, @cyfewlp.
-
-Other Changes:
-
-- IO: variations in analog-only components of gamepad events do not interfere
- with trickling of mouse position events (#4921, #8508)
-- Windows: fixed SetNextWindowCollapsed()/SetWindowCollapsed() bypassing the
- codepath that preserve last contents size when collapsed, resulting in
- programmatically uncollapsing auto-sizing windows having them flicker size
- for a frame. (#7691) [@achabense]
-- Windows: clicking on a window close button doesn't claim focus and bring to front. (#8683)
-- Windows: loosened code to allow hovering of resize grips, borders, and table
- borders while hovering a sibling child window, so that the code in master matches
- one in docking (they accidentally diverged). (#8554)
-- Windows: BeginChild(): fixed being unable to combine manual resize on one axis
- and automatic resize on the other axis. (#8690)
- e.g. neither ImGuiChildFlags_ResizeX | ImGuiChildFlags_AutoResizeY
- or ImGuiChildFlags_ResizeY | ImGuiChildFlags_AutoResizeX worked before.
-- TreeNode: added experimental flags to draw tree hierarchy outlines linking
- parent and tree nodes: (#2920)
- - ImGuiTreeNodeFlags_DrawLinesNone: No lines drawn (default value in style.TreeLinesFlags).
- - ImGuiTreeNodeFlags_DrawLinesFull: Horizontal lines to child nodes. Vertical line drawn down to TreePop() position: cover full contents.
- - ImGuiTreeNodeFlags_DrawLinesToNodes: Horizontal lines to child nodes. Vertical line drawn down to bottom-most child node.
- - Added style.TreeLinesFlags which stores the default setting,
- which may be overridden in individual TreeNode() calls.
- - Added style.TreeLinesSize (default to 1.0f).
- - Added style.TreeLinesRadius (default to 0.0f).
- - Added ImGuiCol_TreeLines (in default styles this is the same as ImGuiCol_Border).
- - Caveats:
- - Tree nodes may be used in many creative ways (manually positioning openable
- nodes in unusual ways, using indent to create tree-looking structures, etc.)
- and the feature may not accurately represent them in every cases.
- - The feature adds a little cost as extra data needs to be stored.
- (ImGuiTreeNodeFlags_DrawLinesToNodes is slower than ImGuiTreeNodeFlags_DrawLinesFull
- which may be meaningful on very large trees, as it needs to record bottom-most
- Y position even for clipped nodes).
- - The feature is unlikely to ever work properly when using a coarse clipper
- such as ImGuiListClipper.
-- TreeNode: fixed incorrect clipping of arrow/bullet when using ImGuiTreeNodeFlags_SpanAllColumns.
-- InputText: fixed cursor positioning issue using up/down keys near end of lines while
- editing non-ASCII text. (Regression from 1.91.2) (#8635, #7925)
-- InputText: fixed a buffer overrun that could happen when using dynamically resizing
- buffers (e.g. imgui_stdlib.cpp for std::string, or ImGuiInputTextFlags_CallbackRezize)
- and programmatically making an insertion. (#8689) [@ocornut, @m9710797]
-- Tables: fixed TableHeader() eager vertical clipping of text which may be noticeable
- with FramePadding.y was too small. (#6236)
-- Tables: fixed an assert when combining Tables, Frozen Rows, Clipper and BeginMultiSelect()
- in a certain order. (#8595, #8250)
-- Tabs: fixes small issues with how "..." ellipsis moved depending on visibility
- of Close Button or Unsaved Document marker. (#8387)
-- Tooltips: tooltips have a maximum size corresponding to host display/monitor size,
- which mitigates edge case issues in multi-viewport scenarios where abnormally large
- windows (e.g. determined programmatically) can lead to renderer backend trying to
- create abnormally large framebuffers.
-- TextLinkOpenURL(): added bool return value on click. (#8645, #8451, #7660)
-- Scroll: fixed contents size, scrollbar visibility and scrolling resetting issues
- with abnormally large contents ranges. (#3609, #8215)
-- Clipper: some mitigation/improvements for abnormally large contents ranges. (#3609, #8215)
-- Nav: fixed assertion when holding gamepad FaceLeft/West button to open
- CTRL+Tab windowing + pressing a keyboard key. (#8525)
-- Nav: fixed scroll fallback (when there are no interactive widgets to jump to) not
- being enabled on windows with menu or title bar.
-- Nav: fixed an issue handling PageUp/PageDown on windows with abnormally large contents
- range which could lead to clipper requesting very large ranges.
-- Error Handling: added better error report and recovery for extraneous
- EndPopup() call. (#1651, #8499)
-- Error Handling: added better error report and recovery when calling EndFrame()
- or Render() without NewFrame(). Was previously only an assert.
-- Style, InputText: added ImGuiCol_InputTextCursor to configure color of
- the InputText cursor/caret. (#7031)
-- Platform IME: added ImGuiPlatformImeData::ViewportId info (backported from Docking branch).
-- Platform IME: added ImGuiPlatformImeData::WantTextInput which might set independently
- of WantVisible. This is set in the same structure because activating text input generally
- requires providing a window to the backend. (#8584, #6341)
-- DrawList: Fixed a regression from 1.91.1 where a Begin()/PushFont()/AddImage() sequence
- would not restore the correct atlas Texture Identifier when the PushFont() call used
- a font from a different atlas. (#8694, caused by #3224, #3875, #6398, #7903)
-- Misc: added extra operators to ImVec4 in IMGUI_DEFINE_MATH_OPERATORS block. (#8510) [@gan74]
-- Misc: removed static linkage from operators to facilitate using in C++ modules. (#8682, #8358) [@johmani]
-- Demo: changed default framed item width to use Min(GetFontSize() * 12, GetContentRegionAvail().x * 0.40f).
-- Renderer Backends:
- - Backends: SDLGPU3: Fixed creating atlas texture earlier than other backends, preventing
- to load fonts between the Init and NewFrames calls.
- - Backends: SDLGPU3: Made ImGui_ImplSDLGPU3_PrepareDrawData() reuse GPU Transfer Buffers which
- were unusually slow to recreate every frame. Much faster now. (#8534) [@ocornut, @TheMode]
- - Backends: SDLGPU3: added support for ImDrawCallback_ResetRenderState. (#8599)
- - Backends: OpenGL3: made GLES 3.20 contexts not access GL_CONTEXT_PROFILE_MASK nor
- GL_PRIMITIVE_RESTART. (#8664) [@DyXel]
- - Backends: DirectX12: Fixed build on MinGW. (#8702, #4594) [@playday3008]
- - Backends: DirectX10, DirectX11, DirectX12: Honor FramebufferScale to allow for custom
- platform backends and experiments using it (consistently with other renderer backends,
- even though in normal condition it is not set under Windows). (#8412) [@WSSDude]
- - Backends: Vulkan: Deep-copy ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo's
- pColorAttachmentFormats buffer when set, in order to reduce common user-error of
- specifying a pointer to data that gets out of scope. (#8282)
- - Backends: Vulkan: Load dynamic rendering functions using vkGetDeviceProcAddr()
- + try both non-KHR and KHR versions. (#8600, #8326, #8365) [@ChrisTom-94]
- - Backends: Vulkan: fixed validation errors in window create/resize helpers used by examples
- and by multi-viewports implementation, which would typically trigger errors while detaching
- secondary viewports. (#8600, #8176) [@ChrisTom-94]
-- Platform Backends:
- - Backends: GLFW: added ImGui_ImplGlfw_GetContentScaleForMonitor(), ImGui_ImplGlfw_GetContentScaleForWindow()
- helpers. They are wrappers to glfwGetMonitorContentScale()/glfwGetWindowContentScale(), with compile-time
- GLFW version checks + returning 1.0f on Apple platform.
- - Backends: GLFW: Added support for multiple Dear ImGui contexts. (#8676, #8239, #8069)
- - Backends: SDL2: added ImGui_ImplSDL2_GetDpiScaleForDisplay() and ImGui_ImplSDL2_GetContentScaleForWindow()
- helpers. They are wrappers to SDL_GetDisplayDPI(), with compile-time SDL version checks + returning 1.0f
- on Apple platforms. SDL3 already does this by default.
- - Backends: Win32: Fixed an issue where externally losing mouse capture (due to e.g. focus loss)
- would fail to claim it again the next subsequent click. (#8594)
- - Backends: SDL2, SDL3, OSX: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad
- regardless of ImGuiConfigFlags_NavEnableGamepad being set. (#8508)
- - Backends: SDL2, SDL3: don't attempt to call SDL_CaptureMouse() on drivers where we don't
- call SDL_GetGlobalMouseState(). This is specifically for Wayland but we currently use
- the same white-list as SDL_GetGlobalMouseState(). (#8561) [@vs49688]
- - Backends: GLFW, SDL2, SDL3: include GLFW/SDL version number in io.BackendPlatformName.
- - Backends: SDL3: Update for SDL3 api changes: revert SDL_GetClipboardText()
- memory ownership change. (#8530, #7801) [@Green-Sky]
- - Backends: SDL3: honor ImGuiPlatformImeData::WantTextInput as an alternative
- way to call SDL_StartTextInput(), without IME being necessarily visible. (#8584)
- - Backends: SDL3: fixed pulling SDL_PROP_WINDOW_COCOA_WINDOW_POINTER into
- viewport->PlatformHandleRaw. (#8725, #8726) [@eertbleyen]
- - Backends: OSX: ImGui_ImplOSX_HandleEvent() only process event for window containing
- our view. (#8644) [@BingoXuan]
-- Examples:
- - Examples: Made many examples DPI aware by default.
- The single-viewport is basically:
- - Query monitor DPI scale. Helpers are provided in some backends.
- - Call style.ScaleAllSizes() and set style.FontScaleDpi with this factor.
- Multi-viewport applications may set both of those flags:
- - io.ConfigDpiScaleFonts = true;
- - io.ConfigDpiScaleViewports = true;
- Which will scale fonts but NOT style padding/spacings/thicknesses yet.
- - Examples: Apple+Metal, Apple+OpenGL: add Makefile (CLion opens them nicely). (#8637) [@pthom]
- - Examples: DirectX12+Win32: also test for IsIconic() for sleeping since we don't seem to
- get a DXGI_STATUS_OCCLUDED signal when minimized. (#8603) [@dooann]
-
-
------------------------------------------------------------------------
- VERSION 1.91.9b (Released 2025-03-17)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.9b
-
-- Tables: Fixed assert when loading .ini settings with reordered columns. (#8496, #7934)
-- Tables: Fixed issues when loading .ini settings for a table with columns using
- ImGuiTableColumnFlags_DefaultHide or ImGuiTableColumnFlags_DefaultSort. (#8496, #7934)
-
-
------------------------------------------------------------------------
- VERSION 1.91.9 (Released 2025-03-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.9
-
-Breaking changes:
-
-- Image: removed 'tint_col' and 'border_col' parameter from Image() function. (#8131, #8238)
- - Old function signature:
- void Image (ImTextureID tex_id, ImVec2 image_size, ImVec2 uv0 = (0,0), ImVec2 uv1 = (1,1), ImVec4 tint_col = (1,1,1,1), ImVec4 border_col = (0,0,0,0));
- - New function signatures:
- void Image (ImTextureID tex_id, ImVec2 image_size, ImVec2 uv0 = (0,0), ImVec2 uv1 = (1,1));
- void ImageWithBg(ImTextureID tex_id, ImVec2 image_size, ImVec2 uv0 = (0,0), ImVec2 uv1 = (1,1), ImVec4 bg_col = (0,0,0,0), ImVec4 tint_col = (1,1,1,1));
- - TL;DR: 'border_col' had misleading side-effect on layout, 'bg_col' was missing, parameter order couldn't be consistent with ImageButton().
- - New behavior always use ImGuiCol_Border color + style.ImageBorderSize / ImGuiStyleVar_ImageBorderSize.
- - Old behavior altered border size (and therefore layout) based on border color's
- alpha, which caused variety of problems.
- - Old behavior used a fixed value of 1.0f for border size which was not tweakable.
- - Kept legacy signature (will obsolete), which mimics the old behavior,
- but uses Max(1.0f, style.ImageBorderSize) when border_col is specified.
- - Added ImageWithBg() function which has both 'bg_col' (which was missing) and 'tint_col'.
- It was impossible to add 'bg_col' to Image() with a parameter order consistent with
- other functions, so we decided to remove 'tint_col' and introduce ImageWithBg().
-- Renamed ImFontConfig::GlyphExtraSpacing.x option to GlyphExtraAdvanceX. (#242)
-- Renamed style.TabMinWidthForCloseButton to style.TabCloseButtonMinWidthUnselected.
-- Backends: Vulkan: Added 'uint32_t api_version' argument to ImGui_ImplVulkan_LoadFunctions().
- Note that it was also added to ImGui_ImplVulkan_InitInfo but for the later it is optional.
- (#8326, #8365, #8400)
-- Internals: Fonts: ImFontAtlas::ConfigData[] has been renamed to ImFontAtlas::Sources[],
-- Internals: Fonts: ImFont::ConfigData[], ConfigDataCount has been renamed to Sources[], SourcesCount.
-- Internals: Menus: reworked mangling of menu windows to use "###Menu_00" etc. instead
- of "##Menu_00", allowing them to also store the menu name before it. This shouldn't
- affect code unless directly accessing menu window from their mangled name.
-
-Other changes:
-
-- Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(),
- RadioButton(), Selectable(). Regression from 2025/01/13. (#8370)
-- Windows: Fixed an issue where BeginChild() inside a collapsed Begin()
- wouldn't inherit the SkipItems flag, resulting in missing coarse clipping
- opportunities for code not checking the BeginChild() return value.
-- Windows, Style: Added style.WindowBorderHoverPadding setting to configure
- inner/outer padding applied to hit-testing of windows borders and detection
- of hovered window.
-- InputText: Allow CTRL+Shift+Z to redo even outside of OSX. (#8389) [@tanksdude]
-- InputText: Pasting a multi-line buffer into a single-line edit replaces
- carriage return by spaces. (#8459)
-- InputTextWithHint(): Fixed buffer-overflow (luckily often with no visible effect)
- when a user callback modified the buffer contents in a way that altered the
- visibility of the preview/hint buffer. (#8368) [@m9710797, @ocornut]
-- Scrollbar: Rework logic that fades-out scrollbar when it becomes too small,
- which amusingly made it disappear when using very big font/frame size.
-- Scrollbar: Automatically stabilize ScrollbarX visibility when detecting a
- feedback loop manifesting with ScrollbarX visibility toggling on and off
- repeatedly. (#8488, #3285, #4539)
- (feedback loops of this sort can manifest in various situations, but combining
- horizontal + vertical scrollbar + using a clipper with varying width items is
- one frequent cause. The better solution is to, either: (1) enforce visibility
- by using ImGuiWindowFlags_AlwaysHorizontalScrollbar or (2) declare stable
- contents width with SetNextWindowContentSize(), if you can compute it.)
-- Tables: fixed calling SetNextWindowScroll() on clipped scrolling table
- to not leak the value into a subsequent window. (#8196)
-- Tables: fixed an issue where Columns Visible/Width state wouldn't be correctly
- restored when hot-reloading .ini state. (#7934)
-- Tables: tamed some .ini settings optimizations to more accurately allow
- overwriting/hot-reloading settings in more situations. (#7934)
-- Tables, Error Handling: Recovery from invalid index in TableSetColumnIndex(). (#1651)
-- Image: Added ImageWithBg() variant with bg color and tint color. (#8131, #8238)
-- Image, Style: Added style.ImageBorderSize, ImGuiStyleVar_ImageBorderSize. (#8131, #8238)
-- Selectable: Fixed horizontal label alignment with SelectableTextAlign.x > 0 and
- specifying a selectable size. (#8338)
-- Tabs, Style: made the Close Button of selected tabs always visible by default,
- without requiring to hover the tab. (#8387)
- - Added style.TabCloseButtonMinWidthSelected/TabCloseButtonMinWidthUnselected settings
- to configure visibility of the Close Button for selected and unselected tabs.
- (-1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width)
- - Default for selected tabs: TabCloseButtonMinWidthSelected = -1.0f (always visible)
- - Default for unselected tabs: TabCloseButtonMinWidthUnselected = 0.0f (visible when hovered)
-- Tabs: fixed middle-mouse-button to close tab not checking that close button
- is hovered, merely its visibility. (#8399, #8387) [@nicovanbentum]
-- TextLink(), TextLinkOpenURL(): fixed honoring text baseline alignment.
- (#8451, #7660) [@achabense]
-- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
- handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
-- Disabled: Fixed an issue restoring Alpha in EndDisabled() when using nested
- BeginDisabled() calls with PushStyleVar(ImGuiStyleVar_DisabledAlpha) within. (#8454, #7640)
-- Clipper: Fixed an issue where passing an out of bound index to IncludeItemByIndex()
- could incorrectly offset the final cursor, even if that index was not iterated through.
- One case where it would manifest was calling Combo() with an out of range index. (#8450)
-- Debug Tools: Added io.ConfigDebugHighlightIdConflictsShowItemPicker (defaults to true)
- to allow disabled Item Picker suggestion in user facing builds. (#7961, #7669)
-- Debug Tools: Tweaked layout of ID Stack Tool and always display full path. (#4631)
-- imgui_freetype: update lunasvg API to support v3.0+. (#8656, #6842, #6591) [@moretromain]
-- Misc: Various zealous warning fixes for newer version of Clang.
-- Misc: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursors
- (busy/wait/hourglass shape, with or without an arrow cursor).
-- Demo: Reorganized "Widgets" section to be alphabetically ordered and split in more functions.
-- Demo: Combos: demonstrate a very simple way to add a filter to a combo,
- by showing the filter inside the combo contents. (#718)
-- Examples: SDL3: Added comments to clarify setup for users of the unfortunate
- SDL_MAIN_USE_CALLBACKS feature. (#8455)
-- IO: Added ImGuiKey_Oem102 to ImGuiKey enum. (#7136, #7201, #7206, #7306, #8468)
-- Backends: reworked key handlers to use/prioritize untranslated scancodes instead of
- translated keycodes when dealing with OEM keys which are too difficult to find a reliable
- translated mapping on all systems, backends and keyboard layout.
- (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
- - The affected keys are: ImGuiKey_Apostrophe, ImGuiKey_Comma, ImGuiKey_Minus, ImGuiKey_Period,
- ImGuiKey_Slash, ImGuiKey_Semicolon, ImGuiKey_Equal, ImGuiKey_LeftBracket, ImGuiKey_RightBracket,
- ImGuiKey_Backslash, ImGuiKey_GraveAccent, and newly introduced ImGuiKey_Oem102.
- - This is NOT affecting characters used the text inputs.
- - Fixes many cases of keys not emitting a ImGuiKey value with certain keyboard layouts.
- - Makes emitted ImGuiKey values more consistent regardless of keyboard mapping,
- but you may be getting different values as before.
- - Win32, SDL2, SDL3: Use scancodes for OEM keys.
- - GLFW: GLFW_KEY_WORLD_1 and GLFW_KEY_WORLD_2 are emitting ImGuiKey_Oem102.
-- Backends: GLFW: Fixed clipboard handler assertion when using GLFW <= 3.2.1 compiled
- with asserts enabled. (#8452)
-- Backends: SDL2, SDL3: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn
- handler. (#7660) [@achabense]
-- Backends: SDL2, SDL3, Win32, Allegro5: Added support for ImGuiMouseCursor_Wait
- and ImGuiMouseCursor_Progress cursors.
-- Backends: SDL2, SDL3: Avoid calling SDL_GetGlobalMouseState() when mouse is in
- relative mode. (#8425, #8407) [@TheMode]
-- Backends: SDL2, SDL3: Only start SDL_CaptureMouse() when mouse is being dragged,
- to mitigate issues with e.g. Linux debuggers not claiming capture back on debug
- break. (#6410, #3650)
-- Backends: OpenGL3: Lazily reinitialize embedded GL loader for when calling backend
- from e.g. other DLL boundaries. (#8406)
-- Backends: DirectX12: Fixed an issue where pre-1.91.5 legacy ImGui_ImplDX12_Init()
- signature started breaking in 1.91.8 due to missing command queue. (#8429)
-- Backends: Metal: Fixed a crash on application resources. (#8367, #7419) [@anszom]
-- Backends: Vulkan: Added ApiVersion field in ImGui_ImplVulkan_InitInfo.
- Default to header version if unspecified. (#8326, #8365) [@mklefrancois]
-- Backends: Vulkan: Dynamic rendering path loads "vkCmdBeginRendering/vkCmdEndRendering"
- (without -KHR suffix) on API 1.3. (#8326, #8365) [@mklefrancois]
-- Backends: WebGPU: Recreate image bind groups during render to allow reuse of
- WGPUTextureView pointers. (#8426, #8046, #7765, #8027) [@pplux, @Jairard]
-- Backends: WebGPU: Fix for DAWN API change WGPUProgrammableStageDescriptor -> WGPUComputeState.
- [@PhantomCloak] (#8369)
-- Backends: WebGPU: Fix for webgpu-native API changes. (#8426) [@pplux]
-
-
------------------------------------------------------------------------
- VERSION 1.91.8 (Released 2025-01-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.8
-
-Breaking changes:
-
-- ColorEdit, ColorPicker: redesigned how alpha is displayed in the preview
- square. (#8335, #1578, #346)
- - Removed ImGuiColorEditFlags_AlphaPreview (made value 0): it is now the default behavior.
- - Prior to 1.91.8: alpha was made opaque in the preview by default _unless_ using ImGuiColorEditFlags_AlphaPreview.
- - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior.
- - The new flags may be combined better and allow finer controls:
- - ImGuiColorEditFlags_AlphaOpaque: disable alpha in the preview, but alpha value still editable.
- - ImGuiColorEditFlags_AlphaNoBg: disable rendering a checkerboard background behind transparent color.
- - ImGuiColorEditFlags_AlphaPreviewHalf: display half opaque / half transparent preview.
-- Backends: SDLGPU3: Renamed ImGui_ImplSDLGPU3_InitInfo::GpuDevice to Device
- for consistency. (#8163, #7998, #7988)
-
-Other changes:
-
-- imgui_freetype: fixed issue where glyph advances would incorrectly be
- snapped to pixels. Effectively it would only be noticeable when hinting
- is disabled with ImGuiFreeTypeBuilderFlags_NoHinting, as hinting itself
- snaps glyph advances.
-- Inputs: added IsMouseReleasedWithDelay() helper. (#8337, #8320)
- Use if you absolutely need to distinguish single-click from double-clicks
- by introducing a delay. This is a very rarely used UI idiom, but some apps
- use this: e.g. MS Explorer single-click on an icon triggers a rename.
- Generally use with 'delay >= io.MouseDoubleClickTime' + combine with a
- 'GetMouseClickedCount() == 1' check.
-- Windows: legacy SetWindowFontScale() is properly inherited by nested child
- windows. Note that an upcoming major release should make this obsolete,
- but in the meanwhile it works better now. (#2701, #8138, #1018)
-- Windows, Style: Fixed small rendering issues with menu bar, resize grip and
- scrollbar when using thick border sizes. (#8267, #7887)
-- Windows: Fixed IsItemXXXX() functions not working on append-version of EndChild(). (#8350)
- Also made some of the fields accessible after BeginChild() to match Begin() logic.
-- Error Handling: Recovery from missing EndMenuBar() call. (#1651)
-- Tables, Menus: Fixed using BeginTable() in menu layer (any menu bar). (#8355)
- It previously overrode the current layer back to main layer, which caused an issue
- with MainMenuBar attempted to release focus when leaving the menu layer.
-- Tables, Menus: Fixed tables or child windows submitted inside BeginMainMenuBar()
- being unable to save their settings, as the main menu bar uses _NoSavedSettings. (#8356)
-- ColorEdit, ColorPicker: Fixed alpha preview broken in 1.91.7. (#8336, #8241). [@PathogenDavid]
-- Tabs, Style: reworked selected overline rendering to better accommodate
- for rounded tabs. Reduced default thickness (style.TabBarOverlineSize),
- increased default rounding (style.TabRounding). (#8334) [@Kian738, @ocornut]
-- Debug Tools: Tweaked font preview.
-- ImDrawList: texture baked storage for thick line reduced from ~64x64 to ~32x32. (#3245)
-- Fonts: IndexLookup[] table hold 16-bit values even in ImWchar32 mode,
- as it accounts for number of glyphs in same font. This is favorable to
- CalcTextSize() calls touching less memory.
-- Fonts: OversampleH/OversampleV defaults to 0 for automatic selection.
- - OversampleH == 0 --> use 1 or 2 depending on font size and use of PixelSnapH.
- - OversampleV == 0 --> always use 1.
-- ImFontAtlas: made calling ClearFonts() call ClearInputData(), as calling
- one without the other is never correct. (#8174, #6556, #6336, #4723)
-- Examples: DirectX12: Reduced number of frame in flight from 3 to 2 in
- provided example, to reduce latency.
-- Examples: Vulkan: better handle VK_SUBOPTIMAL_KHR being returned by
- vkAcquireNextImageKHR() or vkQueuePresentKHR(). (#7825, #7831) [@NostraMagister]
-- Backends: SDL2: removed assert preventing using ImGui_ImplSDL2_SetGamepadMode()
- with ImGui_ImplSDL2_GamepadMode_Manual and an empty array. (#8329)
-- Backends: SDL3: removed assert preventing using ImGui_ImplSDL3_SetGamepadMode()
- with ImGui_ImplSDL3_GamepadMode_Manual and an empty array. (#8329)
-- Backends: SDLGPU3: Exposed ImGui_ImplSDLGPU3_CreateDeviceObjects()/_DestroyDeviceObjects().
- Removed return value from ImGui_ImplSDLGPU3_CreateFontsTexture(). (#8163, #7998, #7988)
-- Backends: SDL_Renderer2/3: Use endian-dependent RGBA32 texture format, to match
- SDL_Color. (#8327) [@dkosmari]
-- Backends: DirectX12: Texture upload use the command queue provided in
- ImGui_ImplDX12_InitInfo instead of creating its own.
-- Backends: OSX: Removed notification observer when shutting down. (#8331) [@jrachele]
-
-
------------------------------------------------------------------------
- VERSION 1.91.7 (Released 2025-01-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.7
-
-Breaking changes:
-
-- TreeNode: renamed ImGuiTreeNodeFlags_SpanTextWidth to ImGuiTreeNodeFlags_SpanLabelWidth
- for consistency with other names. Kept redirection enum (will obsolete). (#6937)
-
-Other changes:
-
-- Fixed issues with IsItemDeactivated() and IsItemDeactivatedAfterEdit() not
- emitting a reliable signal when an item is deactivated externally: e.g.
- via an explicit clear of focus, clear of active id, opening of modal etc.
- (#5184, #5904, #6766, #8303, #8004)
- - It used to work when the interruption happened in the frame before the
- active item as submitted, but not after. It should work in both cases now.
- - While this is not specific to a certain widgets, typically it would
- mostly be noticeable on InputText() because it keeps ActiveId for a
- longer time while allowing other interaction to happen.
-- Error Handling: Fixed bugs recovering from within a table that created
- a child window, and from nested child windows. (#1651)
-- Error Handling: Turned common EndTable() and other TableXXX functions
- fail cases into a recoverable error. (#1651, #8314)
-- Error Handling: Basic error handling options in Demo->Tools->Debug Options. (#1651)
-- InputText: Fixed a bug where character replacements performed from a callback
- were not applied when pasting from clipboard. (#8229)
-- InputText: Fixed issue when activating a ReadOnly field when the underlying
- value is being modified. (#8242)
-- InputText: Added sanity check to detect some cases of passing a non
- zero-terminated input buffer.
-- InputText: Fixed not calling CallbackEdit on revert/clear with Escape key,
- although IsItemEdited() was behaving correctly. (#8273)
-- Tables: Fixed TableAngledHeadersRow() creating an infinite horizontal
- scrolling region when the table is hosted in a viewport with negative
- coordinates (left of primary monitor, with multi-viewports enabled).
-- Tables, MultiSelect: Fixed an issue where column width may be mismeasured
- when calling BeginMultiSelect() while inside a table. (#8250)
-- TreeNode, Tables: Added ImGuiTreeNodeFlags_LabelSpanAllColumns to make
- the label (not only the highlight/frame) also spans all columns. This is
- useful for table rows where you know nothing else is submitted. (#8318, #3565)
- Obviously best used with ImGuiTableFlags_NoBordersInBodyUntilResize.
-- Selectable: Fixed horizontal label alignment when combined with using
- ImGuiSelectableFlags_SpanAllColumns. (#8338)
-- Drags: Added ImGuiSliderFlags_NoSpeedTweaks flag to disable keyboard
- modifiers altering the tweak speed. Useful if you want to alter tweak speed
- yourself based on your own logic. (#8223)
-- Nav: Fixed an issue where Alt key would clear current active item on
- windows with the ImGuiWindowFlags_NoNavInputs flag. (#8231)
-- Debug Tools: Debug Log: hovering 0xXXXXXXXX values in log is allowed even
- if a popup is blocking mouse access to the debug log window. (#5855)
-- Debug Tools: Item Picker: Always available in Tools menu regardless of value
- of io.ConfigDebugIsDebuggerPresent. (#2673)
-- Fonts: Fixed miscalculation of Ellipsis ("...") character width when automatically
- created from a single comma character, affecting some fonts/settings (not all).
-- Demo: Added label edition to Property Editor demo + fix an ID issue. (#8266) [@moritz-h]
-- Misc: Fixed misc/cpp/imgui_stdlib.h/.cpp not supporting IMGUI_DISABLE. (#8294) [@juur]
-- Misc: Fixed MinGW builds not using UTF-8 friendly _wfopen(). (#8300)
-- Backends: SDLGPU3 for SDL3: Added backend for SDL_GPU! (#8163, #7998, #7988) [@DeltaW0x].
-- Backends: SDL3: Added ImGui_ImplSDL3_InitForSDLGPU() for consistency, even
- though it is currently not doing anything particular. (#8163, #7998, #7988)
-- Backends: Allegro5: Avoid calling al_set_mouse_cursor() repeatedly since it appears
- to leak on on X11 (#8256). [@Helodity]
-- Backends: Metal: Fixed leaks when using metal-cpp. (#8276, #8166) [@selimsandal]
-- Backends: Metal: Fixed resource leak when using multiple contexts. (#7419) [@anszom]
-- Backends: Vulkan: Fixed setting VkSwapchainCreateInfoKHR::preTransform for
- platforms not supporting VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR. (#8222) [@Zer0xFF]
-- Backends: Vulkan: Added a few more ImGui_ImplVulkanH_XXX helper functions
- primarily for the purpose of making our examples simpler.
-- Backends: Vulkan: Added IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE to clarify
- how many image sampler descriptors are expected to be available in the provided
- descriptor pool. Current backend needs 1 but it is expected that by end of Q1 2025
- this number will grow (will stay a small number). (#6642)
-- Backends: DX11: Expose vertex constant buffer in ImGui_ImplDX11_RenderState.
- Reset projection matrix in ImDrawCallback_ResetRenderState handlers. (#6969, #5834, #7468, #3590)
-- Backends: DX10: Expose ImGui_ImplDX10_RenderState for completeness. (#6969, #5834, #7468, #3590)
-- Examples: Added Win32+Vulkan example for completeness. (#8180) [@jristic]
-
-
------------------------------------------------------------------------
- VERSION 1.91.6 (Released 2024-12-11)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.6
-
-Breaking changes:
-
-- Backends: DX12: Changed ImGui_ImplDX12_Init() signature to take a
- ImGui_ImplDX12_InitInfo struct.
- - Using the new API, application is now required to pass function pointers
- to allocate/free SRV Descriptors.
- - We provide convenience legacy fields to pass a single descriptor,
- matching the old API, but upcoming features will want multiple.
- - Legacy ImGui_ImplDX12_Init() signature is still supported (will obsolete).
-- Misc: changed CRC32 table from CRC32-adler to CRC32c polynomial in order to
- be compatible with the result of SSE 4.2 instructions. (#8169, #4933) [@Teselka]
- - As a result, some .ini data may be partially lost when storing checksums
- (docking and tables information particularly).
- - Because some users have crafted and storing .ini data as a way to workaround
- limitations of the docking API, we are providing a '#define IMGUI_USE_LEGACY_CRC32_ADLER'
- compile-time option to keep using old CRC32 tables if you cannot afford invalidating
- old .ini data.
-
-Other changes:
-
-- Error Handling: fixed cases where recoverable error handling would crash when
- processing errors outside of the NewFrame()..EndFrame() scope. (#1651)
-- Tables: fixed SetNextWindowScroll() value being ignored by BeginTable() during
- the first frame or when scrolling flags have changed. (#8196)
-- InputText: added ImGuiInputTextFlags_ElideLeft to elide left side and ensure right side
- of contents is visible when whole text is not fitting (useful for paths/filenames).
- (#1442, #1440, #4391, #7208, #8216) [@kucoman, @ocornut]
-- InputText: reactivating last activated InputText() doesn't restore horizontal scrolling
- (which was disabled during deactivation anyway).
-- Misc: changed embedded ProggyClean encoding to save a bit of binary space (~12kb to 9.5kb).
-- Misc: added IMGUI_DISABLE_DEFAULT_FONT to strip embedded font from binary. (#8161)
- [@demonese]
-- Demo: example tree used by Property Editor & Selection demos properly freed
- on application closure. (#8158) [@Legulysse]
-- Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted
- for surface area used to determine best-guess texture size. (#8107) [@YarikTH, @ocornut]
-- Misc: use SSE 4.2 crc32 instructions when available. (#8169, #4933) [@Teselka]
-- Tools: binary_to_compressed_c: added -u8/-u32/-base85 export options.
-- Backends: DirectX12: Let user specifies the DepthStencilView format by setting
- ImGui_ImplDX12_InitInfo::DSVFormat. (#8217) [@bmarques1995]
-- Backends: Vulkan: Make user-provided descriptor pool optional. As a convenience,
- when setting init_info->DescriptorPoolSize then the backend will create and manage
- one itself. (#8172, #4867) [@zeux]
-- Examples: Win32+DX12: Using a basic free-list allocator to manage multiple
- SRV descriptors.
-
-
------------------------------------------------------------------------
- VERSION 1.91.5 (Released 2024-11-07)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.5
-
-Breaking changes:
-
-- Commented out pre-1.87 IO system (equivalent to using IMGUI_DISABLE_OBSOLETE_KEYIO or IMGUI_DISABLE_OBSOLETE_FUNCTIONS before).
- - io.KeyMap[] and io.KeysDown[] are removed (obsoleted February 2022). Use IsKeyDown() instead.
- - io.NavInputs[] and ImGuiNavInput are removed (obsoleted July 2022).
- - Pre-1.87 backends are not supported:
- - backends need to call io.AddKeyEvent(), io.AddMouseEvent() instead of writing to io.KeysDown[], io.MouseDown[] fields.
- - backends need to call io.AddKeyAnalogEvent() for gamepad values instead of writing to io.NavInputs[] fields.
- - you can use IsKeyDown() instead of reading from io.KeysDown[].
- - For more references:
- - read 1.87 and 1.88 part of API BREAKING CHANGES in imgui.cpp or read Changelog for 1.87 and 1.88.
- - read https://github.com/ocornut/imgui/issues/4921
- - If you have trouble updating a very old codebase using legacy backend-specific key codes:
- consider updating to 1.91.4 first, then #define IMGUI_DISABLE_OBSOLETE_KEYIO, then update to latest.
- - Obsoleted ImGuiKey_COUNT (it is unusually error-prone/misleading since valid keys don't start at 0).
- Probably use ImGuiKey_NamedKey_BEGIN/ImGuiKey_NamedKey_END?
-- Fonts: removed const qualifiers from most font functions in prevision for upcoming fonts improvements.
-
-Other changes:
-
-- Selectable: selected Selectables use ImGuiCol_Header instead of an arbitrary lerp
- between _Header and _HeaderHovered which was introduced v1.91 (#8106, #1861)
-- Buttons: using ImGuiItemFlags_ButtonRepeat makes default button behavior use
- PressedOnClick instead of PressedOnClickRelease when unspecified.
- - This is intended to make the +/- buttons of InputInt/InputFloat react on the
- initial mouse down event.
- - Note that it may reveal incorrect usage if you were using InputInt/InputFloat
- without persistent storage by relying solely on e.g. IsItemDeactivatedAfterEdit():
- this was never supported and didn't work consistently (see #8149).
-- InputText: fixed a bug (regression in 1.91.2) where modifying text buffer within
- a callback would sometimes prevents further appending to the buffer.
-- Tabs, Style: made ImGuiCol_TabDimmedSelectedOverline alpha 0 (not visible) in default
- styles as the current look is not right (but ImGuiCol_TabSelectedOverline stays the same).
-- Log/Capture: added experimental io.ConfigWindowsCopyContentsWithCtrlC option to
- automatically copy window contents into clipboard using CTRL+C. This is experimental
- because (1) it currently breaks on nested Begin/End, (2) text output quality varies,
- and (3) text output comes in submission order rather than spatial order.
-- Log/Capture: better decorating of BeginMenu() and TabItem() output.
-- Log/Capture: a non terminated log ends automatically in the window which called it.
-- imgui_freetype: Fixed a crash in build font atlas when using merged fonts and the
- first font in a merged set has no loaded glyph. (#8081)
-- Backends: DX12: Unmap() call specify written range. The range is informational and
- may be used by debug tools.
-- Backends: SDL2: Replace SDL_Vulkan_GetDrawableSize() forward declaration with the
- actual include. (#8095, #7967, #3190) [@sev-]
-- Backends: SDL2, SDL3: SDL_EVENT_MOUSE_WHEEL event doesn't require dividing
- by 100.0f on Emscripten target. (#4019, #6096, #1463)
-- Examples: SDL3+Vulkan: Added example. (#8084, #8085)
-- Examples: Android+OpenGL: Using ALooper_pollOnce() instead of ALooper_pollAll()
- which has been deprecated. (#8013) [@feather179]
-
-
------------------------------------------------------------------------
- VERSION 1.91.4 (Released 2024-10-18)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.4
-
-Breaking changes:
-
-- Style: renamed ImGuiCol_NavHighlight to ImGuiCol_NavCursor, for consistency with
- newly exposed and reworked features. Kept inline redirection enum (will obsolete).
-- The typedef for ImTextureID now defaults to ImU64 instead of void*. (#1641)
- - This removes the requirement to redefine it for backends which are e.g. storing
- descriptor sets or other 64-bits structures when building on 32-bits archs
- (namely our DX12 and Vulkan backends). It therefore simplify various building scripts/helpers.
- - You may have compile-time warnings if you were casting to 'void*' instead of 'ImTextureID'
- when passing your types to functions taking ImTextureID values, e.g. ImGui::Image().
- In doubt it is almost always better to do an intermediate intptr_t cast, since it
- allows casting any pointer/integer type without warning:
- - May warn: ImGui::Image((void*)MyTextureData, ...);
- - May warn: ImGui::Image((void*)(intptr_t)MyTextureData, ...);
- - Won't warn: ImGui::Image((ImTextureID)(intptr_t)MyTextureData), ...);
- - Note that you can always define ImTextureID to be your own high-level structures
- (with dedicated constructors and extra render parameters) if you like.
-- IO: moved ImGuiConfigFlags_NavEnableSetMousePos to standalone io.ConfigNavMoveSetMousePos bool.
-- IO: moved ImGuiConfigFlags_NavNoCaptureKeyboard to standalone io.ConfigNavCaptureKeyboard bool
- (note the inverted value!). (#2517, #2009)
- Kept legacy names (will obsolete) + code that copies settings once the first time.
- Dynamically changing the old value won't work. Switch to using the new value!
-
-Other changes:
-
-- IO: added 'void* platform_io.Renderer_RenderState' which is set during the
- ImGui_ImplXXXX_RenderDrawData() of standard backends to expose selected render
- states to your draw callbacks. (#6969, #5834, #7468, #3590)
-- IO: io.WantCaptureKeyboard is never set when ImGuiConfigFlags_NoKeyboard is enabled. (#4921)
-- Error Handling: turned a few more functions into recoverable errors. (#1651)
-- Nav (Keyboard/Gamepad navigation):
- - Nav: added io.ConfigNavCursorVisibleAuto and io.ConfigNavCursorVisibleAlways to configure
- visibility of navigation cursor. (#1074, #2048, #7237, #8059, #3200, #787)
- - Set io.ConfigNavCursorVisibleAuto = true (default) to enable automatic toggling
- of cursor visibility (mouse click hide the cursor, arrow keys makes it visible).
- - Set io.ConfigNavCursorVisibleAlways to keep cursor always visible.
- - Nav: added SetNavCursorVisible(bool visible) function to manipulate visibility of
- navigation cursor (e.g. set default state, or after some actions). (#1074, #2048, #7237, #8059)
- - Nav: added io.ConfigNavEscapeClearFocusItem and io.ConfigNavEscapeClearFocusWindow to change
- how pressing Escape affects navigation. (#8059, #2048, #1074, #3200)
- - Set io.ConfigNavEscapeClearFocusItem = true (default) to clear focused item and highlight.
- - Set io.ConfigNavEscapeClearFocusItem = false for Escape to not have an effect.
- - Set io.ConfigNavEscapeClearFocusWindow = true to completely unfocus the dear imgui window,
- is for some reason your app relies on imgui focus to take other decisions.
- - Nav: pressing escape to hide the navigation cursor doesn't clear location, so it may be
- restored when Ctrl+Tabbing back into the same window later.
- - Nav: fixed Ctrl+Tab initiated with no focused window from skipping the top-most window. (#3200)
- - Nav: navigation cursor is not rendered for items with `ImGuiItemFlags_NoNav`. Can be relevant
- when e.g activating a _NoNav item with mouse, then Ctrl+Tabbing back and forth.
-- Disabled: clicking a disabled item focuses parent window. (#8064)
-- InvisibleButton, Nav: fixed an issue when InvisibleButton() would be navigable into but
- not display navigation highlight. Properly navigation on it by default. (#8057)
-- InvisibleButton: added ImGuiButtonFlags_EnableNav to enable navigation. (#8057)
-- Tooltips: fixed incorrect tooltip positioning when using keyboard/gamepad navigation
- (1.91.3 regression). (#8036)
-- DrawList: AddCallback() added an optional size parameter allowing to copy and
- store any amount of user data for usage by callbacks: (#6969, #4770, #7665)
- - If userdata_size == 0: we copy/store the 'userdata' argument as-is (existing behavior).
- It will be available unmodified in ImDrawCmd::UserCallbackData during render.
- - If userdata_size > 0, we copy/store 'userdata_size' bytes pointed to by 'userdata' (new behavior).
- We store them in a buffer stored inside the drawlist. ImDrawCmd::UserCallbackData
- will point inside that buffer so you have to retrieve data from there. Your callback
- may need to use ImDrawCmd::UserCallbackDataSize if you expect dynamically-sized data.
- - Note that we use a raw type-less copy.
-- Tables: fixed initial auto-sizing issue with synced-instances. (#8045, #7218)
-- InputText: fixed an issue with not declaring ownership of Delete/Backspace/Arrow keys,
- preventing use of external shortcuts that are not guarded by an ActiveId check. (#8048)
- [@geertbleyen]
-- InputText: ensure mouse cursor shape is set regardless of whether keyboard mode is
- enabled or not. (#6417)
-- InputScalar: added an assert to clarify that ImGuiInputTextFlags_EnterReturnsTrue is not
- supported by InputFloat, InputInt, InputScalar etc. widgets. It actually never was. (#8065, #3946)
-- imgui_freetype: Added support for plutosvg (as an alternative to lunasvg) to render
- OpenType SVG fonts. Requires defining IMGUI_ENABLE_FREETYPE_PLUTOSVG along with IMGUI_ENABLE_FREETYPE.
- Providing headers/libraries for plutosvg + plutovg is up to you (see #7927 for help).
- (#7927, #7187, #6591, #6607) [@pthom]
-- Backends: DX11, DX12, SDLRenderer2/3. Vulkan, WGPU: expose selected state in
- ImGui_ImplXXXX_RenderState structures during render loop user draw callbacks.
- (#6969, #5834, #7468, #3590)
-- Backends: DX9, DX10, DX11, DX12, OpenGL, Vulkan, WGPU: Changed default texture sampler
- to Clamp instead of Repeat/Wrap. (#7468, #7511, #5999, #5502, #7230)
-
-
------------------------------------------------------------------------
- VERSION 1.91.3 (Released 2024-10-04)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.3
-
-Breaking changes:
-
-- Drags: treat v_min==v_max as a valid clamping range when != 0.0f. Zero is still a special
- value due to legacy reasons, unless using ImGuiSliderFlags_ClampZeroRange. (#7968, #3361, #76)
-- Drags: extended behavior of ImGuiSliderFlags_AlwaysClamp to include _ClampZeroRange.
- It considers v_min==v_max==0.0f as a valid clamping range (aka edits not allowed).
- Although unlikely, it you wish to only clamp on text input but want v_min==v_max==0.0f
- to mean unclamped drags, you can use _ClampOnInput instead of _AlwaysClamp. (#7968, #3361, #76)
-
-Other changes:
-
-- Error Handling: Enabled/improved error recovery systems. (#1651, #5654)
- - Error recovery is provided as a way to facilitate:
- - Recovery after a programming error. Native code or scripting language (the later
- tends to facilitate iterating on code while running).
- - Recovery after running an exception handler or any error processing which may skip code
- after an error has been detected.
- - Error recovery is not perfect nor guaranteed! It is a feature to ease development.
- You not are not supposed to rely on it in the course of a normal application run.
- - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT().
- - By design, we do not allow error recovery to be 100% silent. One of the options needs to be enabled!
- - Possible usage: facilitate recovery from errors triggered from a scripting language or
- after specific exceptions handlers. Surface errors to programmers in less aggressive ways.
- - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled
- when making direct imgui API calls! Otherwise it would severely hinder your ability to
- catch and correct mistakes!
- - Added io.ConfigErrorRecovery to enable error recovery support.
- - Added io.ConfigErrorRecoveryEnableAssert to assert on recoverable errors.
- - Added io.ConfigErrorRecoveryEnableDebugLog to output to debug log on recoverable errors.
- - Added io.ConfigErrorRecoveryEnableTooltip to enable displaying an error tooltip on recoverable errors.
- The tooltip include a way to enable asserts if they were disabled.
- - All options are enabled by default.
- - Read https://github.com/ocornut/imgui/wiki/Error-Handling for a bit more details.
-- Windows: BeginChild(): made it possible to call SetNextWindowSize() on a child window
- using ImGuiChildFlags_ResizeX,ImGuiChildFlags_ResizeY in order to override its current
- size. (#1710, #8020)
-- Scrollbar: Shift+Click scroll to clicked location (pre-1.90.8 default). (#8002, #7328)
-- Scrollbar: added io.ConfigScrollbarScrollByPage setting (default to true). (#8002, #7328)
- Set io.ConfigScrollbarScrollByPage=false to enforce always scrolling to clicked location.
-- Drags: split ImGuiSliderFlags_AlwaysClamp into two distinct flags: (#7968, #3361, #76)
- - ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput + ImGuiSliderFlags_ClampZeroRange.
- - Previously _AlwaysClamp only did the equivalent of _ClampOnInput.
- - Added ImGuiSliderFlags_ClampOnInput which is now a subset of AlwaysClamp.
- (note that it was the old name of AlwaysClamp, but we are reintroducing that name).
- - Added ImGuiSliderFlags_ClampZeroRange to enforce clamping even when v_min==v_max==0.0f
- in drag functions. Sliders are not affected.
-- Tooltips, Drag and Drop: Fixed an issue where the fallback drag and drop payload tooltip
- appeared during drag and drop release.
-- Tooltips, Drag and Drop: Stabilized name of drag and drop tooltip window so that
- transitioning from an item tooltip to a drag tooltip doesn't leak window auto-sizing
- info from one to the other. (#8036)
-- Tooltips: Tooltips triggered from touch inputs are positioned above the item. (#8036)
-- Backends: SDL3: Update for API changes: SDL_bool removal. SDL_INIT_TIMER removal.
-- Backends: WebGPU: Fixed DAWN api change using WGPUStringView in WGPUShaderSourceWGSL.
- (#8009, #8010) [@blitz-research]
-
------------------------------------------------------------------------
- VERSION 1.91.2 (Released 2024-09-19)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.2
-
-Breaking changes:
-
- - Internals: using multiple overlaid ButtonBehavior() with same ID will now have the
- io.ConfigDebugHighlightIdConflicts=true feature emit a warning. (#8030)
- It was one of the rare case where using same ID is legal. Workarounds:
- - use single ButtonBehavior() call with multiple _MouseButton flags
- - or surround the calls with PushItemFlag(ImGuiItemFlags_AllowDuplicateId, true); ... PopItemFlag()
-
-Other changes:
-
-- Added io.ConfigDebugHighlightIdConflicts debug feature! (#7961, #7669)
- THIS DETECTS THE MOST COMMON USER ERROR BY FIRST-TIME DEAR IMGUI PROGRAMMERS!
- - The tool detects when multiple items are sharing the same identifier, due to not
- using PushID/PopID in loops, or not using ID stack facilities such as "##" suffixes.
- Very frequently it happens when using empty "" labels.
- - When hovering an item with a conflicting ID, all visible items with the same ID will
- be highlighted and an explanatory tooltip is made visible.
- - The feature may be disabled and is exposed in Demo->Tools menu.
- - I've been wanting to add this tool for a long time, but was stalled by finding a way to
- not make it spammy + make it practically zero cost. After @pthom made various proposals to
- solve the same problem (thanks for pushing me!), I decided it was time to finish it.
- - Added ImGuiItemFlags_AllowDuplicateId to use with PushItemFlag()/PopItemFlag() if for some
- reason you intend to have duplicate identifiers.
- - (#74, #96, #480, #501, #647, #654, #719, #843, #894, #1057, #1173, #1390, #1414, #1556, #1768,
- #2041, #2116, #2330, #2475, #2562, #2667, #2807, #2885, #3102, #3375, #3526, #3964, #4008,
- #4070, #4158, #4172, #4199, #4375, #4395, #4471, #4548, #4612, #4631, #4657, #4796, #5210,
- #5303, #5360, #5393, #5533, #5692, #5707, #5729, #5773, #5787, #5884, #6046, #6093, #6186,
- #6223, #6364, #6387, #6567, #6692, #6724, #6939, #6984, #7246, #7270, #7375, #7421, #7434,
- #7472, #7581, #7724, #7926, #7937 and probably more..)
-- Nav: pressing any keyboard key while holding Alt disable toggling nav layer on Alt release. (#4439)
-- MultiSelect+Tables: fixed an issue where box-select would skip items while drag-scrolling
- in a table with outer borders. (#7970, #7821).
-- Inputs: SetNextItemShortcut() with ImGuiInputFlags_Tooltip doesn't show tooltip when item is active.
-- InputText: internal refactoring to simplify and optimize the code. The ImWchar buffer has been
- removed. Simplifications allowed to implement new optimizations for handling very large text buffers
- (e.g. in our testing, handling of a 1 MB text buffer is now 3 times faster in VS2022 Debug build).
- This is the first step toward more refactoring. (#7925) [@alektron, @ocornut]
-- InputText: added CJK double-width punctuation to list of separators considered for CTRL+Arrow.
-- Tables: fixed auto-width columns when using synced-instances of same table. The previous fix
- done in v1.90.5 was incomplete. (#7218)
-- Tables: fixed assertion related to inconsistent outer clipping when sizes are not rounded. (#7957) [@eclbtownsend]
-- Tables: fixed assertion with tables with borders when clipped by parent. (#6765, #3752, #7428)
-- Windows: fixed an issue where double-click to collapse could be triggered even while another
- item is active, if the item didn't use the left mouse button. (#7841)
-- Misc: Made it accepted to call SetMouseCursor() with any out-of-bound value, as a way to allow
- hacking in custom cursors if desirable.
-- Fonts: fixed ellipsis "..." rendering width miscalculation bug introduced in 1.91.0. (#7976) [@DDeimos]
-- TextLinkOpenURL(): modified tooltip to display a verb "Open 'xxxx'". (#7885, #7660)
-- Backends: SDL2: use SDL_Vulkan_GetDrawableSize() when available. (#7967, #3190) [@scribam]
-- Backends: GLFW+Emscripten: use OSX behaviors automatically when using contrib glfw port. (#7965, #7915)
- [@ypujante]
-- Backends: WebGPU: Added support for optional IMGUI_IMPL_WEBGPU_BACKEND_DAWN / IMGUI_IMPL_WEBGPU_BACKEND_WGPU
- defines to handle ever-changing native implementations. (#7977, #7969, #6602, #6188, #7523) [@acgaudette]
-
------------------------------------------------------------------------
- VERSION 1.91.1 (Released 2024-09-04)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.1
-
-Breaking changes:
-
-- BeginChild(): renamed ImGuiChildFlags_Border to ImGuiChildFlags_Borders for consistency. [@cfillion]
- Kept inline redirection flag (will obsolete).
-- IO: moved clipboard functions from ImGuiIO to ImGuiPlatformIO:
- - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
- - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
- - in function signatures, changed 'void* user_data' to 'ImGuiContext* ctx' for consistency
- with other functions. Pull your user data from platform_io.ClipboardUserData if used.
- - as this is will affect all users of custom engines/backends, we are providing proper
- legacy redirection (will obsolete).
-- IO: moved other functions from ImGuiIO to ImGuiPlatformIO:
- - io.PlatformOpenInShellFn -> platform_io.Platform_OpenInShellFn (#7660)
- - io.PlatformSetImeDataFn -> platform_io.Platform_SetImeDataFn
- - io.PlatformLocaleDecimalPoint -> platform_io.Platform_LocaleDecimalPoint (#7389, #6719, #2278)
- - access those via GetPlatformIO() instead of GetIO().
- (Because PlatformOpenInShellFn and PlatformSetImeDataFn were introduced very recently and
- often automatically set by core library and backends, we are exceptionally not maintaining
- a legacy redirection symbol for those two.)
-- Commented the old ImageButton() signature obsoleted in 1.89 (~August 2022). (#5533, #4471, #2464, #1390)
- - old ImageButton() used ImTextureId as item id (created issue with e.g. multiple buttons in same scope, transient texture id values, opaque computation of ID)
- - new ImageButton() requires an explicit 'const char* str_id'
- - old ImageButton() had frame_padding' override argument.
- - new ImageButton() always use style.FramePadding, which you can modify using PushStyleVar()/PopStyleVar().
-
-Other changes:
-
-- IO: Added GetPlatformIO() and ImGuiPlatformIO, pulled from 'docking' branch, which
- is a centralized spot to connect os/platform/renderer related functions.
- Clipboard, IME and OpenInShell hooks are moved here. (#7660)
-- IO, InputText: fixed an issue where typing text in an InputText() would defer character
- processing by one frame, because of the trickling input queue. Reworked interleaved
- keys<>char trickling to take account for keys known to input characters. (#7889, #4921, #4858)
-- Windows: adjust default ClipRect to better match rendering of thick borders (which are in
- theory not supported). Compensate for the fact that borders are centered around the windows
- edge rather than inner. (#7887, #7888 + #3312, #7540, #3756, #6170, #6365)
-- Made BeginItemTooltip() and IsItemHovered() with delay flag infer an implicit ID (for
- ID-less items such as Text element) in a way that works when item resizes. (#7945, #1485)
-- MultiSelect+TreeNode+Drag and Drop: fixed an issue where carrying a drag and drop payload
- over an already open tree node using multi-select would incorrectly select it. (#7850)
-- MultiSelect+TreeNode: default open behavior is _OpenOnDoubleClick + _OpenOnArrow when
- used in a multi-select context without any ImGuiTreeNode_OpenOnXXX flags set. (#7850)
-- Tables: fixes/revert a 1.90 change were outer border would be moved bottom and right
- by an extra pixel + rework the change so that contents doesn't overlap the bottom and
- right border in a scrolling table. (#6765, #3752, #7428)
-- Tables: fixed an issue resizing columns or querying hovered column/row when using multiple
- synced instances that are laid out at different X positions. (#7933)
-- Tabs: avoid queuing a refocus when tab is already focused, which would have the
- side-effect of e.g. closing popup on a mouse release. (#7914)
-- InputText: allow callback to update buffer while in read-only mode. (imgui_club/#46)
-- InputText: fixed an issue programmatically refocusing a multi-line input which was just active. (#4761, #7870)
-- TextLink(), TextLinkOpenURL(): change mouse cursor to Hand shape when hovered. (#7885, #7660)
-- Tooltips, Drag and Drop: made it possible to override BeginTooltip() position while inside
- a drag and drop source or target: a SetNextWindowPos() call won't be overridden. (#6973)
-- PlotHistogram, PlotLines: register item ID and use button behavior in a more idiomatic manner,
- fixes preventing e.g. GetItemID() and other ID-based helper to work. (#7935, #3072)
-- Style: added PushStyleVarX(), PushStyleVarY() helpers to conveniently modify only
- one component of a ImVec2 var.
-- Fonts: made it possible to use PushFont()/PopFont() calls across Begin() calls. (#3224, #3875, #6398, #7903)
-- Backends:
- - Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
- provide a way to do a portable sleep. (#7844)
- - Backends: GLFW+Emscripten: Use OpenURL() from GLFW3 contrib port when available and using
- the contrib port instead of Emscripten own GLFW3 implementation. (#7647, #7915, #7660) [@ypujante]
- - Backends: SDL2, SDL3: ignore events of other SDL windows. (#7853) [@madebr, @ocornut]
- - Backends: SDL2, SDL3: storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
- - Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership logic was reverted back
- by SDL3 on July 27. (#7918, #7898, #7807) [@cheyao, @MattGuerrette]
- - Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString()
- since GLFW own tests are doing that and it seems unnecessary.
- - Backends: SDL2, SDL3, GLFW, OSX, Allegro: update to set function handlers in ImGuiPlatformIO
- instead of ImGuiIO.
-- Examples:
- - Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
- to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
- - Examples: SDL3: Update for API changes: SDL_Init() returns 0 on failure.
-
------------------------------------------------------------------------
- VERSION 1.91.0 (Released 2024-07-30)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.0
-
-Breaking changes:
-
-- IO, IME: renamed platform IME hook and added explicit context for consistency and future-proofness.
- - old: io.SetPlatformImeDataFn(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
- - new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
- It is expected that for a vast majority of users this is automatically set by core
- library and/or platform backend so it won't have any effect.
-- Obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). (#7838)
- You should never need those functions! You can do everything in less a confusing manner by only
- using GetCursorScreenPos() and GetContentRegionAvail(). Also always consider that if you are using
- GetWindowPos() and GetCursorPos() you may also be making things unnecessarily complicated.
- I repeat: You can do everything with GetCursorScreenPos() and GetContentRegionAvail()!
- - GetWindowContentRegionMax().x - GetCursorPos().x --> GetContentRegionAvail().x
- - GetWindowContentRegionMax().x + GetWindowPos().x --> GetCursorScreenPos().x + GetContentRegionAvail().x // when called from left edge of window
- - GetContentRegionMax() --> GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in local coordinates
- - GetWindowContentRegionMax().x - GetWindowContentRegionMin().x --> GetContentRegionAvail() // when called from left edge of window
-- Item flag changes:
- - Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag()
- with ImGuiItemFlags_ButtonRepeat. Kept inline redirecting functions (will obsolete).
- - Obsoleted PushTabStop()/PopTabStop() in favor of using new PushItemFlag()/PopItemFlag()
- with ImGuiItemFlags_NoTabStop. Kept inline redirecting functions (will obsolete).
- - Renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups for
- consistency. Kept inline redirecting functions (will obsolete).
- + Internals: changed/inverted ImGuiItemFlags_SelectableDontClosePopup (default==false) to
- ImGuiItemFlags_AutoClosePopups (default==true), same logic, only inverted behavior.
- (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
-- Commented out obsolete ImGuiModFlags (renamed to ImGuiKeyChord in 1.89). (#4921, #456)
-- Commented out obsolete ImGuiModFlags_XXX values (renamed to ImGuiMod_XXX in 1.89). (#4921, #456)
- - ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl, ImGuiModFlags_Shift -> ImGuiMod_Shift etc.
-- Backends: GLFW+Emscripten: Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to
- ImGui_ImplGlfw_InstallEmscriptenCallbacks(), with an additional GLFWWindow* parameter. (#7647) [@ypujante]
-
-Other changes:
-
-- Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660)
-- IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell. (#7660)
- (*EDIT* From next version 1.91.1 we moved this to platform_io.Platform_OpenInShellFn *EDIT**)
- Added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS to disable default Windows/Linux/Mac implementations.
-- IO: added io.ConfigNavSwapGamepadButtons to swap Activate/Cancel (A<>B) buttons, to match the
- typical "Nintendo/Japanese consoles" button layout when using Gamepad navigation. (#787, #5723)
-- Added PushItemFlag()/PopItemFlags(), ImGuiItemFlags to modify shared item flags:
- - Added ImGuiItemFlags_NoTabStop to disable tabbing through items.
- - Added ImGuiItemFlags_NoNav to disable any navigation and focus of items. (#787)
- - Added ImGuiItemFlags_NoNavDefaultFocus to disable item being default focus. (#787)
- - Added ImGuiItemFlags_ButtonRepeat to enable repeat on any button-like behavior.
- - Added ImGuiItemFlags_AutoClosePopups to disable menu items/selection auto closing parent popups.
- Disabling this was previously possible for Selectable() via a direct flag but not for MenuItem().
- (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
- - This was mostly all previously in imgui_internal.h.
-- Multi-Select: added multi-select API and demos. (#1861, #6518)
- - This system implements standard multi-selection idioms (CTRL+mouse click, CTRL+keyboard moves,
- SHIFT+mouse click, SHIFT+keyboard moves, etc.) with support for clipper (not submitting non-visible
- items), box-selection with scrolling, and many other details.
- - In the spirit of Dear ImGui design, your code owns both items and actual selection data.
- This is designed to allow all kinds of selection storage you may use in your application
- (e.g. set/map/hash, intrusive selection, interval trees, up to you).
- - The supported widgets are Selectable(), Checkbox(). TreeNode() is also technically supported but...
- using this correctly is more complicated. You need some sort of linear/random access to your tree,
- which is suited to advanced trees setups already implementing filters and clipper.
- We will work toward simplifying our existing demo for trees.
- - A helper ImGuiSelectionBasicStorage is provided to facilitate getting started in a typical app
- (likely to suit a majority of users).
- - Documentation:
- - Wiki page https://github.com/ocornut/imgui/wiki/Multi-Select for API overview.
- - Demo code + headers are well commented.
- - Added BeginMultiSelect(), EndMultiSelect(), SetNextItemSelectionUserData().
- - Added IsItemToggledSelection() for use if you need latest selection update during current iteration.
- - Added ImGuiMultiSelectIO and ImGuiSelectionRequest structures:
- - BeginMultiSelect() and EndMultiSelect() return a ImGuiMultiSelectIO structure, which
- is mostly an array of ImGuiSelectionRequest actions (clear, select all, set range, etc.)
- - Other fields are helpful when using a clipper, or wanting to handle deletion nicely.
- - Added ImGuiSelectionBasicStorage helper to store and maintain a selection (optional):
- - This is similar to if you used e.g. a std::set<ID> to store a selection, with all the right
- glue to honor ImGuiMultiSelectIO requests. Most applications can use that.
- - Added ImGuiSelectionExternalStorage helper to maintain an externally stored selection (optional):
- - Helpful to easily bind multi-selection to e.g. an array of checkboxes.
- - Added ImGuiMultiSelectFlags options:
- - ImGuiMultiSelectFlags_SingleSelect
- - ImGuiMultiSelectFlags_NoSelectAll
- - ImGuiMultiSelectFlags_NoRangeSelect
- - ImGuiMultiSelectFlags_NoAutoSelect
- - ImGuiMultiSelectFlags_NoAutoClear
- - ImGuiMultiSelectFlags_NoAutoClearOnReselect (#7424)
- - ImGuiMultiSelectFlags_BoxSelect1d
- - ImGuiMultiSelectFlags_BoxSelect2d
- - ImGuiMultiSelectFlags_BoxSelectNoScroll
- - ImGuiMultiSelectFlags_ClearOnEscape
- - ImGuiMultiSelectFlags_ClearOnClickVoid
- - ImGuiMultiSelectFlags_ScopeWindow (default), ImGuiMultiSelectFlags_ScopeRect
- - ImGuiMultiSelectFlags_SelectOnClick (default), ImGuiMultiSelectFlags_SelectOnClickRelease
- - ImGuiMultiSelectFlags_NavWrapX
- - Demo: Added "Examples->Assets Browser" demo.
- - Demo: Added "Widgets->Selection State & Multi-Select" section, with:
- - Multi-Select
- - Multi-Select (with clipper)
- - Multi-Select (with deletion)
- - Multi-Select (dual list box) (#6648)
- - Multi-Select (in a table)
- - Multi-Select (checkboxes)
- - Multi-Select (multiple scopes)
- - Multi-Select (tiled assert browser)
- - Multi-Select (trees) (#1861)
- - Multi-Select (advanced)
-- Inputs: added SetItemKeyOwner(ImGuiKey key) in public API.
- This is a simplified version of a more complete set of function available in imgui_internal.h.
- One common use-case for this is to allow your widgets to disable standard inputs behaviors such
- as Tab or Alt handling, Mouse Wheel scrolling, etc.
- (#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
- // Hovering or activating the button will disable mouse wheel default behavior to scroll
- InvisibleButton(...);
- SetItemKeyOwner(ImGuiKey_MouseWheelY);
-- Nav: fixed clicking window decorations (e.g. resize borders) from losing focused item when
- within a child window using ImGuiChildFlags_NavFlattened.
-- InputText: added '\' and '/' as word separator. (#7824, #7704) [@reduf]
-- TreeNode: added SetNextItemStorageID() to specify/override the identifier used for persisting
- open/close storage. Useful if needing to often read/write from storage without manipulating
- the ID stack. (#7553, #6990, #3823, #1131)
-- Selectable: added ImGuiSelectableFlags_Highlight flag to highlight items independently from
- the hovered state. (#7820) [@rerilier]
-- Clipper: added SeekCursorForItem() function. When using ImGuiListClipper::Begin(INT_MAX) you can
- can use the clipper without knowing the amount of items beforehand. (#1311)
- In this situation, call ImGuiListClipper::SeekCursorForItem(items_count) at the end of your iteration
- loop to position the layout cursor correctly. This is done automatically if provided a count to Begin().
-- Groups, Tables: fixed EndGroup() failing to correctly capture current table occupied size. (#7543)
-- Style, TabBar: added style.TabBarOverlineSize / ImGuiStyleVar_TabBarOverlineSize to manipulate
- thickness of the horizontal line over selected tabs. [@DctrNoob]
-- Style: close button and collapse/window-menu button hover highlight made rectangular instead of round.
-- Misc: added GetID(int) variant for consistency. (#7111)
-- Debug Tools:
- - Debug Log: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855)
- Printed entries include imgui frame counter prefix + are redirected to ShowDebugLogWindow() and
- other configurable locations. Always call IMGUI_DEBUG_LOG() for maximum stripping in caller code.
- - Debug Log: Added "Configure Outputs.." button. (#5855)
- - Debug Log: Fixed incorrect checkbox layout when partially clipped.
-- Demo: Reworked "Property Editor" demo in a manner that more resemble the tree data and
- struct description data that a real application would want to use.
-- Backends:
- - Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of (VK_LWIN || VK_RWIN).
- (#7768, #4858, #2622) [@Aemony]
- - Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership change. (#7807)
- - Backends: SDL3: Update for API changes: SDL_GetClipboardText() memory ownership change. (#7801)
- - Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
- - Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls]
- - Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.
- - Backends: GLFW,SDL2: Added io.PlatformOpenInShellFn handler for web/Emscripten versions. (#7660)
- [@ypujante, @ocornut]
- - Backends: GLFW+Emscripten: Added support for GLFW3 contrib port which fixes many of the things
- not supported by the embedded GLFW: gamepad support, mouse cursor shapes, copy to clipboard,
- workaround for Super/Meta key, different ways of resizing, multi-window (glfw/canvas) support.
- (#7647) [@ypujante]
- - Backends: GLFW+Emscripten: Fixed Emscripten warning when using mouse wheel on some setups
- "Unable to preventDefault inside passive event listener". (#7647, #7600) [@ypujante]
-
-
------------------------------------------------------------------------
- VERSION 1.90.9 (Released 2024-07-01)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.9
-
-Breaking changes:
-
-- Removed old nested structure: renaming ImGuiStorage::ImGuiStoragePair type to
- ImGuiStoragePair (simpler for many languages). No significant nested type left.
-- BeginChild: added ImGuiChildFlags_NavFlattened as a replacement for the window
- flag ImGuiWindowFlags_NavFlattened: the feature only ever made sense for
- BeginChild() calls anyhow. (#7687) [@cfillion]
- - old: BeginChild("Name", size, 0, ImGuiWindowFlags_NavFlattened);
- - new: BeginChild("Name", size, ImGuiChildFlags_NavFlattened, 0)
- Kept inline redirection flag (will obsolete).
-- Style: renamed tab colors for clarity and consistency with other changes: (#261, #351)
- - ImGuiCol_TabActive -> ImGuiCol_TabSelected
- - ImGuiCol_TabUnfocused -> ImGuiCol_TabDimmed
- - ImGuiCol_TabUnfocusedActive -> ImGuiCol_TabDimmedSelected
- Kept inline redirecting enums (will obsolete).
-- IO: io.ClearInputKeys() (first exposed in 1.89.8) doesn't clear mouse data.
- Newly added io.ClearInputMouse() does. (#4921)
-- Drag and Drop: renamed ImGuiDragDropFlags_SourceAutoExpirePayload to
- ImGuiDragDropFlags_PayloadAutoExpire. Kept inline redirecting enum (will obsolete). (#1725, #143)
-
-Other changes:
-
-- IO: do not disable io.ConfigWindowsResizeFromEdges (which allow resizing from borders
- and lower-left corner) when ImGuiBackendFlags_HasMouseCursors is not set by backend.
- The initial reasoning is that resizing from borders feels better when correct mouse cursor
- shape change as honored by backends. Keeping this enabling will hopefully increase pressure
- on third-party backends to set ImGuiBackendFlags_HasMouseCursors and honor changes of
- ImGui::GetMouseCursor() value. (#1495)
-- IO: do not claim io.WantCaptureMouse=true on the mouse release frame of a button
- which was pressed over void/underlying app, which is consistent/needed to allow the
- mouse up event of a drag over void/underlying app to catch release. (#1392) [@Moka42]
-- IO: Added io.ClearInputMouse() to clear mouse state. (#4921)
-- IO: Added ImGuiConfigFlags_NoKeyboard for consistency and convenience. (#4921)
-- Windows: BeginChild(): fixed a glitch when during a resize of a child window which is
- tightly close to the boundaries of its parent (e.g. with zero WindowPadding), the child
- position could have temporarily be moved around by erroneous padding application. (#7706)
-- TabBar, Style: added ImGuiTabBarFlags_DrawSelectedOverline option to draw a horizontal
- line over selected tabs to increase visibility. This is used by docking.
- Added corresponding ImGuiCol_TabSelectedOverline and ImGuiCol_TabDimmedSelectedOverline colors.
-- Tables: added TableGetHoveredColumn() to public API, as an alternative to testing for
- 'TableGetColumnFlags(column) & ImGuiTableColumnFlags_IsHovered' on each column. (#3740)
-- Disabled, Inputs: fixed using Shortcut() or SetNextItemShortcut() within a disabled block
- bypassing the disabled state. (#7726)
-- Disabled: Reworked 1.90.8 behavior of Begin() not inheriting current BeginDisabled() state,
- to make it that only tooltip windows are temporarily clearing it. (#211, #7640)
-- Drags: added ImGuiSliderFlags_WrapAround flag for DragInt(), DragFloat() etc. (#7749)
-- Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern sets
- active id so a multi-frame extern source doesn't interfere with hovered widgets. (#143)
-- Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern does not assume
- a mouse button being pressed. Facilitate implementing cross-context drag and drop. (#143)
-- Drag and Drop: Added ImGuiDragDropFlags_PayloadNoCrossContext/_PayloadNoCrossProcess flags
- as metadata to specify that a payload may not be copied outside the context/process by
- some logic aiming to copy payloads around.
-- Drag and Drop: Fixes an issue when elapsing payload would be based on last payload
- frame instead of last drag source frame, which makes a difference if not resubmitting
- payload every frame. (#143)
-- Debug Tools: Metrics/Debugger: Browsing a Storage perform hover lookup on identifier.
-- Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from docking branch for
- use by backends.
-- imgui_freetype: Fixed divide by zero while handling FT_PIXEL_MODE_BGRA glyphs. (#7267, #3369)
-- Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it
- has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748) [@mlauss2]
-- Backends: SDL3: Update for API removal of keysym field in SDL_KeyboardEvent. (#7728)
-- Backends: SDL3: Update for SDL_StartTextInput()/SDL_StopTextInput() API changes. (#7735)
-- Backends: SDL3: Update for SDL_SetTextInputRect() API rename. (#7760, #7754) [@maxortner01]
-- Backends: SDLRenderer3: Update for SDL_RenderGeometryRaw() API changes. (SDL#9009).
-- Backends: Vulkan: Remove Volk/ from volk.h #include directives. (#7722, #6582, #4854)
- [@martin-ejdestig]
-- Examples: SDL3: Remove use of SDL_HINT_IME_NATIVE_UI since new SDL_HINT_IME_IMPLEMENTED_UI
- values has a more suitable default for our case case.
-- Examples: GLFW+Vulkan, SDL+Vulkan: handle swap chain resize even without Vulkan
- returning VK_SUBOPTIMAL_KHR, which doesn't seem to happen on Wayland. (#7671)
- [@AndreiNego, @ocornut]
-
-
------------------------------------------------------------------------
- VERSION 1.90.8 (Released 2024-06-06)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.8
-
-Breaking changes:
-
-- Reordered various ImGuiInputTextFlags values. This should NOT be breaking unless
- you are using generated headers that have values not matching the main library.
-- Removed ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft
- from imgui.h, was mostly unused and misleading.
-
-Other changes:
-
-- Inputs: fixed IsMouseClicked(..., repeat=true); broken in 1.90.7 on 2024/05/22.
- (due to an internal api parameter swap, repeat wouldn't be honored and
- ownership would be accidentally checked even though this api is meant to not
- check ownership). (#7657) [@korenkonder]
-- Windows: fixed altering FramePadding mid-frame not correctly affecting logic
- responsible for honoring io.ConfigWindowsMoveFromTitleBarOnly. (#7576, #899)
-- Scrollbar: made scrolling logic more standard: clicking above or below the
- grab scrolls by one page, holding mouse button repeats scrolling. (#7328, #150)
-- Scrollbar: fixed miscalculation of vertical scrollbar visibility when required
- solely by the presence of a horizontal scrollbar. (#1574)
-- InputScalar, InputInt, InputFloat: added ImGuiInputTextFlags_ParseEmptyRefVal
- to parse an empty field as zero-value. (#7305) [@supermerill, @ocornut]
-- InputScalar, InputInt, InputFloat: added ImGuiInputTextFlags_DisplayEmptyRefVal
- to display a zero-value as empty. (#7305) [@supermerill, @ocornut]
-- Popups: fixed an issue preventing to close a popup opened over a modal by clicking
- over void (it required clicking over the visible part of the modal). (#7654)
-- Tables: fixed an issue where ideal size reported to parent container wouldn't
- correctly take account of inner scrollbar, affecting potential auto-resize of
- parent container. (#7651)
-- Tables: fixed a bug where after disabling the ScrollY flag for a table,
- previous scrollbar width would be accounted for. (#5920)
-- Combo: simplified Combo() API uses a list clipper (due to its api it wasn't
- previously trivial before we added clipper.IncludeItemByIndex() function).
-- Disabled: nested tooltips or other non-child window within a BeginDisabled()
- block disable the disabled state. (#211, #7640)
-- Misc: made ImGuiDir and ImGuiSortDirection stronger-typed enums.
-- Backends: SDL3: Update for SDL_SYSTEM_CURSOR_xxx api renames. (#7653)
-
-
------------------------------------------------------------------------
- VERSION 1.90.7 (Released 2024-05-27)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.7
-
-Breaking changes:
-
-- Inputs: on macOS X, Cmd and Ctrl keys are now automatically swapped by io.AddKeyEvent(),
- as this naturally align with how macOS X uses those keys. (#2343, #4084, #5923, #456)
- - Effectively it means that e.g. ImGuiMod_Ctrl | ImGuiKey_C is a valid idiomatic shortcut
- for both Windows and Mac style users.
- - It shouldn't really affect your code unless you had explicit/custom shortcut swapping in
- place for macOS X apps in your input logic.
- - Removed ImGuiMod_Shortcut which was previously dynamically remapping to Ctrl or Cmd/Super.
- It is now unnecessary to specific cross-platform idiomatic shortcuts.
- Kept symbols redirecting ImGuiMod_Shortcut to ImGuiMod_Ctrl (will obsolete).
-- Commented out obsolete symbols renamed in 1.88 (May 2022):
- CaptureKeyboardFromApp() -> SetNextFrameWantCaptureKeyboard()
- CaptureMouseFromApp() -> SetNextFrameWantCaptureMouse()
-- Backends: SDL_Renderer2/SDL_Renderer3: ImGui_ImplSDLRenderer2_RenderDrawData() and
- ImGui_ImplSDLRenderer3_RenderDrawData() now takes a SDL_Renderer* parameter. This was previously
- overlooked from the API but it will allow eventual support for multi-viewports.
-
-Other changes:
-
-- Windows: BeginChild(): fixed visibility of fully clipped child windows and tables to Test Engine.
-- Windows: BeginChild(): fixed auto-fit calculation when using either (not both) ResizeX/ResizeY
- and double-clicking on a border. Calculation incorrectly didn't always account for scrollbar as
- it assumed the other axis would also be auto-fit. (#1710)
-- Inputs: added shortcut and routing system in public API. (#456, #2637) [BETA]
- - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
- - in Parent: call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
- - in Child1: call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
- - in Child2: no call // When Child2 is focused, Parent gets the shortcut.
- The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
- This is an important property as it facilitate working with foreign code or larger codebase.
- - Added Shortcut() function:
- e.g. Using ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_C); with default policy:
- - checks that CTRL+C is pressed,
- - and that current window is in focus stack,
- - and that no other requests for CTRL+C have been made from higher priority locations
- (e.g. deeper in the window/item stack).
- - Added SetNextItemShortcut() to set a shortcut to locally or remotely press or activate
- an item (depending on specified routing policy: using ImGuiInputFlags_RouteGlobal the item
- shortcut may be executed even if its window is not in focus stack).
- Items like buttons are not fully activated, in the sense that they get pressed but another
- active item, e.g. InputText() won't be deactivated.
- - Added routing policies for Shortcut(), SetNextItemShortcut(): (#456, #2637)
- - ImGuiInputFlags_RouteFocused: focus stack route (default)
- - ImGuiInputFlags_RouteActive: only route to active item
- - ImGuiInputFlags_RouteGlobal: route globally, unless a focus route claim shame shortcut.
- - ImGuiInputFlags_RouteAlways: no routing submission, no routing check.
- - Added other shortcut/routing options: (#456, #2637)
- - ImGuiInputFlags_Repeat: for use by Shortcut() and by upcoming rework of various
- input functions (which are still internal for now).
- - ImGuiInputFlags_Tooltip: for SetNextItemShortcut() to show a tooltip when hovering item.
- - ImGuiInputFlags_RouteOverFocused: global route takes priority over focus route.
- - ImGuiInputFlags_RouteOverActive: global route takes priority over active item.
- - ImGuiInputFlags_RouteUnlessBgFocused: global route disabled if no imgui window focused.
- - ImGuiInputFlags_RouteFromRootWindow: route evaluated from the point of view of root window rather than current window.
-- Inputs: (OSX) Fixes variety of code which inconsistently required using Ctrl instead of Cmd.
- - e.g. Drags/Sliders now use Cmd+Click to input a value. (#4084)
- - Some shortcuts still uses Ctrl on Mac: e.g. Ctrl+Tab to switch windows. (#4828)
-- Inputs: (OSX) Ctrl+Left Click alias as a Right click. (#2343) [@haldean, @ocornut]
-- Inputs: Fixed ImGui::GetKeyName(ImGuiKey_None) from returning "N/A" or "None" depending
- on value of IMGUI_DISABLE_OBSOLETE_KEYIO. It always returns "None".
-- Nav: fixed holding Ctrl or gamepad L1 from not slowing down keyboard/gamepad tweak speed.
- Broken during a refactor refactor for 1.89. Holding Shift/R1 to speed up wasn't broken.
-- Tables: fixed cell background of fully clipped row overlapping with header. (#7575, #7041) [@prabuinet]
-- Demo: Added "Inputs & Focus -> Shortcuts" section. (#456, #2637)
-- Demo: Documents: Added shortcuts and renaming tabs/documents. (#7233)
-- Examples: Win32+DX9,DX10,DX11,DX12: rework main loop to handle minimization and screen
- locking without burning resources by running unthrottled code. (#2496, #3907, #6308, #7615)
-- Backends: all backends + demo now call IMGUI_CHECKVERSION() to verify ABI compatibility between caller
- code and compiled version of Dear ImGui. If you get an assert it most likely mean you have a build issue,
- read comments near the assert. (#7568)
-- Backends: Win32: undo an assert introduced in 1.90.6 which didn't allow WndProc
- handler to be called before backend initialization. Because of how ::CreateWindow()
- calls in WndProc this is facilitating. (#6275) [@MennoVink]
-- Backends, Examples: SDL3: updates for latest SDL3 API changes. (#7580) [@kuvaus, @ocornut]
-
-Breaking changes IF you were using imgui_internal.h versions of Shortcut() or owner-aware
-versions of IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked() prior to this version:
-
-- Inputs (Internals): Renamed ImGuiKeyOwner_None to ImGuiKeyOwner_NoOwner, to make use more
- explicit and reduce confusion with the fact it is a non-zero value and cannot be a default.
-- Inputs (Internals): Renamed symbols global routes:
- Renamed ImGuiInputFlags_RouteGlobalLow -> ImGuiInputFlags_RouteGlobal (this is the suggested global route)
- Renamed ImGuiInputFlags_RouteGlobal -> ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused
- Renamed ImGuiInputFlags_RouteGlobalHigh -> ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive
-- Inputs (Internals): Shortcut(), SetShortcutRouting(): swapped last two parameters order
- in function signatures:
- Before: Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id = 0, ImGuiInputFlags flags = 0);
- After: Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0, ImGuiID owner_id = 0);
-- Inputs (Internals): owner-aware versions of IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked():
- swapped last two parameters order in function signatures:
- Before: IsKeyPressed(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
- After: IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0);
- Before: IsMouseClicked(ImGuiMouseButton button, ImGuiID owner_id, ImGuiInputFlags flags = 0);
- After: IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0);
-- For several reasons those changes makes sense. They were all made before making some of
- those API public. Only past users of imgui_internal.h with the extra parameters will be affected.
- Added asserts for valid flags in various functions to detect _some_ misuses, BUT NOT ALL.
-
-
------------------------------------------------------------------------
- VERSION 1.90.6 (Released 2024-05-08)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.6
-
-Breaking changes:
-
-- TreeNode: Fixed a layout inconsistency when using an empty/hidden label followed
- by a SameLine() call. (#7505, #282)
- Before: TreeNode("##Hidden"); SameLine(); Text("Hello");
- // This was actually incorrect! BUT appeared to look ok with the default style
- // where ItemSpacing.x == FramePadding.x * 2 (it didn't look aligned otherwise).
- After: TreeNode("##Hidden"); SameLine(0, 0); Text("Hello");
- // This is correct for all values in style.
- With the fix, IF you were successfully using TreeNode("")+SameLine(); you will now
- have extra spacing between your TreeNode and the following item. You'll need to change
- the SameLine() call to SameLine(0,0) to remove this extraneous spacing.
- This seemed like the more sensible fix that's not making things less consistent.
- (Note: when using this idiom you are likely to also use ImGuiTreeNodeFlags_SpanAvailWidth).
-
-Other changes:
-
-- Windows: Changed default ClipRect to extend to windows' left and right borders,
- instead of adding arbitrary WindowPadding.x * 0.5f space on left and right.
- That ClipRect half-padding was arbitrary/confusing and inconsistent with Y axis.
- It also made it harder to draw items covering whole window without pushing an
- extended ClipRect. Some items near windows left and right edge that used to be clipped
- may be partly more visible. (#3312, #7540, #3756, #6170, #6365)
-- Windows: Fixed subsequent Begin() append calls from setting last item information
- for title bar, making it impossible to use IsItemHovered() on a Begin()-to-append,
- and causing issue bypassing hover detection on collapsed windows. (#7506, #823)
-- Fonts: Fixed font ascent and descent calculation when a font hits exact integer values.
- It is possible that some prior manual use of ImFontConfig::GlyphOffset may become
- duplicate with this fix. (#7399, #7404) [@GamingMinds-DanielC]
-- TreeNode: Added ImGuiTreeNodeFlags_SpanTextWidth to make hitbox and highlight only
- cover the label. (#6937) [@dimateos]
-- Tables: Angled headers: fixed multi-line label display when angle is flipped. (#6917)
-- Tables: Angled headers: added style.TableAngledHeadersTextAlign and corresponding
- ImGuiStyleVar_TableAngledHeadersTextAlign variable. Default to horizontal center. (#6917)
- [@thedmd, @ocornut]
-- ProgressBar: Added support for indeterminate progress bar by passing an animated
- negative fraction, e.g. ProgressBar(-1.0f * GetTime()). (#5316, #5370, #1901)[@gan74]
-- Text, DrawList: Improved handling of long single-line wrapped text. Faster and
- mitigate issues with reading vertex indexing limits with 16-bit indices. (#7496, #5720)
-- Backends: OpenGL3: Detect ES3 contexts on desktop based on version string,
- to e.g. avoid calling glPolygonMode() on them. (#7447) [@afraidofdark, @ocornut]
-- Backends: OpenGL3: Update loader for Linux to support EGL/GLVND. (#7562) [@ShadowNinja, @vanfanel]
-- Backends: Vulkan: Added convenience support for Volk via IMGUI_IMPL_VULKAN_USE_VOLK define.
- (you could always use IMGUI_IMPL_VULKAN_NO_PROTOTYPES + ImGui_ImplVulkan_LoadFunctions() as well).
- (#6582, #4854) [@adalsteinnh, @kennyalive, @ocornut]
-- Backends: SDL3: Fixed text inputs. Re-enable calling SDL_StartTextInput()/SDL_StopTextInput()
- as SDL3 no longer enables it by default. (#7452, #6306, #6071, #1953) [@Green-Sky]
-- Examples: GLFW+Vulkan, SDL+Vulkan: Added optional support for Volk. (#6582, #4854)
-- Examples: GLFW+WebGPU: Added support for WebGPU-native/Dawn (#7435, #7132) [@eliasdaler, @Zelif]
-- Examples: GLFW+WebGPU: Renamed example_emscripten_wgpu/ to example_glfw_wgpu/. (#7435, #7132)
-
-
------------------------------------------------------------------------
- VERSION 1.90.5 (Released 2024-04-11)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.5
-
-Breaking changes:
-
-- More formally obsoleted GetKeyIndex() when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is set.
- It has been unnecessary and a no-op since 1.87 (it returns the same value as passed
- when used with a 1.87+ backend using io.AddKeyEvent() function). (#4921)
- - IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) --> IsKeyPressed(ImGuiKey_XXX)
-- ImDrawList: Merged the radius_x/radius_y parameters in AddEllipse(), AddEllipseFilled()
- and PathEllipticalArcTo() into a single ImVec2 parameter. Exceptionally, because those
- functions were added recently in 1.90, we are not adding inline redirection functions.
- The transition is easy and should affect few users. (#2743, #7417) [@cfillion]
-
-Other changes:
-
-- Windows: Scrollbar visibility decision uses current size when both size and contents
- size are submitted by API. (#7252)
-- Windows: Double-click to collapse may be disabled via key-ownership mechanism. (#7369)
-- Windows: BeginChild(): Extend outer resize borders to the edges when there are no corner
- grips. Essentially affects resizable child windows. (#7440, #1710) [@cfillion]
-- Windows: BeginChild(): Resizing logic for child windows evaluates whether per-axis clamping
- should be applied based on parent scrollbars, not child scrollbars. (#7440, #1710) [@cfillion]
- Adjust those resizing limits to match window padding rather than inner clipping rectangle.
-- Tables: Fixed auto-width columns when using synced-instances of same table, width of
- one instance would bleed into next one instead of sharing their widths. (#7218)
-- Tables: Angled headers: fixed border hit box extending beyond when used within
- non-scrollable tables. (#7416) [@cfillion]
-- Tables: Angled headers: fixed borders not moving back up after TableAngleHeadersRow()
- stops being called. (#7416) [@cfillion]
-- Tables: Angled headers: rounding header size to nearest integers, fixes some issues
- when using clipper.
-- Menus, Popups: Fixed an issue where sibling menu popups re-opening in successive
- frames would erroneously close the window. While it is technically a popup issue
- it would generally manifest when fast moving the mouse bottom to top in a sub-menu.
- (#7325, #7287, #7063)
-- ProgressBar: Fixed passing fraction==NaN from leading to a crash. (#7451)
-- ListBox: Fixed text-baseline offset when using SameLine()+Text() after a labeled ListBox().
-- Drags, Sliders, Inputs: Fixed io.PlatformLocaleDecimalPoint decimal point localization
- feature not working regression from 1.90.1. (#7389, #6719, #2278) [@GamingMinds-DanielC]
-- Style: Added ImGuiStyleVar_TabBorderSize, ImGuiStyleVar_TableAngledHeadersAngle for
- consistency. (#7411) [@cfillion]
-- DrawList: Added AddConcavePolyFilled(), PathFillConcave() concave filling. (#760) [@thedmd]
- Note that only simple polygons (no self-intersections, no holes) are supported.
-- DrawList: Allow AddText() to accept null ranges. (#3615, 7391)
-- Docs: added more wiki links to headers of imgui.h/imgui.cpp to facilitate discovery
- of interesting resources, because GitHub doesn't allow Wiki to be crawled by search engines.
- - This is the main wiki: https://github.com/ocornut/imgui/wiki
- - This is the crawlable version: https://github-wiki-see.page/m/ocornut/imgui/wiki
- Adding a link to the crawlable version, even though it is not intended for humans,
- to increase its search rank.
-
-
------------------------------------------------------------------------
- VERSION 1.90.4 (Released 2024-02-22)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.4
-
-Other changes:
-
-- Nav: Fixed SetKeyboardFocusHere() or programmatic tabbing API from not working on
- windows with the ImGuiWindowFlags_NoNavInputs flag (regression in 1.90.2, which
- among other things broke imgui_memory_editor).
-- Menus, Popups: Fixed an issue where hovering a parent-menu upward would
- erroneously close the window. (#7325, #7287, #7063)
-- Popups: Fixed resizable popup minimum size being too small. Standardized minimum
- size logic. (#7329).
-- Modals: Temporary changes of ImGuiCol_ModalWindowDimBg are properly handled by
- BeginPopupModal(). (#7340)
-- Tables: Angled headers: fixed support for multi-line labels. (#6917)
-- Tables: Angled headers: various fixes to accurately handle CellPadding changes. (#6917)
-- Tables: Angled headers: properly registers horizontal component of angled headers
- for auto-resizing of columns. (#6917)
-- Tables: Angled headers: fixed TableAngledHeadersRow() incorrect background fill
- drawn too low, particularly visible with tables that have no scrolling. (#6917)
-- ProgressBar: Fixed a minor tessellation issue when rendering rounded progress bars,
- where in some situations the rounded section wouldn't follow regular tessellation rules.
-- Debug Tools: Item Picker: Promoted ImGui::DebugStartItemPicker() to public API. (#2673)
-- Debug Tools: Item Picker: Menu entry visible in Demo->Tools but greyed out unless
- io.ConfigDebugIsDebuggerPresent is set. (#2673)
-- Misc: Added optional alpha multiplier parameter to GetColorU32(ImU32) variant.
-- Demo: Custom Rendering: better demonstrate PathArcTo(), PathBezierQuadraticCurveTo(),
- PathBezierCubicCurveTo(), PathStroke(), PathFillConvex() functions.
-
-
------------------------------------------------------------------------
- VERSION 1.90.3 (Released 2024-02-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.3
-
-Breaking changes:
-
-- Backends: SDL2: Removed obsolete ImGui_ImplSDL2_NewFrame(SDL_Window*) signature which
- was obsoleted in 1.84. Calling ImGui_ImplSDL2_NewFrame() is fine.
-- Backends: Vulkan: Moved RenderPass parameter from ImGui_ImplVulkan_Init() function to
- ImGui_ImplVulkan_InitInfo structure. Not required when using dynamic rendering. (#7308) [@shawnhatori]
-- Backends: Vulkan: Using dynamic rendering now require filling the PipelineRenderingCreateInfo
- structure in ImGui_ImplVulkan_InitInfo, allowing to configure color/depth/stencil formats.
- Removed ColorAttachmentFormat field previously provided for dynamic rendering.
- (#7166, #6855, #5446, #5037) [@shawnhatori]
-
-Other changes:
-
-- Menus, Popups: Fixed menus and popups with ChildWindow flag erroneously not displaying
- a scrollbar when contents is over parent viewport size. (#7287, #7063) [@ZingBallyhoo]
-- Backends: SDL2, SDL3: Handle gamepad disconnection + fixed increasing gamepad reference
- counter continuously. Added support for multiple simultaneous gamepads.
- Added ImGui_ImplSDL2_SetGamepadMode()) function to select whether to automatically pick
- first available gamepad, all gamepads, or specific gamepads.
- (#3884, #6559, #6890, #7180) [@ocornut, @lethal-guitar, @wn2000, @bog-dan-ro]
-- Backends: SDL3: Fixed gamepad handling. (#7180) [@bog-dan-ro]
-- Backends: SDLRenderer3: query newly added SDL_RenderViewportSet() to not restore
- a wrong viewport if none was initially set.
-- Backends: DirectX9: Using RGBA format when allowed by the driver to avoid CPU side
- conversion. (#6575) [@Demonese]
-- Internals: Fixed ImFileOpen not working before context is created, preventing creation
- of a font atlas before main context creation. (#7314, #7315) [@PathogenDavid, @ocornut]
-
-
------------------------------------------------------------------------
- VERSION 1.90.2 (Released 2024-02-09)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.2
-
-Breaking changes:
-
-- Commented out ImGuiIO::ImeWindowHandle obsoleted in 1.87 in favor of writing
- to 'void* ImGuiViewport::PlatformHandleRaw'.
-- Backends: WebGPU: ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure
- instead of variety of parameters, allowing for easier further changes. (#7240)
-
-Other changes:
-
-- Nav: keyboard/gamepad activation mark widgets as held to give better visual feedback.
-- Nav: tweak to logic marking navigated item as hovered when using keyboard, allowing
- the hover highlight to stay even while another item is activated.
-- Nav: Fixed SetKeyboardFocusHere() not working when current nav focus is in different scope,
- regression from 1.90.1 related to code scoping Tab presses to local scope. (#7226) [@bratpilz]
-- Nav: Fixed pressing Escape while in a child window with _NavFlattened flag. (#7237)
-- Nav: Improve handling of Alt key to toggle menu so that key ownership may be claimed on
- individual left/right alt key without interfering with the other.
-- Nav, Menus: Fixed click on a BeginMenu() followed by right-arrow from making the child menu
- reopen and flicker (using ImGuiPopupFlags_NoReopen).
-- Nav: ImGuiWindowFlags_NoNavInputs is tested during scoring so NavFlattened windows can use it.
-- Popups: OpenPopup(): added ImGuiPopupFlags_NoReopen flag to specifically not close and reopen
- a popup when it is already open. (#1497, #1533)
- (Note that this differs from specific handling we already have in place for the case of calling
- OpenPopup() repeatedly every frame: we already didn't reopen in that specific situation, otherwise
- the effect would be very disastrous in term of confusion, as reopening would steal focus).
-- Popups: Slight change to popup closing logic (e.g. after focusing another window) which skipped
- over popups that are also child windows.
-- Combo: Fixed not reusing windows optimally when used inside a popup stack.
-- Debug Tools: Metrics: Fixed debug break in SetShortcutRouting() not handling ImGuiMod_Shortcut redirect.
-- Debug Tools: Metrics: Improved Monitors and Viewports minimap display. Highlight on hover.
-- Debug Tools: Debug Log: Added "Input Routing" logging.
-- Debug Tools: Added "nop" to IM_DEBUG_BREAK macro on GCC to work around GDB bug (#7266) [@Peter0x44]
-- Backends: Vulkan: Fixed vkAcquireNextImageKHR() validation errors in VulkanSDK 1.3.275 by
- allocating one extra semaphore than in-flight frames. (#7236) [@mklefrancois]
-- Backends: Vulkan: Fixed vkMapMemory() calls unnecessarily using full buffer size. (#3957)
-- Backends: Vulkan: Fixed handling of ImGui_ImplVulkan_InitInfo::MinAllocationSize field. (#7189, #4238)
-- Backends: WebGPU: Added ImGui_ImplWGPU_InitInfo::PipelineMultisampleState. (#7240)
-- Backends: WebGPU: Filling all WGPUDepthStencilState fields explicitly as a recent Dawn
- update stopped setting default values. (#7232) [@GrigoryGraborenko]
-- Backends: WebGPU: Fixed pipeline layout leak. (#7245) [@rajveermalviya]
-- Backends: OpenGL3: Backup and restore GL_PIXEL_UNPACK_BUFFER. (#7253)
-- Internals: Many improvements related to yet unpublicized shortcut routing and input ownership systems.
-- Internals: InputText: Added internal helpers to force reload of user-buf when active. (#2890) [@kudaba, @ocornut]
- Often requested in some form (#6962, #5219, #3290, #4627, #5054, #3878, #2881, #1506, #1216, #968),
- and useful for interactive completion/suggestions popups (#2057, #718)
-
-
------------------------------------------------------------------------
- VERSION 1.90.1 (Released 2024-01-10)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.1
-
-Breaking changes:
-
-- imgui_freetype: commented out ImGuiFreeType::BuildFontAtlas() obsoleted in 1.81.
- Prefer using #define IMGUI_ENABLE_FREETYPE or see commented code for manual calls.
-- Removed CalcListClipping() marked obsolete in 1.86. (#3841)
- Prefer using ImGuiListClipper which can return non-contiguous ranges.
-- Internals, Columns: commented out legacy ImGuiColumnsFlags_XXX symbols redirecting
- to ImGuiOldColumnsFlags_XXX, obsoleted from imgui_internal.h in 1.80.
-- Commented out obsolete ImGuiKey_KeyPadEnter redirection to ImGuiKey_KeypadEnter. (#2625, #7143)
-
-Other changes:
-
-- Windows:
- - BeginChild(): Fixed auto-resizing erroneously limiting size to host viewport
- minus padding. There are no limit to a child width/height. (#7063) [@Devyre]
- - BeginChild(): Resize borders rendered even when ImGuiWindowFlags_NoBackground
- is specified. (#1710, #7194)
- - Fixed some auto-resizing path using style.WindowMinSize.x (instead of x/y)
- for both axes since 1.90. (#7106) [@n0bodysec]
- - Scrolling: internal scrolling value is rounded instead of truncated, as a way to reduce
- speed asymmetry when (incorrectly) attempting to scroll by non-integer amount. (#6677)
-- Navigation (Keyboard/gamepad):
- - Nav, IO: SetNextFrameWantCaptureKeyboard(false) calls are not overridden back to true when
- navigation is enabled. SetNextFrameWantCaptureKeyboard() is always higher priority. (#6997)
- - Nav: Activation can also be performed with Keypad Enter. (#5606)
-- Drag and Drop:
- - Fixed drop target highlight on items temporarily pushing a widened clip rect
- (namely Selectables and Treenodes using SpanAllColumn flag) so the highlight properly covers
- all columns. (#7049, #4281, #3272)
-- InputText:
- - InputTextMultiline: Fixed Tab character input not repeating (1.89.4 regression).
- - InputTextMultiline: Tabbing through a multi-line text editor which allows Tab character inputs
- (using the ImGuiInputTextFlags_AllowTabInput flag) doesn't automatically activate it, in order
- to allow passing through multiple widgets easily. (#3092, #5759, #787)
-- Drags, Sliders, Inputs:
- - DragScalarN, SliderScalarN, InputScalarN: Fixed incorrect pushes into ItemWidth
- stack when number of components is 1. [#7095] [@Nahor]
- - Drags, Sliders, Inputs: removed all attempts to filter non-numerical characters during text
- editing. Invalid inputs not applied to value, visibly reverted after validation. (#6810, #7096)
- - Drags, Sliders, Inputs: removal of filter means that "nan" and "inf" values may be input. (#7096)
- - DragScalarN, SliderScalarN, InputScalarN, PushMultiItemsWidths: improve multi-components
- width computation to better distribute the error. (#7120, #7121) [@Nahor]
-- Menus:
- - Tweaked hover slack logic, adding an extra timeout to avoid situations where a slow vertical
- movements toward another parent BeginMenu() can keep the wrong child menu open. (#6671, #6926)
-- Color Editors:
- - ColorEdit: Layout tweaks for very small sizes. (#7120, #7121)
- - ColorPicker: Fixed saturation/value cursor radius not scaling properly.
-- Tabs: Added ImGuiTabItemFlags_NoAssumedClosure to enable app to react on closure attempt,
- without having to draw an unsaved document marker (ImGuiTabItemFlags_UnsavedDocument sets
- _NoAssumedClosure automatically). (#7084)
-- Debug Tools:
- - Added io.ConfigDebugIsDebuggerPresent option. When enabled, this adds buttons in various
- locations of Metrics/Debugger to manually request a debugger break:
- - Request a debug break in a Begin() call.
- - Request a debug break in a ItemAdd() call via debug log and hovering 0xXXXXXX identifiers.
- - Request a debug break in a BeginTable() call.
- - Request a debug break in a SetShortcutRouting()/Shortcut() call. [Internal]
- - Metrics: Reorganize Tools menu.
- - Added DebugFlashStyleColor() to identify a style color. Added to Style Editor.
- - Debug Log: Hide its own clipper log to reduce noise in the output. (#5855)
- - Debug Log: Clicking any filter with SHIFT held enables it for 2 frames only,
- making it easier when dealing with spammy logs. (#5855)
-- Settings: Fixed an issue marking settings as dirty when merely clicking on a border or resize
- grip without moving it.
-- Misc: Added IMGUI_USER_H_FILENAME to change the path included when using
- IMGUI_INCLUDE_IMGUI_USER_H. (#7039) [@bryceberger]
-- Misc: Rework debug display of texture id in Metrics window to avoid compile-error when
- ImTextureID is defined to be larger than 64-bits. (#7090)
-- Misc: Added extra courtesy ==/!= operators when IMGUI_DEFINE_MATH_OPERATORS is defined.
-- Misc: Fixed text functions fast-path for handling "%s" and "%.*s" to handle null pointers gracefully,
- like most printf implementations. (#7016, #3466, #6846) [@codefrog2002]
-- Misc: Renamed some defines in imstb_textedit.h to avoid conflicts when using unity/jumbo builds
- on a codebase where another copy of the library is used.
-- Misc: During shutdown, check that io.BackendPlatformUserData and io.BackendRendererUserData are NULL
- in order to catch cases where backend was not shut down. (#7175)
-- Misc: Reworked Issue Template to a shinier and better form. (#5927) [@Panquesito7, @PathogenDavid, @ocornut]
-- Backends:
- - GLFW, Emscripten: Added ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to
- register canvas selector and auto-resize GLFW window. (#6751) [@Traveller23, @ypujante]
- - GLFW: Fixed Windows specific hooks to use Unicode version of WndProc even when
- compiling in MBCS mode. (#7174) [@kimidaisuki22]
- - OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load libGL.so variants in
- case of missing symlink. Fix 1.90 regression for some distros. (#6983)
- - Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs
- vkDestroyCommandPool(). (#7075) [@FoonTheRaccoon]
- - Vulkan: Added MinAllocationSize field in ImGui_ImplVulkan_InitInfo to workaround zealous
- "best practice" validation layer. (#7189, #4238) [@philae-ael]
- - Vulkan: Stopped creating command pools with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
- as we don't reset them.
- - WebGPU: Fixed wgpuRenderPassEncoderSetScissorRect() crash when rendering modal window's
- dimming layer, which has an unclipped value in ImDrawCmd::ClipRect. (#7191) [@aparis69]
-- Examples:
- - Examples: GLFW+Emscripten: Fixed examples not consistently resizing according to host canvas.
- (#6751) [@Traveller23, @ypujante]
- - Examples: SDL3: Minor fixes following recent SDL3 in-progress development.
-
-
------------------------------------------------------------------------
- VERSION 1.90.0 (Released 2023-11-15)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90
-
-Breaking changes:
-
- - BeginChild(): Upgraded 'bool border = false' parameter to 'ImGuiChildFlags flags = 0'.
- Added ImGuiChildFlags_Border value. As with our prior "bool-to-flags" API updates,
- the ImGuiChildFlags_Border value is guaranteed to be == true forever to ensure a
- smoother transition, meaning all existing calls will still work.
- If you want to neatly transition your call sites:
- Before: BeginChild("Name", size, true)
- After: BeginChild("Name", size, ImGuiChildFlags_Border)
- Before: BeginChild("Name", size, false)
- After: BeginChild("Name", size) or BeginChild("Name", 0) or BeginChild("Name", size, ImGuiChildFlags_None)
- Existing code will still work as 'ImGuiChildFlags_Border == true', but you are encouraged to update call sites.
- **AMEND FROM THE FUTURE: from 1.91.1, 'ImGuiChildFlags_Border' is called 'ImGuiChildFlags_Borders'**
- - BeginChild(): Added child-flag ImGuiChildFlags_AlwaysUseWindowPadding as a replacement for
- the window-flag ImGuiWindowFlags_AlwaysUseWindowPadding: the feature only ever made sense
- for use with BeginChild() anyhow, passing it to Begin() had no effect. Now that we accept
- child-flags we are moving it there. (#462)
- Before: BeginChild("Name", size, 0, ImGuiWindowFlags_AlwaysUseWindowPadding);
- After: BeginChild("Name", size, ImGuiChildFlags_AlwaysUseWindowPadding, 0);
- Kept inline redirection enum (will obsolete later) so existing code will work.
- - BeginChildFrame()/EndChildFrame(): removed functions in favor of using BeginChild() with
- the ImGuiChildFlags_FrameStyle flag. Kept inline redirection function (will obsolete).
- Those functions were merely PushStyle/PopStyle helpers and custom versions are easy to create.
- (The removal isn't so much motivated by needing to add the feature in BeginChild(), but by the
- necessity to avoid BeginChildFrame() signature mismatching BeginChild() signature and features.)
- - Debug Tools: Renamed ShowStackToolWindow() ("Stack Tool") to ShowIDStackToolWindow() ("ID Stack Tool"),
- as earlier name was misleading. Kept inline redirection function. (#4631)
- - IO: Removed io.MetricsActiveAllocations introduced in 1.63, was displayed in Metrics and unlikely to
- be accessed by end-user. Value still visible in the UI and easily to recompute from a delta.
- - Defining IMGUI_DISABLE_OBSOLETE_FUNCTIONS now automatically defines IMGUI_DISABLE_OBSOLETE_KEYIO. (#4921)
- - Removed IM_OFFSETOF() macro in favor of using offsetof() available in C++11. Kept redirection define. (#4537)
- - ListBox, Combo: Changed signature of "name getter" callback in old one-liner ListBox()/Combo() apis.
- Before:
- getter type: bool (*getter)(void* user_data, int idx, const char** out_text)
- function: bool Combo(const char* label, int* current_item, bool (*getter)(void* user_data, int idx, const char** out_text), ...);
- function: bool ListBox(const char* label, int* current_item, bool (*getting)(void* user_data, int idx, const char** out_text), ...);
- After:
- getter type: const char* (*getter)(void* user_data, int idx)
- function: bool Combo(const char* label, int* current_item, const char* (*getter)(void* user_data, int idx), ...);
- function: bool ListBox(const char* label, int* current_item, const char* (*getter)(void* user_data, int idx), ...);
- Old type was unnecessarily complex and harder to wrap in e.g. a lambda. Kept inline redirection function (will obsolete).
- - Commented out obsolete redirecting enums/functions that were marked obsolete two years ago:
- - GetWindowContentRegionWidth() -> use GetWindowContentRegionMax().x - GetWindowContentRegionMin().x.
- Consider that generally 'GetContentRegionAvail().x' is often more correct and more useful.
- - ImDrawCornerFlags_XXX -> use ImDrawFlags_RoundCornersXXX names.
- Read 1.82 changelog for details + grep commented names in sources.
- - Commented out runtime support for hardcoded ~0 or 0x01..0x0F rounding flags values for
- AddRect()/AddRectFilled()/PathRect()/AddImageRounded(). -> Use ImDrawFlags_RoundCornersXXX flags.
- Read 1.82 changelog for details.
- - Backends: Vulkan: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own
- command-buffer to upload fonts. Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unnecessary.
- No need to call ImGui_ImplVulkan_CreateFontsTexture() as it is done automatically in ImGui_ImplVulkan_NewFrame().
- You can call ImGui_ImplVulkan_CreateFontsTexture() manually if you need to reload the font atlas texture.
- (#6943, #6715, #6327, #3743, #4618)
-
-Other changes:
-
-- Windows:
- - BeginChild(): Added ImGuiChildFlags_ResizeX and ImGuiChildFlags_ResizeY to allow resizing
- child windows from the bottom/right border (toward layout direction). Resized child windows
- settings are saved and persistent in .ini file. (#1710)
- - BeginChild(): Added ImGuiChildFlags_Border as a replacement for 'bool border = true' parameter.
- **AMEND FROM THE FUTURE: from 1.91.1, 'ImGuiChildFlags_Border' is called 'ImGuiChildFlags_Borders'**
- - BeginChild(): Added ImGuiChildFlags_AutoResizeX and ImGuiChildFlags_AutoResizeY to auto-resize
- on one axis, while generally providing a size on the other axis. (#1666, #1395, #1496, #1710)
- e.g. BeginChild("name", {-FLT_MIN, 0.0f}, ImGuiChildFlags_AutoResizeY);
- - Size is only reevaluated if the child window is within visible boundaries or just appearing.
- This allows coarse clipping to be performed and auto-resizing childs to return false when
- hidden because of being scrolled out.
- - Combining this with also specifying ImGuiChildFlags_AlwaysAutoResize disables
- this optimization, meaning child contents will never be clipped (not recommended).
- - Please be considerate that child are full windows and carry significant overhead:
- combining auto-resizing for both axes to create a non-scrolling child to merely draw
- a border would be better more optimally using BeginGroup(). (see #1496)
- (until we come up with new helpers for framed groups and work-rect adjustments).
- - BeginChild(): made it possible to use SetNextWindowSizeConstraints() rectangle, often
- useful when ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY. (#1666, #1395, #1496)
- Custom constraint callback are not supported with child window.
- - BeginChild(): Added ImGuiChildFlags_FrameStyle as a replacement for BeginChildFrame(),
- use it to make child window use FrameBg, FrameRounding, FrameBorderSize, FramePadding
- instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
- - Popups: clarified meaning of 'p_open != NULL' in BeginPopupModal() + set back user value
- to false when popup is closed in ways other than clicking the close button. (#6900)
- - Double-clicking lower-left resize grip auto-resize (like lower-right one).
- - Double-clicking bottom or right window border auto-resize on a singles axis.
- - Use relative mouse movement for border resize when the border geometry has moved
- (e.g. resizing a child window triggering parent scroll) in order to avoid resizing
- feedback loops. Unless manually mouse-wheeling while border resizing. (#1710)
-- Separators:
- - Altered end-points to use more standard boundaries. (#205, #4787, #1643)
- Left position is always current cursor X position, right position is always work-rect
- rightmost edge. It effectively means that:
- - A separator in the root of a window will end up a little more distant from edges
- than previously (essentially following WindowPadding instead of clipping edges).
- - A separator inside a table cell end up a little distance from edges instead of
- touching them (essentially following CellPadding instead of clipping edges).
- - Matches tree indentation (was not the case before).
- - Matches SeparatorText(). (#1643)
- - Makes things correct inside groups without specific/hard-coded handling. (#205)
- - Support legacy behavior when used inside old Columns(), as we favored that idiom back then,
- only different is left position follows indentation level, to match calling a Separator()
- inside or outside Columns().
-- Tooltips:
- - Made using SetItemTooltip()/IsItemHovered(ImGuiHoveredFlags_ForTooltip) defaults to
- activate tooltips on disabled items. This is done by adding ImGuiHoveredFlags_AllowWhenDisabled
- to the default value of style.HoverFlagsForTooltipMouse/HoverFlagsForTooltipNav. (#1485)
- - Made is possible to combine ImGuiHoveredFlags_ForTooltip with a ImGuiHoveredFlags_DelayXXX
- override. (#1485)
-- Drag and Drop:
- - Reworked drop target highlight: reduce rectangle to its visible portion, and then expand
- slightly. A full rectangle is always visible and it may protrude slightly. (#4281, #3272)
- - Fixed submitting a tooltip from drop target location when using AcceptDragDropPayload()
- with ImGuiDragDropFlags_AcceptNoPreviewTooltip and submitting a tooltip manually.
-- Tables:
- - Added angled headers support. You need to set ImGuiTableColumnFlags_AngledHeader on selected
- columns and call TableAngledHeadersRow(). Added style.TableAngledHeadersAngle style option. (#6917)
- - Added ImGuiTableFlags_HighlightHoveredColumn flag, currently highlighting column header.
- - Fixed an edge-case when no columns are visible + table scrollbar is visible + user
- code is always testing return value of TableSetColumnIndex() to coarse clip. With an active
- clipper it would have asserted. Without a clipper, the scrollbar range would be wrong.
- - Request user to submit contents when outer host-window is requesting auto-resize,
- so a scrolling table can contribute to initial window size. (#6510)
- - Fixed subtle drawing overlap between borders in some situations.
- - Fixed bottom-most and right-most outer border offset by one. (#6765, #3752) [@v-ein]
- - Fixed top-most and left-most outer border overlapping inner clip-rect when scrolling. (#6765)
- - Fixed top-most outer border being drawn with both TableBorderLight and TableBorderStrong
- in some situations, causing the earlier to be visible underneath when alpha is not 1.0f.
- - Fixed right-clicking right-most section (past right-most column) from highlighting a column.
- - Fixed an issue with ScrollX enabled where an extraneous draw command would be created.
-- Menus:
- - Menus: Fixed a bug where activating an item in a child-menu and dragging mouse over the
- parent-menu would erroneously close the child-menu. (Regression from 1.88). (#6869)
- - MenuBar: Fixed an issue where layouting an item in the menu-bar would erroneously
- register contents size in a way that would affect the scrolling layer.
- Was most often noticeable when using a horizontal scrollbar. (#6789)
-- InputText:
- - InputTextMultiline: Fixed a crash pressing Down on last empty line of a multi-line buffer.
- (regression from 1.89.2, only happened in some states). (#6783, #6000)
- - InputTextMultiline: Fixed Tabbing cycle leading to a situation where Enter key wouldn't
- be accepted by the widget when navigation highlight is visible. (#6802, #3092, #5759, #787)
-- Nav: Tabbing always enable nav highlight when ImGuiConfigFlags_NavEnableKeyboard is set.
- Previously was inconsistent and only enabled when stepping through a non-input item.
- (#6802, #3092, #5759, #787)
-- TreeNode: Added ImGuiTreeNodeFlags_SpanAllColumns for use in tables. (#3151, #3565, #2451, #2438)
-- TabBar: Fixed position of unsaved document marker (ImGuiTabItemFlags_UnsavedDocument) which was
- accidentally offset in 1.89.9. (#6862) [@alektron]
-- ColorPicker4(): Fixed ImGuiColorEditFlags_NoTooltip not being forwarded to individual DragFloat3
- sub-widgets which have a visible color preview when ImGuiColorEditFlags_NoSidePreview is also set. (#6957)
-- BeginGroup(): Fixed a bug pushing line lower extent too far down when called after a call
- to SameLine() followed by manual cursor manipulation.
-- BeginCombo(): Added ImGuiComboFlags_WidthFitPreview flag. (#6881) [@mpv-enjoyer]
-- BeginListBox(): Fixed not consuming SetNextWindowXXX() data when returning false.
-- Fonts:
- - Argument 'float size_pixels' passed to AddFontXXX() functions is now rounded to lowest integer.
- This is because our layout/font system currently doesn't fully support non-integer sizes. Until
- it does, this has been a common pitfall leading to more or less subtle issues. (#3164, #3309, #6800)
- - Better assert during load when passing truncated font data or wrong data size. (#6822)
- - Ensure calling AddFontXXX function doesn't invalidates ImFont's ConfigData pointers
- prior to building again. (#6825)
- - Added ImFontConfig::RasterizerDensity field to increase texture size of rendered glyphs
- without altering other metrics. Among other things, this makes it easier to have zooming code
- swapping between 2 fonts (e.g. a 100% and a 400% fonts) depending on current scale. (#6925) [@thedmd]
- Important: if you increase this it is expected that you would render the font with a scale of
- similar value or magnitude. Merely increasing this without increasing scale may lower quality.
- - imgui_freetype: Added support for RasterizerDensity. (#6925) [@thedmd]
- - imgui_freetype: Fixed a warning and leak in IMGUI_ENABLE_FREETYPE_LUNASVG support. (#6842, #6591)
-- Inputs: Added IsKeyChordPressed() helper function e.g. IsKeyChordPressed(ImGuiMod_Ctrl | ImGuiKey_S).
- (note that ImGuiMod_Shortcut may be used as an alias for Cmd on OSX and Ctrl on other systems).
-- Misc: Most text functions also treat "%.*s" (along with "%s") specially to bypass formatting. (#3466, #6846)
-- IO: Add extra keys to ImGuiKey enum: ImGuiKey_F13 to ImGuiKey_F24. (#6891, #4921)
-- IO: Add extra keys to ImGuiKey enum: ImGuiKey_AppBack, ImGuiKey_AppForward. (#4921)
-- IO: Setting io.WantSetMousePos ignores incoming MousePos events. (#6837, #228) [@bertaye]
-- Debug Tools: Metrics: Added log of recent alloc/free calls.
-- Debug Tools: Metrics: Added "Show groups rectangles" in tools.
-- ImDrawList: Added AddEllipse(), AddEllipseFilled(), PathEllipticalArcTo(). (#2743) [@Doohl]
-- ImVector: Added find_index() helper.
-- Demo: Added "Drag and Drop -> Tooltip at target location" demo.
-- Demo: Added "Layout -> Child Windows -> Manual-resize" demo. (#1710)
-- Demo: Added "Layout -> Child Windows -> Auto-resize with constraints" demo. (#1666, #1395, #1496, #1710)
-- Demo: Partly fixed "Examples -> Constrained-resizing window" custom constrains demo. (#6210) [@cfillion]
-- Backends: Vulkan: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own
- command-buffer to upload fonts. Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unnecessary.
- No need to call ImGui_ImplVulkan_CreateFontsTexture() as it is done automatically in ImGui_ImplVulkan_NewFrame().
- You can call ImGui_ImplVulkan_CreateFontsTexture() manually if you need to reload font atlas texture.
- Fixed leaks, and added ImGui_ImplVulkan_DestroyFontsTexture() (probably no need to call this directly).
- (#6943, #6715, #6327, #3743, #4618)
- [@helynranta, @thomasherzog, @guybrush77, @albin-johansson, @MiroKaku, @benbatya-fb, @ocornut]
-- Backends: GLFW: Clear emscripten's MouseWheel callback before shutdown. (#6790, #6096, #4019) [@halx99]
-- Backends: GLFW: Added support for F13 to F24 function keys. (#6891)
-- Backends: SDL2, SDL3: Added support for F13 to F24 function keys, AppBack, AppForward. (#6891)
-- Backends: SDL3: Updates for recent API changes. (#7000, #6974)
-- Backends: Win32: Added support for F13 to F24 function keys, AppBack, AppForward. (#6891)
-- Backends: Win32: Added support for keyboard codepage conversion for when application
- is compiled in MBCS mode and using a non-Unicode window. (#6785, #6782, #5725, #5961) [@sneakyevil]
-- Backends: Win32: Synthesize key-down event on key-up for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows
- doesn't emit it (same behavior as GLFW/SDL). (#6859) [@thedmd, @SuperWangKai]
-- Backends: OpenGL3: rename symbols in our internal loader so that LTO compilation with another
- copy of gl3w becomes possible. (#6875, #6668, #4445) [@nicolasnoble]
-- Backends: OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" instead
- of "libGL.so.1", accommodating for NetBSD systems having only "libGL.so.3" available. (#6983)
-- Backends: OSX: Added support for F13 to F20 function keys. Support mapping F13 to PrintScreen. (#6891)
-- Examples: GLFW+Vulkan, SDL+Vulkan: Simplified and removed code due to backend improvements.
-- Internals: Renamed ImFloor() to ImTrunc(). Renamed ImFloorSigned() to ImFloor(). (#6861)
-
-
------------------------------------------------------------------------
- VERSION 1.89.9 (Released 2023-09-04)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.9
-
-Breaking changes:
-
-- Clipper: Renamed IncludeRangeByIndices(), also called ForceDisplayRangeByIndices()
- before 1.89.6, to IncludeItemsByIndex(). Kept inline redirection function. (#6424, #3841)
-
-Other changes:
-
-- Tables: Made it possible to use SameLine(0,0) after TableNextColumn() or
- TableSetColumnIndex() in order to reuse line pos/height from previous cell. (#3740)
-- Tables: Made it possible to change style.CellPadding.y between rows. (#3740)
-- Nav, TreeNode: Pressing Left with ImGuiTreeNodeFlags_NavLeftJumpsBackHere now goes
- through proper navigation logic: honor scrolling and selection. (#1079, #1131)
-- Sliders: Fixed an integer overflow and div-by-zero in SliderInt() when
- v_max=INT_MAX (#6675, #6679) [@jbarthelmes]
-- Windows: Layout of Close/Collapse buttons uses style.ItemInnerSpacing.x between items,
- stopped incorrectly using FramePadding in a way where hit-boxes could overlap when
- setting large values. (#6749)
-- TabBar, Style: added style.TabBarBorderSize and associated ImGuiStyleVar_TabBarBorderSize.
- Tweaked rendering of that separator to allow thicker values. (#6820, #4859, #5022, #5239)
-- InputFloat, SliderFloat, DragFloat: always turn both '.' and ',' into the current decimal
- point character when using Decimal/Scientific character filter. (#6719, #2278) [@adamsepp]
-- ColorEdit, ColorPicker: Manipulating options popup don't mark item as edited. (#6722)
- (Note that they may still be marked as Active/Hovered.)
-- Clipper: Added IncludeItemByIndex() helper to include a single item. (#6424, #3841)
-- Clipper: Fixed a bug if attempt to force-include a range which matches an already
- included range, clipper would end earlier. (#3841)
-- ImDrawData: Fixed an issue where TotalVtxCount/TotalIdxCount does not match the sum
- of individual ImDrawList's buffer sizes when a dimming/modal background is rendered. (#6716)
-- ImDrawList: Automatically calling ChannelsMerge() if not done after a split.
-- ImDrawList: Fixed OOB access in _CalcCircleAutoSegmentCount when passing excessively
- large radius to AddCircle(). (#6657, #5317) [@EggsyCRO, @jdpatdiscord]
-- IO: Exposed io.PlatformLocaleDecimalPoint to configure decimal point ('.' or ',') for
- languages needing it. Should ideally be set to the value of '*localeconv()->decimal_point'
- but our backends don't do it yet. (#6719, #2278)
-- IO: Fixed io.AddMousePosEvent() and io.AddMouseButtonEvent() writing MouseSource to
- wrong union section. Was semantically incorrect and accidentally had no side-effects
- with default compiler alignment settings. (#6727) [@RickHuang2001]
-- Misc: Made multiple calls to Render() during the same frame early out faster.
-- Debug Tools: Metrics: Fixed "Drawlists" section and per-viewport equivalent
- appearing empty (regression in 1.89.8).
-- Demo: Reorganized "Examples" menu.
-- Demo: Tables: Demonstrate using SameLine() between cells. (#3740)
-- Demo: Tables: Demonstrate altering CellPadding.y between rows. (#3740)
-- Demo: Custom Rendering: Demonstrate out-of-order rendering using ImDrawListSplitter.
-- Backends: SDL2,SDL3: added ImGui_ImplSDL2_InitForOther()/ImGui_ImplSDL3_InitForOther()
- for consistency (matching GLFW backend) and as most initialization paths don't actually
- need to care about rendering backend.
-- Examples: Emscripten+WebGPU: Fixed WGPUInstance creation process + use preferred
- framebuffer format. (#6640, #6748) [@smileorigin]
-
-
------------------------------------------------------------------------
- VERSION 1.89.8 (Released 2023-08-01)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.8
-
-Breaking changes:
-
-- IO: Obsoleted io.ClearInputCharacters() (added in 1.47) as it now ambiguous
- and often incorrect/misleading considering the existence of a higher-level
- input queue. This is automatically cleared by io.ClearInputKeys(). (#4921)
-- ImDrawData: CmdLists[] array is now owned, changed from 'ImDrawList**' to
- 'ImVector<ImDrawList*>'. Majority of users shouldn't be affected, but you
- cannot compare to NULL nor reassign manually anymore.
- Instead use AddDrawList(). Allocation count are identical. (#6406, #4879, #1878)
-
-Other changes:
-
-- Fonts: ImFontConfig::OversampleH now defaults to 2 instead of 3, since the
- quality increase is largely minimal.
-- Fonts, imgui_freetype: Added support to render OpenType SVG fonts using lunasvg.
- Requires enabling IMGUI_ENABLE_FREETYPE_LUNASVG along with IMGUI_ENABLE_FREETYPE,
- and providing headers/libraries for lunasvg. (#6591, #6607) [@sakiodre]
-- ImDrawData: CmdLists[] array is now an ImVector<> owned by ImDrawData rather
- than a pointer to internal state.
- - This makes it easier for user to create their own or append to an existing draw data.
- Added a ImDrawData::AddDrawList() helper function to do that. (#6406, #4879, #1878)
- - This makes it easier to perform a deep-swap instead of a deep-copy, as array
- ownership is now clear. (#6597, #6475, #6167, #5776, #5109, #4763, #3515, #1860)
- - Syntax and allocation count are otherwise identical.
-- Fixed CTRL+Tab dimming background assert when target window has a callback
- in the last ImDrawCmd. (#4857, #5937)
-- IsItemHovered: Fixed ImGuiHoveredFlags_ForTooltip for Keyboard/Gamepad navigation,
- got broken prior to 1.89.7 due to an unrelated change making flags conflict. (#6622, #1485)
-- InputText: Fixed a case where deactivation frame would write to underlying
- buffer or call CallbackResize although unnecessary, in a frame where the
- return value was false.
-- Tables: fixed GetContentRegionAvail().y report not taking account of lower cell
- padding or of using ImGuiTableFlags_NoHostExtendY. Not taking it into account
- would make the idiom of creating vertically bottom-aligned content (e.g. a child
- window) inside a table make the parent window erroneously have a scrollbar. (#6619)
-- Tables: fixed calculation of multi-instance shared decoration/scrollbar width of
- scrolling tables, to avoid flickering width variation when resizing down a table
- hosting a child window. (#5920, #6619)
-- Scrollbar: layout needs to take account of window border size, so a border size
- will slightly reduce scrollbar size. Generally we tried to make it that window
- border size has no incidence on layout but this can't work with thick borders. (#2522)
-- IO: Added io.ClearEventsQueue() to clear incoming inputs events. (#4921)
- May be useful in conjunction with io.ClearInputKeys() if you need to clear
- both current inputs state and queued events (e.g. when using blocking native
- dialogs such as Windows's ::MessageBox() or ::GetOpenFileName()).
-- IO: Changed io.ClearInputKeys() specs to also clear current frame character buffer
- (what now obsoleted io.ClearInputCharacters() did), as this is effectively the
- desirable behavior.
-- Misc: Added IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION config macro to disable
- stb_sprintf implementation when using IMGUI_USE_STB_SPRINTF. (#6626) [@septag]
-- Misc: Avoid stb_textedit.h reincluding string.h while in a namespace, which
- messes up with building with Clang Modules. (#6653, #4791) [@JohelEGP]
-- Demo: Better showcase use of SetNextItemAllowOverlap(). (#6574, #6512, #3909, #517)
-- Demo: Showcase a few more InputText() flags.
-- Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601)
-- Backends: GLFW: Revert ignoring mouse data on GLFW_CURSOR_DISABLED as it can be used
- differently. User may set ImGuiConfigFlags_NoMouse if desired. (#5625, #6609) [@scorpion-26]
-- Backends: WebGPU: Update for changes in Dawn. (#6602, #6188) [@williamhCode]
-- Examples: Vulkan: Creating minimal descriptor pools to fit only what is needed by
- example. (#6642) [@SaschaWillem]
-
-
------------------------------------------------------------------------
- VERSION 1.89.7 (Released 2023-07-04)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.7
-
-Breaking changes:
-
-- Moved io.HoverDelayShort/io.HoverDelayNormal to style.HoverDelayShort/style.HoverDelayNormal.
- As the fields were added in 1.89 and expected to be left unchanged by most users, or only
- tweaked once during app initialization, we are exceptionally accepting the breakage.
- Majority of users should not even notice.
-- Overlapping items: (#6512, #3909, #517)
- - Added 'SetNextItemAllowOverlap()' (called before an item) as a replacement for using
- 'SetItemAllowOverlap()' (called after an item). This is roughly equivalent to using the
- legacy 'SetItemAllowOverlap()' call (public API) + ImGuiButtonFlags_AllowOverlap (internal).
- - Obsoleted 'SetItemAllowOverlap()': it didn't and couldn't work reliably since 1.89 (2022-11-15),
- and relied on ambiguously defined design. Use 'SetNextItemAllowOverlap()' before item instead.
- - Selectable, TreeNode: When using ImGuiSelectableFlags_AllowOverlap/ImGuiTreeNodeFlags_AllowOverlap
- and holding item held, overlapping widgets won't appear as hovered. (#6512, #3909)
- While this fixes a common small visual issue, it also means that calling IsItemHovered()
- after a non-reactive elements - e.g. Text() - overlapping an active one may fail if you don't
- use IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem). (#6610)
- - Renamed 'ImGuiTreeNodeFlags_AllowItemOverlap' to 'ImGuiTreeNodeFlags_AllowOverlap'.
- - Renamed 'ImGuiSelectableFlags_AllowItemOverlap' to 'ImGuiSelectableFlags_AllowOverlap'
- - Kept redirecting enums (will obsolete).
-
-Other changes:
-
-- Tooltips/IsItemHovered() related changes:
- - Tooltips: Added SetItemTooltip() and BeginItemTooltip() functions.
- They are shortcuts for the common idiom of using IsItemHovered().
- - SetItemTooltip("Hello") == if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip("Hello"); }
- - BeginItemTooltip() == IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip()
- The newly added ImGuiHoveredFlags_Tooltip is meant to facilitate standardizing
- mouse hovering delays and rules for a given application.
- The previously common idiom of using 'if (IsItemHovered()) { SetTooltip(...); }'
- won't use delay or stationary test.
- - IsItemHovered: Added ImGuiHoveredFlags_Stationary to require mouse being
- stationary when hovering a new item. Added style.HoverStationaryDelay (~0.15 sec).
- Once the mouse has been stationary once the state is preserved for same item. (#1485)
- - IsItemHovered: Added ImGuiHoveredFlags_ForTooltip as a shortcut for pulling flags
- from style.HoverFlagsForTooltipMouse or style.HoverFlagsForTooltipNav depending
- on active inputs (#1485)
- - style.HoverFlagsForTooltipMouse defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'
- - style.HoverFlagsForTooltipNav defaults to 'ImGuiHoveredFlags_NoSharedDelay | ImGuiHoveredFlags_DelayNormal'.
- - Tooltips: Tweak default offset for non-drag and drop tooltips so underlying items
- isn't covered as much. (Match offset for drag and drop tooltips)
- - IsItemHovered: Tweaked default value of style.HoverDelayNormal from 0.30 to 0.40,
- Tweaked default value of style.HoverDelayShort from 0.10 to 0.15. (#1485)
- - IsItemHovered: Added ImGuiHoveredFlags_AllowWhenOverlappedByWindow to ignore window-overlap only.
- Option ImGuiHoveredFlags_AllowWhenOverlapped now expand into a combination of both
- _AllowWhenOverlappedByWindow + _AllowWhenOverlappedByItem, matching old behavior.
-- Overlapping items: (#6512, #3909, #517)
- - Most item types should now work with SetNextItemAllowOverlap(). (#6512, #3909, #517)
- - Fixed first frame of an overlap highlighting underlying item if previous frame didn't hover anything.
- - IsItemHovered: Changed to return false when querying an item using AllowOverlap mode which
- is being overlapped. Added ImGuiHoveredFlags_AllowWhenOverlappedByItem to opt-out. (#6512, #3909, #517)
-- IsWindowHovered: Added support for ImGuiHoveredFlags_Stationary.
-- IsWindowHovered, IsItemHovered: Assert when passed any unsupported flags.
-- Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either
- ScrollX or ScrollY flags from being impossible to resize. (#6503)
-- CollapsingHeader/TreeNode: Fixed text padding when using _Framed+_Leaf flags. (#6549) [@BobbyAnguelov]
-- InputText: Fixed not returning true when buffer is cleared while using the
- ImGuiInputTextFlags_EscapeClearsAll flag. (#5688, #2620)
-- InputText: Fixed a crash on deactivating a ReadOnly buffer. (#6570, #6292, #4714)
-- InputText: ImGuiInputTextCallbackData::InsertChars() accept (NULL,NULL) range, in order to conform
- to common idioms (e.g. passing .data(), .data() + .size() from a null string). (#6565, #6566, #3615)
-- Combo: Made simple/legacy Combo() function not returns true when picking already selected item.
- This is consistent with other widgets. If you need something else, you can use BeginCombo(). (#1182)
-- Clipper: Rework inner logic to allow functioning with a zero-clear constructor.
- This is order to facilitate usage for language bindings (e.g cimgui or dear_binding)
- where user may not be calling a constructor manually. (#5856)
-- Drag and Drop: Apply default behavior of drag source not reporting itself as hovered
- at lower-level, so DragXXX, SliderXXX, InputXXX, Plot widgets are fulfilling it.
- (Behavior doesn't apply when ImGuiDragDropFlags_SourceNoDisableHover is set).
-- Modals: In the case of nested modal, made sure that focused or appearing windows are
- moved below the lowest blocking modal (rather than the highest one). (#4317)
-- GetKeyName(): Fixed assert with ImGuiMod_XXX values when IMGUI_DISABLE_OBSOLETE_KEYIO is set.
-- Debug Tools: Added 'io.ConfigDebugIniSettings' option to save .ini data with extra
- comments. Currently mainly for inspecting Docking .ini data, but makes saving slower.
-- Demo: Added more developed "Widgets->Tooltips" section. (#1485)
-- Backends: OpenGL3: Fixed support for glBindSampler() backup/restore on ES3. (#6375, #6508) [@jsm174]
-- Backends: OpenGL3: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts
- lower than 3.2. (#6539, #6333) [@krumelmonster]
-- Backends: Vulkan: Added optional support for VK_KHR_dynamic_rendering (Vulkan 1.3+) in the
- backend for applications using it. User needs to set 'init_info->UseDynamicRendering = true'
- and 'init_info->ColorAttachmentFormat'. RenderPass becomes unused. (#5446, #5037) [@spnda, @cmarcelo]
-- Backends: GLFW: Accept glfwGetTime() not returning a monotonically increasing value.
- This seems to happens on some Windows setup when peripherals disconnect, and is likely
- to also happen on browser+Emscripten. Matches similar 1.89.4 fix in SDL backend. (#6491)
-- Examples: Win32+OpenGL3: Changed DefWindowProc() to DefWindowProcW() to match other examples
- and support the example app being compiled without UNICODE. (#6516, #5725, #5961, #5975) [@yenixing]
-
-
------------------------------------------------------------------------
- VERSION 1.89.6 (Released 2023-05-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.6
-
-Breaking changes:
-
-- Clipper: Commented out obsolete redirection constructor which was marked obsolete in 1.79:
- 'ImGuiListClipper(int items_count, float items_height)' --> Use 'ImGuiListClipper() + clipper.Begin()'.
-- Clipper: Renamed ForceDisplayRangeByIndices() to IncludeRangeByIndices(), kept
- inline redirection function (introduced in 1.86 and rarely used). (#6424, #3841)
-- Commented out obsolete/redirecting functions that were marked obsolete more than two years ago:
- - ListBoxHeader() -> use BeginListBox()
- - ListBoxFooter() -> use EndListBox()
- - Note how two variants of ListBoxHeader() existed. Check commented versions in imgui.h for reference.
-- Backends: SDL_Renderer: Renamed 'imgui_impl_sdlrenderer.h/cpp' to 'imgui_impl_sdlrenderer2.h/cpp',
- in order to accommodate for upcoming SDL3 and change in its SDL_Renderer API. (#6286)
-- Backends: GLUT: Removed call to ImGui::NewFrame() from ImGui_ImplGLUT_NewFrame().
- It needs to be called from the main app loop, like with every other backends. (#6337) [@GereonV]
-
-Other changes:
-
-- Window: Fixed resizing from upper border when io.ConfigWindowsMoveFromTitleBarOnly is set. (#6390)
-- Tables: Fixed a small miscalculation in TableHeader() leading to an empty tooltip
- showing when a sorting column has no visible name. (#6342) [@lukaasm]
-- Tables: Fixed command merging when compiling with VS2013 (one array on stack was not
- initialized on VS2013. Unsure if due to a bug or UB/standard conformance). (#6377)
-- InputText: Avoid setting io.WantTextInputNextFrame during the deactivation frame.
- (#6341) [@lukaasm]
-- Drag, Sliders: if the format string doesn't contain any %, CTRL+Click to input text will
- use the default format specifier for the type. Allow display/input of raw value when using
- "enums" patterns (display label instead of value) + allow using when value is hidden. (#6405)
-- Nav: Record/restore preferred position on each given axis after a movement on that axis,
- then score movement on the other axis using this as a bias. This allows going up and down
- between e.g. a large header spanning horizontal space and three-ways-columns, landing
- on the same column as before.
-- Nav: Fixed navigation within tables/columns where item boundaries goes beyond columns limits,
- unclipped bounding boxes would interfere with other columns. (#2221) [@zzzyap, @ocornut]
-- Nav: Fixed CTRL+Tab into a root window with only childs with _NavFlattened flags
- erroneously initializing default nav layer to menu layer.
-- Menus: Fixed an issue when opening a menu hierarchy in a given menu-bar would allow
- opening another via simple hovering. (#3496, #4797)
-- Fonts: Fixed crash when merging fonts and the first font has no valid glyph. (#6446) [@JaedanC]
-- Fonts: Fixed crash when manually specifying an EllipsisChar that doesn't exist. (#6480)
-- Misc: Added ImVec2 unary minus operator. (#6368) [@Koostosh]
-- Debug Tools: Debug Log: Fixed not parsing 0xXXXXXXXX values for geo-locating on mouse
- hover hover when the identifier is at the end of the line. (#5855)
-- Debug Tools: Added 'io.ConfigDebugIgnoreFocusLoss' option to disable 'io.AddFocusEvent(false)'
- handling. May facilitate interactions with a debugger when focus loss leads to clearing
- inputs data. (#4388, #4921)
-- Backends: Clear bits sets io.BackendFlags on backend Shutdown(). (#6334, #6335] [@GereonV]
- Potentially this would facilitate switching runtime backend mid-session.
-- Backends: Win32: Added ImGui_ImplWin32_InitForOpenGL() to facilitate combining raw
- Win32/Winapi with OpenGL. (#3218)
-- Backends: OpenGL3: Restore front and back polygon mode separately when supported
- by context (Desktop 3.0, 3.1, or 3.2+ with compat bit). (#6333) [@GereonV]
-- Backends: OpenGL3: Support for glBindSampler() backup/restore on ES3. (#6375) [@jsm174]
-- Backends: SDL3: Fixed build on Emscripten/iOS/Android. (#6391) [@jo-codegirl]
-- Backends: SDLRenderer3: Added SDL_Renderer for SDL3 backend. (#6286) [@Carcons, @ocornut]
-- Examples: Added native Win32+OpenGL3 example. We don't recommend using this setup but we
- provide it for completeness. (#3218, #5170, #6086, #2772, #2600, #2359, #2022, #1553) [@learn-more]
-- Examples: Vulkan: Use integrated GPU if nothing else is available. (#6359) [@kimidaisuki22]
-- Examples: DX9, DX10, DX11: Queue framebuffer resize instead of processing in WM_SIZE,
- as some drivers tends to only cleanup after existing the native resize modal loop. (#6374)
-- Examples: Added SDL3+SDL_Renderer example. (#6286)
-- Examples: Updated all Visual Studio projects and batches to use /utf-8 argument.
-
-
------------------------------------------------------------------------
- VERSION 1.89.5 (Released 2023-04-13)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.5
-
-Other changes:
-
-- InputText: Reworked prev/next-word behavior to more closely match Visual Studio
- text editor. Include '.' as a delimiter and alter varying subtle behavior with how
- blanks and separators are treated when skipping words. (#6067) [@ajweeks]
-- InputText: Fixed a tricky edge case, ensuring value is always written back on the
- frame where IsItemDeactivated() returns true, in order to allow usage without user
- retaining underlying data. While we don't really want to encourage user not retaining
- underlying data, in the absence of a "late commit" behavior/flag we understand it may
- be desirable to take advantage of this trick. (#4714)
-- Drag, Sliders: Fixed parsing of text input when '+' or '#' format flags are used
- in the format string. (#6259) [@idbrii]
-- Nav: Made Ctrl+Tab/Ctrl+Shift+Tab windowing register ownership to held modifier so
- it doesn't interfere with other code when remapping those actions. (#4828, #3255, #5641)
-- Nav: Made PageUp/PageDown/Home/End navigation also scroll parent windows when
- necessary to make the target location fully visible (same as e.g. arrow keys).
-- ColorEdit: Fixed shading of S/V triangle in Hue Wheel mode. (#5200, #6254) [@jamesthomasgriffin]
-- TabBar: Tab-bars with ImGuiTabBarFlags_FittingPolicyScroll can be scrolled with
- horizontal mouse-wheel (or Shift + WheelY). (#2702)
-- Rendering: Using adaptive tessellation for RadioButton, ColorEdit preview circles,
- Windows Close and Collapse Buttons.
-- ButtonBehavior: Fixed an edge case where changing widget type/behavior while active
- and using same id could lead to an assert. (#6304)
-- Misc: Fixed ImVec2 operator[] violating aliasing rules causing issue with Intel C++
- compiler. (#6272) [@BayesBug]
-- IO: Input queue trickling adjustment for touch screens. (#2702, #4921)
- This fixes single-tapping to move simulated mouse and immediately click on a widget
- that is using the ImGuiButtonFlags_AllowItemOverlap policy.
- - This only works if the backend can distinguish TouchScreen vs Mouse.
- See 'Demo->Tools->Metrics->Inputs->Mouse Source' to verify.
- - Fixed tapping on BeginTabItem() on a touch-screen. (#2702)
- - Fixed tapping on CollapsingHeader() with a close button on a touch-screen.
- - Fixed tapping on TreeNode() using ImGuiTreeNodeFlags_AllowItemOverlap on a touch-screen.
- - Fixed tapping on Selectable() using ImGuiSelectableFlags_AllowItemOverlap on a touch-screen.
- - Fixed tapping on TableHeader() on a touch-screen.
-- IO: Added io.AddMouseSourceEvent() and ImGuiMouseSource enum. This is to allow backend to
- specify actual event source between Mouse/TouchScreen/Pen. (#2702, #2334, #2372, #3453, #5693)
-- IO: Fixed support for calling io.AddXXXX functions from inactive context (wrongly
- advertised as supported in 1.89.4). (#6199, #6256, #5856) [@cfillion]
-- Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
-- Backends: OpenGL3: Properly restoring "no shader program bound" if it was the case prior to
- running the rendering function. (#6267, #6220, #6224) [@BrunoLevy]
-- Backends: Win32: Added support for io.AddMouseSourceEvent() to discriminate Mouse/TouchScreen/Pen. (#2334, #2702)
-- Backends: SDL2/SDL3: Added support for io.AddMouseSourceEvent() to discriminate Mouse/TouchScreen.
- This is relying on SDL passing SDL_TOUCH_MOUSEID in the event's 'which' field. (#2334, #2702)
-- Backends: SDL2/SDL3: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they actually
- block text input input and don't only pertain to IME. It's unclear exactly what their relation
- is to other IME function such as SDL_SetTextInputRect(). (#6306, #6071, #1953)
-- Backends: GLFW: Added support on Win32 only for io.AddMouseSourceEvent() to discriminate
- Mouse/TouchScreen/Pen. (#2334, #2702)
-- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
-- Backends: Android: Added support for io.AddMouseSourceEvent() to discriminate Mouse/TouchScreen/Pen.
- (#6315) [@PathogenDavid]
-- Backends: OSX: Added support for io.AddMouseSourceEvent() to discriminate Mouse/Pen.
- (#6314) [@PathogenDavid]
-- Backends: WebGPU: Align buffers. Use WGSL shaders instead of SPIR-V. Add gamma uniform. (#6188) [@eliemichel]
-- Backends: WebGPU: Reorganized to store data in io.BackendRendererUserData like other backends.
-- Examples: Vulkan: Fixed validation errors with newer VulkanSDK by explicitly querying and enabling
- "VK_KHR_get_physical_device_properties2", "VK_KHR_portability_enumeration", and
- VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR. (#6109, #6172, #6101)
-- Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects,
- now that VS 2022 17.6 Preview 2 support adding Debug Step Filter spec files into projects.
-- Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243)
-- TestSuite: Added variety of new regression tests and improved/amended existing ones
- in imgui_test_engine/ repo. [@PathogenDavid, @ocornut]
-
-
------------------------------------------------------------------------
- VERSION 1.89.4 (Released 2023-03-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.4
-
-Breaking Changes:
-
-- Renamed PushAllowKeyboardFocus()/PopAllowKeyboardFocus() to PushTabStop()/PopTabStop().
- Kept inline redirection functions (will obsolete).
-- Moved the optional "courtesy maths operators" implementation from imgui_internal.h in imgui.h.
- Even though we encourage using your own maths types and operators by setting up IM_VEC2_CLASS_EXTRA,
- it has been frequently requested by people to use our own. We had an opt-in define which was
- previously fulfilled by imgui_internal.h. It is now fulfilled by imgui.h. (#6164, #6137, #5966, #2832)
- OK: #define IMGUI_DEFINE_MATH_OPERATORS / #include "imgui.h" / #include "imgui_internal.h"
- Error: #include "imgui.h" / #define IMGUI_DEFINE_MATH_OPERATORS / #include "imgui_internal.h"
- Added a dedicated compile-time check message to help diagnose this.
-- Tooltips: Added 'bool' return value to BeginTooltip() for API consistency.
- Please only submit contents and call EndTooltip() if BeginTooltip() returns true.
- In reality the function will _currently_ always return true, but further changes down the
- line may change this, best to clarify API sooner. Updated demo code accordingly.
-- Commented out redirecting enums/functions names that were marked obsolete two years ago:
- - ImGuiSliderFlags_ClampOnInput -> use ImGuiSliderFlags_AlwaysClamp
- - ImGuiInputTextFlags_AlwaysInsertMode -> use ImGuiInputTextFlags_AlwaysOverwrite
- - ImDrawList::AddBezierCurve() -> use ImDrawList::AddBezierCubic()
- - ImDrawList::PathBezierCurveTo() -> use ImDrawList::PathBezierCubicCurveTo()
-
-Other changes:
-
-- Nav: Tabbing now cycles through all items when ImGuiConfigFlags_NavEnableKeyboard is set.
- (#3092, #5759, #787)
- While this was generally desired and requested by many, note that its addition means
- that some types of UI may become more fastidious to use TAB key with, if the navigation
- cursor cycles through too many items. You can mark items items as not tab-spottable:
- - Public API: PushTabStop(false) / PopTabStop()
- - Internal: PushItemFlag(ImGuiItemFlags_NoTabStop, true);
- - Internal: Directly pass ImGuiItemFlags_NoTabStop to ItemAdd() for custom widgets.
-- Nav: Tabbing/Shift+Tabbing can more reliably be used to step out of an item that is not
- tab-stoppable. (#3092, #5759, #787)
-- Nav: Made Enter key submit the same type of Activation event as Space key,
- allowing to press buttons with Enter. (#5606)
- (Enter emulates a "prefer text input" activation vs.
- Space emulates a "prefer tweak" activation which is to closer to gamepad controls).
-- Nav: Fixed an issue with Gamepad navigation when the movement lead to a scroll and
- frame time > repeat rate. Triggering a new move request on the same frame as a move
- result lead to an incorrect calculation and loss of navigation id. (#6171)
-- Nav: Fixed SetItemDefaultFocus() from not scrolling when item is partially visible.
- (#2814, #2812) [@DomGries]
-- Tables: Fixed an issue where user's Y cursor movement within a hidden column would
- have side-effects.
-- IO: Lifted constraint to call io.AddEventXXX functions from current context. (#4921, #5856, #6199)
-- InputText: Fixed not being able to use CTRL+Tab while an InputText() using Tab
- for completion or text data is active (regression from 1.89).
-- Drag and Drop: Fixed handling of overlapping targets when smaller one is submitted
- before and can accept the same data type. (#6183).
-- Drag and Drop: Clear drag and drop state as soon as delivery is accepted in order to
- avoid interferences. (#5817, #6183) [@DimaKoltun]
-- Debug Tools: Added io.ConfigDebugBeginReturnValueOnce / io.ConfigDebugBeginReturnValueLoop
- options to simulate Begin/BeginChild returning false to facilitate debugging user behavior.
-- Demo: Updated to test return value of BeginTooltip().
-- Backends: OpenGL3: Fixed restoration of a potentially deleted OpenGL program. If an active
- program was pending deletion, attempting to restore it would error. (#6220, #6224) [@Cyphall]
-- Backends: Win32: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse positions over
- non-client area (e.g. OS decorations) when app is not focused. (#6045, #6162)
-- Backends: SDL2, SDL3: Accept SDL_GetPerformanceCounter() not returning a monotonically
- increasing value. (#6189, #6114, #3644) [@adamkewley]
-- Backends: GLFW: Avoid using glfwGetError() and glfwGetGamepadState() on Emscripten, which
- recently updated its GLFW emulation layer to GLFW 3.3 without supporting those. (#6240)
-- Examples: Android: Fixed example build for Gradle 8. (#6229, #6227) [@duddel]
-- Examples: Updated all examples application to enable ImGuiConfigFlags_NavEnableKeyboard
- and ImGuiConfigFlags_NavEnableGamepad by default. (#787)
-- Internals: Misc tweaks to facilitate applying an explicit-context patch. (#5856) [@Dragnalith]
-
-
------------------------------------------------------------------------
- VERSION 1.89.3 (Released 2023-02-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.3
-
-Breaking Changes:
-
-- Backends+Examples: SDL2: renamed all unnumbered references to "sdl" to "sdl2".
- This is in prevision for the future release of SDL3 and its associated backend. (#6146)
- - imgui_impl_sdl.cpp -> imgui_impl_sdl2.cpp
- - imgui_impl_sdl.h -> imgui_impl_sdl2.h
- - example_sdl_xxxx/ -> example_sdl2_xxxx/ (folders and projects)
-
-Other changes:
-
-- SeparatorText(): Added SeparatorText() widget. (#1643) [@phed, @ocornut]
- - Added to style: float SeparatorTextBorderSize.
- - Added to style: ImVec2 SeparatorTextAlign, SeparatorTextPadding.
-- Tables: Raised max Columns count from 64 to 512. (#6094, #5305, #4876, #3572)
- The previous limit was due to using 64-bit integers but we moved to bits-array
- and tweaked the system enough to ensure no performance loss.
-- Tables: Solved an ID conflict issue with multiple-instances of a same table,
- due to how unique table instance id was generated. (#6140) [@ocornut, @rodrigorc]
-- Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent
- across backends/os. (#4019, #6096, #1463) [@PathogenDavid, @ocornut, @rokups]
- - Clarified that 'wheel_y > 0.0f' scrolls Up, 'wheel_y < 0.0f' scrolls Down.
- Clarified that 'wheel_x > 0.0f' scrolls Left, 'wheel_x < 0.0f' scrolls Right.
- - Backends: Fixed horizontal scroll direction for Win32 and SDL backends. (#4019)
- - Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463)
- (whereas on OSX machines Shift+WheelY turns into WheelX at the OS level).
- - If you use a custom backend, you should verify horizontal wheel direction.
- - Axes are flipped by OSX for mouse & touch-pad when 'Natural Scrolling' is on.
- - Axes are flipped by Windows for touch-pad when 'Settings->Touchpad->Down motion scrolls up' is on.
- - You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui.
- - Known issues remaining with Emscripten:
- - The magnitude of wheeling values on Emscripten was improved but isn't perfect. (#6096)
- - When running the Emscripten app on a Mac with a mouse, SHIFT+WheelY doesn't turn into WheelX.
- This is because we don't know that we are running on Mac and apply our own Shift+swapping
- on top of OSX's own swapping, so wheel axes are swapped twice. Emscripten apps may need
- to find a way to detect this and set io.ConfigMacOSXBehaviors manually (if you know a way
- let us know!), or offer the "OSX-style behavior" option to their user.
-- Window: Avoid rendering shapes for hidden resize grips.
-- Text: Fixed layouting of wrapped-text block skipping successive empty lines,
- regression from the fix in 1.89.2. (#5720, #5919)
-- Text: Fixed clipping of single-character "..." ellipsis (U+2026 or U+0085) when font
- is scaled. Scaling wasn't taken into account, leading to ellipsis character straying
- slightly out of its expected boundaries. (#2775)
-- Text: Tweaked rendering of three-dots "..." ellipsis variant. (#2775, #4269)
-- InputText: Added support for Ctrl+Delete to delete up to end-of-word. (#6067) [@ajweeks]
- (Not adding Super+Delete to delete to up to end-of-line on OSX, as OSX doesn't have it)
-- InputText: On OSX, inhibit usage of Alt key to toggle menu when active (used for work skip).
-- Menus: Fixed layout of MenuItem()/BeginMenu() when label contains a '\n'. (#6116) [@imkcy9]
-- ColorEdit, ColorPicker: Fixed hue/saturation preservation logic from interfering with
- the displayed value (but not stored value) of others widgets instances. (#6155)
-- PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets.
-- Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130)
-- Fonts: Assert that in each GlyphRanges[] pairs first is <= second.
-- ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when
- color alpha is zero.
-- Misc: Most text functions treat "%s" as a shortcut to no-formatting. (#3466)
-- Misc: Tolerate zero delta-time under Emscripten as backends are imprecise in their
- values for io.DeltaTime, and browser features such as "privacy.resistFingerprinting=true"
- can exacerbate that. (#6114, #3644)
-- Backends: OSX: Fixed scroll/wheel scaling for devices emitting events with
- hasPreciseScrollingDeltas==false (e.g. non-Apple mice).
-- Backends: Win32: flipping WM_MOUSEHWHEEL horizontal value to match other backends and
- offer consistent horizontal scrolling direction. (#4019)
-- Backends: SDL2: flipping SDL_MOUSEWHEEL horizontal value to match other backends and
- offer consistent horizontal scrolling direction. (#4019)
-- Backends: SDL2: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
-- Backends: SDL2: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data
- for smooth scrolling as reported by SDL. (#4019, #6096)
-- Backends: SDL2: Avoid calling SDL_SetCursor() when cursor has not changed, as the function
- is surprisingly costly on Mac with latest SDL (already fixed in SDL latest trunk). (#6113)
-- Backends: SDL2: Implement IME handler to call SDL_SetTextInputRect()/SDL_StartTextInput().
- It will only works with SDL 2.0.18+ if your code calls 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1")'
- prior to calling SDL_CreateWindow(). Updated all examples accordingly. (#6071, #1953)
-- Backends: SDL3: Added experimental imgui_impl_sdl3.cpp backend. (#6146) [@dovker, @ocornut]
- SDL 3.0.0 has not yet been released, so it is possible that its specs/api will change before
- release. This backend is provided as a convenience for early adopters etc. We don't recommend
- switching to SDL3 before it is released.
-- Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate
- scrolling impulses on Emscripten. (#4019, #6096) [@ocornut, @wolfpld, @tolopolarity]
-- Backends: GLFW: Added ImGui_ImplGlfw_SetCallbacksChainForAllWindows() to instruct backend
- to chain callbacks even for secondary viewports/windows. User callbacks may need to test
- the 'window' parameter. (#6142)
-- Backends: OpenGL3: Fixed GL loader compatibility with 2.x profiles. (#6154, #4445, #3530) [@grauw]
-- Backends: WebGPU: Fixed building for latest WebGPU specs (remove implicit layout generation).
- (#6117, #4116, #3632) [@tonygrue, @bfierz]
-- Examples: refactored SDL2+GL and GLFW+GL examples to compile with Emscripten.
- (#2492, #2494, #3699, #3705) [@ocornut, @nicolasnoble]
- The dedicated example_emscripten_opengl3/ has been removed.
-- Examples: Added SDL3+GL experimental example. (#6146)
-- Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call
- DefWindowProcW() instead of DefWindowProc() so that title text are correctly converted
- when application is compiled without /DUNICODE. (#5725, #5961, #5975) [@markreidvfx]
-- Examples: SDL2+SDL_Renderer: Added call to SDL_RenderSetScale() to fix display on a
- Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931).
-
-
------------------------------------------------------------------------
- VERSION 1.89.2 (Released 2023-01-05)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.2
-
-All changes:
-
-- Tables, Nav, Scrolling: fixed scrolling functions and focus tracking with frozen rows and
- frozen columns. Windows now have a better understanding of outer/inner decoration sizes,
- which should later lead us toward more flexible uses of menu/status bars. (#5143, #3692)
-- Tables, Nav: frozen columns are not part of menu layer and can be crossed over. (#5143, #3692)
-- Tables, Columns: fixed cases where empty columns may lead to empty ImDrawCmd. (#4857, #5937)
-- Tables: fixed matching width of synchronized tables (multiple tables with same id) when only
- some instances have a vertical scrollbar and not all. (#5920)
-- Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with
- zero triangles, which would makes the render loop of some backends assert (e.g. Metal with
- debugging, Allegro). (#4857, #5937)
-- Inputs, IO: reworked ImGuiMod_Shortcut to redirect to Ctrl/Super at runtime instead of
- compile-time, being consistent with our support for io.ConfigMacOSXBehaviors and making it
- easier for bindings generators to process that value. (#5923, #456)
-- Inputs, Scrolling: better selection of scrolling window when hovering nested windows
- and when backend/OS is emitting dual-axis wheeling inputs (typically touch pads on macOS).
- We now select a primary axis based on recent events, and select a target window based on it.
- We expect this behavior to be further improved/tweaked. (#3795, #4559) [@ocornut, @folays]
-- InputText: fixed cursor navigation when pressing Up Arrow on the last character of a
- multiline buffer which doesn't end with a carriage return. (#6000)
-- Text: fixed layouting of wrapped-text block when the last source line is above the
- clipping region. Regression added in 1.89. (#5720, #5919)
-- Misc: added GetItemID() in public API. It is not often expected that you would use this,
- but it is useful for Shortcut() and upcoming owner-aware input functions which wants to
- be implemented with public API.
-- Fonts: imgui_freetype: fixed a packing issue which in some occurrences would prevent large
- amount of glyphs from being packed correctly. (#5788, #5829)
-- Fonts: added a 'void* UserData' field in ImFontAtlas, as a convenience for use by
- applications using multiple font atlases.
-- Demo: simplified "Inputs" section, moved contents to Metrics->Inputs.
-- Debug Tools: Metrics: added "Inputs" section, moved from Demo for consistency.
-- Misc: fixed parameters to IMGUI_DEBUG_LOG() not being dead-stripped when building
- with IMGUI_DISABLE_DEBUG_TOOLS is used. (#5901) [@Teselka]
-- Misc: fixed compile-time detection of SSE features on MSVC 32-bits builds. (#5943) [@TheMostDiligent]
-- Examples: DirectX10, DirectX11: try WARP software driver if hardware driver is not available. (#5924, #5562)
-- Backends: GLFW: Fixed mods state on Linux when using Alt-GR text input (e.g. German keyboard layout), which
- could lead to broken text input. Revert a 2022/01/17 change were we resumed using mods provided by GLFW,
- turns out they are faulty in this specific situation. (#6034)
-- Backends: Allegro5: restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5. (#5937) [@Espyo]
-- Backends: Vulkan: Fixed sampler passed to ImGui_ImplVulkan_AddTexture() not being honored as we were using
- an immutable sampler. (#5502, #6001, #914) [@martin-ejdestig, @rytisss]
-
-
------------------------------------------------------------------------
- VERSION 1.89.1 (Released 2022-11-24)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.1
-
-Other changes:
-
-- Scrolling, Focus: fixed SetKeyboardFocusHere()/SetItemDefaultFocus() during a window-appearing
- frame (and associated lower-level functions e.g. ScrollToRectEx()) from not centering item. (#5902)
-- Inputs: fixed moving a window or drag and dropping from preventing input-owner-unaware code
- from accessing keys. (#5888, #4921, #456)
-- Inputs: fixed moving a window or drag and dropping from capturing mods. (#5888, #4921, #456)
-- Layout: fixed End()/EndChild() incorrectly asserting if users manipulates cursor position
- inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (#5548, #5911)
-- Combo: fixed selected item (marked with SetItemDefaultFocus()) from not being centered when
- the combo window initially appears. (#5902).
-- ColorEdit: fixed label overlapping when using style.ColorButtonPosition == ImGuiDir_Left to
- move the color button on the left side (regression introduced in 1.88 WIP 2022/02/28). (#5912)
-- Drag and Drop: fixed GetDragDropPayload() returning a non-NULL value if a drag source is
- active but a payload hasn't been submitted yet. This is convenient to detect new payload
- from within a drag source handler. (#5910, #143)
-- Backends: GLFW: cancel out errors emitted by glfwGetKeyName() when a name is missing. (#5908)
-- Backends: WebGPU: fixed validation error with default depth buffer settings. (#5869, #5914) [@kdchambers]
-
-
------------------------------------------------------------------------
- VERSION 1.89 (Released 2022-11-15)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89
-
-Breaking changes:
-
-- Layout: Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
- This relates to when moving the cursor position beyond current boundaries WITHOUT submitting an item.
- - Previously this would make the window content size ~200x200:
- Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
- - Instead, please submit an item:
- Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + Dummy(ImVec2(0,0)) + End();
- - Alternative:
- Begin(...) + Dummy(ImVec2(200,200)) + End();
- Content size is now only extended when submitting an item.
- With '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will now be detected and assert.
- Without '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will silently be fixed until we obsolete it.
- (This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150,
- threads have been amended to refer to this issue).
-- Inputs: ImGuiKey is now a typed enum, allowing ImGuiKey_XXX symbols to be named in debuggers. (#4921)
- This will require uses of legacy backend-dependent indices to be casted, e.g.
- - with imgui_impl_glfw: IsKeyPressed(GLFW_KEY_A) -> IsKeyPressed((ImGuiKey)GLFW_KEY_A);
- - with imgui_impl_win32: IsKeyPressed('A') -> IsKeyPressed((ImGuiKey)'A')
- - etc. however if you are upgrading code you might as well use the backend-agnostic IsKeyPressed(ImGuiKey_A) now.
-- Renamed and merged keyboard modifiers key enums and flags into a same set: (#4921, #456)
- - ImGuiKey_ModCtrl and ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl
- - ImGuiKey_ModShift and ImGuiModFlags_Shift -> ImGuiMod_Shift
- - ImGuiKey_ModAlt and ImGuiModFlags_Alt -> ImGuiMod_Alt
- - ImGuiKey_ModSuper and ImGuiModFlags_Super -> ImGuiMod_Super
- Kept inline redirection enums (will obsolete).
- This change simplifies a few things, reduces confusion, and will facilitate upcoming
- shortcut/input ownership apis.
- - The ImGuiKey_ModXXX were introduced in 1.87 and mostly used by backends.
- - The ImGuiModFlags_XXX have been exposed in imgui.h but not really used by any public api,
- only by third-party extensions. They were however subject to a recent rename
- (ImGuiKeyModFlags_XXX -> ImGuiModFlags_XXX) and we are exceptionally commenting out
- the older ImGuiKeyModFlags_XXX names ahead of obsolescence schedule to reduce confusion
- and because they were not meant to be used anyway.
-- Removed io.NavInputs[] and ImGuiNavInput enum that were used to feed gamepad inputs.
- Basically 1.87 already obsoleted them from the backend's point of view, but internally
- our navigation code still used this array and enum, so they were still present.
- Not anymore! (#4921, #4858, #787, #1599, #323)
- Transition guide:
- - Official backends from 1.87+ -> no issue.
- - Official backends from 1.60 to 1.86 -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need updating!
- - Custom backends not writing to io.NavInputs[] -> no issue.
- - Custom backends writing to io.NavInputs[] -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need fixing!
- - TL;DR: Backends should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values instead of filling io.NavInput[].
- The ImGuiNavInput enum was essentially 1.60's attempt to combine keyboard and gamepad inputs with named
- semantic, but the additional indirection and copy added complexity and got in the way of other
- incoming work. User's code (other than backends) should not be affected, unless you have custom
- widgets intercepting navigation events via the named enums (in which case you can upgrade your code).
-- DragInt()/SliderInt(): Removed runtime patching of invalid "%f"/"%.0f" types of format strings.
- This was obsoleted in 1.61 (May 2018). See 1.61 changelog for details.
-- Changed signature of ImageButton() function: (#5533, #4471, #2464, #1390)
- - Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter.
- - Old signature: bool ImageButton(ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), int frame_padding = -1, ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- - used the ImTextureID value to create an ID. This was inconsistent with other functions, led to ID conflicts, and caused problems with engines using transient ImTextureID values.
- - had a FramePadding override which was inconsistent with other functions and made the already-long signature even longer.
- - New signature: bool ImageButton(const char* str_id, ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- - requires an explicit identifier. You may still use e.g. PushID() calls and then pass an empty identifier.
- - always uses style.FramePadding for padding, to be consistent with other buttons. You may use PushStyleVar() to alter this.
- - As always we are keeping a redirection function available (will obsolete later).
-- Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)'. (#1057)
- Must always pass a pointer value explicitly, NULL/nullptr is ok but require cast, e.g. TreePush((void*)nullptr);
- If you used TreePush() replace with TreePush((void*)NULL);
-- Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (#255)
- They only made sense before we could use IMGUI_USER_CONFIG.
-
-Other Changes:
-
-- Popups & Modals: fixed nested Begin() inside a popup being erroneously input-inhibited.
- While it is unusual, you can nest a Begin() inside a popup or modal, it is occasionally
- useful to achieve certain things (e.g. to implement suggestion popups #718, #4461).
-- Inputs: Standard widgets now claim for key/button ownership and test for them.
- - Fixes scenario where e.g. a Popup with a Selectable() reacting on mouse down
- (e.g. double click) closes, and behind it is another window with an item reacting
- on mouse up. Previously this would lead to both items reacting, now the item in the
- window behind won't react on the mouse up since the mouse button ownership has already
- been claimed earlier.
- - Internals: There are MANY more aspects to this changes. Added experimental/internal APIs
- to allow handling input/shorting routing and key ownership. Things will be moved into
- public APIs over time. For now this release is a way to test the solidity of underlying
- systems while letting early adopters adopters toy with internals.
- (#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
-- Scrolling: Tweak mouse-wheel locked window timer so it is shorter but also gets reset
- whenever scrolling again. Modulate for small (sub-pixel) amounts. (#2604)
-- Scrolling: Mitigated issue where multi-axis mouse-wheel inputs (usually from touch pad
- events) are incorrectly locking scrolling in a parent window. (#4559, #3795, #2604)
-- Scrolling: Exposed SetNextWindowScroll() in public API. Useful to remove a scrolling
- delay in some situations where e.g. windows need to be synced. (#1526)
-- InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing
- Enter keep the input active and select all text.
-- InputText: numerical fields automatically accept full-width characters (U+FF01..U+FF5E)
- by converting them to half-width (U+0021..U+007E).
-- InputText: added ImGuiInputTextFlags_EscapeClearsAll flag: first press on Escape clears
- text if any, second press deactivate the InputText(). (#5688, #2620)
-- InputText: added support for shift+click style selection. (#5619) [@procedural]
-- InputText: clarified that callbacks cannot modify buffer when using the ReadOnly flag.
-- InputText: fixed minor one-frame selection glitch when reverting with Escape.
-- ColorEdit3: fixed id collision leading to an assertion. (#5707)
-- IsItemHovered: Added ImGuiHoveredFlags_DelayNormal and ImGuiHoveredFlags_DelayShort flags,
- allowing to introduce a shared delay for tooltip idioms. The delays are respectively
- io.HoverDelayNormal (default to 0.30f) and io.HoverDelayShort (default to 0.10f). (#1485)
-- IsItemHovered: Added ImGuiHoveredFlags_NoSharedDelay to disable sharing delays between items,
- so moving from one item to a nearby one will requires delay to elapse again. (#1485)
-- Tables: activating an ID (e.g. clicking button inside) column doesn't prevent columns
- output flags from having ImGuiTableColumnFlags_IsHovered set. (#2957)
-- Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the
- next row in such state where subsequent SameLine() would move back to previous row.
-- Tabs: Fixed a crash when closing multiple windows (possible with docking only) with an
- appended TabItemButton(). (#5515, #3291) [@rokups]
-- Tabs: Fixed shrinking policy leading to infinite loops when fed unrounded tab widths. (#5652)
-- Tabs: Fixed shrinking policy sometimes erroneously making right-most tabs stray a little out
- bar boundaries (bug in 1.88). (#5652).
-- Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
-- Window: Fixed a potential crash when appending to a child window. (#5515, #3496, #4797) [@rokups]
-- Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
-- Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). (#5843)
-- Window: Fixed position not being clamped while auto-resizing (fixes appearing windows without
- .ini data from moving for a frame when using io.ConfigWindowsMoveFromTitleBarOnly). (#5843)
-- IO: Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456)
-- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
- can apply to mouse data as well. (#4921)
-- IO: Filter duplicate input events during the AddXXX() calls. (#5599, #4921)
-- IO: Fixed AddFocusEvent(false) to also clear MouseDown[] state. (#4921)
-- Menus: Fixed incorrect sub-menu parent association when opening a menu by closing another.
- Among other things, it would accidentally break part of the closing heuristic logic when moving
- towards a sub-menu. (#2517, #5614). [@rokups]
-- Menus: Fixed gaps in closing logic which would make child-menu erroneously close when crossing
- the gap between a menu item inside a window and a child-menu in a secondary viewport. (#5614)
-- Menus: Fixed using IsItemHovered()/IsItemClicked() on BeginMenu(). (#5775)
-- Menus, Popups: Experimental fix for issue where clicking on an open BeginMenu() item called from
- a window which is neither a popup neither a menu used to incorrectly close and reopen the menu
- (the fix may have side-effect and is labelled as experimental as we may need to revert). (#5775)
-- Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item
- in parent window when the parent is not a popup. (#5730)
-- Menus, Nav: Fixed not being able to close a menu with Left arrow when parent is not a popup. (#5730)
-- Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple
- BeginMenu() call with same names). (#1207)
-- Menus: Fixed a one-frame issue where SetNextWindowXXX data are not consumed by a BeginMenu()
- returning false.
-- Nav: Fixed moving/resizing window with gamepad or keyboard when running at very high framerate.
-- Nav: Pressing Space/GamepadFaceDown on a repeating button uses the same repeating rate as a mouse hold.
-- Nav: Fixed an issue opening a menu with Right key from a non-menu window.
-- Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region,
- which would result in an abnormal number of vertices created (was slower and more likely to
- asserts with 16-bits ImDrawVtx). (#5720)
-- Fonts: Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (#5676, #5727) [@azonenberg]
-- ImDrawList: Not using alloca() anymore, lift single polygon size limits. (#5704, #1811)
- - Note: now using a temporary buffer stored in ImDrawListSharedData.
- This change made it more visible than you cannot append to multiple ImDrawList from multiple
- threads if they share the same ImDrawListSharedData. Previously it was a little more likely
- for this to "accidentally" work, but was already incorrect. (#6167)
-- Platform IME: [Windows] Removed call to ImmAssociateContextEx() leading to freeze on some setups.
- (#2589, #5535, #5264, #4972)
-- Misc: better error reporting for PopStyleColor()/PopStyleVar() + easier to recover. (#1651)
-- Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138)
-- Debug Tools: Debug Log: Visually locate items when hovering a 0xXXXXXXXX value. (#5855)
-- Debug Tools: Debug Log: Added 'IO' and 'Clipper' events logging. (#5855)
-- Debug Tools: Metrics: Visually locate items when hovering a 0xXXXXXXXX value (in most places).
-- Debug Tools: Item Picker: Mouse button can be changed by holding Ctrl+Shift, making it easier
- to use the Item Picker in e.g. menus. (#2673)
-- Docs: Fixed various typos in comments and documentations. (#5649, #5675, #5679) [@tocic, @lessigsx]
-- Demo: Improved "Constrained-resizing window" example, more clearly showcase aspect-ratio. (#5627)
-- Demo: Added more explicit "Center window" mode to "Overlay example". (#5618)
-- Demo: Fixed Log & Console from losing scrolling position with Auto-Scroll when child is clipped. (#5721)
-- Examples: Added all SDL examples to default VS solution.
-- Examples: Win32: Always use RegisterClassW() to ensure windows are Unicode. (#5725)
-- Examples: Android: Enable .ini file loading/saving into application internal data folder. (#5836) [@rewtio]
-- Backends: GLFW: Honor GLFW_CURSOR_DISABLED by not setting mouse position. (#5625) [@scorpion-26]
-- Backends: GLFW: Add glfwGetError() call on GLFW 3.3 to inhibit missing mouse cursor errors. (#5785) [@mitchellh]
-- Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows
- (e.g. for multi-viewport support) and don't capture mouse when drag and dropping. (#5710)
-- Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was
- registered as MBCS (not Unicode). (#5725, #1807, #471, #2815, #1060) [@or75, @ocornut]
-- Backends: OSX: Fixed mouse inputs on flipped views. (#5756) [@Nemirtingas]
-- Backends: OSX: Fixed mouse coordinate before clicking on the host window. (#5842) [@maezawa-akira]
-- Backends: OSX: Fixes to support full app creation in C++. (#5403) [@stack]
-- Backends: OpenGL3: Reverted use of glBufferSubData(), too many corruptions issues were reported,
- and old leaks issues seemingly can't be reproed with Intel drivers nowadays (revert earlier changes).
- (#4468, #4504, #3381, #2981, #4825, #4832, #5127).
-- Backends: Metal: Use __bridge for ARC based systems. (#5403) [@stack]
-- Backends: Metal: Add dispatch synchronization. (#5447) [@luigifcruz]
-- Backends: Metal: Update deprecated property 'sampleCount'->'rasterSampleCount'. (#5603) [@dcvz]
-- Backends: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symmetry. (#914, #5738).
-- Backends: WebGPU: fixed rendering when a depth buffer is enabled. (#5869) [@brainlag]
-
-
------------------------------------------------------------------------
- VERSION 1.88 (Released 2022-06-21)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.88
-
-Breaking changes:
-
-- Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS for correctness.
- Kept support for old define (will obsolete).
-- Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse()
- and SetNextFrameWantCaptureKeyboard() to clarify purpose, old name was too misleading.
- Kept inline redirection functions (will obsolete).
-- Renamed ImGuiKeyModFlags to ImGuiModFlags. Kept inline redirection enums (will obsolete).
- (This was never used in public API functions but technically present in imgui.h and ImGuiIO).
-- Backends: OSX: Removed ImGui_ImplOSX_HandleEvent() from backend API in favor of backend
- automatically handling event capture. Examples that are using the OSX backend have removed
- all the now-unnecessary calls to ImGui_ImplOSX_HandleEvent(), applications can do as well.
- [@stuartcarnie] (#4821)
-- Internals: calling ButtonBehavior() without calling ItemAdd() now requires a KeepAliveID()
- call. This is because the KeepAliveID() call was moved from GetID() to ItemAdd(). (#5181)
-
-Other Changes:
-
-- IO: Fixed backward-compatibility regression introduced in 1.87: (#4921, #4858)
- - Direct accesses to io.KeysDown[] with legacy indices didn't work (with new backends).
- - Direct accesses to io.KeysDown[GetKeyIndex(XXX)] would access invalid data (with old/new backends).
- - Calling IsKeyDown() didn't have those problems, and is recommended as io.KeysDown[] is obsolete.
-- IO: Fixed input queue trickling of interleaved keys/chars events (which are frequent especially
- when holding down a key as OS submits chars repeat events) delaying key presses and mouse movements.
- In particular, using the input system for fast game-like actions (e.g. WASD camera move) would
- typically have been impacted, as well as holding a key while dragging mouse. Constraints have
- been lifted and are now only happening when e.g. an InputText() widget is active. (#4921, #4858)
- Note that even thought you shouldn't need to disable io.ConfigInputTrickleEventQueue, you can
- technically dynamically change its setting based on the context (e.g. disable only when hovering
- or interacting with a game/3D view).
-- IO: Fixed input queue trickling of mouse wheel events: multiple wheel events are merged, while
- a mouse pos followed by a mouse wheel are now trickled. (#4921, #4821)
-- IO: Added io.SetAppAcceptingEvents() to set a master flag for accepting key/mouse/characters
- events (default to true). Useful if you have native dialog boxes that are interrupting your
- application loop/refresh, and you want to disable events being queued while your app is frozen.
-- Windows: Fixed first-time windows appearing in negative coordinates from being initialized
- with a wrong size. This would most often be noticeable in multi-viewport mode (docking branch)
- when spawning a window in a monitor with negative coordinates. (#5215, #3414) [@DimaKoltun]
-- Clipper: Fixed a regression in 1.86 when not calling clipper.End() and late destructing the
- clipper instance. High-level languages (Lua,Rust etc.) would typically be affected. (#4822)
-- Layout: Fixed mixing up SameLine() and SetCursorPos() together from creating situations where line
- height would be emitted from the wrong location (e.g. 'ItemA+SameLine()+SetCursorPos()+ItemB' would
- emit ItemA worth of height from the position of ItemB, which is not necessarily aligned with ItemA).
-- Sliders: An initial click within the knob/grab doesn't shift its position. (#1946, #5328)
-- Sliders, Drags: Fixed dragging when using hexadecimal display format string. (#5165, #3133)
-- Sliders, Drags: Fixed manual input when using hexadecimal display format string. (#5165, #3133)
-- InputScalar: Fixed manual input when using %03d style width in display format string. (#5165, #3133)
-- InputScalar: Automatically allow hexadecimal input when format is %X (without extra flag).
-- InputScalar: Automatically allow scientific input when format is float/double (without extra flag).
-- Nav: Fixed nav movement in a scope with only one disabled item from focusing the disabled item. (#5189)
-- Nav: Fixed issues with nav request being transferred to another window when calling SetKeyboardFocusHere()
- and simultaneous changing window focus. (#4449)
-- Nav: Changed SetKeyboardFocusHere() to not behave if a drag or window moving is in progress.
-- Nav: Fixed inability to cancel nav in modal popups. (#5400) [@rokups]
-- IsItemHovered(): added ImGuiHoveredFlags_NoNavOverride to disable the behavior where the
- return value is overridden by focus when gamepad/keyboard navigation is active.
-- InputText: Fixed pressing Tab emitting two tabs characters because of dual Keys/Chars events being
- trickled with the new input queue (happened on some backends only). (#2467, #1336)
-- InputText: Fixed a one-frame display glitch where pressing Escape to revert after a deletion
- would lead to small garbage being displayed for one frame. Curiously a rather old bug! (#3008)
-- InputText: Fixed an undo-state corruption issue when editing main buffer before reactivating item. (#4947)
-- InputText: Fixed an undo-state corruption issue when editing in-flight buffer in user callback.
- (#4947, #4949] [@JoshuaWebb]
-- Tables: Fixed incorrect border height used for logic when resizing one of several synchronized
- instance of a same table ID, when instances have a different height. (#3955).
-- Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. (#5276)
-- Tables: Fixed draw-call merging of last column. Depending on some unrelated settings (e.g. BorderH)
- merging draw-call of the last column didn't always work (regression since 1.87). (#4843, #4844) [@rokups]
-- Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate.
-- ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label.
-- Tabs: BeginTabItem() now reacts to SetNextItemWidth(). (#5262)
-- Tabs: Tweak shrinking policy so that while resizing tabs that don't need shrinking keep their
- initial width more precisely (without the occasional +1 worth of width).
-- Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window
- always lead to menu closure. Fixes using items that are not MenuItem() or BeginItem() at the root
- level of a popup with a child menu opened.
-- Menus: Menus emitted from the main/scrolling layer are not part of the same menu-set as menus emitted
- from the menu-bar, avoiding accidental hovering from one to the other. (#3496, #4797) [@rokups]
-- Style: Adjust default value of GrabMinSize from 10.0f to 12.0f.
-- Stack Tool: Added option to copy item path to clipboard. (#4631)
-- Settings: Fixed out-of-bounds read when .ini file on disk is empty. (#5351) [@quantum5]
-- Settings: Fixed some SetNextWindowPos/SetNextWindowSize API calls not marking settings as dirty.
-- DrawList: Fixed PathArcTo() emitting terminating vertices too close to arc vertices. (#4993) [@thedmd]
-- DrawList: Fixed texture-based anti-aliasing path with RGBA textures (#5132, #3245) [@cfillion]
-- DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)
-- DrawList: Circle with a radius smaller than 0.5f won't appear, to be consistent with other primitives. [@thedmd]
-- Debug Tools: Debug Log: Added ShowDebugLogWindow() showing an opt-in synthetic log of principal events
- (focus, popup, active id changes) helping to diagnose issues.
-- Debug Tools: Added DebugTextEncoding() function to facilitate diagnosing issues when not sure about
- whether you have a UTF-8 text encoding issue or a font loading issue. [@LaMarche05, @ocornut]
-- Demo: Add better demo of how to use SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard().
-- Metrics: Added a "UTF-8 Encoding Viewer" section using the aforementioned DebugTextEncoding() function.
-- Metrics: Added "InputText" section to visualize internal state (#4947, #4949).
-- Misc: Fixed calling GetID("label") _before_ a widget emitting this item inside a group (such as InputInt())
- from causing an assertion when closing the group. (#5181).
-- Misc: Fixed IsAnyItemHovered() returning false when using navigation.
-- Misc: Allow redefining IM_COL32_XXX layout macros to facilitate use on big-endian systems. (#5190, #767, #844)
-- Misc: Added IMGUI_STB_SPRINTF_FILENAME to support custom path to stb_sprintf. (#5068, #2954) [@jakubtomsu]
-- Misc: Added constexpr to ImVec2/ImVec4 inline constructors. (#4995) [@Myriachan]
-- Misc: Updated stb_truetype.h from 1.20 to 1.26 (many fixes). (#5075)
-- Misc: Updated stb_textedit.h from 1.13 to 1.14 (our changes so this effectively is a no-op). (#5075)
-- Misc: Updated stb_rect_pack.h from 1.00 to 1.01 (minor). (#5075)
-- Misc: binary_to_compressed_c tool: Added -nostatic option. (#5021) [@podsvirov]
-- ImVector: Fixed erase() with empty range. (#5009) [@thedmd]
-- Backends: Vulkan: Don't use VK_PRESENT_MODE_MAX_ENUM_KHR as specs state it isn't part of the API. (#5254)
-- Backends: GLFW: Fixed a regression in 1.87 which resulted in keyboard modifiers events being
- reported incorrectly on Linux/X11, due to a bug in GLFW. [@rokups]
-- Backends: GLFW: Fixed untranslated keys when pressing lower case letters on OSX (#5260, #5261) [@cpichard]
-- Backends: SDL: Fixed dragging out viewport broken on some SDL setups. (#5012) [@rokups]
-- Backends: SDL: Added support for extra mouse buttons (SDL_BUTTON_X1/SDL_BUTTON_X2). (#5125) [@sgiurgiu]
-- Backends: SDL, OpenGL3: Fixes to facilitate building on AmigaOS4. (#5190) [@afxgroup]
-- Backends: OSX: Monitor NSKeyUp events to catch missing keyUp for key when user press Cmd + key (#5128) [@thedmd]
-- Backends: OSX, Metal: Store backend data in a per-context struct, allowing to use these backends with
- multiple contexts. (#5203, #5221, #4141) [@noisewuwei]
-- Backends: Metal: Fixed null dereference on exit inside command buffer completion handler. (#5363, #5365) [@warrenm]
-- Backends: OpenGL3: Partially revert 1.86 change of using glBufferSubData(): now only done on Windows and
- Intel GPU, based on querying glGetString(GL_VENDOR). Essentially we got report of accumulating leaks on Intel
- with multi-viewports when using simple glBufferData() without orphaning, and report of corruptions on other
- GPUs with multi-viewports when using orphaning and glBufferSubData(), so currently switching technique based
- on GPU vendor, which unfortunately reinforce the cargo-cult nature of dealing with OpenGL drivers.
- Navigating the space of mysterious OpenGL drivers is particularly difficult as they are known to rely on
- application specific whitelisting. (#4468, #3381, #2981, #4825, #4832, #5127).
-- Backends: OpenGL3: Fix state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING
- and vertex attribute states. [@rokups]
-- Examples: Emscripten+WebGPU: Fix building for latest WebGPU specs. (#3632)
-- Examples: OSX+Metal, OSX+OpenGL: Removed now-unnecessary calls to ImGui_ImplOSX_HandleEvent(). (#4821)
-
-
------------------------------------------------------------------------
- VERSION 1.87 (Released 2022-02-07)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.87
-
-Breaking Changes:
-
-- Removed support for pre-C++11 compilers. We'll stop supporting VS2010. (#4537)
-- Reworked IO mouse input API: (#4921, #4858) [@thedmd, @ocornut]
- - Added io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() functions,
- obsoleting writing directly to io.MousePos, io.MouseDown[], io.MouseWheel, etc.
- - This enable input queue trickling to support low framerates. (#2787, #1992, #3383, #2525, #1320)
- - For all calls to IO new functions, the Dear ImGui context should be bound/current.
-- Reworked IO keyboard input API: (#4921, #2625, #3724) [@thedmd, @ocornut]
- - Added io.AddKeyEvent() function, obsoleting writing directly to io.KeyMap[], io.KeysDown[] arrays.
- - You can use IsKeyDown() instead of reading from io.KeysDown[].
- - For keyboard modifiers, you can call io.AddKeyEvent() with ImGuiKey_ModXXX values,
- obsoleting writing directly to io.KeyCtrl, io.KeyShift etc.
- - Added io.SetKeyEventNativeData() function (optional) to pass native and old legacy indices.
- - Added full range of key enums in ImGuiKey (e.g. ImGuiKey_F1).
- - Added GetKeyName() helper function.
- - Obsoleted GetKeyIndex(): it is now unnecessary and will now return the same value.
- - All keyboard related functions taking 'int user_key_index' now take 'ImGuiKey key':
- - IsKeyDown(), IsKeyPressed(), IsKeyReleased(), GetKeyPressedAmount().
- - Added io.ConfigInputTrickleEventQueue (defaulting to true) to disable input queue trickling.
- - Backward compatibility:
- - All backends updated to use new functions.
- - Old backends populating those arrays should still work!
- - Calling e.g. IsKeyPressed(MY_NATIVE_KEY_XXX) will still work! (for a while)
- - Those legacy arrays will only be disabled if '#define IMGUI_DISABLE_OBSOLETE_KEYIO' is set in your imconfig.
- In a few versions, IMGUI_DISABLE_OBSOLETE_FUNCTIONS will automatically enable IMGUI_DISABLE_OBSOLETE_KEYIO,
- so this will be moved into the regular obsolescence path.
- - BREAKING: If your custom backend used ImGuiKey as mock native indices (e.g. "io.KeyMap[ImGuiKey_A] = ImGuiKey_A")
- this is a use case that will now assert and be breaking for your old backend.
- - Transition guide:
- - IsKeyPressed(MY_NATIVE_KEY_XXX) -> use IsKeyPressed(ImGuiKey_XXX)
- - IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) -> use IsKeyPressed(ImGuiKey_XXX)
- - Backend writing to io.KeyMap[],KeysDown[] -> backend should call io.AddKeyEvent(), if legacy indexing is desired, call io.SetKeyEventNativeData()
- - Basically the trick we took advantage of is that we previously only supported native keycode from 0 to 511,
- so ImGuiKey values can still express a legacy native keycode, and new named keys are all >= 512.
- - This will enable a few things in the future:
- - Access to portable keys allows for backend-agnostic keyboard input code. Until now it was difficult
- to share code using keyboard across project because of this gap. (#2625, #3724)
- - Access to full key ranges will allow us to develop a proper keyboard shortcut system. (#456)
- - io.SetKeyEventNativeData() include native keycode/scancode which may later be exposed. (#3141, #2959)
-- Reworked IO nav/gamepad input API and unifying inputs sources: (#4921, #4858, #787)
- - Added full range of ImGuiKey_GamepadXXXX enums (e.g. ImGuiKey_GamepadDpadUp, ImGuiKey_GamepadR2) to use with
- io.AddKeyEvent(), io.AddKeyAnalogEvent().
- - Added io.AddKeyAnalogEvent() function, obsoleting writing directly to io.NavInputs[] arrays.
-- Renamed ImGuiKey_KeyPadEnter to ImGuiKey_KeypadEnter to align with new symbols. Kept redirection enum. (#2625)
-- Removed support for legacy arithmetic operators (+,+-,*,/) when inputting text into a slider/drag. (#4917, #3184)
- This doesn't break any api/code but a feature that was accessible by end-users (which seemingly no one used).
- (Instead you may implement custom expression evaluators to provide a better version of this).
-- Backends: GLFW: backend now uses glfwSetCursorPosCallback().
- - If calling ImGui_ImplGlfw_InitXXX with install_callbacks=true: nothing to do. is already done for you.
- - If calling ImGui_ImplGlfw_InitXXX with install_callbacks=false: you WILL NEED to register the GLFW callback
- using glfwSetCursorPosCallback() and forward it to the backend function ImGui_ImplGlfw_CursorPosCallback().
-- Backends: SDL: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(), so backend can call
- SDL_GetRendererOutputSize() to obtain framebuffer size valid for hi-dpi. (#4927) [@Clownacy]
-- Commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72 (March-July 2019)
- - ImGui::SetNextTreeNodeOpen() -> use ImGui::SetNextItemOpen()
- - ImGui::GetContentRegionAvailWidth() -> use ImGui::GetContentRegionAvail().x
- - ImGui::TreeAdvanceToLabelPos() -> use ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetTreeNodeToLabelSpacing());
- - ImFontAtlas::CustomRect -> use ImFontAtlasCustomRect
- - ImGuiColorEditFlags_RGB/HSV/HEX -> use ImGuiColorEditFlags_DisplayRGB/HSV/Hex
-- Removed io.ImeSetInputScreenPosFn() in favor of more flexible io.SetPlatformImeDataFn() for IME support.
- Because this field was mostly only ever used by Dear ImGui internally, not by backends nor the vast majority
- of user code, this should only affect a very small fraction for users who are already very IME-aware.
-- Obsoleted 'void* io.ImeWindowHandle' in favor of writing to 'void* ImGuiViewport::PlatformHandleRaw'.
- This removes an incompatibility between 'master' and 'multi-viewports' backends and toward enabling
- better support for IME. Updated backends accordingly. Because the old field is set by existing backends,
- we are keeping it (marked as obsolete).
-
-Other Changes:
-
-- IO: Added event based input queue API, which now trickles events to support low framerates. [@thedmd, @ocornut]
- Previously the most common issue case (button presses in low framerates) was handled by backend. This is now
- handled by core automatically for all kind of inputs. (#4858, #2787, #1992, #3383, #2525, #1320)
- - New IO functions for keyboard/gamepad: AddKeyEvent(), AddKeyAnalogEvent().
- - New IO functions for mouse: AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent().
-- IO: Unified key enums allow using key functions on key mods and gamepad values.
-- Fixed CTRL+Tab into an empty window causing artifacts on the highlight rectangle due to bad reordering on ImDrawCmd.
-- Fixed a situation where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with zero triangles,
- which would makes the draw operation of some backends assert (e.g. Metal with debugging). (#4857)
-- Popups: Fixed a regression crash when a new window is created after a modal on the same frame. (#4920) [@rokups]
-- Popups: Fixed an issue when reopening a same popup multiple times would offset them by 1 pixel on the right. (#4936)
-- Tables, ImDrawListSplitter: Fixed erroneously stripping trailing ImDrawList::AddCallback() when submitted in
- last column or last channel and when there are no other drawing operation. (#4843, #4844) [@hoffstadt]
-- Tables: Fixed positioning of Sort icon on right-most column with some settings (not resizable + no borders). (#4918).
-- Nav: Fixed gamepad navigation in wrapping popups not wrapping all the way. (#4365)
-- Sliders, Drags: Fixed text input of values with a leading sign, common when using a format enforcing sign. (#4917)
-- Demo: draw a section of keyboard in "Inputs > Keyboard, Gamepad & Navigation state" to visualize keys. [@thedmd]
-- Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API,
- now taking a ImGuiPlatformImeData structure which we can more easily extend in the future.
-- Platform IME: moved io.ImeWindowHandle to GetMainViewport()->PlatformHandleRaw.
-- Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME composition window when not used. (#2589) [@actboy168]
-- Platform IME: add ImGuiPlatformImeData::InputLineHeight. (#3113) [@liuliu]
-- Platform IME: [windows] call ImmSetCandidateWindow() to position candidate window.
-- Backends: GLFW: Pass locale::getd keys (matching keyboard layout). Fix e.g. CTRL+A, CTRL+Z, CTRL+Y shortcuts.
- We are now converting GLFW untranslated keycodes back to translated keycodes in order to match the behavior of
- other backend, and facilitate the use of GLFW with lettered-shortcuts API. (#456, #2625)
-- Backends: GLFW: Submit keys and key mods using io.AddKeyEvent(). (#2625, #4921)
-- Backends: GLFW: Submit mouse data using io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() functions. (#4921)
-- Backends: GLFW: Retrieve mouse position using glfwSetCursorPosCallback() + fallback when focused but not hovered/captured.
-- Backends: GLFW: Submit gamepad data using io.AddKeyEvent/AddKeyAnalogEvent() functions, stopped writing to io.NavInputs[]. (#4921)
-- Backends: GLFW: Added ImGui_ImplGlfw_InstallCallbacks()/ImGui_ImplGlfw_RestoreCallbacks() helpers to facilitate user installing
- callbacks after initializing backend. (#4981)
-- Backends: Win32: Submit keys and key mods using io.AddKeyEvent(). (#2625, #4921)
-- Backends: Win32: Retrieve mouse position using WM_MOUSEMOVE/WM_MOUSELEAVE + fallback when focused but not hovered/captured.
-- Backends: Win32: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4921)
-- Backends: Win32: Maintain a MouseButtonsDown mask instead of using ImGui::IsAnyMouseDown() which will be obsoleted.
-- Backends: Win32: Submit gamepad data using io.AddKeyEvent/AddKeyAnalogEvent() functions, stopped writing to io.NavInputs[]. (#4921)
-- Backends: SDL: Pass locale::getd keys (matching keyboard layout). Fix e.g. CTRL+A, CTRL+Z, CTRL+Y shortcuts. (#456, #2625)
-- Backends: SDL: Submit key data using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
-- Backends: SDL: Retrieve mouse position using SDL_MOUSEMOTION/SDL_WINDOWEVENT_LEAVE + fallback when focused but not hovered/captured.
-- Backends: SDL: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4921)
-- Backends: SDL: Maintain a MouseButtonsDown mask instead of using ImGui::IsAnyMouseDown() which will be obsoleted.
-- Backends: SDL: Submit gamepad data using io.AddKeyEvent/AddKeyAnalogEvent() functions, stopped writing to io.NavInputs[]. (#4921)
-- Backends: Allegro5: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
-- Backends: Allegro5: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4921)
-- Backends: OSX: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
-- Backends: OSX: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4921)
-- Backends: OSX: Submit gamepad data using io.AddKeyEvent/AddKeyAnalogEvent() functions, stopped writing to io.NavInputs[]. (#4921)
-- Backends: OSX: Added basic Platform IME support. (#3108, #2598) [@liuliu]
-- Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759)
-- Backends: OSX: Fix building with old Xcode versions that are missing gamepad features. [@rokups]
-- Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui.
-- Backends: Android, GLUT: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
-- Backends: Android, GLUT: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4858)
-- Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init (added in 1.86). (#4468, #4830) [@dymk]
- It would generally not have noticeable side-effect at runtime but would be detected by runtime checkers.
-- Backends: OpenGL3: Fix OpenGL ES2 includes on Apple systems. [@rokups]
-- Backends: Metal: Added Apple Metal C++ API support. (#4824, #4746) [@luigifcruz]
- Enable with '#define IMGUI_IMPL_METAL_CPP' in your imconfig.h file.
-- Backends: Metal: Ignore ImDrawCmd where ElemCount == 0, which are normally not emitted by the library but
- can theoretically be created by user code manipulating a ImDrawList. (#4857)
-- Backends: Vulkan: Added support for ImTextureID as VkDescriptorSet, add ImGui_ImplVulkan_AddTexture(). (#914) [@martty]
-- Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927) [@Clownacy]
-- Backends: WebGPU: Fixed incorrect size parameters in wgpuRenderPassEncoderSetIndexBuffer() and
- wgpuRenderPassEncoderSetVertexBuffer() calls. (#4891) [@FeepsDev]
-
-
------------------------------------------------------------------------
- VERSION 1.86 (Released 2021-12-22)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.86
-
-Breaking Changes:
-
-- Removed CalcListClipping() function. Prefer using ImGuiListClipper which can return non-contiguous ranges.
- Please open an issue if you think you really need this function. (#3841)
-- Backends: OSX: Added NSView* parameter to ImGui_ImplOSX_Init(). (#4759) [@stuartcarnie]
-- Backends: Marmalade: Removed obsolete Marmalade backend (imgui_impl_marmalade.cpp) + example app. (#368, #375)
- Find last supported version at https://github.com/ocornut/imgui/wiki/Bindings
-
-Other Changes:
-
-- Added an assertion for the common user mistake of using "" as an identifier at the root level of a window
- instead of using "##something". Empty identifiers are valid and useful in a very small amount of cases,
- but 99.9% of the time if you need an empty label you should use "##something". (#1414, #2562, #2807, #4008,
- #4158, #4375, #4548, #4657, #4796). READ THE FAQ ABOUT HOW THE ID STACK WORKS -> https://dearimgui.com/faq
-- Added GetMouseClickedCount() function, returning the number of successive clicks. (#3229) [@kudaba]
- (so IsMouseDoubleClicked(ImGuiMouseButton_Left) is same as GetMouseClickedCount(ImGuiMouseButton_Left) == 2,
- but it allows testing for triple clicks and more).
-- Modals: fixed issue hovering popups inside a child windows inside a modal. (#4676, #4527)
-- Modals, Popups, Windows: changes how appearing windows are interrupting popups and modals. (#4317) [@rokups]
- - appearing windows created from within the begin stack of a popup/modal will no longer close it.
- - appearing windows created not within the begin stack of a modal will no longer close the modal,
- and automatically appear behind it.
-- Fixed IsWindowFocused()/IsWindowHovered() issues with child windows inside popups. (#4676)
-- Nav: Ctrl+tabbing to cycle through windows is now enabled regardless of using the _NavEnableKeyboard
- configuration flag. This is part of an effort to generalize the use of keyboard inputs. (#4023, #787).
- Note that while this is active you can also moving windows (with arrow) and resize (shift+arrows).
-- Nav: tabbing now cycles through clipped items and scroll accordingly. (#4449)
-- Nav: pressing PageUp/PageDown/Home/End when in Menu layer automatically moves back to Main layer.
-- Nav: fixed resizing window from borders setting navigation to Menu layer.
-- Nav: prevent child from clipping items when using _NavFlattened and parent has a pending request.
-- Nav: pressing Esc to exit a child window reactivates the Nav highlight if it was disabled by mouse.
-- Nav: with ImGuiConfigFlags_NavEnableSetMousePos enabled: Fixed absolute mouse position when using
- Home/End leads to scrolling. Fixed not setting mouse position when a failed move request (e.g. when
- already at edge) reactivates the navigation highlight.
-- Menus: fixed closing a menu inside a popup/modal by clicking on the popup/modal. (#3496, #4797)
-- Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797) [@xndcn]
-- Menus: fixed menu inside a popup/modal not inhibiting hovering of items in the popup/modal. (#3496, #4797)
-- Menus: fixed sub-menu items inside a popups from closing the popup.
-- Menus: fixed top-level menu from not consistently using style.PopupRounding. (#4788)
-- InputText, Nav: fixed repeated calls to SetKeyboardFocusHere() preventing to use InputText(). (#4682)
-- InputText, Nav: fixed using SetKeyboardFocusHere() on InputTextMultiline(). (#4761)
-- InputText: made double-click select word, triple-line select line. Word delimitation logic differs
- slightly from the one used by CTRL+arrows. (#2244)
-- InputText: fixed ReadOnly flag preventing callbacks from receiving the text buffer. (#4762) [@actondev]
-- InputText: fixed Shift+Delete from not cutting into clipboard. (#4818, #1541) [@corporateshark]
-- InputTextMultiline: fixed incorrect padding when FrameBorder > 0. (#3781, #4794)
-- InputTextMultiline: fixed vertical tracking with large values of FramePadding.y. (#3781, #4794)
-- Separator: fixed cover all columns while called inside a table. (#4787)
-- Clipper: currently focused item is automatically included in clipper range.
- Fixes issue where e.g. drag and dropping an item and scrolling ensure the item source location is
- still submitted. (#3841, #1725) [@GamingMinds-DanielC, @ocornut]
-- Clipper: added ForceDisplayRangeByIndices() to force a given item (or several) to be stepped out
- during a clipping operation. (#3841) [@GamingMinds-DanielC]
-- Clipper: rework so gamepad/keyboard navigation doesn't create spikes in number of items requested
- by the clipper to display. (#3841)
-- Clipper: fixed content height declaration slightly mismatching the value of when not using a clipper.
- (an additional ItemSpacing.y was declared, affecting scrollbar range).
-- Clipper: various and incomplete changes to tame down scrolling and precision issues on very large ranges.
- Passing an explicit height to the clipper now allows larger ranges. (#3609, #3962).
-- Clipper: fixed invalid state when number of frozen table row is smaller than ItemCount.
-- Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceAllowNullID doesn't lose
- tooltip when scrolling. (#143)
-- Fonts: fixed infinite loop in ImFontGlyphRangesBuilder::AddRanges() when passing UINT16_MAX or UINT32_MAX
- without the IMGUI_USE_WCHAR32 compile-time option. (#4802) [@SlavicPotato]
-- Metrics: Added a node showing windows in submission order and showing the Begin() stack.
-- Misc: Added missing ImGuiMouseCursor_NotAllowed cursor for software rendering (when the
- io.MouseDrawCursor flag is enabled). (#4713) [@nobody-special666]
-- Misc: Fixed software mouse cursor being rendered multiple times if Render() is called more than once.
-- Misc: Fix MinGW DLL build issue (when IMGUI_API is defined). [@rokups]
-- CI: Add MinGW DLL build to test suite. [@rokups]
-- Backends: Vulkan: Call vkCmdSetScissor() at the end of render with a full-viewport to reduce
- likelihood of issues with people using VK_DYNAMIC_STATE_SCISSOR in their app without calling
- vkCmdSetScissor() explicitly every frame. (#4644)
-- Backends: OpenGL3: Using buffer orphaning + glBufferSubData(), seems to fix leaks with multi-viewports
- with some Intel HD drivers, and perhaps improve performances. (#4468, #4504, #2981, #3381) [@parbo]
-- Backends: OpenGL2, Allegro5, Marmalade: Fixed mishandling of the ImDrawCmd::IdxOffset field.
- This is an old bug, but due to the way we created drawlists, it never had any visible side-effect before.
- The new code for handling Modal and CTRL+Tab dimming/whitening recently made the bug surface. (#4790)
-- Backends: Win32: Store left/right variants of Ctrl/Shift/Alt mods in KeysDown[] array. (#2625) [@thedmd]
-- Backends: DX12: Fixed DRAW_EMPTY_SCISSOR_RECTANGLE warnings. (#4775)
-- Backends: SDL_Renderer: Added support for large meshes (64k+ vertices) with 16-bit indices,
- enabling 'ImGuiBackendFlags_RendererHasVtxOffset' in the backend. (#3926) [@rokups]
-- Backends: SDL_Renderer: Fix for SDL 2.0.19+ RenderGeometryRaw() API signature change. (#4819) [@sridenour]
-- Backends: OSX: Generally fix keyboard support. Keyboard arrays indexed using kVK_* codes, e.g.
- ImGui::IsKeyPressed(kVK_Space). Don't set mouse cursor shape unconditionally. Handle two fingers scroll
- cancel event. (#4759, #4253, #1873) [@stuartcarnie]
-- Backends: OSX: Add Game Controller support (need linking GameController framework) (#4759) [@stuartcarnie]
-- Backends: WebGPU: Passing explicit buffer sizes to wgpuRenderPassEncoderSetVertexBuffer() and
- wgpuRenderPassEncoderSetIndexBuffer() functions as validation layers appears to not do what the
- in-flux specs says. (#4766) [@meshula]
-
-
------------------------------------------------------------------------
- VERSION 1.85 (Released 2021-10-12)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.85
-
-This is the last release officially supporting C++03 and Visual Studio 2008/2010. (#4537)
-We expect that the next release will require a subset of the C++11 language (VS 2012~, GCC 4.8.1, Clang 3.3).
-We may use some C++11 language features but we will not use any C++ library headers.
-If you are stuck on ancient compiler you may need to stay at this version onward.
-
-Breaking Changes:
-
-- Removed GetWindowContentRegionWidth() function. Kept inline redirection helper.
- Can use 'GetWindowContentRegionMax().x - GetWindowContentRegionMin().x' instead but it's not
- very useful in practice, and the only use of it in the demo was illfit.
- Using 'GetContentRegionAvail().x' is generally a better choice.
-
-Other Changes:
-
-- Debug: Stack Tool: Added "Stack Tool" available in "Demo->Tools->Stack Tool", "Metrics->Tools",
- or by calling the ShowStackToolWindow() function. The tool run queries on hovered id to display
- details about individual components that were hashed to create an ID. It helps understanding
- the ID stack system and debugging potential ID collisions. (#4631) [@ocornut, @rokups]
-- Windows: Fixed background order of overlapping childs submitted sequentially. (#4493)
-- IsWindowFocused: Added ImGuiFocusedFlags_NoPopupHierarchy flag allowing to exclude child popups
- from the tested windows when combined with _ChildWindows.
-- IsWindowHovered: Added ImGuiHoveredFlags_NoPopupHierarchy flag allowing to exclude child popups
- from the tested windows when combined with _ChildWindows.
-- InputTextMultiline: Fixed label size not being included into window contents rect unless
- the whole widget is clipped.
-- InputText: Allow activating/cancelling/validating input with gamepad nav events. (#2321, #4552)
-- InputText: Fixed selection rectangle appearing one frame late when selecting all.
-- TextUnformatted: Accept null ranges including (NULL,NULL) without asserting, in order to conform
- to common idioms (e.g. passing .data(), .data() + .size() from a null string). (#3615)
-- Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. (#211)
-- Nav: Fixed using SetKeyboardFocusHere() on non-visible/clipped items. It now works and will scroll
- toward the item. When called during a frame where the parent window is appearing, scrolling will
- aim to center the item in the window. When calling during a frame where the parent window is already
- visible, scrolling will aim to scroll as little as possible to make the item visible. We will later
- expose scroll functions and flags in public API to select those behaviors. (#343, #4079, #2352)
-- Nav: Fixed using SetKeyboardFocusHere() from activating a different item on the next frame if
- submitted items have changed during that frame. (#432)
-- Nav: Fixed toggling menu layer with Alt or exiting menu layer with Esc not moving mouse when
- the ImGuiConfigFlags_NavEnableSetMousePos config flag is set.
-- Nav: Fixed a few widgets from not setting reference keyboard/gamepad navigation ID when
- activated with mouse. More specifically: BeginTabItem(), the scrolling arrows of BeginTabBar(),
- the arrow section of TreeNode(), the +/- buttons of InputInt()/InputFloat(), Selectable() with
- ImGuiSelectableFlags_SelectOnRelease. More generally: any direct use of ButtonBehavior() with
- the PressedOnClick/PressedOnDoubleClick/PressedOnRelease button policy.
-- Nav: Fixed an issue with losing focus on docked windows when pressing Alt while keyboard navigation
- is disabled. (#4547, #4439) [@PathogenDavid]
-- Nav: Fixed vertical scoring offset when wrapping on Y in a decorated window.
-- Nav: Improve scrolling behavior when navigating to an item larger than view.
-- TreePush(): removed unnecessary/inconsistent legacy behavior where passing a NULL value to
- the TreePush(const char*) and TreePush(const void*) functions would use a hard-coded replacement.
- The only situation where that change would make a meaningful difference is TreePush((const char*)NULL)
- (_explicitly_ casting a null pointer to const char*), which is unlikely and will now crash.
- You may replace it with anything else.
-- ColorEdit4: Fixed not being able to change hue when saturation is 0. (#4014) [@rokups]
-- ColorEdit4: Fixed hue resetting to 0 when it is set to 255. [@rokups]
-- ColorEdit4: Fixed hue value jitter when source color is stored as RGB in 32-bit integer and perform
- RGB<>HSV round trips every frames. [@rokups]
-- ColorPicker4: Fixed picker being unable to select exact 1.0f color when dragging toward the edges
- of the SV square (previously picked 0.999989986f). (#3517) [@rokups]
-- Menus: Fixed vertical alignments of MenuItem() calls within a menu bar (broken in 1.84). (#4538)
-- Menus: Improve closing logic when moving diagonally in empty between between parent and child menus to
- accommodate for varying font size and dpi.
-- Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510).
-- Menus: Fixed an assertion happening in some situations when closing nested menus (broken in 1.83). (#4640)
-- Drag and Drop: Fixed using BeginDragDropSource() inside a BeginChild() that returned false. (#4515)
-- PlotHistogram: Fixed zero-line position when manually specifying min<0 and max>0. (#4349) [@filippocrocchini]
-- Misc: Added asserts for missing PopItemFlag() calls.
-- Misc: Fixed printf-style format checks on Clang+MinGW. (#4626, #4183, #3592) [@guusw]
-- IO: Added 'io.WantCaptureMouseUnlessPopupClose' alternative to `io.WantCaptureMouse'. (#4480)
- This allows apps to receive the click on void when that click is used to close popup (by default,
- clicking on a void when a popup is open will close the popup but not release io.WantCaptureMouse).
-- Fonts: imgui_freetype: Fixed crash when FT_Render_Glyph() fails to render a glyph and returns NULL
- (which apparently happens with Freetype 2.11). (#4394, #4145?).
-- Fonts: Fixed ImFontAtlas::ClearInputData() marking atlas as not built. (#4455, #3487)
-- Backends: Added more implicit asserts to detect invalid/redundant calls to Shutdown functions. (#4562)
-- Backends: OpenGL3: Fixed our custom GL loader conflicting with user using GL3W. (#4445) [@rokups]
-- Backends: WebGPU: Fixed for latest specs. (#4472, #4512) [@Kangz, @bfierz]
-- Backends: SDL_Renderer: Added SDL_Renderer backend compatible with upcoming SDL 2.0.18. (#3926) [@1bsyl]
-- Backends: Metal: Fixed a crash when clipping rect larger than framebuffer is submitted via
- a direct unclipped PushClipRect() call. (#4464)
-- Backends: OSX: Use mach_absolute_time as CFAbsoluteTimeGetCurrent can jump backwards. (#4557, #4563) [@lfnoise]
-- Backends: All renderers: Normalize clipping rect handling across backends. (#4464)
-- Examples: Added SDL + SDL_Renderer example in "examples/example_sdl_sdlrenderer/" folder. (#3926) [@1bsyl]
-
-
------------------------------------------------------------------------
- VERSION 1.84.2 (Released 2021-08-23)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.84.2
-
-- Disabled: Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [@Legulysse]
-- Backends: OpenGL3: OpenGL: Fixed ES 3.0 shader ("#version 300 es") to use normal precision
- floats. Avoid wobbly rendering at HD resolutions. (#4463) [@nicolasnoble]
-
-
------------------------------------------------------------------------
- VERSION 1.84.1 (Released 2021-08-20)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.84.1
-
-- Disabled: Fixed BeginDisabled(false) - BeginDisabled(true) was working. (#211, #4452, #4453)
-
-
------------------------------------------------------------------------
- VERSION 1.84 (Released 2021-08-20)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.84
-
-Breaking Changes:
-
-- Commented out redirecting functions/enums names that were marked obsolete in 1.67 and 1.69 (March 2019):
- - ImGui::GetOverlayDrawList() -> use ImGui::GetForegroundDrawList()
- - ImFont::GlyphRangesBuilder -> use ImFontGlyphRangesBuilder
-- Backends: OpenGL3: added a third source file "imgui_impl_opengl3_loader.h". (#4445) [@rokups]
-- Backends: GLFW: backend now uses glfwSetCursorEnterCallback(). (#3751, #4377, #2445)
-- Backends: GLFW: backend now uses glfwSetWindowFocusCallback(). (#4388) [@thedmd]
- - If calling ImGui_ImplGlfw_InitXXX with install_callbacks=true: this is already done for you.
- - If calling ImGui_ImplGlfw_InitXXX with install_callbacks=false: you WILL NEED to register the GLFW callbacks
- and forward them to the backend:
- - Register glfwSetCursorEnterCallback, forward events to ImGui_ImplGlfw_CursorEnterCallback().
- - Register glfwSetWindowFocusCallback, forward events to ImGui_ImplGlfw_WindowFocusCallback().
-- Backends: SDL2: removed unnecessary SDL_Window* parameter from ImGui_ImplSDL2_NewFrame(). (#3244) [@funchal]
- Kept inline redirection function (will obsolete).
-- Backends: SDL2: backend needs to set 'SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1")' in order to
- receive mouse clicks events on window focus, otherwise SDL doesn't emit the event. (#3751, #4377, #2445)
- This is unfortunately a global SDL setting, so enabling it _might_ have a side-effect on your application.
- It is unlikely to make a difference, but if your app absolutely needs to ignore the initial on-focus click:
- you can ignore SDL_MOUSEBUTTONDOWN events coming right after a SDL_WINDOWEVENT_FOCUS_GAINED event).
-- Internals: (for custom widgets): because disabled items now sets HoveredId, if you want custom widgets to
- not react as hovered when disabled, in the majority of use cases it is preferable to check the "hovered"
- return value of ButtonBehavior() rather than (HoveredId == id).
-
-Other Changes:
-
-- IO: Added io.AddFocusEvent() api for backend to tell when host window has gained/lost focus. (#4388) [@thedmd]
- If you use a custom backend, consider adding support for this!
-- Disabled: added BeginDisabled()/EndDisabled() api to create a scope where interactions are disabled. (#211)
- - Added style.DisabledAlpha (default to 0.60f) and ImGuiStyleVar_DisabledAlpha. (#211)
- - Unlike the internal-and-undocumented-but-somehow-known PushItemFlag(ImGuiItemFlags_Disabled), this also alters
- visuals. Currently this is done by lowering alpha of all widgets. Future styling system may do that differently.
- - Disabled items set HoveredId, allowing e.g. HoveredIdTimer to run. (#211, #3419) [@rokups]
- - Disabled items more consistently release ActiveId if the active item got disabled. (#211)
- - Nav: Fixed disabled items from being candidate for default focus. (#211, #787)
- - Fixed Selectable() selection not showing when disabled. (#211)
- - Fixed IsItemHovered() returning true on disabled item when navigated to. (#211)
- - Fixed IsItemHovered() when popping disabled state after item, or when using Selectable_Disabled. (#211)
-- Windows: ImGuiWindowFlags_UnsavedDocument/ImGuiTabItemFlags_UnsavedDocument displays a dot instead of a '*' so it
- is independent from font style. When in a tab, the dot is displayed at the same position as the close button.
- Added extra comments to clarify the purpose of this flag in the context of docked windows.
-- Tables: Added ImGuiTableColumnFlags_Disabled acting a master disable over (hidden from user/context menu). (#3935)
-- Tables: Clarified that TableSetColumnEnabled() requires the table to use the ImGuiTableFlags_Hideable flag,
- because it manipulates the user-accessible show/hide state. (#3935)
-- Tables: Added ImGuiTableColumnFlags_NoHeaderLabel to request TableHeadersRow() to not submit label for a column.
- Convenient for some small columns. Name will still appear in context menu. (#4206).
-- Tables: Fixed columns order on TableSetupScrollFreeze() if previous data got frozen columns out of their section.
-- Tables: Fixed invalid data in TableGetSortSpecs() when SpecsDirty flag is unset. (#4233)
-- Tabs: Fixed using more than 32 KB-worth of tab names. (#4176)
-- InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. (#211)
-- InputText: Fixed named filtering flags disabling newline or tabs in multiline inputs (#4409, #4410) [@kfsone]
-- Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. (#4281, #3272)
-- Drag and Drop: Fixed using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip. [@JeffM2501]
-- Menus: MenuItem() and BeginMenu() are not affected/overlapping when style.SelectableTextAlign is altered.
-- Menus: Fixed hovering a disabled menu or menu item not closing other menus. (#211)
-- Popups: Fixed BeginPopup/OpenPopup sequence failing when there are no focused windows. (#4308) [@rokups]
-- Nav: Alt doesn't toggle menu layer if other modifiers are held. (#4439)
-- Fixed printf-style format checks on non-MinGW flavors. (#4183, #3592)
-- Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels.
-- Fonts: Prefer using U+FFFD character for fallback instead of '?', if available. (#4269)
-- Fonts: Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269)
-- Fonts: Added U+FFFD ("replacement character") to default Asian glyphs ranges. (#4269)
-- Fonts: Fixed calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487)
-- DrawList: Fixed AddCircle/AddCircleFilled() with auto-tessellation not using accelerated paths for small circles.
- Fixed AddCircle/AddCircleFilled() with 12 segments which had a broken edge. (#4419, #4421) [@thedmd]
-- Demo: Fixed requirement in 1.83 to link with imgui_demo.cpp if IMGUI_DISABLE_METRICS_WINDOW is not set. (#4171)
- Normally the right way to disable compiling the demo is to set IMGUI_DISABLE_DEMO_WINDOWS, but we want to avoid
- implying that the file is required.
-- Metrics: Fixed a crash when inspecting the individual draw command of a foreground drawlist. [@rokups]
-- Backends: Reorganized most backends (Win32, SDL, GLFW, OpenGL2/3, DX9/10/11/12, Vulkan, Allegro) to pull their
- data from a single structure stored inside the main Dear ImGui context. This facilitate/allow usage of standard
- backends with multiple-contexts BUT is only partially tested and not well supported. It is generally advised to
- instead use the multi-viewports feature of docking branch where a single Dear ImGui context can be used across
- multiple windows. (#586, #1851, #2004, #3012, #3934, #4141)
-- Backends: Win32: Rework to handle certain Windows 8.1/10 features without a manifest. (#4200, #4191)
- - ImGui_ImplWin32_GetDpiScaleForMonitor() will handle per-monitor DPI on Windows 10 without a manifest.
- - ImGui_ImplWin32_EnableDpiAwareness() will call SetProcessDpiAwareness() fallback on Windows 8.1 without a manifest.
-- Backends: Win32: IME functions are disabled by default for non-Visual Studio compilers (MinGW etc.). Enable with
- '#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS' for those compilers. Undo change from 1.82. (#2590, #738, #4185, #4301)
-- Backends: Win32: Mouse position is correctly reported when the host window is hovered but not focused. (#2445, #2696, #3751, #4377)
-- Backends: Win32, SDL2, GLFW, OSX, Allegro: now calling io.AddFocusEvent() on focus gain/loss. (#4388) [@thedmd]
- This allow us to ignore certain inputs on focus loss (previously relied on mouse loss but backends are now
- reporting mouse even when host window is unfocused, as per #2445, #2696, #3751, #4377)
-- Backends: Fixed keyboard modifiers being reported when host window doesn't have focus. (#2622)
-- Backends: GLFW: Mouse position is correctly reported when the host window is hovered but not focused. (#3751, #4377, #2445)
- (backend now uses glfwSetCursorEnterCallback(). If you called ImGui_ImplGlfw_InitXXX with install_callbacks=false, you will
- need to install this callback and forward the data to the backend via ImGui_ImplGlfw_CursorEnterCallback).
-- Backends: SDL2: Mouse position is correctly reported when the host window is hovered but not focused. (#3751, #4377, #2445)
- (enabled with SDL 2.0.5+ as SDL_GetMouseFocus() is only usable with SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH).
-- Backends: DX9: Explicitly disable texture state stages after >= 1. (#4268) [@NZJenkins]
-- Backends: DX12: Fix texture casting crash on 32-bit systems (introduced on 2021/05/19 and v1.83) + added comments
- about building on 32-bit systems. (#4225) [@kingofthebongo2008]
-- Backends: OpenGL3: Embed our own minimal GL headers/loader (imgui_impl_opengl3_loader.h) based on gl3w.
- Reduces the frequent issues and confusion coming from having to support multiple loaders and requiring users to use and
- initialize the same loader as the backend. (#4445) [@rokups]
- Removed support for gl3w, glew, glad, glad2, glbinding2, glbinding3 (all now unnecessary).
-- Backends: OpenGL3: Handle GL_CLIP_ORIGIN on <4.5 contexts if "GL_ARB_clip_control" extension is detected. (#4170, #3998)
-- Backends: OpenGL3: Destroy vertex/fragment shader objects right after they are linked into main shader. (#4244) [@Crowbarous]
-- Backends: OpenGL3: Use OES_vertex_array extension on Emscripten + backup/restore current state. (#4266, #4267) [@harry75369]
-- Backends: GLFW: Installing and exposed ImGui_ImplGlfw_MonitorCallback() for forward compatibility with docking branch.
-- Backends: OSX: Added a fix for shortcuts using CTRL key instead of CMD key. (#4253) [@rokups]
-- Examples: DX12: Fixed handling of Alt+Enter in example app (using swapchain's ResizeBuffers). (#4346) [@PathogenDavid]
-- Examples: DX12: Removed unnecessary recreation of backend-owned device objects when window is resized. (#4347) [@PathogenDavid]
-- Examples: OpenGL3+GLFW,SDL: Remove include cruft to support variety of GL loaders (no longer necessary). [@rokups]
-- Examples: OSX+OpenGL2: Fix event forwarding (fix key remaining stuck when using shortcuts with Cmd/Super key).
- Other OSX examples were not affected. (#4253, #1873) [@rokups]
-- Examples: Updated all .vcxproj to VS2015 (toolset v140) to facilitate usage with vcpkg.
-- Examples: SDL2: Accommodate for vcpkg install having headers in SDL2/SDL.h vs SDL.h.
-
-
------------------------------------------------------------------------
- VERSION 1.83 (Released 2021-05-24)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.83
-
-Breaking Changes:
-
-- Backends: Obsoleted direct access to ImDrawCmd::TextureId in favor of calling ImDrawCmd::GetTexID(). (#3761) [@thedmd]
- - If you are using official backends from the source tree: you have nothing to do.
- - If you copied old backend code or using your own: change access to draw_cmd->TextureId to draw_cmd->GetTexID().
- Why are we doing this?
- - This change will be required in the future when adding support for incremental texture atlas updates.
- - Please note this won't break soon, but we are making the change ahead of time.
-
-Other Changes:
-
-- Scrolling: Fix scroll tracking with e.g. SetScrollHereX/Y() when WindowPadding < ItemSpacing.
-- Scrolling: Fix scroll snapping on edge of scroll region when both scrollbars are enabled.
-- Scrolling: Fix mouse wheel axis swap when using SHIFT on macOS (system already does it). (#4010)
-- Window: Fix IsWindowAppearing() from returning true twice in most cases. (#3982, #1497, #1061)
-- Nav: Fixed toggling menu layer while an InputText() is active not stealing active id. (#787)
-- Nav: Fixed pressing Escape to leave menu layer while in a popup or child window. (#787)
-- Nav, InputText: Fixed accidental menu toggling while typing non-ascii characters using AltGR. [@rokups] (#370)
-- Nav: Fixed using SetItemDefaultFocus() on windows with _NavFlattened flag. (#787)
-- Nav: Fixed Tabbing initial activation from skipping the first item if it is tabbable through. (#787)
-- Nav: Fixed fast CTRL+Tab (where keys are only held for one single frame) from properly enabling the
- menu layer of target window if it doesn't have other active layers.
-- Tables: Expose TableSetColumnEnabled() in public api. (#3935)
-- Tables: Better preserve widths when columns count changes. (#4046)
-- Tables: Sharing more memory buffers between tables, reducing general memory footprints. (#3740)
-- Tabs: Fixed mouse reordering with very fast movements (e.g. crossing multiple tabs in a single
- frame and then immediately standing still (would only affect automation/bots). [@rokups]
-- Menus: made MenuItem() in a menu bar reflect the 'selected' argument with a highlight. (#4128) [@mattelegende]
-- Drags, Sliders, Inputs: Specifying a NULL format to Float functions default them to "%.3f" to be
- consistent with the compile-time default. (#3922)
-- DragScalar: Add default value for v_speed argument to match higher-level functions. (#3922) [@eliasdaler]
-- ColorEdit4: Alpha default to 255 (instead of 0) when omitted in hex input. (#3973) [@squadack]
-- InputText: Fix handling of paste failure (buffer full) which in some cases could corrupt the undo stack. (#4038)
- (fix submitted to https://github.com/nothings/stb/pull/1158) [@Unit2Ed, @ocornut]
-- InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. (#4005) [@dougbinks]
-- InputText: Align caret/cursor to pixel coordinates. (#4080) [@elvissteinjr]
-- InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password
- is used. (#4155, #4156) [@michael-swan]
-- LabelText: Fixed clipping of multi-line value text when label is single-line. (#4004)
-- LabelText: Fixed vertical alignment of single-line value text when label is multi-line. (#4004)
-- Combos: Changed the combo popup to use a different id to also using a context menu with the default item id.
- Fixed using BeginPopupContextItem() with no parameter after a combo. (#4167)
-- Popups: Added 'OpenPopup(ImGuiID id)' overload to facilitate calling from nested stacks. (#3993, #331) [@zlash]
-- Tweak computation of io.Framerate so it is less biased toward high-values in the first 120 frames. (#4138)
-- Optimization: Disabling some of MSVC most aggressive Debug runtime checks for some simple/low-level functions
- (e.g. ImVec2, ImVector) leading to a 10-20% increase of performances with MSVC "default" Debug settings.
-- ImDrawList: Add and use SSE-enabled ImRsqrt() in place of 1.0f / ImSqrt(). (#4091) [@wolfpld]
-- ImDrawList: Fixed/improved thickness of thick strokes with sharp angles. (#4053, #3366, #2964, #2868, #2518, #2183)
- Effectively introduced a regression in 1.67 (Jan 2019), and a fix in 1.70 (Apr 2019) but the fix wasn't actually on
- par with original version. Now incorporating the correct revert.
-- ImDrawList: Fixed PathArcTo() regression from 1.82 preventing use of counter-clockwise angles. (#4030, #3491) [@thedmd]
-- Demo: Improved popups demo and comments.
-- Metrics: Added "Fonts" section with same information as available in "Style Editor">"Fonts".
-- Backends: SDL2: Rework global mouse pos availability check listing supported platforms explicitly,
- effectively fixing mouse access on Raspberry Pi. (#2837, #3950) [@lethal-guitar, @hinxx]
-- Backends: Win32: Clearing keyboard down array when losing focus (WM_KILLFOCUS). (#2062, #3532, #3961)
- [@1025798851]
-- Backends: OSX: Fix keys remaining stuck when CMD-tabbing to a different application. (#3832) [@rokups]
-- Backends: DirectX9: calling IDirect3DStateBlock9::Capture() after CreateStateBlock() which appears to
- workaround/fix state restoring issues. Unknown exactly why so, bit of a cargo-cult fix. (#3857)
-- Backends: DirectX9: explicitly setting up more graphics states to increase compatibility with unusual
- non-default states. (#4063)
-- Backends: DirectX10, DirectX11: fixed a crash when backing/restoring state if nothing is bound when
- entering the rendering function. (#4045) [@Nemirtingas]
-- Backends: GLFW: Adding bound check in KeyCallback because GLFW appears to send -1 on some setups. [#4124]
-- Backends: Vulkan: Fix mapped memory Vulkan validation error when buffer sizes are not multiple of
- VkPhysicalDeviceLimits::nonCoherentAtomSize. (#3957) [@AgentX1994]
-- Backends: WebGPU: Update to latest specs (Chrome Canary 92 and Emscripten 2.0.20). (#4116, #3632) [@bfierz, @Kangz]
-- Backends: OpenGL3: Don't try to read GL_CLIP_ORIGIN unless we're OpenGL 4.5. (#3998, #2366, #2186) [@s7jones]
-- Examples: OpenGL: Add OpenGL ES 2.0 support to modern GL examples. (#2837, #3951) [@lethal-guitar, @hinxx]
-- Examples: Vulkan: Rebuild swapchain on VK_SUBOPTIMAL_KHR. (#3881)
-- Examples: Vulkan: Prefer using discrete GPU if there are more than one available. (#4012) [@rokups]
-- Examples: SDL2: Link with shell32.lib required by SDL2main.lib since SDL 2.0.12. [#3988]
-- Examples: Android: Make Android example build compatible with Gradle 7.0. (#3446)
-- Docs: Improvements to description of using colored glyphs/emojis. (#4169, #3369)
-- Docs: Improvements to minor mistakes in documentation comments (#3923) [@ANF-Studios]
-
-
------------------------------------------------------------------------
- VERSION 1.82 (Released 2021-02-15)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.82
-
-Breaking Changes:
-
-- Removed redirecting functions/enums names that were marked obsolete in 1.66 (September 2018):
- - ImGui::SetScrollHere() --> use ImGui::SetScrollHereY()
-- ImDrawList: upgraded AddPolyline()/PathStroke()'s "bool closed" parameter to use "ImDrawFlags flags".
- - bool closed = false --> use ImDrawFlags_None, or 0
- - bool closed = true --> use ImDrawFlags_Closed
- The matching ImDrawFlags_Closed value is guaranteed to always stay == 1 in the future.
- Difference may not be noticeable for most but zealous type-checking tools may report a need to change.
-- ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use ImDrawFlags instead of ImDrawCornersFlags.
- - ImDrawCornerFlags_TopLeft --> use ImDrawFlags_RoundCornersTopLeft
- - ImDrawCornerFlags_BotRight --> use ImDrawFlags_RoundCornersBottomRight
- - ImDrawCornerFlags_None --> use ImDrawFlags_RoundCornersNone etc.
- Flags now sanely defaults to 0 instead of 0x0F, consistent with all other flags in the API.
- IMPORTANT: The default with rounding > 0.0f is now "round all corners" vs old implicit "round no corners":
- - rounding == 0.0f + flags == 0 --> meant no rounding --> unchanged (common use)
- - rounding > 0.0f + flags != 0 --> meant rounding --> unchanged (common use)
- - rounding == 0.0f + flags != 0 --> meant no rounding --> unchanged (unlikely use)
- - rounding > 0.0f + flags == 0 --> meant no rounding --> BREAKING (unlikely use)!
- - this ONLY matters for hardcoded use of 0 with rounding > 0.0f.
- - fix by using named ImDrawFlags_RoundCornersNone or rounding == 0.0f!
- - this is technically the only real breaking change which we can't solve automatically (it's also uncommon).
- The old ImDrawCornersFlags used awkward default values of ~0 or 0xF (4 lower bits set) to signify "round all corners"
- and we sometimes encouraged using them as shortcuts. As a result the legacy path still support use of hardcoded ~0
- or any value from 0x1 or 0xF. They will behave the same with legacy paths enabled (will assert otherwise).
- Courtesy of legacy untangling commity: [@rokups, @ocornut, @thedmd]
-- ImDrawList: clarified that PathArcTo()/PathArcToFast() won't render with radius < 0.0f. Previously it sorts
- of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
-- InputText: renamed ImGuiInputTextFlags_AlwaysInsertMode to ImGuiInputTextFlags_AlwaysOverwrite, old name was an
- incorrect description of behavior. Was mostly used by memory editor. Kept inline redirection function. (#2863)
-- Moved 'misc/natvis/imgui.natvis' to 'misc/debuggers/imgui.natvis' as we will provide scripts for other debuggers.
-- Style: renamed rarely used style.CircleSegmentMaxError (old default = 1.60f)
- to style.CircleTessellationMaxError (new default = 0.30f) as its meaning changed. (#3808) [@thedmd]
-- Win32+MinGW: Re-enabled IME functions by default even under MinGW. In July 2016, issue #738 had me incorrectly
- disable those default functions for MinGW. MinGW users should: either link with -limm32, either set their
- imconfig file with '#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS'. (#2590, #738) [@actboy168]
- *EDIT* Undid in 1.84.
-- Backends: Win32: Pragma linking with dwmapi.lib (Vista-era, ~9 kb). MinGW users will need to link with -ldwmapi.
-
-Other Changes:
-
-- Window, Nav: Fixed crash when calling SetWindowFocus(NULL) at the time a new window appears. (#3865) [@nem0]
-- Window: Shrink close button hit-testing region when it covers an abnormally high portion of the window visible
- area (e.g. when window is collapsed + moved in a corner) to facilitate moving the window away. (#3825)
-- Nav: Various fixes for losing gamepad/keyboard navigation reference point when a window reappears or
- when it appears while gamepad/keyboard are not being used. (#787)
-- Drags: Fixed crash when using DragScalar() directly (not via common wrapper like DragFloat() etc.)
- with ImGuiSliderFlags_AlwaysClamp + only one of either p_min or p_max set. (#3824) [@harry75369]
-- Drags, Sliders: Fixed a bug where editing value would use wrong number if there were digits right after
- format specifier (e.g. using "%f123" as a format string). [@rokups]
-- Drags, Sliders: Fixed a bug where using custom formatting flags (',$,_) supported by stb_sprintf.h
- would cause incorrect value to be displayed. (#3604) [@rokups]
-- Drags, Sliders: Support ImGuiSliderFlags_Logarithmic flag with integers. Because why not? (#3786)
-- Tables: Fixed unaligned accesses when using TableSetBgColor(ImGuiTableBgTarget_CellBg). (#3872)
-- IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using
- either of them, when the hovered location is located within a child window, e.g. InputTextMultiline().
- This is intended to have no side effects, but brace yourself for the possible comeback.. (#3851, #1370)
-- Drag and Drop: can use BeginDragDropSource() for other than the left mouse button as long as the item
- has an ID (for ID-less items will add new functionalities later). (#1637, #3885)
-- ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. (#3369)
- This can currently only ever be set by the Freetype renderer.
-- imgui_freetype: Added ImGuiFreeTypeBuilderFlags_Bitmap flag to request Freetype loading bitmap data.
- This may have an effect on size and must be called with correct size values. (#3879) [@metarutaiga]
-- ImDrawList: PathArcTo() now supports "int num_segments = 0" (new default) and adaptively tessellate.
- The adaptive tessellation uses look up tables, tends to be faster than old PathArcTo() while maintaining
- quality for large arcs (tessellation quality derived from "style.CircleTessellationMaxError") (#3491) [@thedmd]
-- ImDrawList: PathArcToFast() also adaptively tessellate efficiently. This means that large rounded corners
- in e.g. hi-dpi settings will generally look better. (#3491) [@thedmd]
-- ImDrawList: AddCircle, AddCircleFilled(): Tweaked default segment count calculation to honor MaxError
- with more accuracy. Made default segment count always even for better looking result. (#3808) [@thedmd]
-- Misc: Added GetAllocatorFunctions() to facilitate sharing allocators across DLL boundaries. (#3836)
-- Misc: Added 'debuggers/imgui.gdb' and 'debuggers/imgui.natstepfilter' (along with existing 'imgui.natvis')
- scripts to configure popular debuggers into skipping trivial functions when using StepInto. [@rokups]
-- Backends: Android: Added native Android backend. (#3446) [@duddel]
-- Backends: Win32: Added ImGui_ImplWin32_EnableAlphaCompositing() to facilitate experimenting with
- alpha compositing and transparent windows. (#2766, #3447 etc.).
-- Backends: OpenGL, Vulkan, DX9, DX10, DX11, DX12, Metal, WebGPU, Allegro: Rework blending equation to
- preserve alpha in output buffer (using SrcBlendAlpha = ONE, DstBlendAlpha = ONE_MINUS_SRC_ALPHA consistently
- across all backends), facilitating compositing of the output buffer with another buffer.
- (#2693, #2764, #2766, #2873, #3447, #3813, #3816) [@ocornut, @thedmd, @ShawnM427, @Ubpa, @aiekick]
-- Backends: DX9: Fix to support IMGUI_USE_BGRA_PACKED_COLOR. (#3844) [@Xiliusha]
-- Backends: DX9: Fix to support colored glyphs, using newly introduced 'TexPixelsUseColors' info. (#3844)
-- Examples: Android: Added Android + GL ES3 example. (#3446) [@duddel]
-- Examples: Reworked setup of clear color to be compatible with transparent values.
-- CI: Use a dedicated "scheduled" workflow to trigger scheduled builds. Forks may disable this workflow if
- scheduled builds builds are not required. [@rokups]
-- Log/Capture: Added LogTextV, a va_list variant of LogText. [@PathogenDavid]
-
-
------------------------------------------------------------------------
- VERSION 1.81 (Released 2021-02-10)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.81
-
-Breaking Changes:
-
-- ListBox helpers:
- - Renamed ListBoxHeader(const char* label, ImVec2 size) to BeginListBox().
- - Renamed ListBoxFooter() to EndListBox().
- - Removed ListBoxHeader(const char* label, int items_count, int height_in_items = -1) in favor of specifying size.
- In the redirection function, made vertical padding consistent regardless of (items_count <= height_in_items) or not.
- - Kept inline redirection function for all threes (will obsolete).
-- imgui_freetype:
- - Removed ImGuiFreeType::BuildFontAtlas(). Kept inline redirection function.
- Prefer using '#define IMGUI_ENABLE_FREETYPE', but there's a runtime selection path available too.
- - The shared extra flags parameters (very rarely used) are now stored in ImFontAtlas::FontBuilderFlags.
- - Renamed ImFontConfig::RasterizerFlags (used by FreeType) to ImFontConfig::FontBuilderFlags.
- - Renamed ImGuiFreeType::XXX flags to ImGuiFreeTypeBuilderFlags_XXX for consistency with other API.
-
-Other Changes:
-
-- Viewports Added ImGui::GetMainViewport() as a way to get the bounds and work area of the host display. (#3789, #1542)
- - In 'master' branch or without multi-viewports feature enabled:
- - GetMainViewport()->Pos is always == (0,0)
- - GetMainViewport()->Size is always == io.DisplaySize
- - In 'docking' branch and with the multi-viewports feature enabled:
- - GetMainViewport() will return information from your host Platform Window.
- - In the future, we will support a "no main viewport" mode and this may return bounds of your main monitor.
- - For forward compatibility with multi-viewports/multi-monitors:
- - Code using (0,0) as a way to signify "upper-left of the host window" should use GetMainViewport()->Pos.
- - Code using io.DisplaySize as a way to signify "size of the host window" should use GetMainViewport()->Size.
- - We are also exposing a work area in ImGuiViewport ('WorkPos', 'WorkSize' vs 'Pos', 'Size' for full area):
- - For a Platform Window, the work area is generally the full area minus space used by menu-bars.
- - For a Platform Monitor, the work area is generally the full area minus space used by task-bars.
- - All of this has been the case in 'docking' branch for a long time. What we've done is merely merging
- a small chunk of the multi-viewport logic into 'master' to standardize some concepts ahead of time.
-- Tables: Fixed PopItemWidth() or multi-components items not restoring per-column ItemWidth correctly. (#3760)
-- Window: Fixed minor title bar text clipping issue when FramePadding is small/zero and there are no
- close button in the window. (#3731)
-- SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. (#3774) [@erwincoumans]
- Would also repro with DragFloat() when using ImGuiSliderFlags_Logarithmic with v_min==v_max.
-- Menus: Fixed an issue with child-menu auto sizing (issue introduced in 1.80 on 2021/01/25) (#3779)
-- InputText: Fixed slightly off ScrollX tracking, noticeable with large values of FramePadding.x. (#3781)
-- InputText: Multiline: Fixed padding/cliprect not precisely matching single-line version. (#3781)
-- InputText: Multiline: Fixed FramePadding.y worth of vertical offset when aiming with mouse.
-- ListBox: Tweaked default height calculation.
-- Fonts: imgui_freetype: Facilitated using FreeType integration: [@Xipiryon, @ocornut]
- - Use '#define IMGUI_ENABLE_FREETYPE' in imconfig.h should make it work with no other modifications
- other than compiling misc/freetype/imgui_freetype.cpp and linking with FreeType.
- - Use '#define IMGUI_ENABLE_STB_TRUETYPE' if you somehow need the stb_truetype rasterizer to be
- compiled in along with the FreeType one, otherwise it is enabled by default.
-- Fonts: imgui_freetype: Added support for colored glyphs as supported by Freetype 2.10+ (for .ttf using CPAL/COLR
- tables only). Enable the ImGuiFreeTypeBuilderFlags_LoadColor on a given font. Atlas always output directly
- as RGBA8 in this situation. Likely to make sense with IMGUI_USE_WCHAR32. (#3369) [@pshurgal]
-- Fonts: Fixed CalcTextSize() width rounding so it behaves more like a ceil. This is in order for text wrapping
- to have enough space when provided width precisely calculated with CalcTextSize().x. (#3776)
- Note that the rounding of either positions and widths are technically undesirable (e.g. #3437, #791) but
- variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
-- Log/Capture: Fix various new line/spacing issue when logging widgets. [@Xipiryon, @ocornut]
-- Log/Capture: Improved the ASCII look of various widgets, making large dumps more easily human readable.
-- ImDrawList: Fixed AddCircle()/AddCircleFilled() with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
- Would lead to a buffer read overflow.
-- ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert.
-- ImDrawList: Fixed PathArcToFast() handling of a_min > a_max.
-- Metrics: Back-ported "Viewports" debug visualizer from 'docking' branch.
-- Demo: Added 'Examples->Fullscreen Window' demo using GetMainViewport() values. (#3789)
-- Demo: 'Simple Overlay' demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
-- Backends: Win32: Dynamically loading XInput DLL instead of linking with it, facilitate compiling with
- old WindowSDK versions or running on Windows 7. (#3646, #3645, #3248, #2716) [@Demonese]
-- Backends: Vulkan: Add support for custom Vulkan function loader and VK_NO_PROTOTYPES. (#3759, #3227) [@Hossein-Noroozpour]
- User needs to call ImGui_ImplVulkan_LoadFunctions() with their custom loader prior to other functions.
-- Backends: Metal: Fixed texture storage mode when building on Mac Catalyst. (#3748) [@Belinsky-L-V]
-- Backends: OSX: Fixed mouse position not being reported when mouse buttons other than left one are down. (#3762) [@rokups]
-- Backends: WebGPU: Added renderer backend for WebGPU support (imgui_impl_wgpu.cpp) (#3632) [@bfierz]
- Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.
-- Examples: WebGPU: Added Emscripten+WebGPU example. (#3632) [@bfierz]
-- Backends: GLFW: Added ImGui_ImplGlfw_InitForOther() initialization call to use with non OpenGL API. (#3632)
-
-
------------------------------------------------------------------------
- VERSION 1.80 (Released 2021-01-21)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.80
-
-Breaking Changes:
-
-- Added imgui_tables.cpp file! Manually constructed project files will need the new file added! (#3740)
-- Backends: moved all backends files (imgui_impl_XXXX.cpp, imgui_impl_XXXX.h) from examples/ to backends/. (#3513)
-- Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(). Kept inline redirection function (will obsolete).
-- Renamed ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). Kept inline redirection function (will obsolete).
-- Removed redirecting functions/enums names that were marked obsolete in 1.60 (April 2018):
- - io.RenderDrawListsFn pointer -> use ImGui::GetDrawData() value and call the render function of your backend
- - ImGui::IsAnyWindowFocused() -> use ImGui::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)
- - ImGui::IsAnyWindowHovered() -> use ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow)
- - ImGuiStyleVar_Count_ -> use ImGuiStyleVar_COUNT
- - ImGuiMouseCursor_Count_ -> use ImGuiMouseCursor_COUNT
-- Removed redirecting functions/enums names that were marked obsolete in 1.61 (May 2018):
- - InputFloat (... int decimal_precision ...) -> use InputFloat (... const char* format ...) with format = "%.Xf" where X was value for decimal_precision.
- - same for InputFloat2()/InputFloat3()/InputFloat4() variants taking a `int decimal_precision` parameter.
-- Removed redirecting functions/enums names that were marked obsolete in 1.63 (August 2018):
- - ImGui::IsItemDeactivatedAfterChange() -> use ImGui::IsItemDeactivatedAfterEdit().
- - ImGuiCol_ModalWindowDarkening -> use ImGuiCol_ModalWindowDimBg
- - ImGuiInputTextCallback -> use ImGuiTextEditCallback
- - ImGuiInputTextCallbackData -> use ImGuiTextEditCallbackData
-- If you were still using the old names, while you are cleaning up, considering enabling
- IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h even temporarily to have a pass at finding
- and removing up old API calls, if any remaining.
-- Internals: Columns: renamed undocumented/internals ImGuiColumnsFlags_* to ImGuiOldColumnFlags_* to reduce
- confusion with Tables API. Keep redirection enums (will obsolete). (#125, #513, #913, #1204, #1444, #2142, #2707)
-- Renamed io.ConfigWindowsMemoryCompactTimer to io.ConfigMemoryCompactTimer as the feature now applies
- to other data structures. (#2636)
-
-Other Changes:
-
-- Tables: added new Tables Beta API as a replacement for old Columns. (#3740, #2957, #125)
- Check out 'Demo->Tables' for many demos.
- Read API comments in imgui.h for details. Read extra commentary in imgui_tables.cpp.
- - Added 16 functions:
- - BeginTable(), EndTable()
- - TableNextRow(), TableNextColumn(), TableSetColumnIndex()
- - TableSetupColumn(), TableSetupScrollFreeze()
- - TableHeadersRow(), TableHeader()
- - TableGetRowIndex(), TableGetColumnCount(), TableGetColumnIndex(), TableGetColumnName(), TableGetColumnFlags()
- - TableGetSortSpecs(), TableSetBgColor()
- - Added 3 flags sets:
- - ImGuiTableFlags (29 flags for: features, decorations, sizing policies, padding, clipping, scrolling, sorting etc.)
- - ImGuiTableColumnFlags (24 flags for: width policies, default settings, sorting options, indentation options etc.)
- - ImGuiTableRowFlags (1 flag for: header row)
- - Added 2 structures: ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs
- - Added 2 enums: ImGuiSortDirection, ImGuiTableBgTarget
- - Added 1 style variable: ImGuiStyleVar_CellPadding
- - Added 5 style colors: ImGuiCol_TableHeaderBg, ImGuiCol_TableBorderStrong, ImGuiCol_TableBorderLight, ImGuiCol_TableRowBg, ImGuiCol_TableRowBgAlt.
-- Tabs: Made it possible to append to an existing tab bar by calling BeginTabBar()/EndTabBar() again.
-- Tabs: Fixed using more than 128 tabs in a tab bar (scrolling policy recommended).
-- Tabs: Do not display a tooltip if the name already fits over a given tab. (#3521)
-- Tabs: Fixed minor/unlikely bug skipping over a button when scrolling left with arrows.
-- Tabs: Requested ideal content size (for auto-fit) doesn't affect horizontal scrolling. (#3414)
-- Drag and Drop: Fix losing drop source ActiveID (and often source tooltip) when opening a TreeNode()
- or CollapsingHeader() while dragging. (#1738)
-- Drag and Drop: Fix drag and drop to tie same-size drop targets by chosen the later one. Fixes dragging
- into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717) [@Black-Cat]
-- Checkbox: Added CheckboxFlags() helper with int* type (internals have a template version, not exposed).
-- Clipper: Fixed incorrect end-list positioning when using ImGuiListClipper with 1 item (bug in 1.79). (#3663) [@nyorain]
-- InputText: Fixed updating cursor/selection position when a callback altered the buffer in a way
- where the byte count is unchanged but the decoded character count changes. (#3587) [@gqw]
-- InputText: Fixed switching from single to multi-line while preserving same ID.
-- Combo: Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034)
-- DragFloat, DragInt: very slightly increased mouse drag threshold + expressing it as a factor of default value.
-- DragFloat, DragInt: added experimental io.ConfigDragClickToInputText feature to enable turning DragXXX widgets
- into text input with a simple mouse click-release (without moving). (#3737)
-- Nav: Fixed IsItemFocused() from returning false when Nav highlight is hidden because mouse has moved.
- It's essentially been always the case but it doesn't make much sense. Instead we will aim at exposing
- feedback and control of keyboard/gamepad navigation highlight and mouse hover disable flag. (#787, #2048)
-- Metrics: Fixed mishandling of ImDrawCmd::VtxOffset in wireframe mesh renderer.
-- Metrics: Rebranded as "Dear ImGui Metrics/Debugger" to clarify its purpose.
-- ImDrawList: Added ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() quadratic bezier
- helpers. (#3127, #3664, #3665) [@aiekick]
-- Fonts: Updated GetGlyphRangesJapanese() to include a larger 2999 ideograms selection of Joyo/Jinmeiyo
- kanjis, from the previous 1946 ideograms selection. This will consume a some more memory but be generally
- much more fitting for Japanese display, until we switch to a more dynamic atlas. (#3627) [@vaiorabbit]
-- Log/Capture: fix capture to work on clipped child windows.
-- Misc: Made the ItemFlags stack shared, so effectively the ButtonRepeat/AllowKeyboardFocus states
- (and others exposed in internals such as PushItemFlag) are inherited by stacked Begin/End pairs,
- vs previously a non-child stacked Begin() would reset those flags back to zero for the stacked window.
-- Misc: Replaced UTF-8 decoder with one based on branchless one by Christopher Wellons. [@rokups]
- Super minor fix handling incomplete UTF-8 contents: if input does not contain enough bytes, decoder
- returns IM_UNICODE_CODEPOINT_INVALID and consume remaining bytes (vs old decoded consumed only 1 byte).
-- Misc: Fix format warnings when using gnu printf extensions in a setup that supports them (gcc/mingw). (#3592)
-- Misc: Made EndFrame() assertion for key modifiers being unchanged during the frame (added in 1.76) more
- lenient, allowing full mid-frame releases. This is to accommodate the use of mid-frame modal native
- windows calls, which leads backends such as GLFW to send key clearing events on focus loss. (#3575)
-- Style: Changed default style.WindowRounding value to 0.0f (matches default for multi-viewports).
-- Style: Reduced the size of the resizing grip, made alpha less prominent.
-- Style: Classic: Increase the default alpha value of WindowBg to be closer to other styles.
-- Demo: Clarify usage of right-aligned items in Demo>Layout>Widgets Width.
-- Backends: OpenGL3: Use glGetString(GL_VERSION) query instead of glGetIntegerv(GL_MAJOR_VERSION, ...)
- when the later returns zero (e.g. Desktop GL 2.x). (#3530) [@xndcn]
-- Backends: OpenGL2: Backup and restore GL_SHADE_MODEL and disable GL_NORMAL_ARRAY state to increase
- compatibility with legacy code. (#3671)
-- Backends: OpenGL3: Backup and restore GL_PRIMITIVE_RESTART state. (#3544) [@Xipiryon]
-- Backends: OpenGL2, OpenGL3: Backup and restore GL_STENCIL_TEST enable state. (#3668)
-- Backends: Vulkan: Added support for specifying which sub-pass to reference during VkPipeline creation. (@3579) [@bdero]
-- Backends: DX12: Improve Windows 7 compatibility (for D3D12On7) by loading d3d12.dll dynamically. (#3696) [@Mattiwatti]
-- Backends: Win32: Fix setting of io.DisplaySize to invalid/uninitialized data after hwnd has been closed.
-- Backends: OSX: Fix keypad-enter key not working on MacOS. (#3554) [@rokups, @lfnoise]
-- Examples: Apple+Metal: Consolidated/simplified to get closer to other examples. (#3543) [@warrenm]
-- Examples: Apple+Metal: Forward events down so OS key combination like Cmd+Q can work. (#3554) [@rokups]
-- Examples: Emscripten: Renamed example_emscripten/ to example_emscripten_opengl3/. (#3632)
-- Examples: Emscripten: Added 'make serve' helper to spawn a web-server on localhost. (#3705) [@Horki]
-- Examples: DirectX12: Move ImGui::Render() call above the first barrier to clarify its lack of effect on the graphics pipe.
-- CI: Fix testing for Windows DLL builds. (#3603, #3601) [@iboB]
-- Docs: Improved the wiki and added a https://github.com/ocornut/imgui/wiki/Useful-Widgets page. [@Xipiryon]
- [2021/05/20: moved to https://github.com/ocornut/imgui/wiki/Useful-Extensions]
-- Docs: Split examples/README.txt into docs/BACKENDS.md and docs/EXAMPLES.md, and improved them.
-- Docs: Consistently renamed all occurrences of "binding" and "back-end" to "backend" in comments and docs.
-
-
------------------------------------------------------------------------
- VERSION 1.79 (Released 2020-10-08)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.79
-
-Breaking Changes:
-
-- Fonts: Removed ImFont::DisplayOffset in favor of ImFontConfig::GlyphOffset. DisplayOffset was applied
- after scaling and not very meaningful/useful outside of being needed by the default ProggyClean font.
- It was also getting in the way of better font scaling, so let's get rid of it now!
- If you used DisplayOffset it was probably in association to rasterizing a font at a specific size,
- in which case the corresponding offset may be reported into GlyphOffset. (#1619)
- If you scaled this value after calling AddFontDefault(), this is now done automatically.
-- ImGuiListClipper: Renamed constructor parameters which created an ambiguous alternative to using
- the ImGuiListClipper::Begin() function, with misleading edge cases. Always use ImGuiListClipper::Begin()!
- Kept inline redirection function (will obsolete).
- (note: imgui_memory_editor <0.40 from imgui_club/ used this old clipper API. Update your copy if needed).
-- Style: Renamed style.TabMinWidthForUnselectedCloseButton to style.TabMinWidthForCloseButton.
-- Renamed ImGuiSliderFlags_ClampOnInput to ImGuiSliderFlags_AlwaysClamp. Kept redirection enum (will obsolete).
-- Renamed OpenPopupContextItem() back to OpenPopupOnItemClick(), REVERTED CHANGE FROM 1.77.
- For variety of reason this is more self-explanatory and less error-prone. Kept inline redirection function.
-- Removed return value from OpenPopupOnItemClick() - returned true on mouse release on an item - because it
- is inconsistent with other popups API and makes others misleading. It's also and unnecessary: you can
- use IsWindowAppearing() after BeginPopup() for a similar result.
-
-Other Changes:
-
-- Window: Fixed using non-zero pivot in SetNextWindowPos() when the window is collapsed. (#3433)
-- Nav: Fixed navigation resuming on first visible item when using gamepad. [@rokups]
-- Nav: Fixed using Alt to toggle the Menu layer when inside a Modal window. (#787)
-- Scrolling: Fixed SetScrollHere(0) functions edge snapping when called during a frame where
- ContentSize is changing (issue introduced in 1.78). (#3452).
-- InputText: Added support for Page Up/Down in InputTextMultiline(). (#3430) [@Xipiryon]
-- InputText: Added selection helpers in ImGuiInputTextCallbackData().
-- InputText: Added ImGuiInputTextFlags_CallbackEdit to modify internally owned buffer after an edit.
- (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the
- underlying buffer while focus is active).
-- InputText: Fixed using ImGuiInputTextFlags_Password with InputTextMultiline(). (#3427, #3428)
- It is a rather unusual or useless combination of features but no reason it shouldn't work!
-- InputText: Fixed minor scrolling glitch when erasing trailing lines in InputTextMultiline().
-- InputText: Fixed cursor being partially covered after using Ctrl+End key.
-- InputText: Fixed callback's helper DeleteChars() function when cursor is inside the deleted block. (#3454)
-- InputText: Made pressing Down arrow on the last line when it doesn't have a carriage return not move to
- the end of the line (so it is consistent with Up arrow, and behave same as Notepad and Visual Studio.
- Note that some other text editors instead would move the cursor to the end of the line). [@Xipiryon]
-- DragFloat, DragScalar: Fixed ImGuiSliderFlags_ClampOnInput not being honored in the special case
- where v_min == v_max. (#3361)
-- SliderInt, SliderScalar: Fixed reaching of maximum value with inverted integer min/max ranges, both
- with signed and unsigned types. Added reverse Sliders to Demo. (#3432, #3449) [@rokups]
-- Text: Bypass unnecessary formatting when using the TextColored()/TextWrapped()/TextDisabled() helpers
- with a "%s" format string. (#3466)
-- CheckboxFlags: Display mixed-value/tristate marker when passed flags that have multiple bits set and
- stored value matches neither zero neither the full set.
-- BeginMenuBar: Fixed minor bug where CursorPosMax gets pushed to CursorPos prior to calling BeginMenuBar(),
- so e.g. calling the function at the end of a window would often add +ItemSpacing.y to scrolling range.
-- TreeNode, CollapsingHeader: Made clicking on arrow toggle toggle the open state on the Mouse Down event
- rather than the Mouse Down+Up sequence, even if the _OpenOnArrow flag isn't set. This is standard behavior
- and amends the change done in 1.76 which only affected cases were _OpenOnArrow flag was set.
- (This is also necessary to support full multi/range-select/drag and drop operations.)
-- Tabs: Added TabItemButton() to submit tab that behave like a button. (#3291) [@Xipiryon]
-- Tabs: Added ImGuiTabItemFlags_Leading and ImGuiTabItemFlags_Trailing flags to position tabs or button
- at either end of the tab bar. Those tabs won't be part of the scrolling region, and when reordering cannot
- be moving outside of their section. Most often used with TabItemButton(). (#3291) [@Xipiryon]
-- Tabs: Added ImGuiTabItemFlags_NoReorder flag to disable reordering a given tab.
-- Tabs: Keep tab item close button visible while dragging a tab (independent of hovering state).
-- Tabs: Fixed a small bug where closing a tab that is not selected would leave a tab hole for a frame.
-- Tabs: Fixed a small bug where scrolling buttons (with ImGuiTabBarFlags_FittingPolicyScroll) would
- generate an unnecessary extra draw call.
-- Tabs: Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave
- tabs reordered in the tab list popup. [@Xipiryon]
-- Columns: Fix inverted ClipRect being passed to renderer when using certain primitives inside of
- a fully clipped column. (#3475) [@szreder]
-- Popups, Tooltips: Fix edge cases issues with positioning popups and tooltips when they are larger than
- viewport on either or both axes. [@Rokups]
-- Fonts: AddFontDefault() adjust its vertical offset based on floor(size/13) instead of always +1.
- Was previously done by altering DisplayOffset.y but wouldn't work for DPI scaled font.
-- Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
-- Demo: Add simple InputText() callbacks demo (aside from the more elaborate ones in 'Examples->Console').
-- Backends: OpenGL3: Fix to avoid compiling/calling glBindSampler() on ES or pre-3.3 contexts which have
- the defines set by a loader. (#3467, #1985) [@jjwebb]
-- Backends: Vulkan: Some internal refactor aimed at allowing multi-viewport feature to create their
- own render pass. (#3455, #3459) [@FunMiles]
-- Backends: DX12: Clarified that imgui_impl_dx12 can be compiled on 32-bit systems by redefining
- the ImTextureID to be 64-bit (e.g. '#define ImTextureID ImU64' in imconfig.h). (#301)
-- Backends: DX12: Fix debug layer warning when scissor rect is zero-sized. (#3472, #3462) [@StoneWolf]
-- Examples: Vulkan: Reworked buffer resize handling, fix for Linux/X11. (#3390, #2626) [@RoryO]
-- Examples: Vulkan: Switch validation layer to use "VK_LAYER_KHRONOS_validation" instead of
- "VK_LAYER_LUNARG_standard_validation" which is deprecated (#3459) [@FunMiles]
-- Examples: DX12: Enable breaking on any warning/error when debug interface is enabled.
-- Examples: DX12: Added '#define ImTextureID ImU64' in project and build files to also allow building
- on 32-bit systems. Added project to default Visual Studio solution file. (#301)
-
-
------------------------------------------------------------------------
- VERSION 1.78 (Released 2020-08-18)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.78
-
-Breaking Changes:
-
-- Obsoleted use of the trailing 'float power=1.0f' parameter for those functions: [@Shironekoben, @ocornut]
- - DragFloat(), DragFloat2(), DragFloat3(), DragFloat4(), DragFloatRange2(), DragScalar(), DragScalarN()
- - SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4(), SliderScalar(), SliderScalarN()
- - VSliderFloat(), VSliderScalar()
- Replaced the final 'float power=1.0f' argument with ImGuiSliderFlags defaulting to 0 (as with all our flags).
- Worked out a backward-compatibility scheme so hopefully most C++ codebase should not be affected.
- In short, when calling those functions:
- - If you omitted the 'power' parameter (likely!), you are not affected.
- - If you set the 'power' parameter to 1.0f (same as previous default value):
- - Your compiler may warn on float>int conversion.
- - Everything else will work (but will assert if IMGUI_DISABLE_OBSOLETE_FUNCTIONS is defined).
- - You can replace the 1.0f value with 0 to fix the warning, and be technically correct.
- - If you set the 'power' parameter to >1.0f (to enable non-linear editing):
- - Your compiler may warn on float>int conversion.
- - Code will assert at runtime for IM_ASSERT(power == 1.0f) with the following assert description:
- "Call Drag function with ImGuiSliderFlags_Logarithmic instead of using the old 'float power' function!".
- - In case asserts are disabled, the code will not crash and enable the _Logarithmic flag.
- - You can replace the >1.0f value with ImGuiSliderFlags_Logarithmic to fix the warning/assert
- and get a _similar_ effect as previous uses of power >1.0f.
- See https://github.com/ocornut/imgui/issues/3361 for all details.
- For shared code, you can version check at compile-time with `#if IMGUI_VERSION_NUM >= 17704`.
- Kept inline redirection functions (will obsolete) apart for: DragFloatRange2(), VSliderFloat(), VSliderScalar().
- For those three the 'float power=1.0f' version was removed directly as they were most unlikely ever used.
-- DragInt, DragFloat, DragScalar: Obsoleted use of v_min > v_max to lock edits (introduced in 1.73, this was not
- demoed nor documented much, will be replaced a more generic ReadOnly feature).
-
-Other Changes:
-
-- Nav: Fixed clicking on void (behind any windows) from not clearing the focused window.
- This would be problematic e.g. in situation where the application relies on io.WantCaptureKeyboard
- flag being cleared accordingly. (bug introduced in 1.77 WIP on 2020/06/16) (#3344, #2880)
-- Window: Fixed clicking over an item which hovering has been disabled (e.g inhibited by a popup)
- from marking the window as moved.
-- Drag, Slider: Added ImGuiSliderFlags parameters.
- - For float functions they replace the old trailing 'float power=1.0' parameter.
- (See #3361 and the "Breaking Changes" block above for all details).
- - Added ImGuiSliderFlags_Logarithmic flag to enable logarithmic editing
- (generally more precision around zero), as a replacement to the old 'float power' parameter
- which was obsoleted. (#1823, #1316, #642) [@Shironekoben, @AndrewBelt]
- - Added ImGuiSliderFlags_ClampOnInput flag to force clamping value when using
- CTRL+Click to type in a value manually. (#1829, #3209, #946, #413).
- [note: RENAMED to ImGuiSliderFlags_AlwaysClamp in 1.79].
- - Added ImGuiSliderFlags_NoRoundToFormat flag to disable rounding underlying
- value to match precision of the display format string. (#642)
- - Added ImGuiSliderFlags_NoInput flag to disable turning widget into a text input
- with CTRL+Click or Nav Enter.
-- Nav, Slider: Fix using keyboard/gamepad controls with certain logarithmic sliders where
- pushing a direction near zero values would be cancelled out. [@Shironekoben]
-- DragFloatRange2, DragIntRange2: Fixed an issue allowing to drag out of bounds when both
- min and max value are on the same value. (#1441)
-- InputText, ImDrawList: Fixed assert triggering when drawing single line of text with more
- than ~16 KB characters. (Note that current code is going to show corrupted display if after
- clipping, more than 16 KB characters are visible in the same low-level ImDrawList::RenderText()
- call. ImGui-level functions such as TextUnformatted() are not affected. This is quite rare
- but it will be addressed later). (#3349)
-- Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns).
- Also fixed related text clipping when used in a column after the first one. (#3187, #3386)
-- Scrolling: Avoid SetScroll, SetScrollFromPos functions from snapping on the edge of scroll
- limits when close-enough by (WindowPadding - ItemPadding), which was a tweak with too many
- side-effects. The behavior is still present in SetScrollHere functions as they are more explicitly
- aiming at making widgets visible. May later be moved to a flag.
-- Tabs: Allow calling SetTabItemClosed() after a tab has been submitted (will process next frame).
-- InvisibleButton: Made public a small selection of ImGuiButtonFlags (previously in imgui_internal.h)
- and allowed to pass them to InvisibleButton(): ImGuiButtonFlags_MouseButtonLeft/Right/Middle.
- This is a small but rather important change because lots of multi-button behaviors could previously
- only be achieved using lower-level/internal API. Now also available via high-level InvisibleButton()
- with is a de facto versatile building block to creating custom widgets with the public API.
-- Fonts: Fixed ImFontConfig::GlyphExtraSpacing and ImFontConfig::PixelSnapH settings being pulled
- from the merged/target font settings when merging fonts, instead of being pulled from the source
- font settings.
-- ImDrawList: Thick anti-aliased strokes (> 1.0f) with integer thickness now use a texture-based
- path, reducing the amount of vertices/indices and CPU/GPU usage. (#3245) [@Shironekoben]
- - This change will facilitate the wider use of thick borders in future style changes.
- - Requires an extra bit of texture space (~64x64 by default), relies on GPU bilinear filtering.
- - Set `io.AntiAliasedLinesUseTex = false` to disable rendering using this method.
- - Clear `ImFontAtlasFlags_NoBakedLines` in ImFontAtlas::Flags to disable baking data in texture.
-- ImDrawList: changed AddCircle(), AddCircleFilled() default num_segments from 12 to 0, effectively
- enabling auto-tessellation by default. Tweak tessellation in Style Editor->Rendering section, or
- by modifying the 'style.CircleSegmentMaxError' value. [@ShironekoBen]
-- ImDrawList: Fixed minor bug introduced in 1.75 where AddCircle() with 12 segments would generate
- an extra vertex. (This bug was mistakenly marked as fixed in earlier 1.77 release). [@ShironekoBen]
-- Demo: Improved "Custom Rendering"->"Canvas" demo with a grid, scrolling and context menu.
- Also showcase using InvisibleButton() with multiple mouse buttons flags.
-- Demo: Improved "Layout & Scrolling" -> "Clipping" section.
-- Demo: Improved "Layout & Scrolling" -> "Child Windows" section.
-- Style Editor: Added preview of circle auto-tessellation when editing the corresponding value.
-- Backends: OpenGL3: Added support for glad2 loader. (#3330) [@moritz-h]
-- Backends: Allegro 5: Fixed horizontal scrolling direction with mouse wheel / touch pads (it seems
- like Allegro 5 reports it differently from GLFW and SDL). (#3394, #2424, #1463) [@nobody-special666]
-- Examples: Vulkan: Fixed GLFW+Vulkan and SDL+Vulkan clear color not being set. (#3390) [@RoryO]
-- CI: Emscripten has stopped their support for their fastcomp backend, switching to latest sdk [@Xipiryon]
-
-
------------------------------------------------------------------------
- VERSION 1.77 (Released 2020-06-29)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.77
-
-Breaking Changes:
-
-- Removed unnecessary ID (first arg) of ImFontAtlas::AddCustomRectRegular() function. Please
- note that this is a Beta api and will likely be reworked in order to support multi-DPI across
- multiple monitors.
-- Renamed OpenPopupOnItemClick() to OpenPopupContextItem(). Kept inline redirection function (will obsolete).
- [NOTE: THIS WAS REVERTED IN 1.79]
-- Removed BeginPopupContextWindow(const char*, int mouse_button, bool also_over_items) in favor
- of BeginPopupContextWindow(const char*, ImGuiPopupFlags flags) with ImGuiPopupFlags_NoOverItems.
- Kept inline redirection function (will obsolete).
-- Removed obsoleted CalcItemRectClosestPoint() entry point (has been asserting since December 2017).
-
-Other Changes:
-
-- TreeNode: Fixed bug where BeginDragDropSource() failed when the _OpenOnDoubleClick flag is
- enabled (bug introduced in 1.76, but pre-1.76 it would also fail unless the _OpenOnArrow
- flag was also set, and _OpenOnArrow is frequently set along with _OpenOnDoubleClick).
-- TreeNode: Fixed bug where dragging a payload over a TreeNode() with either _OpenOnDoubleClick
- or _OpenOnArrow would open the node. (#143)
-- Windows: Fix unintended feedback loops when resizing windows close to main viewport edges. [@rokups]
-- Tabs: Added style.TabMinWidthForUnselectedCloseButton settings:
- - Set to 0.0f (default) to always make a close button appear on hover (same as Chrome, VS).
- - Set to FLT_MAX to only display a close button when selected (merely hovering is not enough).
- - Set to an intermediary value to toggle behavior based on width (same as Firefox).
-- Tabs: Added a ImGuiTabItemFlags_NoTooltip flag to disable the tooltip for individual tab item
- (vs ImGuiTabBarFlags_NoTooltip for entire tab bar). [@Xipiryon]
-- Popups: All functions capable of opening popups (OpenPopup*, BeginPopupContext*) now take a new
- ImGuiPopupFlags sets of flags instead of a mouse button index. The API is automatically backward
- compatible as ImGuiPopupFlags is guaranteed to hold mouse button index in the lower bits.
-- Popups: Added ImGuiPopupFlags_NoOpenOverExistingPopup for OpenPopup*/BeginPopupContext* functions
- to first test for the presence of another popup at the same level.
-- Popups: Added ImGuiPopupFlags_NoOpenOverItems for BeginPopupContextWindow() - similar to testing
- for !IsAnyItemHovered() prior to doing an OpenPopup().
-- Popups: Added ImGuiPopupFlags_AnyPopupId and ImGuiPopupFlags_AnyPopupLevel flags for IsPopupOpen(),
- allowing to check if any popup is open at the current level, if a given popup is open at any popup
- level, if any popup is open at all.
-- Popups: Fix an edge case where programmatically closing a popup while clicking on its empty space
- would attempt to focus it and close other popups. (#2880)
-- Popups: Fix BeginPopupContextVoid() when clicking over the area made unavailable by a modal. (#1636)
-- Popups: Clarified some of the comments and function prototypes.
-- Modals: BeginPopupModal() doesn't set the ImGuiWindowFlags_NoSavedSettings flag anymore, and will
- not always be auto-centered. Note that modals are more similar to regular windows than they are to
- popups, so api and behavior may evolve further toward embracing this. (#915, #3091)
- Enforce centering using e.g. SetNextWindowPos(io.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f,0.5f)).
-- Metrics: Added a "Settings" section with some details about persistent ini settings.
-- Nav, Menus: Fix vertical wrap-around in menus or popups created with multiple appending calls to
- BeginMenu()/EndMenu() or BeginPopup(0/EndPopup(). (#3223, #1207) [@rokups]
-- Drag and Drop: Fixed unintended fallback "..." tooltip display during drag operation when
- drag source uses _SourceNoPreviewTooltip flags. (#3160) [@rokups]
-- Columns: Lower overhead on column switches and switching to background channel.
- Benefits Columns but was primarily made with Tables in mind!
-- Fonts: Fix GetGlyphRangesKorean() end-range to end at 0xD7A3 (instead of 0xD79D). (#348, #3217) [@marukrap]
-- ImDrawList: Fixed an issue where draw command merging or primitive unreserve while crossing the
- VtxOffset boundary would lead to draw commands with wrong VtxOffset. (#3129, #3163, #3232, #2591)
- [@thedmd, @Shironekoben, @sergeyn, @ocornut]
-- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where changing channels with different
- TextureId, VtxOffset would incorrectly apply new settings to draw channels. (#3129, #3163)
- [@ocornut, @thedmd, @Shironekoben]
-- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where starting a split when current
- VtxOffset was not zero would lead to draw commands with wrong VtxOffset. (#2591)
-- ImDrawList, ImDrawListSplitter, Columns: Fixed an issue where starting a split right after
- a callback draw command would incorrectly override the callback draw command.
-- Misc, Freetype: Fix for rare case where FT_Get_Char_Index() succeeds but FT_Load_Glyph() fails.
-- Docs: Improved and moved font documentation to docs/FONTS.md so it can be readable on the web.
- Updated various links/wiki accordingly. Added FAQ entry about DPI. (#2861) [@ButternCream, @ocornut]
-- CI: Added CI test to verify we're never accidentally dragging libstdc++ (on some compiler setups,
- static constructors for non-pod data seems to drag in libstdc++ due to thread-safety concerns).
- Fixed a static constructor which led to this dependency on some compiler setups. [@rokups]
-- Backends: Win32: Support for #define NOGDI, won't try to call GetDeviceCaps(). (#3137, #2327)
-- Backends: Win32: Fix _WIN32_WINNT < 0x0600 (MinGW defaults to 0x502 == Windows 2003). (#3183)
-- Backends: SDL: Report a zero display-size when window is minimized, consistent with other backends,
- making more render/clipping code use an early out path.
-- Backends: OpenGL: Fixed handling of GL 4.5+ glClipControl(GL_UPPER_LEFT) by inverting the
- projection matrix top and bottom values. (#3143, #3146) [@u3shit]
-- Backends: OpenGL: On OSX, if unspecified by app, made default GLSL version 150. (#3199) [@albertvaka]
-- Backends: OpenGL: Fixed loader auto-detection to not interfere with ES2/ES3 defines. (#3246) [@funchal]
-- Backends: Vulkan: Fixed error in if initial frame has no vertices. (#3177)
-- Backends: Vulkan: Fixed edge case where render callbacks wouldn't be called if the ImDrawData
- structure didn't have any vertices. (#2697) [@kudaba]
-- Backends: OSX: Added workaround to avoid fast mouse clicks. (#3261, #1992, #2525) [@nburrus]
-- Examples: GLFW+Vulkan, SDL+Vulkan: Fix for handling of minimized windows. (#3259)
-- Examples: Apple: Fixed example_apple_metal and example_apple_opengl2 using imgui_impl_osx.mm
- not forwarding right and center mouse clicks. (#3260) [@nburrus]
-
-
------------------------------------------------------------------------
- VERSION 1.76 (Released 2020-04-12)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.76
-
-Other Changes:
-
-- Drag and Drop, Nav: Disabling navigation arrow keys when drag and drop is active. In the docking
- branch pressing arrow keys while dragging a window from a tab could trigger an assert. (#3025)
-- BeginMenu: Using same ID multiple times appends content to a menu. (#1207) [@rokups]
-- BeginMenu: Fixed a bug where SetNextWindowXXX data before a BeginMenu() would not be cleared
- when the menu is not open. (#3030)
-- InputText: Fixed password fields displaying ASCII spaces as blanks instead of using the '*'
- glyph. (#2149, #515)
-- Selectable: Fixed honoring style.SelectableTextAlign with unspecified size. (#2347, #2601)
-- Selectable: Allow using ImGuiSelectableFlags_SpanAllColumns in other columns than first. (#125)
-- TreeNode: Made clicking on arrow with _OpenOnArrow toggle the open state on the Mouse Down
- event rather than the Mouse Down+Up sequence (this is rather standard behavior).
-- ColorButton: Added ImGuiColorEditFlags_NoBorder flag to remove the border normally enforced
- by default for standalone ColorButton.
-- Nav: Fixed interactions with ImGuiListClipper, so e.g. Home/End result would not clip the
- landing item on the landing frame. (#787)
-- Nav: Fixed currently focused item from ever being clipped by ItemAdd(). (#787)
-- Scrolling: Fixed scrolling centering API leading to non-integer scrolling values and initial
- cursor position. This would often get fixed after the fix item submission, but using the
- ImGuiListClipper as the first thing after Begin() could largely break size calculations. (#3073)
-- Added optional support for Unicode plane 1-16 (#2538, #2541, #2815) [@cloudwu, @samhocevar]
- - Compile-time enable with '#define IMGUI_USE_WCHAR32' in imconfig.h.
- - More consistent handling of unsupported code points (0xFFFD).
- - Surrogate pairs are supported when submitting UTF-16 data via io.AddInputCharacterUTF16(),
- allowing for more complete CJK input.
- - sizeof(ImWchar) goes from 2 to 4. IM_UNICODE_CODEPOINT_MAX goes from 0xFFFF to 0x10FFFF.
- - Various structures such as ImFont, ImFontGlyphRangesBuilder will use more memory, this
- is currently not particularly efficient.
-- Columns: undid the change in 1.75 were Columns()/BeginColumns() were preemptively limited
- to 64 columns with an assert. (#3037, #125)
-- Window: Fixed a bug with child window inheriting ItemFlags from their parent when the child
- window also manipulate the ItemFlags stack. (#3024) [@Stanbroek]
-- Font: Fixed non-ASCII space occasionally creating unnecessary empty looking polygons.
-- Misc: Added an explicit compile-time test for non-scoped IM_ASSERT() macros to redirect users
- to a solution rather than encourage people to add braces in the codebase.
-- Misc: Added additional checks in EndFrame() to verify that io.KeyXXX values have not been
- tampered with between NewFrame() and EndFrame().
-- Misc: Made default clipboard handlers for Win32 and OSX use a buffer inside the main context
- instead of a static buffer, so it can be freed properly on Shutdown. (#3110)
-- Misc, Freetype: Fixed support for IMGUI_STB_RECT_PACK_FILENAME compile time directive
- in imgui_freetype.cpp (matching support in the regular code path). (#3062) [@DonKult]
-- Metrics: Made Tools section more prominent. Showing wire-frame mesh directly hovering the ImDrawCmd
- instead of requiring to open it. Added options to disable bounding box and mesh display.
- Added notes on inactive/gc-ed windows.
-- Demo: Added black and white and color gradients to Demo>Examples>Custom Rendering.
-- CI: Added more tests on the continuous-integration server: extra warnings for Clang/GCC, building
- SDL+Metal example, building imgui_freetype.cpp, more compile-time imconfig.h settings: disabling
- obsolete functions, enabling 32-bit ImDrawIdx, enabling 32-bit ImWchar, disabling demo. [@rokups]
-- Backends: OpenGL3: Fixed version check mistakenly testing for GL 4.0+ instead of 3.2+ to enable
- ImGuiBackendFlags_RendererHasVtxOffset, leaving 3.2 contexts without it. (#3119, #2866) [@wolfpld]
-- Backends: OpenGL3: Added include support for older glbinding 2.x loader. (#3061) [@DonKult]
-- Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(),
- ImGui_ImplWin32_GetDpiScaleForMonitor() helpers functions (backported from the docking branch).
- Those functions makes it easier for example apps to support hi-dpi features without setting up
- a manifest.
-- Backends: Win32: Calling AddInputCharacterUTF16() from WM_CHAR message handler in order to support
- high-plane surrogate pairs. (#2815) [@cloudwu, @samhocevar]
-- Backends: SDL: Added ImGui_ImplSDL2_InitForMetal() for API consistency (even though the function
- currently does nothing).
-- Backends: SDL: Fixed mapping for ImGuiKey_KeyPadEnter. (#3031) [@Davido71]
-- Examples: Win32+DX12: Fixed resizing main window, enabled debug layer. (#3087, #3115) [@sergeyn]
-- Examples: SDL+DX11: Fixed resizing main window. (#3057) [@joeslay]
-- Examples: Added SDL+Metal example application. (#3017) [@coding-jackalope]
-
-
------------------------------------------------------------------------
- VERSION 1.75 (Released 2020-02-10)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.75
-
-Breaking Changes:
-
-- Removed redirecting functions/enums names that were marked obsolete in 1.53 (December 2017):
- - ShowTestWindow() -> use ShowDemoWindow()
- - IsRootWindowFocused() -> use IsWindowFocused(ImGuiFocusedFlags_RootWindow)
- - IsRootWindowOrAnyChildFocused() -> use IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows)
- - SetNextWindowContentWidth(w) -> use SetNextWindowContentSize(ImVec2(w, 0.0f)
- - GetItemsLineHeightWithSpacing() -> use GetFrameHeightWithSpacing()
- - ImGuiCol_ChildWindowBg -> use ImGuiCol_ChildBg
- - ImGuiStyleVar_ChildWindowRounding -> use ImGuiStyleVar_ChildRounding
- - ImGuiTreeNodeFlags_AllowOverlapMode -> use ImGuiTreeNodeFlags_AllowItemOverlap
- - IMGUI_DISABLE_TEST_WINDOWS -> use IMGUI_DISABLE_DEMO_WINDOWS
- If you were still using the old names, while you are cleaning up, considering enabling
- IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h even temporarily to have a pass at finding
- and removing up old API calls, if any remaining.
-- Removed implicit default parameter to IsMouseDragging(int button = 0) to be consistent
- with other mouse functions (none of the other functions have it).
-- Obsoleted calling ImDrawList::PrimReserve() with a negative count (which was vaguely
- documented and rarely if ever used). Instead we added an explicit PrimUnreserve() API
- which can be implemented faster. Also clarified pre-existing constraints which weren't
- documented (can only unreserve from the last reserve call). If you suspect you ever
- used that feature before (very unlikely, but grep for call to PrimReserve in your code),
- you can #define IMGUI_DEBUG_PARANOID in imconfig.h to catch existing calls. [@ShironekoBen]
-- ImDrawList::AddCircle()/AddCircleFilled() functions don't accept negative radius.
-- Limiting Columns()/BeginColumns() api to 64 columns with an assert. While the current code
- technically supports it, future code may not so we're putting the restriction ahead.
- [Undid that change in 1.76]
-- imgui_internal.h: changed ImRect() default constructor initializes all fields to 0.0f instead
- of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). If you used ImRect::Add() to create bounding boxes by
- adding points into it without explicit initialization, you may need to fix your initial value.
-
-Other Changes:
-
-- Inputs: Added ImGuiMouseButton enum for convenience (e.g. ImGuiMouseButton_Right=1).
- We forever guarantee that the existing value will not changes so existing code is free to use 0/1/2.
-- Nav: Fixed a bug where the initial CTRL+Tab press while in a child window sometimes selected
- the current root window instead of always selecting the previous root window. (#787)
-- ColorEdit: Fix label alignment when using ImGuiColorEditFlags_NoInputs. (#2955) [@rokups]
-- ColorEdit: In HSV display of a RGB stored value, attempt to locally preserve Saturation
- when Value==0.0 (similar to changes done in 1.73 for Hue). Removed Hue editing lock since
- those improvements in 1.73 makes them unnecessary. (#2722, #2770). [@rokups]
-- ColorEdit: "Copy As" context-menu tool shows hex values with a '#' prefix instead of '0x'.
-- ColorEdit: "Copy As" content-menu tool shows hex values both with/without alpha when available.
-- InputText: Fix corruption or crash when executing undo after clearing input with ESC, as a
- byproduct we are allowing to later undo the revert with a CTRL+Z. (#3008).
-- InputText: Fix using a combination of _CallbackResize (e.g. for std::string binding), along with the
- _EnterReturnsTrue flag along with the rarely used property of using an InputText without persisting
- user-side storage. Previously if you had e.g. a local unsaved std::string and reading result back
- from the widget, the user string object wouldn't be resized when Enter key was pressed. (#3009)
-- MenuBar: Fix minor clipping issue where occasionally a menu text can overlap the right-most border.
-- Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) [@Albog]
-- Window: When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we
- test both the focused/clicked window (which could be a child window) and the root window.
-- ImDrawList: AddCircle(), AddCircleFilled() API can now auto-tessellate when provided a segment
- count of zero. Alter tessellation quality with 'style.CircleSegmentMaxError'. [@ShironekoBen]
-- ImDrawList: Add AddNgon(), AddNgonFilled() API with a guarantee on the explicit segment count.
- In the current branch they are essentially the same as AddCircle(), AddCircleFilled() but as
- we will rework the circle rendering functions to use textures and automatic segment count
- selection, those new api can fill a gap. [@ShironekoBen]
-- Columns: ImDrawList::Channels* functions now work inside columns. Added extra comments to
- suggest using user-owned ImDrawListSplitter instead of ImDrawList functions. [@rokups]
-- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
-- Misc: Added IMGUI_DISABLE compile-time definition to make all headers and sources empty.
-- Misc: Disable format checks when using stb_printf, to allow using extra formats.
- Made IMGUI_USE_STB_SPRINTF a properly documented imconfig.h flag. (#2954) [@loicmolinari]
-- Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp
- files in a same compilation unit. Actual users of that technique (also called "Unity builds")
- can generally provide this themselves, so we don't really recommend you use this. [@rokups]
-- CI: Added PVS-Studio static analysis on the continuous-integration server. [@rokups]
-- Backends: GLFW, SDL, Win32, OSX, Allegro: Added support for ImGuiMouseCursor_NotAllowed. [@rokups]
-- Backends: GLFW: Added support for the missing mouse cursors newly added in GLFW 3.4+. [@rokups]
-- Backends: SDL: Wayland: use SDL_GetMouseState (because there is no global mouse state available
- on Wayland). (#2800, #2802) [@NeroBurner]
-- Backends: GLFW, SDL: report Windows key (io.KeySuper) as always released. Neither GLFW nor SDL can
- correctly report the key release in every cases (e.g. when using Win+V) causing problems with some
- widgets. The next release of GLFW (3.4+) will have a fix for it. However since it is both difficult
- and discouraged to make use of this key for Windows application anyway, we just hide it. (#2976)
-- Backends: Win32: Added support for #define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD to disable all
- XInput using code, and IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT to disable linking with XInput,
- the later may be problematic if compiling with recent Windows SDK and you want your app to run
- on Windows 7. You can instead try linking with Xinput9_1_0.lib instead. (#2716)
-- Backends: Glut: Improved FreeGLUT support for MinGW. (#3004) [@podsvirov]
-- Backends: Emscripten: Avoid forcefully setting IMGUI_DISABLE_FILE_FUNCTIONS. (#3005) [@podsvirov]
-- Examples: OpenGL: Explicitly adding -DIMGUI_IMPL_OPENGL_LOADER_GL3W to Makefile to match linking
- settings (otherwise if another loader such as Glew is accessible, the OpenGL3 backend might
- automatically use it). (#2919, #2798)
-- Examples: OpenGL: Added support for glbinding OpenGL loader. (#2870) [@rokups]
-- Examples: Emscripten: Demonstrating embedding fonts in Makefile and code. (#2953) [@Oipo]
-- Examples: Metal: Wrapped main loop in @autoreleasepool block to ensure allocations get freed
- even if underlying system event loop gets paused due to app nap. (#2910, #2917) [@bear24rw]
-
-
------------------------------------------------------------------------
- VERSION 1.74 (Released 2019-11-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.74
-
-Breaking Changes:
-
-- Removed redirecting functions/enums names that were marked obsolete in 1.52 (October 2017):
- - Begin() [old 5 args version] -> use Begin() [3 args], use SetNextWindowSize() SetNextWindowBgAlpha() if needed
- - IsRootWindowOrAnyChildHovered() -> use IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows)
- - AlignFirstTextHeightToWidgets() -> use AlignTextToFramePadding()
- - SetNextWindowPosCenter() -> use SetNextWindowPos() with a pivot of (0.5f, 0.5f)
- - ImFont::Glyph -> use ImFontGlyph
- If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out
- the new names or equivalent features, or see how they were implemented until 1.73.
-- Inputs: Fixed a miscalculation in the keyboard/mouse "typematic" repeat delay/rate calculation, used
- by keys and e.g. repeating mouse buttons as well as the GetKeyPressedAmount() function.
- If you were using a non-default value for io.KeyRepeatRate (previous default was 0.250), you can
- add +io.KeyRepeatDelay to it to compensate for the fix.
- The function was triggering on: 0.0 and (delay+rate*N) where (N>=1). Fixed formula responds to (N>=0).
- Effectively it made io.KeyRepeatRate behave like it was set to (io.KeyRepeatRate + io.KeyRepeatDelay).
- Fixed the code and altered default io.KeyRepeatRate,Delay from 0.250,0.050 to 0.300,0.050 to compensate.
- If you never altered io.KeyRepeatRate nor used GetKeyPressedAmount() this won't affect you.
-- Misc: Renamed IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS to IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS. (#1038)
-- Misc: Renamed IMGUI_DISABLE_MATH_FUNCTIONS to IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS.
-- Fonts: ImFontAtlas::AddCustomRectRegular() now requires an ID larger than 0x110000 (instead of 0x10000) to
- conform with supporting Unicode planes 1-16 in a future update. ID below 0x110000 will now assert.
-- Backends: DX12: Added extra ID3D12DescriptorHeap parameter to ImGui_ImplDX12_Init() function.
- The value is unused in master branch but will be used by the multi-viewport feature. (#2851) [@obfuscate]
-
-Other Changes:
-
-- InputText, Nav: Fixed Home/End key broken when activating Keyboard Navigation. (#787)
-- InputText: Filter out ASCII 127 (DEL) emitted by low-level OSX layer, as we are using the Key value. (#2578)
-- Layout: Fixed a couple of subtle bounding box vertical positioning issues relating to the handling of text
- baseline alignment. The issue would generally manifest when laying out multiple items on a same line,
- with varying heights and text baseline offsets.
- Some specific examples, e.g. a button with regular frame padding followed by another item with a
- multi-line label and no frame padding, such as: multi-line text, small button, tree node item, etc.
- The second item was correctly offset to match text baseline, and would interact/display correctly,
- but it wouldn't push the contents area boundary low enough.
-- Scrollbar: Fixed an issue where scrollbars wouldn't display on the frame following a frame where
- all child window contents would be culled.
-- ColorPicker: Fixed SV triangle gradient to block (broken in 1.73). (#2864, #2711). [@lewa-j]
-- TreeNode: Fixed combination of ImGuiTreeNodeFlags_SpanFullWidth and ImGuiTreeNodeFlags_OpenOnArrow
- incorrectly locating the arrow hit position to the left of the frame. (#2451, #2438, #1897)
-- TreeNode: The collapsing arrow accepts click even if modifier keys are being held, facilitating
- interactions with custom multi-selections patterns. (#2886, #1896, #1861)
-- TreeNode: Added IsItemToggledOpen() to explicitly query if item was just open/closed, facilitating
- interactions with custom multi-selections patterns. (#1896, #1861)
-- DragScalar, SliderScalar, InputScalar: Added p_ prefix to parameter that are pointers to the data
- to clarify how they are used, and more comments redirecting to the demo code. (#2844)
-- Error handling: Assert if user mistakenly calls End() instead of EndChild() on a child window. (#1651)
-- Misc: Optimized storage of window settings data (reducing allocation count).
-- Misc: Windows: Do not use _wfopen() if IMGUI_DISABLE_WIN32_FUNCTIONS is defined. (#2815)
-- Misc: Windows: Disabled win32 function by default when building with UWP. (#2892, #2895)
-- Misc: Using static_assert() when using C++11, instead of our own construct (avoid zealous Clang warnings).
-- Misc: Added IMGUI_DISABLE_FILE_FUNCTIONS/IMGUI_DISABLE_DEFAULT_FILE_FUNCTION to nullify or disable
- default implementation of ImFileXXX functions linking with fopen/fclose/fread/fwrite. (#2734)
-- Docs: Improved and moved FAQ to docs/FAQ.md so it can be readable on the web. [@ButternCream, @ocornut]
-- Docs: Moved misc/fonts/README.txt to docs/FONTS.txt.
-- Docs: Added permanent redirect from https://www.dearimgui.com/faq to FAQ page.
-- Demo: Added simple item reordering demo in Widgets -> Drag and Drop section. (#2823, #143) [@rokups]
-- Metrics: Show wire-frame mesh and approximate surface area when hovering ImDrawCmd. [@ShironekoBen]
-- Metrics: Expose basic details of each window key/value state storage.
-- Examples: DX12: Using IDXGIDebug1::ReportLiveObjects() when DX12_ENABLE_DEBUG_LAYER is enabled.
-- Examples: Emscripten: Removed BINARYEN_TRAP_MODE=clamp from Makefile which was removed in Emscripten 1.39.0
- but required prior to 1.39.0, making life easier for absolutely no-one. (#2877, #2878) [@podsvirov]
-- Backends: OpenGL2: Explicitly backup, setup and restore GL_TEXTURE_ENV to increase compatibility with
- legacy OpenGL applications. (#3000)
-- Backends: OpenGL3: Fix building with pre-3.2 GL loaders which do not expose glDrawElementsBaseVertex(),
- using runtime GL version to decide if we set ImGuiBackendFlags_RendererHasVtxOffset. (#2866, #2852) [@dpilawa]
-- Backends: OSX: Fix using Backspace key. (#2578, #2817, #2818) [@DiligentGraphics]
-- Backends: GLFW: Previously installed user callbacks are now restored on shutdown. (#2836) [@malte-v]
-- CI: Set up a bunch of continuous-integration tests using GitHub Actions. We now compile many of the example
- applications on Windows, Linux, MacOS, iOS, Emscripten. Removed Travis integration. (#2865) [@rokups]
-
-
------------------------------------------------------------------------
- VERSION 1.73 (Released 2019-09-24)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.73
-
-Other Changes:
-
-- Nav, Scrolling: Added support for Home/End key. (#787)
-- ColorEdit: Disable Hue edit when Saturation==0 instead of letting Hue values jump around.
-- ColorEdit, ColorPicker: In HSV display of a RGB stored value, attempt to locally preserve Hue
- when Saturation==0, which reduces accidentally lossy interactions. (#2722, #2770) [@rokups]
-- ColorPicker: Made rendering aware of global style alpha of the picker can be faded out. (#2711)
- Note that some elements won't accurately fade down with the same intensity, and the color wheel
- when enabled will have small overlap glitches with (style.Alpha < 1.0).
-- Tabs: Fixed single-tab not shrinking their width down.
-- Tabs: Fixed clicking on a tab larger than tab-bar width creating a bouncing feedback loop.
-- Tabs: Feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (#2768)
- (before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations).
-- Tabs: Improved shrinking for large number of tabs to avoid leaving extraneous space on the right side.
- Individuals tabs are given integer-rounded width and remainder is spread between tabs left-to-right.
-- Columns, Separator: Fixed a bug where non-visible separators within columns would alter the next row position
- differently than visible ones.
-- SliderScalar: Improved assert when using U32 or U64 types with a large v_max value. (#2765) [@loicmouton]
-- DragInt, DragFloat, DragScalar: Using (v_min > v_max) allows locking any edits to the value.
-- DragScalar: Fixed dragging of unsigned values on ARM cpu (float to uint cast is undefined). (#2780) [@dBagrat]
-- TreeNode: Added ImGuiTreeNodeFlags_SpanAvailWidth flag. (#2451, #2438, #1897) [@Melix19, @PathogenDavid]
- This extends the hit-box to the right-most edge, even if the node is not framed.
- (Note: this is not the default in order to allow adding other items on the same line. In the future we will
- aim toward refactoring the hit-system to be front-to-back, allowing more natural overlapping of items,
- and then we will be able to make this the default.)
-- TreeNode: Added ImGuiTreeNodeFlags_SpanFullWidth flag. This extends the hit-box to both the left-most and
- right-most edge of the working area, bypassing indentation.
-- CollapsingHeader: Added support for ImGuiTreeNodeFlags_Bullet and ImGuiTreeNodeFlags_Leaf on framed nodes,
- mostly for consistency. (#2159, #2160) [@goran-w]
-- Selectable: Added ImGuiSelectableFlags_AllowItemOverlap flag in public api (was previously internal only).
-- Style: Allow style.WindowMenuButtonPosition to be set to ImGuiDir_None to hide the collapse button. (#2634, #2639)
-- Font: Better ellipsis ("...") drawing implementation. Instead of drawing three pixely dots (which was glaringly
- unfitting with many types of fonts) we first attempt to find a standard ellipsis glyphs within the loaded set.
- Otherwise we render ellipsis using '.' from the font from where we trim excessive spacing to make it as narrow
- as possible. (#2775) [@rokups]
-- ImDrawList: Clarified the name of many parameters so reading the code is a little easier. (#2740)
-- ImDrawListSplitter: Fixed merging channels if the last submitted draw command used a different texture. (#2506)
-- Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94)
-- ImVector: Added find(), find_erase(), find_erase_unsorted() helpers.
-- Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when
- a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory
- usage has never been reported as a problem, so this is merely a touch of overzealous luxury. (#2636)
-- Documentation: Various tweaks and improvements to the README page. [@ker0chan]
-- Backends: OpenGL3: Tweaked initialization code allow application calling ImGui_ImplOpenGL3_CreateFontsTexture()
- before ImGui_ImplOpenGL3_NewFrame(), which sometimes can be convenient.
-- Backends: OpenGL3: Attempt to automatically detect default GL loader by using __has_include. (#2798) [@o-micron]
-- Backends: DX11: Fixed GSGetShader() call not passing an initialized instance count, which would
- generally make the DX11 debug layer complain (bug added in 1.72).
-- Backends: Vulkan: Added support for specifying multisample count. Set 'ImGui_ImplVulkan_InitInfo::MSAASamples' to
- one of the VkSampleCountFlagBits values to use, default is non-multisampled as before. (#2705, #2706) [@vilya]
-- Examples: OSX: Fix example_apple_opengl2/main.mm not forwarding mouse clicks and drags correctly. (#1961, #2710)
- [@intonarumori, @ElectricMagic]
-- Misc: Updated stb_rect_pack.h from 0.99 to 1.00 (fixes by @rygorous: off-by-1 bug in best-fit heuristic,
- fix handling of rectangles too large to fit inside texture). (#2762) [@tido64]
-
-
------------------------------------------------------------------------
- VERSION 1.72b (Released 2019-07-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.72b
-
-Other Changes:
-
-- Nav, Scrolling: Fixed programmatic scroll leading to a slightly incorrect scroll offset when
- the window has decorations or a menu-bar (broken in 1.71). This was mostly noticeable when
- a keyboard/gamepad movement led to scrolling the view, or using e.g. SetScrollHereY() function.
-- Nav: Made hovering non-MenuItem Selectable not re-assign the source item for keyboard navigation.
-- Nav: Fixed an issue with NavFlattened window flag (beta) where widgets not entirely fitting
- in child window (often selectables because of their protruding sides) would be not considered
- as entry points to to navigate toward the child window. (#787)
-
-
------------------------------------------------------------------------
- VERSION 1.72 (Released 2019-07-27)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.72
-
-Breaking Changes:
-
-- Removed redirecting functions/enums names that were marked obsolete in 1.51 (June 2017):
- - ImGuiCol_Column*, ImGuiSetCond_* enums.
- - IsItemHoveredRect(), IsPosHoveringAnyWindow(), IsMouseHoveringAnyWindow(), IsMouseHoveringWindow() functions.
- - IMGUI_ONCE_UPON_A_FRAME macro.
- If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out
- the new names or equivalent features.
-- Renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Kept redirection typedef (will obsolete).
-- Removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()).
- Kept redirection function (will obsolete). (#581, #324)
-
-Other Changes:
-
-- Scrolling: Made mouse-wheel scrolling lock the underlying window until the mouse is moved again or
- until a short delay expires (~2 seconds). This allow uninterrupted scroll even if child windows are
- passing under the mouse cursor. (#2604)
-- Scrolling: Made it possible for mouse wheel and navigation-triggered scrolling to override a call to
- SetScrollX()/SetScrollY(), making it possible to use a simpler stateless pattern for auto-scrolling:
- // (Submit items..)
- if (ImGui::GetScrollY() >= ImGui::GetScrollMaxY()) // If scrolling at the already at the bottom..
- ImGui::SetScrollHereY(1.0f); // ..make last item fully visible
-- Scrolling: Added SetScrollHereX(), SetScrollFromPosX() for completeness. (#1580) [@kevreco]
-- Scrolling: Mouse wheel scrolling while hovering a child window is automatically forwarded to parent window
- if ScrollMax is zero on the scrolling axis.
- Also still the case if ImGuiWindowFlags_NoScrollWithMouse is set (not new), but previously the forwarding
- would be disabled if ImGuiWindowFlags_NoScrollbar was set on the child window, which is not the case
- any more. Forwarding can still be disabled by setting ImGuiWindowFlags_NoInputs. (amend #1502, #1380).
-- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
-- Window: Fixed old SetWindowFontScale() api value from not being inherited by child window. Added
- comments about the right way to scale your UI (load a font at the right side, rebuild atlas, scale style).
-- Scrollbar: Avoid overlapping the opposite side when window (often a child window) is forcibly too small.
-- Combo: Hide arrow when there's not enough space even for the square button.
-- InputText: Testing for newly added ImGuiKey_KeyPadEnter key. (#2677, #2005) [@amc522]
-- Tabs: Fixed unfocused tab bar separator color (was using ImGuiCol_Tab, should use ImGuiCol_TabUnfocusedActive).
-- Columns: Fixed a regression from 1.71 where the right-side of the contents rectangle within each column
- would wrongly use a WindowPadding.x instead of ItemSpacing.x like it always did. (#125, #2666)
-- Columns: Made the right-most edge reaches up to the clipping rectangle (removing half of WindowPadding.x
- worth of asymmetrical/extraneous padding, note that there's another half that conservatively has to offset
- the right-most column, otherwise it's clipping width won't match the other columns). (#125, #2666)
-- Columns: Improved honoring alignment with various values of ItemSpacing.x and WindowPadding.x. (#125, #2666)
-- Columns: Made GetColumnOffset() and GetColumnWidth() behave when there's no column set, consistently with
- other column functions. (#2683)
-- InputTextMultiline: Fixed vertical scrolling tracking glitch.
-- Word-wrapping: Fixed overzealous word-wrapping when glyph edge lands exactly on the limit. Because
- of this, auto-fitting exactly unwrapped text would make it wrap. (fixes initial 1.15 commit, 78645a7d).
-- Style: Attenuated default opacity of ImGuiCol_Separator in Classic and Light styles.
-- Style: Added style.ColorButtonPosition (left/right, defaults to ImGuiDir_Right) to move the color button
- of ColorEdit3/ColorEdit4 functions to either side of the inputs.
-- IO: Added ImGuiKey_KeyPadEnter and support in various backends (previously backends would need to
- specifically redirect key-pad keys to their regular counterpart). This is a temporary attenuating measure
- until we actually refactor and add whole sets of keys into the ImGuiKey enum. (#2677, #2005) [@amc522]
-- Misc: Made Button(), ColorButton() not trigger an "edited" event leading to IsItemDeactivatedAfterEdit()
- returning true. This also effectively make ColorEdit4() not incorrect trigger IsItemDeactivatedAfterEdit()
- when clicking the color button to open the picker popup. (#1875)
-- Misc: Added IMGUI_DISABLE_METRICS_WINDOW imconfig.h setting to explicitly compile out ShowMetricsWindow().
-- Debug Tools: Added "Metrics->Tools->Item Picker" tool which allow clicking on a widget to break in the
- debugger within the item code. The tool calls IM_DEBUG_BREAK() which can be redefined in imconfig.h.
-- ImDrawList: Fixed CloneOutput() helper crashing. (#1860) [@gviot]
-- ImDrawList::ChannelsSplit(), ImDrawListSplitter: Fixed an issue with merging draw commands between
- channel 0 and 1. (#2624)
-- ImDrawListSplitter: Fixed memory leak when using low-level split api (was not affecting ImDrawList api,
- also this type was added in 1.71 and not advertised as a public-facing feature).
-- Fonts: binary_to_compressed_c.cpp: Display an error message if failing to open/read the input font file.
-- Demo: Log, Console: Using a simpler stateless pattern for auto-scrolling.
-- Demo: Widgets: Showing how to use the format parameter of Slider/Drag functions to display the name
- of an enum value instead of the underlying integer value.
-- Demo: Renamed the "Help" menu to "Tools" (more accurate).
-- Backends: DX10/DX11: Backup, clear and restore Geometry Shader is any is bound when calling renderer.
-- Backends: DX11: Clear Hull Shader, Domain Shader, Compute Shader before rendering. Not backing/restoring them.
-- Backends: OSX: Disabled default native Mac clipboard copy/paste implementation in core library (added in 1.71),
- because it needs application to be linked with '-framework ApplicationServices'. It can be explicitly
- enabled back by using '#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS' in imconfig.h. Re-added
- equivalent using NSPasteboard api in the imgui_impl_osx.mm experimental backend. (#2546)
-- Backends: SDL2: Added ImGui_ImplSDL2_InitForD3D() function to make D3D support more visible.
- (#2482, #2632) [@josiahmanson]
-- Examples: Added SDL2+DirectX11 example application. (#2632, #2612, #2482) [@vincenthamm]
-
-
------------------------------------------------------------------------
- VERSION 1.71 (Released 2019-06-12)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.71
-
-Breaking Changes:
-
-- IO: changed AddInputCharacter(unsigned short c) signature to AddInputCharacter(unsigned int c).
-- Renamed SetNextTreeNodeOpen() to SetNextItemOpen(). Kept inline redirection function (will obsolete).
-- Window: rendering of child windows outer decorations (e.g. bg color, border, scrollbars) is now
- performed as part of their parent window, avoiding the creation of an extraneous draw commands.
- If you have overlapping child windows with decorations, and relied on their relative z-order to be
- mapped to submission their order, this will affect your rendering. The optimization is disabled
- if the parent window has no visual output because it appears to be the most common situation leading
- to the creation of overlapping child windows. Please reach out if you are affected by this change!
-
-Other Changes:
-
-- Window: clarified behavior of SetNextWindowContentSize(). Content size is defined as the size available
- after removal of WindowPadding on each sides. So SetNextWindowContentSize(ImVec2(100,100)) + auto-resize
- will always allow submitting a 100x100 item without creating a scrollbar, regarding of WindowPadding.
- The exact meaning of ContentSize for decorated windows was previously ill-defined.
-- Window: Fixed auto-resize with AlwaysVerticalScrollbar or AlwaysHorizontalScrollbar flags.
-- Window: Fixed one case where auto-resize by double-clicking the resize grip would make either scrollbar
- appear for a single frame after the resize.
-- Separator: Revert 1.70 "Declare its thickness (1.0f) to the layout" change. It's not incorrect
- but it breaks existing some layout patterns. Will return back to it when we expose Separator flags.
-- Fixed InputScalar, InputScalarN, SliderScalarN, DragScalarN with non-visible label from inserting
- style.ItemInnerSpacing.x worth of trailing spacing.
-- Fixed InputFloatX, SliderFloatX, DragFloatX functions erroneously reporting IsItemEdited() multiple
- times when the text input doesn't match the formatted output value (e.g. input "1" shows "1.000").
- It wasn't much of a problem because we typically use the return value instead of IsItemEdited() here.
-- Fixed uses of IsItemDeactivated(), IsItemDeactivatedAfterEdit() on multi-components widgets and
- after EndGroup(). (#2550, #1875)
-- Fixed crash when appending with BeginMainMenuBar() more than once and no other window are showing. (#2567)
-- ColorEdit: Fixed the color picker popup only displaying inputs as HSV instead of showing multiple
- options. (#2587, broken in 1.69 by #2384).
-- CollapsingHeader: Better clipping when a close button is enabled and it overlaps the label. (#600)
-- Scrollbar: Minor bounding box adjustment to cope with various border size.
-- Scrollbar, Style: Changed default style.ScrollbarSize from 16 to 14.
-- Combo: Fixed rounding not applying with the ImGuiComboFlags_NoArrowButton flag. (#2607) [@DucaRii]
-- Nav: Fixed gamepad/keyboard moving of window affecting contents size incorrectly, sometimes leading
- to scrollbars appearing during the movement.
-- Nav: Fixed rare crash when e.g. releasing Alt-key while focusing a window with a menu at the same
- frame as clearing the focus. This was in most noticeable in backends such as Glfw and SDL which
- emits key release events when focusing another viewport, leading to Alt+clicking on void on another
- viewport triggering the issue. (#2609)
-- TreeNode, CollapsingHeader: Fixed highlight frame not covering horizontal area fully when using
- horizontal scrolling. (#2211, #2579)
-- Tabs: Fixed BeginTabBar() within a window with horizontal scrolling from creating a feedback
- loop with the horizontal contents size.
-- Columns: Fixed Columns() within a window with horizontal scrolling from not covering the full
- horizontal area (previously only worked with an explicit contents size). (#125)
-- Columns: Fixed Separator from creating an extraneous draw command. (#125)
-- Columns: Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. (#125)
-- Style: Added style.WindowMenuButtonPosition (left/right, defaults to ImGuiDir_Left) to move the
- collapsing/docking button to the other side of the title bar.
-- Style: Made window close button cross slightly smaller.
-- Log/Capture: Fixed BeginTabItem() label not being included in a text log/capture.
-- ImDrawList: Added ImDrawCmd::VtxOffset value to support large meshes (64k+ vertices) using 16-bit indices.
- The renderer backend needs to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' to enable
- this, and honor the ImDrawCmd::VtxOffset field. Otherwise the value will always be zero. (#2591)
- This has the advantage of preserving smaller index buffers and allowing to execute on hardware that do not
- support 32-bit indices. Most examples backends have been modified to support the VtxOffset field.
-- ImDrawList: Added ImDrawCmd::IdxOffset value, equivalent to summing element count for each draw command.
- This is provided for convenience and consistency with VtxOffset. (#2591)
-- ImDrawCallback: Allow to override the signature of ImDrawCallback by #define-ing it. This is meant to
- facilitate custom rendering backends passing local render-specific data to the draw callback.
-- ImFontAtlas: FreeType: Added RasterizerFlags::Monochrome flag to disable font anti-aliasing. Combine
- with RasterizerFlags::MonoHinting for best results. (#2545) [@HolyBlackCat]
-- ImFontGlyphRangesBuilder: Fixed unnecessarily over-sized buffer, which incidentally was also not
- fully cleared. Fixed edge-case overflow when adding character 0xFFFF. (#2568). [@NIKE3500]
-- Demo: Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows.
-- Backends: Add native Mac clipboard copy/paste default implementation in core library to match what we are
- dealing with Win32, and to facilitate integration in custom engines. (#2546) [@andrewwillmott]
-- Backends: OSX: imgui_impl_osx: Added mouse cursor support. (#2585, #1873) [@actboy168]
-- Examples/Backends: DirectX9/10/11/12, Metal, Vulkan, OpenGL3 (Desktop GL only): Added support for large meshes
- (64k+ vertices) with 16-bit indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in those backends. (#2591)
-- Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(),
- the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode
- support. (#2538, #2541)
-
-
------------------------------------------------------------------------
- VERSION 1.70 (Released 2019-05-06)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.70
-
-Breaking Changes:
-
-- ImDrawList: Improved algorithm for mitre joints on thick lines, preserving correct thickness
- up to 90 degrees angles (e.g. rectangles). If you have custom rendering using thick lines,
- they will appear a little thicker now. (#2518) [@rmitton]
-- Obsoleted GetContentRegionAvailWidth(), use GetContentRegionAvail().x instead.
- Kept inline redirection function.
-- Examples: Vulkan: Added MinImageCount/ImageCount fields in ImGui_ImplVulkan_InitInfo, required
- during initialization to specify the number of in-flight image requested by swap chains.
- (was previously a hard #define IMGUI_VK_QUEUED_FRAMES 2). (#2071, #1677) [@nathanvoglsam]
-- Examples: Vulkan: Tidying up the demo/internals helpers (most engine/app should not rely
- on them but it is possible you have!).
-
-Other Changes:
-
-- ImDrawList: Added ImDrawCallback_ResetRenderState, a special ImDrawList::AddCallback() value
- to request the renderer backend to reset its render state. (#2037, #1639, #2452)
- Examples: Added support for ImDrawCallback_ResetRenderState in all renderer backends. Each
- renderer code setting up initial render state has been moved to a function so it could be
- called at the start of rendering and when a ResetRenderState is requested. [@ocornut, @bear24rw]
-- InputText: Fixed selection background rendering one frame after the cursor movement when
- first transitioning from no-selection to has-selection. (Bug in 1.69) (#2436) [@Nazg-Gul]
-- InputText: Work-around for buggy standard libraries where isprint('\t') returns true. (#2467, #1336)
-- InputText: Fixed ImGuiInputTextFlags_AllowTabInput leading to two tabs characters being inserted
- if the backend provided both Key and Character input. (#2467, #1336)
-- Layout: Added SetNextItemWidth() helper to avoid using PushItemWidth/PopItemWidth() for single items.
- Note that SetNextItemWidth() currently only affect the same subset of items as PushItemWidth(),
- generally referred to as the large framed+labeled items. Because the new SetNextItemWidth()
- function is explicit we may later extend its effect to more items.
-- Layout: Fixed PushItemWidth(-width) for right-side alignment laying out some items (button, listbox, etc.)
- with negative sizes if the 'width' argument was smaller than the available width at the time of item
- submission.
-- Window: Fixed window with the AlwaysAutoResize flag unnecessarily extending their hovering boundaries
- by a few pixels (this is used to facilitate resizing from borders when available for a given window).
- One of the noticeable minor side effect was that navigating menus would have had a tendency to disable
- highlight from parent menu items earlier than necessary while approaching the child menu.
-- Window: Close button is horizontally aligned with style.FramePadding.x.
-- Window: Fixed contents region being off by WindowBorderSize amount on the right when scrollbar is active.
-- Window: Fixed SetNextWindowSizeConstraints() with non-rounded positions making windows drift. (#2067, #2530)
-- Popups: Closing a popup restores the focused/nav window in place at the time of the popup opening,
- instead of restoring the window that was in the window stack at the time of the OpenPopup call. (#2517)
- Among other things, this allows opening a popup while no window are focused, and pressing Escape to
- clear the focus again.
-- Popups: Fixed right-click from closing all popups instead of aiming at the hovered popup level
- (regression in 1.67).
-- Selectable: With ImGuiSelectableFlags_AllowDoubleClick doesn't return true on the mouse button release
- following the double-click. Only first mouse release + second mouse down (double-click) returns true.
- Likewise for internal ButtonBehavior() with both _PressedOnClickRelease | _PressedOnDoubleClick. (#2503)
-- GetMouseDragDelta(): also returns the delta on the mouse button released frame. (#2419)
-- GetMouseDragDelta(): verify that mouse positions are valid otherwise returns zero.
-- Inputs: Also add support for horizontal scroll with Shift+Mouse Wheel. (#2424, #1463) [@LucaRood]
-- PlotLines, PlotHistogram: Ignore NaN values when calculating min/max bounds. (#2485)
-- Columns: Fixed boundary of clipping being off by 1 pixel within the left column. (#125)
-- Separator: Declare its thickness (1.0f) to the layout, making items around separator more symmetrical.
-- Combo, Slider, Scrollbar: Improve rendering in situation when there's only a few pixels available (<3 pixels).
-- Nav: Fixed Drag/Slider functions going into text input mode when keyboard CTRL is held while pressing NavActivate.
-- Drag and Drop: Fixed drag source with ImGuiDragDropFlags_SourceAllowNullID and null ID from receiving click
- regardless of being covered by another window (it didn't honor correct hovering rules). (#2521)
-- ImDrawList: Improved algorithm for mitre joints on thick lines, preserving correct thickness up to 90 degrees
- angles, also faster to output. (#2518) [@rmitton]
-- Misc: Added IM_MALLOC/IM_FREE macros mimicking IM_NEW/IM_DELETE so user doesn't need to revert
- to using the ImGui::MemAlloc()/MemFree() calls directly.
-- Misc: Made IMGUI_CHECKVERSION() macro also check for matching size of ImDrawIdx.
-- Metrics: Added "Show windows rectangles" tool to visualize the different rectangles.
-- Demo: Improved trees in columns demo.
-- Examples: OpenGL: Added a test GL call + comments in ImGui_ImplOpenGL3_Init() to detect uninitialized
- GL function loaders early, and help users understand what they are missing. (#2421)
-- Examples: SDL: Added support for SDL_GameController gamepads (enable with ImGuiConfigFlags_NavEnableGamepad). (#2509) [@DJLink]
-- Examples: Emscripten: Added Emscripten+SDL+GLES2 example. (#2494, #2492, #2351, #336) [@nicolasnoble, @redblobgames]
-- Examples: Metal: Added Glfw+Metal example. (#2527) [@bear24rw]
-- Examples: OpenGL3: Minor tweaks + not calling glBindBuffer more than necessary in the render loop.
-- Examples: Vulkan: Fixed in-flight buffers issues when using multi-viewports. (#2461, #2348, #2378, #2097)
-- Examples: Vulkan: Added missing support for 32-bit indices (#define ImDrawIdx unsigned int).
-- Examples: Vulkan: Avoid passing negative coordinates to vkCmdSetScissor, which debug validation layers do not like.
-- Examples: Vulkan: Added ImGui_ImplVulkan_SetMinImageCount() to change min image count at runtime. (#2071) [@nathanvoglsam]
-- Examples: DirectX9: Fixed erroneous assert in ImGui_ImplDX9_InvalidateDeviceObjects(). (#2454)
-- Examples: DirectX10/11/12, Allegro, Marmalade: Render functions early out when display size is zero (minimized). (#2496)
-- Examples: GLUT: Fixed existing FreeGLUT example to work with regular GLUT. (#2465) [@andrewwillmott]
-- Examples: GLUT: Renamed imgui_impl_freeglut.cpp/.h to imgui_impl_glut.cpp/.h. (#2465) [@andrewwillmott]
-- Examples: GLUT: Made io.DeltaTime always > 0. (#2430)
-- Examples: Visual Studio: Updated default platform toolset+sdk in vcproj files from v100+sdk7 (vs2010)
- to v110+sdk8 (vs2012). This is mostly so we can remove reliance on DXSDK_DIR for the DX10/DX11 example,
- which if existing and when switching to recent SDK ends up conflicting and creating warnings.
-
-
------------------------------------------------------------------------
- VERSION 1.69 (Released 2019-03-13)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.69
-
-Breaking Changes:
-
-- Renamed ColorEdit/ColorPicker's ImGuiColorEditFlags_RGB/_HSV/_HEX flags to respectively
- ImGuiColorEditFlags_DisplayRGB/_DisplayHSV/_DisplayHex. This is because the addition of
- new flag ImGuiColorEditFlags_InputHSV makes the earlier one ambiguous.
- Kept redirection enum values (will obsolete). (#2384) [@haldean]
-- Renamed GetOverlayDrawList() to GetForegroundDrawList(). Kept redirection function (will obsolete). (#2391)
-
-Other Changes:
-
-- Added GetBackgroundDrawList() helper to quickly get access to a ImDrawList that will be rendered
- behind every other windows. (#2391, #545)
-- DragScalar, InputScalar, SliderScalar: Added support for u8/s8/u16/s16 data types (ImGuiDataType_S8, etc.)
- We are reusing function instances of larger types to reduce code size. (#643, #320, #708, #1011)
-- Added InputTextWithHint() to display a description/hint in the text box when no text
- has been entered. (#2400) [@Organic-Code, @ocornut]
-- Nav: Fixed a tap on AltGR (e.g. German keyboard) from navigating to the menu layer.
-- Nav: Fixed Ctrl+Tab keeping active InputText() of a previous window active after the switch. (#2380)
-- Fixed IsItemDeactivated()/IsItemDeactivatedAfterEdit() from not correctly returning true
- when tabbing out of a focusable widget (Input/Slider/Drag) in most situations. (#2215, #1875)
-- InputInt, InputFloat, InputScalar: Fix to keep the label of the +/- buttons centered when
- style.FramePadding.x is abnormally larger than style.FramePadding.y. Since the buttons are
- meant to be square (to align with e.g. color button) we always use FramePadding.y. (#2367)
-- InputInt, InputScalar: +/- buttons now respects the natural type limits instead of
- overflowing or underflowing the value.
-- InputText: Fixed an edge case crash that would happen if another widget sharing the same ID
- is being swapped with an InputText that has yet to be activated.
-- InputText: Fixed various display corruption related to swapping the underlying buffer while
- an input widget is active (both for writable and read-only paths). Often they would manifest
- when manipulating the scrollbar of a multi-line input text.
-- ColorEdit, ColorPicker, ColorButton: Added ImGuiColorEditFlags_InputHSV to manipulate color
- values encoded as HSV (in order to avoid HSV<>RGB round trips and associated singularities).
- (#2383, #2384) [@haldean]
-- ColorPicker: Fixed a bug/assertion when displaying a color picker in a collapsed window
- while dragging its title bar. (#2389)
-- ColorEdit: Fixed tooltip not honoring the ImGuiColorEditFlags_NoAlpha contract of never
- reading the 4th float in the array (value was read and discarded). (#2384) [@haldean]
-- MenuItem, Selectable: Fixed disabled widget interfering with navigation (fix c2db7f63 in 1.67).
-- Tabs: Fixed a crash when using many BeginTabBar() recursively (didn't affect docking). (#2371)
-- Tabs: Added extra misusage error recovery. Past the assert, common misusage don't lead to
- hard crashes any more, facilitating integration with scripting languages. (#1651)
-- Tabs: Fixed ImGuiTabItemFlags_SetSelected being ignored if the tab is not visible (with
- scrolling policy enabled) or if is currently appearing.
-- Tabs: Fixed Tab tooltip code making drag and drop tooltip disappear during the frame where
- the drag payload activate a tab.
-- Tabs: Reworked scrolling policy (when ImGuiTabBarFlags_FittingPolicyScroll is set) to
- teleport the view when aiming at a tab far away the visible section, and otherwise accelerate
- the scrolling speed to cap the scrolling time to 0.3 seconds.
-- Text: Fixed large Text/TextUnformatted calls not feeding their size into layout when starting
- below the lower point of the current clipping rectangle. This bug has been there since v1.0!
- It was hardly noticeable but would affect the scrolling range, which in turn would affect
- some scrolling request functions when called during the appearing frame of a window.
-- Plot: Fixed divide-by-zero in PlotLines() when passing a count of 1. (#2387) [@Lectem]
-- Log/Capture: Fixed LogXXX functions emitting extraneous leading carriage return.
-- Log/Capture: Fixed an issue when empty string on a new line would not emit a carriage return.
-- Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute
- tree depth instead of a relative one.
-- Log/Capture: Fixed CollapsingHeader trailing ascii representation being "#" instead of "##".
-- ImFont: Added GetGlyphRangesVietnamese() helper. (#2403)
-- Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f).
-- Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
-- Demo: InputText: Demonstrating use of ImGuiInputTextFlags_CallbackResize. (#2006, #1443, #1008).
-- Examples: GLFW, SDL: Preserve DisplayFramebufferScale when main viewport is minimized.
- (This is particularly useful for the viewport branch because we are not supporting per-viewport
- frame-buffer scale. It fixes windows not refreshing when main viewport is minimized.) (#2416)
-- Examples: OpenGL: Fix to be able to run on ES 2.0 / WebGL 1.0. [@rmitton, @gabrielcuvillier]
-- Examples: OpenGL: Fix for OSX not supporting OpenGL 4.5, we don't try to read GL_CLIP_ORIGIN
- even if the OpenGL headers/loader happens to define the value. (#2366, #2186)
-- Examples: Allegro: Added support for touch events (emulating mouse). (#2219) [@dos1]
-- Examples: DirectX9: Minor changes to match the other DirectX examples more closely. (#2394)
-
-
------------------------------------------------------------------------
- VERSION 1.68 (Released 2019-02-19)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.68
-
-Breaking Changes:
-
-- Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already).
-- Made it illegal/assert when io.DisplayTime == 0.0f (with an exception for the first frame).
- If for some reason your time step calculation gives you a zero value, replace it with an arbitrarily small value!
-
-Other Changes:
-
-- Added .editorconfig file for text editors to standardize using spaces. (#2038) [@kudaba]
-- ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale).
- This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming
- multi-viewport feature to behave on Retina display and with multiple displays.
- If you are not using a custom backend, please update your render function code ahead of time,
- and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306, #1676)
-- Added IsItemActivated() as an extension to the IsItemDeactivated/IsItemDeactivatedAfterEdit functions
- which are useful to implement variety of undo patterns. (#820, #956, #1875)
-- InputText: Fixed a bug where ESCAPE would not restore the initial value in all situations. (#2321) [@relick]
-- InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787)
-- InputText: Fixed redo buffer exhaustion handling (rare) which could corrupt the undo character buffer. (#2333)
- The way the redo/undo buffers work would have made it generally unnoticeable to the user.
-- Fixed range-version of PushID() and GetID() not honoring the ### operator to restart from the seed value.
-- Fixed CloseCurrentPopup() on a child-menu of a modal incorrectly closing the modal. (#2308)
-- Tabs: Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. (#261, #351)
-- Tabs: Removed ImGuiTabBarFlags_NoTabListPopupButton which was available in 1.67 but actually had zero use.
-- Tabs: Fixed a minor clipping glitch when changing style's FramePadding from frame to frame.
-- Tabs: Fixed border (when enabled) so it is aligned correctly mid-pixel and appears as bright as other borders.
-- Style, Selectable: Added ImGuiStyle::SelectableTextAlign and ImGuiStyleVar_SelectableTextAlign. (#2347) [@haldean]
-- Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth)
- from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. (#1086)
-- RadioButton: Fixed label horizontal alignment to precisely match Checkbox().
-- Window: When resizing from an edge, the border is more visible and better follow the rounded corners.
-- Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). (#2336, #176)
-- Scrollbar: Fade out and disable interaction when too small, in order to facilitate using the resize grab on very
- small window, as well as reducing visual noise/overlap.
-- ListBox: Better optimized when clipped / non-visible.
-- InputTextMultiline: Better optimized when clipped / non-visible.
-- Font: Fixed high-level ImGui::CalcTextSize() used by most widgets from erroneously subtracting 1.0f*scale to
- calculated text width. Among noticeable side-effects, it would make sequences of repeated Text/SameLine calls
- not align the same as a single call, and create mismatch between high-level size calculation and those performed
- with the lower-level ImDrawList api. (#792) [@SlNPacifist]
-- Font: Fixed building atlas when specifying duplicate/overlapping ranges within a same font. (#2353, #2233)
-- ImDrawList: Fixed AddCircle(), AddCircleFilled() angle step being off, which was visible when drawing a "circle"
- with a small number of segments (e.g. an hexagon). (#2287) [@baktery]
-- ImGuiTextBuffer: Added append() function (unformatted).
-- ImFontAtlas: Added 0x2000-0x206F general punctuation range to default ChineseFull/ChineseSimplifiedCommon ranges. (#2093)
-- ImFontAtlas: FreeType: Added support for imgui allocators + custom FreeType only SetAllocatorFunctions. (#2285) [@Vuhdo]
-- ImFontAtlas: FreeType: Fixed using imgui_freetype.cpp in unity builds. (#2302)
-- Demo: Fixed "Log" demo not initializing properly, leading to the first line not showing before a Clear. (#2318) [@bluescan]
-- Demo: Added "Auto-scroll" option in Log/Console demos. (#2300) [@nicolasnoble, @ocornut]
-- Examples: Metal, OpenGL2, OpenGL3, Vulkan: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0)
- when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch,
- this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306) [@rasky, @ocornut]
- Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
-- Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
-- Examples: Win32: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created
- in a different thread or parent. (#1951, #2087, #2156, #2232) [many people]
-- Examples: SDL: Using the SDL_WINDOW_ALLOW_HIGHDPI flag. (#2306, #1676) [@rasky]
-- Examples: Win32: Added support for XInput gamepads (if ImGuiConfigFlags_NavEnableGamepad is enabled).
-- Examples: Win32: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages. (#2264)
-- Examples: DirectX9: Explicitly disable fog (D3DRS_FOGENABLE) before drawing in case user state has it set. (#2288, #2230)
-- Examples: OpenGL2: Added #define GL_SILENCE_DEPRECATION to cope with newer XCode warnings.
-- Examples: OpenGL3: Using GLSL 4.10 shaders for any GLSL version over 410 (e.g. 430, 450). (#2329) [@BrutPitt]
-
-
------------------------------------------------------------------------
- VERSION 1.67 (Released 2019-01-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.67
-
-Breaking Changes:
-
-- Made it illegal to call Begin("") with an empty string. This somehow half-worked before but had various undesirable
- side-effect because the window would have ID zero. In particular it is causing problems in viewport/docking branches.
-- Renamed io.ConfigResizeWindowsFromEdges to io.ConfigWindowsResizeFromEdges and removed its [Beta] mark.
- The addition of new configuration options in the Docking branch is pushing for a little reorganization of those names.
-- Renamed ImFontAtlas::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Kept redirection typedef (will obsolete).
-
-Other Changes:
-- Added BETA api for Tab Bar/Tabs widgets: (#261, #351)
- - Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
- - Added ImGuiTabBarFlags flags for BeginTabBar().
- - Added ImGuiTabItemFlags flags for BeginTabItem().
- - Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
- - Demo: Added Layout->Tabs demo code.
- - Demo: Added "Documents" example app showcasing possible use for tabs.
- This feature was merged from the Docking branch in order to allow the use of regular tabs in your code.
- (It does not provide the docking/splitting/merging of windows available in the Docking branch)
-- Added ImGuiWindowFlags_UnsavedDocument window flag to append '*' to title without altering the ID, as a convenience
- to avoid using the ### operator. In the Docking branch this also has an effect on tab closing behavior.
-- Window, Focus, Popup: Fixed an issue where closing a popup by clicking another window with the _NoMove flag would refocus
- the parent window of the popup instead of the newly clicked window.
-- Window: Contents size is preserved while a window collapsed. Fix auto-resizing window losing their size for one frame when uncollapsed.
-- Window: Contents size is preserved while a window contents is hidden (unless it is hidden for resizing purpose).
-- Window: Resizing windows from edge is now enabled by default (io.ConfigWindowsResizeFromEdges=true). Note that
- it only works _if_ the backend sets ImGuiBackendFlags_HasMouseCursors, which the standard backends do.
-- Window: Added io.ConfigWindowsMoveFromTitleBarOnly option. This is ignored by window with no title bars (often popups).
- This affects clamping window within the visible area: with this option enabled title bars need to be visible. (#899)
-- Window: Fixed using SetNextWindowPos() on a child window (which wasn't really documented) position the cursor as expected
- in the parent window, so there is no mismatch between the layout in parent and the position of the child window.
-- InputFloat: When using ImGuiInputTextFlags_ReadOnly the step buttons are disabled. (#2257)
-- DragFloat: Fixed broken mouse direction change with power!=1.0. (#2174, #2206) [@Joshhua5]
-- Nav: Fixed a keyboard issue where holding Activate/Space for longer than two frames on a button would unnecessary
- keep the focus on the parent window, which could steal it from newly appearing windows. (#787)
-- Nav: Fixed animated window titles from being updated when displayed in the CTRL+Tab list. (#787)
-- Error recovery: Extraneous/undesired calls to End() are now being caught by an assert in the End() function closer
- to the user call site (instead of being reported in EndFrame). Past the assert, they don't lead to crashes any more. (#1651)
- Missing calls to End(), past the assert, should not lead to crashes or to the fallback Debug window appearing on screen.
- Those changes makes it easier to integrate dear imgui with a scripting language allowing, given asserts are redirected
- into e.g. an error log and stopping the script execution.
-- ImFontAtlas: Stb and FreeType: Atlas width is now properly based on total surface rather than glyph count (unless overridden with TexDesiredWidth).
-- ImFontAtlas: Stb and FreeType: Fixed atlas builder so missing glyphs won't influence the atlas texture width. (#2233)
-- ImFontAtlas: Stb and FreeType: Fixed atlas builder so duplicate glyphs (when merging fonts) won't be included in the rasterized atlas.
-- ImFontAtlas: FreeType: Fixed abnormally high atlas height.
-- ImFontAtlas: FreeType: Fixed support for any values of TexGlyphPadding (not just only 1).
-- ImDrawList: Optimized some of the functions for performance of debug builds where non-inline function call cost are non-negligible.
- (Our test UI scene on VS2015 Debug Win64 with /RTC1 went ~5.9 ms -> ~4.9 ms. In Release same scene stays at ~0.3 ms.)
-- IO: Added BackendPlatformUserData, BackendRendererUserData, BackendLanguageUserData void* for storage use by backends.
-- IO: Renamed InputCharacters[], marked internal as was always intended. Please don't access directly, and use AddInputCharacter() instead!
-- IO: AddInputCharacter() goes into a queue which can receive as many characters as needed during the frame. This is useful
- for automation to not have an upper limit on typing speed. Will later transition key/mouse to use the event queue later.
-- Style: Tweaked default value of style.DisplayWindowPadding from (20,20) to (19,19) so the default style as a value
- which is the same as the title bar height.
-- Demo: "Simple Layout" and "Style Editor" are now using tabs.
-- Demo: Added a few more things under "Child windows" (changing ImGuiCol_ChildBg, positioning child, using IsItemHovered after a child).
-- Examples: DirectX10/11/12: Made imgui_impl_dx10/dx11/dx12.cpp link d3dcompiler.lib from the .cpp file to ease integration.
-- Examples: Allegro 5: Properly destroy globals on shutdown to allow for restart. (#2262) [@DomRe]
-
-
------------------------------------------------------------------------
- VERSION 1.66b (Released 2018-12-01)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.66b
-
-Other Changes:
-
-- Fixed a text rendering/clipping bug introduced in 1.66 (on 2018-10-12, commit ede3a3b9) that affect single ImDrawList::AddText()
- calls with single strings larger than 10k. Text/TextUnformatted() calls were not affected, but e.g. InputText() was. [@pdoane]
-- When the focused window become inactive don't restore focus to a window with the ImGuiWindowFlags_NoInputs flag. (#2213) [@zzzyap]
-- Separator: Fixed Separator() outputting an extraneous empty line when captured into clipboard/text/file.
-- Demo: Added ShowAboutWindow() call, previously was only accessible from the demo window.
-- Demo: ShowAboutWindow() now display various Build/Config Information (compiler, os, etc.) that can easily be copied into bug reports.
-- Fixed build issue with osxcross and macOS. (#2218) [@dos1]
-- Examples: Setting up 'io.BackendPlatformName'/'io.BackendRendererName' fields to the current backend can be displayed in the About window.
-- Examples: SDL: changed the signature of ImGui_ImplSDL2_ProcessEvent() to use a const SDL_Event*. (#2187)
-
-
------------------------------------------------------------------------
- VERSION 1.66 (Released 2018-11-22)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.66
-
-Breaking Changes:
-
-- Renamed SetScrollHere() to SetScrollHereY(). Kept redirection function (will obsolete).
-- Renamed misc/stl/imgui_stl.* to misc/cpp/imgui_stdlib.* in prevision for other C++ helper files. (#2035, #2096)
-
-Other Changes:
-
-- Fixed calling SetNextWindowSize()/SetWindowSize() with non-integer values leading to
- accidental alteration of window position. We now round the provided size. (#2067)
-- Fixed calling DestroyContext() always saving .ini data with the current context instead
- of the supplied context pointer. (#2066)
-- Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus
- properly after the main menu bar or last focused window is deactivated.
-- Nav: Fixed an assert in certain circumstance (mostly when using popups) when mouse positions stop being valid. (#2168)
-- Nav: Fixed explicit directional input not re-highlighting current nav item if there is a single item in the window
- and highlight has been previously disabled by the mouse. (#787)
-- DragFloat: Fixed a situation where dragging with value rounding enabled or with a power curve
- erroneously wrapped the value to one of the min/max edge. (#2024, #708, #320, #2075).
-- DragFloat: Disabled using power curve when one edge is FLT_MAX (broken in 1.61). (#2024)
-- DragFloat: Disabled setting a default drag speed when one edge is FLT_MAX. (#2024)
-- SliderAngle: Added optional format argument to alter precision or locale::get the string. (#2150) [@podsvirov]
-- Window: Resizing from edges (with io.ConfigResizeWindowsFromEdges Beta flag) extends the hit region
- of root floating windows outside the window, making it easier to resize windows. Resize grips are also
- extended accordingly so there are no discontinuity when hovering between borders and corners. (#1495, #822)
-- Window: Added ImGuiWindowFlags_NoBackground flag to avoid rendering window background. This is mostly to allow
- the creation of new flag combinations, as we could already use SetNextWindowBgAlpha(0.0f). (#1660) [@biojppm, @ocornut]
-- Window: Added ImGuiWindowFlags_NoDecoration helper flag which is essentially NoTitleBar+NoResize+NoScrollbar+NoCollapse.
-- Window: Added ImGuiWindowFlags_NoMouseInputs which is basically the old ImGuiWindowFlags_NoInputs (essentially
- we have renamed ImGuiWindowFlags_NoInputs to ImGuiWindowFlags_NoMouseInputs). Made the new ImGuiWindowFlags_NoInputs
- encompass both NoMouseInputs+NoNav, which is consistent with its description. (#1660, #787)
-- Window, Inputs: Fixed resizing from edges when io.MousePos is not pixel-rounded by rounding mouse position input. (#2110)
-- BeginChild(): Fixed BeginChild(const char*, ...) variation erroneously not applying the ID stack
- to the provided string to uniquely identify the child window. This was undoing an intentional change
- introduced in 1.50 and broken in 1.60. (#1698, #894, #713).
-- TextUnformatted(): Fixed a case where large-text path would read bytes past the text_end marker depending
- on the position of new lines in the buffer (it wasn't affecting the output but still not the right thing to do!)
-- ListBox(): Fixed frame sizing when items_count==1 unnecessarily showing a scrollbar. (#2173) [@luk1337, @ocornut]
-- ListBox(): Tweaked frame sizing so list boxes will look more consistent when FramePadding is far from ItemSpacing.
-- RenderText(): Some optimization for very large text buffers, useful for non-optimized builds.
-- BeginMenu(): Fixed menu popup horizontal offset being off the item in the menu bar when WindowPadding=0.0f.
-- ArrowButton(): Fixed arrow shape being horizontally misaligned by (FramePadding.y-FramePadding.x) if they are different.
-- Demo: Split the contents of ShowDemoWindow() into smaller functions as it appears to speed up link time with VS. (#2152)
-- Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)
-- ImGuiTextBuffer: Avoid heap allocation when empty.
-- ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3,
- in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty.
-- Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects
- in the WM_SIZE handler. (#2088) [@ice1000]
-- Examples: GLFW: User previously installed GLFW callbacks are now saved and chain-called by the default callbacks. (#1759)
-- Examples: OpenGL3: Added support for GL 4.5's glClipControl(GL_UPPER_LEFT). (#2186)
-- Examples: OpenGL3+GLFW: Fixed error condition when using the GLAD loader. (#2157) [@blackball]
-- Examples: OpenGL3+GLFW/SDL: Made main.cpp compile with IMGUI_IMPL_OPENGL_LOADER_CUSTOM (may be missing init). (#2178) [@doug-moen]
-- Examples: SDL2+Vulkan: Fixed application shutdown which could deadlock on Linux + Xorg. (#2181) [@eRabbit0]
-
-
------------------------------------------------------------------------
- VERSION 1.65 (Released 2018-09-06)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.65
-
-Breaking Changes:
-
-- Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and
- stb_rect_pack.h to imstb_rectpack.h. If you were conveniently using the imgui copy of those
- STB headers in your project, you will have to update your include paths. (#1718, #2036)
- The reason for this change is to avoid conflicts for projects that may also be importing
- their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
-- Renamed io.ConfigCursorBlink to io.ConfigInputTextCursorBlink. (#1427)
-
-Other Changes:
-
-- This is a minor release following the 1.64 refactor, with a little more shuffling of code.
-- Clarified and improved the source code sectioning in all files (easier to search or browse sections).
-- Nav: Removed the [Beta] tag from various descriptions of the gamepad/keyboard navigation system.
- Although it is not perfect and will keep being improved, it is fairly functional and used by many. (#787)
-- Fixed a build issue with non-Cygwin GCC under Windows.
-- Demo: Added a "Configuration" block to make io.ConfigFlags/io.BackendFlags more prominent.
-- Examples: OpenGL3+SDL2: Fixed error condition when using the GLAD loader. (#2059, #2002) [@jiri]
-
-
------------------------------------------------------------------------
- VERSION 1.64 (Released 2018-08-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.64
-
-Changes:
-
-- Moved README, CHANGELOG and TODO files to the docs/ folder.
- If you are updating dear imgui by copying files, take the chance to delete the old files.
-- Added imgui_widgets.cpp file, extracted and moved widgets code out of imgui.cpp into imgui_widgets.cpp.
- Re-ordered some of the code remaining in imgui.cpp.
- NONE OF THE FUNCTIONS HAVE CHANGED. THE CODE IS SEMANTICALLY 100% IDENTICAL, BUT _EVERY_ FUNCTIONS HAS BEEN MOVED.
- Because of this, any local modifications to imgui.cpp will likely conflict when you update.
- If you have any modifications to imgui.cpp, it is suggested that you first update to 1.63, then
- isolate your patches. You can peak at imgui_widgets.cpp from 1.64 to get a sense of what is included in it,
- then separate your changes into several patches that can more easily be applied to 1.64 on a per-file basis.
- What I found worked nicely for me, was to open the diff of the old patches in an interactive merge/diff tool,
- search for the corresponding function in the new code and apply the chunks manually.
-- As a reminder, if you have any change to imgui.cpp it is a good habit to discuss them on the GitHub,
- so a solution applicable on the Master branch can be found. If your company has changes that you cannot
- disclose you may also contact me privately.
-
-
------------------------------------------------------------------------
- VERSION 1.63 (Released 2018-08-29)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.63
-
-Breaking Changes:
-
-- Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features.
- Kept redirection enum (will obsolete).
-- Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecision over time.
-- Removed per-window ImGuiWindowFlags_ResizeFromAnySide Beta flag in favor `io.ConfigResizeWindowsFromEdges=true` to
- enable the feature globally. (#1495)
- The feature is not currently enabled by default because it is not satisfying enough, but will eventually be.
-- InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData
- for consistency. Kept redirection types (will obsolete).
-- InputText: Removed ImGuiTextEditCallbackData::ReadOnly because it is a duplication of (::Flags & ImGuiInputTextFlags_ReadOnly).
-- Renamed IsItemDeactivatedAfterChange() to IsItemDeactivatedAfterEdit() for consistency with new IsItemEdited() API.
- Kept redirection function (will obsolete soonish as IsItemDeactivatedAfterChange() is very recent).
-- Renamed io.OptCursorBlink to io.ConfigCursorBlink [-> io.ConfigInputTextCursorBlink in 1.65], io.OptMacOSXBehaviors to
- io.ConfigMacOSXBehaviors for consistency. (#1427, #473)
-- Removed obsolete redirection functions: CollapsingHeader() variation with 2 bools - marked obsolete in v1.49, May 2016.
-
-Other Changes:
-
-- ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
-- ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
-- Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. The change is motivated by upcoming
- Docking features. (#787)
-- Nav: Made CTRL+TAB skip menus + skip the current navigation window if is has the ImGuiWindow_NoNavFocus set. (#787)
- While it was previously possible, you won't be able to CTRL+TAB out and immediately back in a window with the
- ImGuiWindow_NoNavFocus flag.
-- Window: Allow menu and popups windows from ignoring the style.WindowMinSize values so short menus/popups are not padded. (#1909)
-- Window: Added global io.ConfigResizeWindowsFromEdges option to enable resizing windows from their edges and from
- the lower-left corner. (#1495)
-- Window: Collapse button shows hovering highlight + clicking and dragging on it allows to drag the window as well.
-- Added IsItemEdited() to query if the last item modified its value (or was pressed). This is equivalent to the bool
- returned by most widgets.
- It is useful in some situation e.g. using InputText() with ImGuiInputTextFlags_EnterReturnsTrue. (#2034)
-- InputText: Added support for buffer size/capacity changes via the ImGuiInputTextFlags_CallbackResize flag. (#2006, #1443, #1008).
-- InputText: Fixed not tracking the cursor horizontally when modifying the text buffer through a callback.
-- InputText: Fixed minor off-by-one issue when submitting a buffer size smaller than the initial zero-terminated buffer contents.
-- InputText: Fixed a few pathological crash cases on single-line InputText widget with multiple millions characters worth of contents.
- Because the current text drawing function reserve for a worst-case amount of vertices and how we handle horizontal clipping,
- we currently just avoid displaying those single-line widgets when they are over a threshold of 2 millions characters,
- until a better solution is found.
-- Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes
- related to the addition of IsItemDeactivated()). (#1875, #143)
-- Drag and Drop: Fixed ImGuiDragDropFlags_SourceNoDisableHover to affect hovering state prior to calling IsItemHovered() + fixed description. (#143)
-- Drag and Drop: Calling BeginTooltip() between a BeginDragSource()/EndDragSource() or BeginDropTarget()/EndDropTarget() uses adjusted tooltip
- settings matching the one created when calling BeginDragSource() without the ImGuiDragDropFlags_SourceNoPreviewTooltip flag. (#143)
-- Drag and Drop: Payload stays available and under the mouse if the source stops being submitted, however the tooltip is replaced by "...". (#1725)
-- Drag and Drop: Added ImGuiDragDropFlags_SourceAutoExpirePayload flag to force payload to expire if the source stops being submitted. (#1725, #143).
-- IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
-- Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211)
-- ColorEdit4: Fixed a bug when text input or drag and drop leading to unsaturated HSV values would erroneously alter the resulting color. (#2050)
-- Misc: Added optional misc/stl/imgui_stl.h wrapper to use with STL types (e.g. InputText with std::string). (#2006, #1443, #1008)
- [*EDIT* renamed to misc/std/imgui_stdlib.h in 1.66]
-- Misc: Added IMGUI_VERSION_NUM for easy compile-time testing. (#2025)
-- Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
-- Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
-- Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987)
-- Fixed assertion when transitioning from an active ID to another within a group, affecting ColorPicker (broken in 1.62). (#2023, #820, #956, #1875).
-- Fixed PushID() from keeping alive the new ID Stack top value (if a previously active widget shared the ID it would be erroneously kept alive).
-- Fixed horizontal mouse wheel not forwarding the request to the parent window if ImGuiWindowFlags_NoScrollWithMouse is set. (#1463, #1380, #1502)
-- Fixed an include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
-- ImDrawList: Improved handling for worst-case vertices reservation policy when large amount of text (e.g. 1+ million character strings)
- are being submitted in a single call. It would typically have crashed InputTextMultiline(). (#200)
-- OS/Windows: Fixed missing ImmReleaseContext() call in the default Win32 IME handler. (#1932) [@vby]
-- Metrics: Changed io.MetricsActiveWindows to reflect the number of active windows (!= from visible windows), which is useful
- for lazy/idle render mechanisms as new windows are typically not visible for one frame.
-- Metrics: Added io.MetricsRenderWindow to reflect the number of visible windows.
-- Metrics: Added io.MetricsActiveAllocations, moving away from the cross-context global counters than we previously used. (#1565, #1599, #586)
-- Demo: Added basic Drag and Drop demo. (#143)
-- Demo: Modified the Console example to use InsertChars() in the input text callback instead of poking directly into the buffer.
- Although this won't make a difference in the example itself, using InsertChars() will honor the resizing callback properly. (#2006, #1443, #1008).
-- Demo: Clarified the use of IsItemHovered()/IsItemActive() right after being in the "Active, Focused, Hovered & Focused Tests" section.
-- Examples: Tweaked the main.cpp of each example.
-- Examples: Metal: Added Metal rendering backend. (#1929, #1873) [@warrenm]
-- Examples: OSX: Added early raw OSX platform backend. (#1873) [@pagghiu, @itamago, @ocornut]
-- Examples: Added mac OSX & iOS + Metal example in example_apple_metal/. (#1929, #1873) [@warrenm]
-- Examples: Added mac OSX + OpenGL2 example in example_apple_opengl2/. (#1873)
-- Examples: OpenGL3: Added shaders more versions of GLSL. (#1938, #1941, #1900, #1513, #1466, etc.)
-- Examples: OpenGL3: Tweaked the imgui_impl_opengl3.cpp to work as-is with Emscripten + WebGL 2.0. (#1941). [@o-micron]
-- Examples: OpenGL3: Made the example app default to GL 3.0 + GLSL 130 (instead of GL 3.2 + GLSL 150) unless on Mac.
-- Examples: OpenGL3: Added error output when shaders fail to compile/link.
-- Examples: OpenGL3: Added support for glew and glad OpenGL loaders out of the box. (#2001, #2002) [@jdumas]
-- Examples: OpenGL2: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications. (#1996)
-- Examples: DirectX10, DirectX11: Fixed unreleased resources in Init and Shutdown functions. (#1944)
-- Examples: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility. (#1989) [@matt77hias]
-- Examples: Vulkan: Fixed handling of VkSurfaceCapabilitiesKHR::maxImageCount = 0 case. Tweaked present mode selections.
-- Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
-
-
------------------------------------------------------------------------
- VERSION 1.62 (Released 2018-06-22)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.62
-
-Breaking Changes:
-
-- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen.
- The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without
- ImGuiTreeNodeFlags_NoTreePushOnOpen. In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from
- your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
-- ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and
- discourage using the full set. (#1859)
-
-Other Changes:
-
-- Examples backends have been refactored to separate the platform code (e.g. Win32, Glfw, SDL2) from the renderer code (e.g. DirectX11, OpenGL3, Vulkan).
- The "Platform" backends are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, etc.
- The "Renderer" backends are in charge of: creating the main font texture, rendering imgui draw data.
- before: imgui_impl_dx11.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
- before: imgui_impl_dx12.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx12.cpp
- before: imgui_impl_glfw_gl3.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
- before: imgui_impl_glfw_vulkan.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
- before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp
- before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp etc.
- - The idea is what we can now easily combine and maintain backends and reduce code redundancy. Individual files are
- smaller and more reusable. Integration of imgui into a new/custom engine may also be easier as there is less overlap
- between "windowing / inputs" and "rendering" code, so you may study or grab one half of the code and not the other.
- - This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work
- from the Platform and Renderer backends, and the amount of redundancy across files was becoming too difficult to
- maintain. If you use default backends, you'll benefit from an easy update path to support multi-viewports later
- (for future ImGui 1.7x).
- - This is not strictly a breaking change if you keep your old backends, but when you'll want to fully update your backends,
- expect to have to reshuffle a few things.
- - Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- - Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Read examples/README.txt for details.
-- Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
-- Added IsItemDeactivatedAfterChange() [*EDIT* renamed to IsItemDeactivatedAfterEdit() in 1.63] if the last item was active previously,
- is not anymore, and during its active state modified a value. Note that you may still get false positive (e.g. drag value and while
- holding return on the same value). (#820, #956, #1875)
-- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
-- Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
-- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
-- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips,
- and not clamped by viewport. (#1739)
-- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip
- from the target site. (#143)
-- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX
- instead of EndXXX, to not affect tooltips and child windows.
-- Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
-- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
-- InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted,
- but text won't be corrupted).
-- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
-- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful
- for icon fonts. (#1869)
-- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese
- characters. (#1859) [@JX-Master, @ocornut]
-- Examples: OSX: Added imgui_impl_osx.mm backend to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
-- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by resetting the time storage properly). (#1827) [@ice1000]
-- Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
-- Examples: SDL+Vulkan: Added SDL+Vulkan example.
-- Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
-- Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 backend
- (will be fixed in Allegro 5.2.5+).
-- Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
-- Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other backends,
- a good occasion since we refactored the code.
-- Examples: FreeGLUT: Added FreeGLUT backends. Added FreeGLUT+OpenGL2 example. (#801)
-- Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate
- some uses. (#1888)
-- Examples: Fixed backends to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile
- with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
-- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
-- Internals: PushItemFlag() flags are inherited by BeginChild().
-
-
------------------------------------------------------------------------
- VERSION 1.61 (Released 2018-05-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.61
-
-Breaking Changes:
-
-- DragInt(): The default compile-time format string has been changed from "%.0f" to "%d", as we are not using integers internally
- any more. If you used DragInt() with custom format strings, make sure you change them to use %d or an integer-compatible format.
- To honor backward-compatibility, the DragInt() code will currently parse and modify format strings to replace %*f with %d,
- giving time to users to upgrade their code.
- If you have IMGUI_DISABLE_OBSOLETE_FUNCTIONS enabled, the code will instead assert! You may run a reg-exp search on your
- codebase for e.g. "DragInt.*%f" to you find them.
-- InputFloat(): Obsoleted InputFloat() functions taking an optional "int decimal_precision" in favor of an equivalent and more
- flexible "const char* format", consistent with other functions. Kept redirection functions (will obsolete).
-- Misc: IM_DELETE() helper function added in 1.60 doesn't set the input pointer to NULL, more consistent with standard
- expectation and allows passing r-values.
-
-Other Changes:
-
-- Added DragScalar, DragScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
-- Added InputScalar, InputScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
-- Added SliderScalar, SliderScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
-- Window: Fixed pop-ups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus
- displayed outside the safe area, etc.).
-- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
-- Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
-- Window: Fixed the default proportional item width lagging by one frame on resize.
-- Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating
- feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
-- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
-- Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory()
- to manually load/save .ini settings. (#923, #993)
-- Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory()
- should be called. (#923, #993)
-- Scrolling: Fixed a case where using SetScrollHere(1.0f) at the bottom of a window on the same frame the window height
- has been growing would have the scroll clamped using the previous height. (#1804)
-- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that
- don't display all pixels. (#1439) [@dougbinks]
-- InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
-- InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
-- InputText: Fixed returning true when edition is cancelled with ESC and the current buffer matches the initial value.
-- InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional
- "const char* format" parameter instead of "int decimal_precision". This allow using custom formats to display values
- in scientific notation, and is generally more consistent with other API.
- Obsoleted functions using the optional "int decimal_precision" parameter. (#648, #712)
-- DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing
- in the same direction (keyboard/gamepad version already did this).
-- DragFloat, DragInt: Honor natural type limits (e.g. INT_MAX, FLT_MAX) instead of wrapping around. (#708, #320)
-- DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
-- DragFloat, SliderFloat: Rounding-on-write uses the provided format string instead of parsing the precision from the string,
- which allows for finer uses of %e %g etc. (#648, #642)
-- DragFloat: Improved computation when using the power curve. Improved lost of input precision with very small steps.
- Added an assert than power-curve requires a min/max range. (~#642)
-- DragFloat: The 'power' parameter is only honored if the min/max parameter are also setup.
-- DragInt, SliderInt: Fixed handling of large integers (we previously passed data around internally as float, which reduced
- the range of valid integers).
-- ColorEdit: Fixed not being able to pass the ImGuiColorEditFlags_NoAlpha or ImGuiColorEditFlags_HDR flags to SetColorEditOptions().
-- Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor (as it happened in the pre-1.60 navigation branch). (#787)
-- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
-- Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render the default glyph. Saves space and allow merging fonts with
- overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
-- Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
-- Misc: Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it easier to redefine wrappers for std/crt math functions.
-- Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
-- Demo: Simple Overlay: Added a context menu item to enable freely moving the window.
-- Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643)
-- Examples: Calling IMGUI_CHECKVERSION() in the main.cpp of every example application.
-- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unnecessary conversion (Allegro 5 doesn't support 16-bit indices).
-- Examples: Allegro 5: Renamed backend from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
-- Examples: DirectX 9: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud. (#1790, #1687) [@sr-tream]
-- Examples: SDL: Fixed clipboard paste memory leak in the SDL backend code. (#1803) [@eliasdaler]
-- Various minor fixes, tweaks, refactoring, comments.
-
-
------------------------------------------------------------------------
- VERSION 1.60 (Released 2018-04-07)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.60
-
-The gamepad/keyboard navigation branch (which has been in the work since July 2016) has been merged.
-Gamepad/keyboard navigation is still marked as Beta and has to be enabled explicitly.
-Various internal refactoring have also been done, as part of the navigation work and as part of the upcoming viewport/docking work.
-
-Breaking Changes:
-
-- Obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render().
- e.g. with example backends, call ImDrawData* draw_data = ImGui::GetDrawData(); ImGui_ImplXXXX_RenderDrawData(draw_data).
-- Reorganized context handling to be more explicit: (#1599)
- - YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
- - removed Shutdown() function, as DestroyContext() serve this purpose. If you are using an old backend from the examples/ folder, remove the line that calls Shutdown().
- - you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
- - removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions(), and shared by all contexts.
- - removed the default global context and font atlas instance, which were confusing for users of DLL reloading and users of multiple contexts.
-- Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT and ImGuiMouseCursor_Count_ to ImGuiMouseCursor_COUNT for consistency with other public enums.
-- Fonts: Moved sample TTF files from extra_fonts/ to misc/fonts/. If you loaded files directly from the imgui repo you may need to update your paths.
-- Fonts: Changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed vertical rounding of Ascent/Descent to match TrueType renderer.
- If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
-- BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
-- Obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete).
-- Obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete).
-- Renamed io.WantMoveMouse to io.WantSetMousePos for consistency and ease of understanding (was added in 1.52, not used by core, and honored by some backend ahead of merging the Nav branch).
-- Removed ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered style colors as the closing cross uses regular button colors now.
-- Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData.
-- Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it should be easy to replicate on your side (you can find the code in 1.53).
-- [EDITED] Window: BeginChild() with an explicit name doesn't include the hash within the internal window name. (#1698)
- This change was erroneously introduced, undoing the change done for #894, #713, and not documented properly in the original
- 1.60 release Changelog. It was fixed on 2018-09-28 (1.66) and I wrote this paragraph the same day.
-
-Other Changes:
-
-- Doc: Added a Changelog file in the repository to ease comparing versions (it goes back to dear imgui 1.48), until now it was only on GitHub.
-- Navigation: merged in the gamepad/keyboard navigation (about a million changes!). (#787, #323)
- The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable.
-- To use Gamepad Navigation:
- - Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
- - Backend: Set io.BackendFlags |= ImGuiBackendFlags_HasGamepad + fill the io.NavInputs[] fields before calling NewFrame(). Read imgui.cpp for more details.
- - See https://github.com/ocornut/imgui/issues/1599 for recommended gamepad mapping or download PNG/PSD at http://goo.gl/9LgVZW
- - See 'enum ImGuiNavInput_' in imgui.h for a description of inputs. Read imgui.cpp for more details.
-- To use Keyboard Navigation:
- - Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically
- fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
- - Basic controls: arrows to navigate, Alt to enter menus, Space to activate item, Enter to edit text,
- Escape to cancel/close, Ctrl+Tab to focus windows, etc.
- - When keyboard navigation is active (io.NavActive + ImGuiConfigFlags_NavEnableKeyboard),
- the io.WantCaptureKeyboard flag will be set.
- - For more advanced uses, you may want to read from io.NavActive or io.NavVisible. Read imgui.cpp for more details.
-- Navigation: SetItemDefaultFocus() sets the navigation position in addition to scrolling. (#787)
-- Navigation: Added IsItemFocused(), added IsAnyItemFocused(). (#787)
-- Navigation: Added window flags: ImGuiWindowFlags_NoNav (== ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus).
-- Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
-- Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
-- Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
-- Context: Removed the default global context and font atlas instances, which caused various
- problems to users of multiple contexts and DLL users. (#1565, #1599) YOU NOW NEED TO CALL
- ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
- Existing apps will assert/crash without it.
-- Context: Added SetAllocatorFunctions() to rewire memory allocators (as a replacement to previous
- parameters to CreateContext()). Allocators are shared by all contexts and imgui helpers. (#1565, #586, #992, #1007, #1558)
-- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share.
- Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
-- Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
-- IO: Added io.ConfigFlags for user application to store settings for imgui and for the backend:
- - ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
- - ImGuiConfigFlags_NavEnableGamepad: Enable gamepad navigation (provided ImGuiBackendFlags_HasGamepad is also set by backend).
- - ImGuiConfigFlags_NavEnableSetMousePos: Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward.
- - ImGuiConfigFlags_NoMouseCursorChange: Instruct backend to not alter mouse cursor shape and visibility (by default the example backend use mouse cursor API of the platform when available)
- - ImGuiConfigFlags_NoMouse: Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information passed by the backend.
- - ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen: Flags for general application use.
-- IO: Added io.BackendFlags for backend to store its capabilities (currently: _HasGamepad,
- _HasMouseCursors, _HasSetMousePos). This will be used more in the next version.
-- IO: Added ImGuiKey_Insert, ImGuiKey_Space keys. Setup in all example backends. (#1541)
-- IO: Added Horizontal Mouse Wheel support for horizontal scrolling. (#1463) [@tseeker]
-- IO: Added IsAnyMouseDown() helper which is helpful for backends to handle mouse capturing.
-- Window: Clicking on a window with the ImGuiWIndowFlags_NoMove flags takes an ActiveId so
- we can't hover something else when dragging afterwards. (#1381, #1337)
-- Window: IsWindowHovered(): Added ImGuiHoveredFlags_AnyWindow, ImGuiFocusedFlags_AnyWindow flags
- (See Breaking Changes). Added to demo. (#1382)
-- Window: Added SetNextWindowBgAlpha() helper. Particularly helpful since the legacy 5-parameters
- version of Begin() has been marked as obsolete in 1.53. (#1567)
-- Window: Fixed SetNextWindowContentSize() with 0.0f on Y axis (or SetNextWindowContentWidth())
- overwriting the contents size. Got broken on Dec 10 (1.53). (#1363)
-- ArrowButton: Added ArrowButton() given a cardinal direction (e.g. ImGuiDir_Left).
-- InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), CTRL+Insert (copy), Shift+Insert (paste). (#1541)
-- InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted
- after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
-- InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values
- using scientific notation. Automatically used by InputFloat.
-- Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
-- Style: Enable window border by default. (#707)
-- Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding,
- ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
-- Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).
-- Style: Close buttons now display a cross before hovering. Fixed cross positioning being a little off. Uses button colors for highlight when hovering. (#707)
-- Popup: OpenPopup() Always reopen existing pop-ups. (Removed imgui_internal.h's OpenPopupEx() which was used for this.) (#1497, #1533).
-- Popup: BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid(), OpenPopupOnItemClick() all react on mouse release instead of mouse press. (~#439)
-- Popup: Better handling of user mistakenly calling OpenPopup() every frame (with the 'reopen_existing' option).
- The error will now be more visible and easier to understand. (#1497)
-- Popup: BeginPopup(): Exposed extra_flags parameter that are passed through to Begin(). (#1533)
-- Popup: BeginPopupModal: fixed the conditional test for SetNextWindowPos() which was polling
- the wrong window, which in practice made the test succeed all the time.
-- Tooltip: BeginTooltip() sets ImGuiWindowFlags_NoInputs flag.
-- Scrollbar: Fixed ScrollbarY enable test after ScrollbarX has been enabled being a little
- off (small regression from Nov 2017). (#1574)
-- Scrollbar: Fixed ScrollbarX enable test subtracting WindowPadding.x (this has been there
- since the addition of horizontal scroll bar!).
-- Columns: Clear offsets data when columns count changed. (#1525)
-- Columns: Fixed a memory leak of ImGuiColumnsSet's Columns vector. (#1529) [@unprompted]
-- Columns: Fixed resizing a window very small breaking some columns positioning (broken in 1.53).
-- Columns: The available column extent takes consideration of the right-most clipped pixel,
- so the right-most column may look a little wider but will contain the same amount of visible contents.
-- MenuBar: Fixed menu bar pushing a clipping rect outside of its allocated bound (usually unnoticeable).
-- TreeNode: nodes with the ImGuiTreeNodeFlags_Leaf flag correctly disable highlight when DragDrop is active. (#143, #581)
-- Drag and Drop: Increased payload type string to 32 characters instead of 8. (#143)
-- Drag and Drop: TreeNode as drop target displays rectangle over full frame. (#1597, #143)
-- DragFloat: Fix/workaround for backends which do not preserve a valid mouse position when dragged out of bounds. (#1559)
-- InputFloat: Allow inputting value using scientific notation e.g. "1e+10".
-- InputDouble: Added InputDouble() function. We use a format string instead of a 'decimal_precision'
- parameter to also for "%e" and variants. (#1011)
-- Slider, Combo: Use ImGuiCol_FrameBgHovered color when hovered. (#1456) [@stfx]
-- Combo: BeginCombo(): Added ImGuiComboFlags_NoArrowButton to disable the arrow button and
- only display the wide value preview box.
-- Combo: BeginCombo(): Added ImGuiComboFlags_NoPreview to disable the preview and only
- display a square arrow button.
-- Combo: Arrow button isn't displayed over frame background so its blended color matches other buttons. Left side of the button isn't rounded.
-- PlotLines: plot a flat line if scale_min==scale_max. (#1621)
-- Fonts: Changed DisplayOffset.y to defaults to 0 instead of +1. Fixed rounding of Ascent/Descent
- to match TrueType renderer. If you were adding or subtracting (not assigning) to ImFont::DisplayOffset
- check if your fonts are correctly aligned vertically. (#1619)
-- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
-- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
-- Fonts: Moved extra_fonts/ to misc/fonts/.
-- ImFontAtlas: Fixed cfg.MergeMode not reusing existing glyphs if available (always overwrote).
-- ImFontAtlas: Handle stb_truetype stbtt_InitFont() and stbtt_PackBegin() possible failures
- more gracefully, GetTexDataAsRGBA32() won't crash during conversion. (#1527)
-- ImFontAtlas: Moved mouse cursor data out of ImGuiContext, fix drawing them with multiple contexts.
- Also remove the last remaining undesirable dependency on ImGui in imgui_draw.cpp. (#939)
-- ImFontAtlas: Added ImFontAtlasFlags_NoPowerOfTwoHeight flag to disable padding font height
- to nearest power of two. (#1613)
-- ImFontAtlas: Added ImFontAtlasFlags_NoMouseCursors flag to disable baking software mouse cursors,
- mostly to save texture memory on very low end hardware. (#1613)
-- ImDrawList: Fixed AddRect() with anti-aliasing disabled (lower-right corner pixel was often
- missing, rounding looks a little better.) (#1646)
-- ImDrawList: Added CloneOutput() helper to facilitate the cloning of ImDrawData or ImDrawList for multi-threaded rendering.
-- Misc: Functions passed to libc qsort are explicitly marked cdecl to support compiling with
- vectorcall as the default calling convention. (#1230, #1611) [@RandyGaul]
-- Misc: ImVec2: added [] operator. This is becoming desirable for some code working of either
- axes independently. Better adding it sooner than later.
-- Misc: NewFrame(): Added an assert to detect incorrect filling of the io.KeyMap[] array earlier. (#1555)
-- Misc: Added IM_OFFSETOF() helper in imgui.h (previously was in imgui_internal.h)
-- Misc: Added IM_NEW(), IM_DELETE() helpers in imgui.h (previously were in imgui_internal.h)
-- Misc: Added obsolete redirection function GetItemsLineHeightWithSpacing() (which redirects to GetFrameHeightWithSpacing()), as intended and stated in docs of 1.53.
-- Misc: Added misc/natvis/imgui.natvis for visual studio debugger users to easily visualize imgui internal types. Added to examples projects.
-- Misc: Added IMGUI_USER_CONFIG to define a custom configuration filename. (#255, #1573, #1144, #41)
-- Misc: Added IMGUI_STB_TRUETYPE_FILENAME and IMGUI_STB_RECT_PACK_FILENAME compile time directives to use another version of the stb_ files.
-- Misc: Updated stb_rect_pack from 0.10 to 0.11 (minor changes).
- (Those flags are not used by ImGui itself, they only exists to make it easy for the engine/backend to pass information to the application in a standard manner.)
-- Metrics: Added display of Columns state.
-- Demo: Improved Selectable() examples. (#1528)
-- Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
-- Demo: Console: Using ImGuiCol_Text to be more friendly to color changes.
-- Demo: Using IM_COL32() instead of ImColor() in ImDrawList-centric contexts. Trying to phase out use of the ImColor helper whenever possible.
-- Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your backends if needed.
-- Examples: Using Dark theme by default. (#707). Tweaked demo code.
-- Examples: Added support for horizontal mouse wheel for API that allows it. (#1463) [@tseeker]
-- Examples: All examples now setup the io.BackendFlags to signify they can honor mouse cursors, gamepad, etc.
-- Examples: DirectX10: Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that
- was left in DX10 example but removed in 1.47 (Nov 2015) in every other backends. (#1733)
-- Examples: DirectX12: Added DirectX 12 example. (#301) [@jdm3]
-- Examples: OpenGL3+GLFW,SDL: Changed GLSL shader version from 330 to 150. (#1466, #1504)
-- Examples: OpenGL3+GLFW,SDL: Added a way to override the GLSL version string in the Init function. (#1466, #1504).
-- Examples: OpenGL3+GLFW,SDL: Creating VAO in the render function so it can be more easily used by multiple shared OpenGL contexts. (#1217)
-- Examples: OpenGL3+GLFW: Using 3.2 context instead of 3.3. (#1466)
-- Examples: OpenGL: Setting up glPixelStorei() explicitly before uploading texture.
-- Examples: OpenGL: Calls to glPolygonMode() are casting parameters as GLEnum to not fail with more strict backends. (#1628) [@ilia-glushchenko]
-- Examples: Win32 (DirectX9,10,11,12): Added support for mouse cursor shapes. (#1495)
-- Examples: Win32 (DirectX9,10,11,12: Support for windows using the CS_DBLCLKS class flag by handling the double-click messages (WM_LBUTTONDBLCLK etc.). (#1538, #754) [@ndandoulakis]
-- Examples: Win32 (DirectX9,10,11,12): Made the Win32 proc handlers not assert if there is no active context yet, to be more flexible with creation order. (#1565)
-- Examples: GLFW: Added support for mouse cursor shapes (the diagonal resize cursors are unfortunately not supported by GLFW at the moment. (#1495)
-- Examples: GLFW: Don't attempt to change the mouse cursor input mode if it is set to GLFW_CURSOR_DISABLED by the application. (#1202) [@PhilCK]
-- Examples: SDL: Added support for mouse cursor shapes. (#1626) [@olls]
-- Examples: SDL: Using SDL_CaptureMouse() to retrieve coordinates outside of client area when dragging
- (SDL 2.0.4+ only, otherwise using SDL_WINDOW_INPUT_FOCUS instead of previously SDL_WINDOW_MOUSE_FOCUS). (#1559)
-- Examples: SDL: Enabled vsync by default so people don't come at us when the examples are running at 2000 FPS and burning a CPU core.
-- Examples: SDL: Using SDL_GetPerformanceCounter() / SDL_GetPerformanceFrequency() to handle frame-rate over 1000 FPS properly. (#996)
-- Examples: SDL: Using scan-code exclusively instead of a confusing mixture of scan-codes and key-codes.
-- Examples: SDL: Visual Studio: Added .vcxproj file. Using %SDL2_DIR% in the default .vcxproj
- and build files instead of %SDL_DIR%, the earlier being more standard.
-- Examples: Vulkan: Visual Studio: Added .vcxproj file.
-- Examples: Apple: Fixed filenames in OSX xcode project. Various other Mac friendly fixes. [@gerryhernandez etc.]
-- Examples: Visual Studio: Disabled extraneous function-level check in Release build.
-- Various fixes, tweaks, internal refactoring, optimizations, comments.
-
-
------------------------------------------------------------------------
- VERSION 1.53 (Released 2017-12-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.53
-
-Breaking Changes:
-
-- Renamed the emblematic `ShowTestWindow()` function to `ShowDemoWindow()`. Kept redirection function (will obsolete).
-- Renamed `GetItemsLineHeightWithSpacing()` to `GetFrameHeightWithSpacing()` for consistency. Kept redirection function (will obsolete).
-- Renamed `ImGuiTreeNodeFlags_AllowOverlapMode` flag to `ImGuiTreeNodeFlags_AllowItemOverlap`. Kept redirection enum (will obsolete).
-- Obsoleted `IsRootWindowFocused()` in favor of using `IsWindowFocused(ImGuiFocusedFlags_RootWindow)`. Kept redirection function (will obsolete). (#1382)
-- Obsoleted `IsRootWindowOrAnyChildFocused()` in favor of using `IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows)`. Kept redirection function (will obsolete). (#1382)
-- Obsoleted `IsRootWindowOrAnyChildHovered()` in favor of using `IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows)`. Kept redirection function (will obsolete). (#1382)
-- Obsoleted `SetNextWindowContentWidth() in favor of using `SetNextWindowContentSize()`. Kept redirection function (will obsolete).
-- Renamed `ImGuiTextBuffer::append()` helper to `appendf()`, and `appendv()` to `appendfv()` for consistency. If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed.
-- ImDrawList: Removed 'bool anti_aliased = true' final parameter of `ImDrawList::AddPolyline()` and `ImDrawList::AddConvexPolyFilled()`. Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
-- Style, ImDrawList: Renamed `style.AntiAliasedShapes` to `style.AntiAliasedFill` for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags.
-- Style, Begin: Removed `ImGuiWindowFlags_ShowBorders` window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. `style.FrameBorderSize`, `style.WindowBorderSize`, `style.PopupBorderSize`).
- Use `ImGui::ShowStyleEditor()` to look them up.
- Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time.
- It is recommended that you use the `StyleColorsClassic()`, `StyleColorsDark()`, `StyleColorsLight()` functions. Also see `ShowStyleSelector()`.
-- Style: Removed `ImGuiCol_ComboBg` in favor of combo boxes using `ImGuiCol_PopupBg` for consistency. Combo are normal pop-ups.
-- Style: Renamed `ImGuiCol_ChildWindowBg` to `ImGuiCol_ChildBg`.
-- Style: Renamed `style.ChildWindowRounding` to `style.ChildRounding`, `ImGuiStyleVar_ChildWindowRounding` to `ImGuiStyleVar_ChildRounding`.
-- Removed obsolete redirection functions: SetScrollPosHere() - marked obsolete in v1.42, July 2015.
-- Removed obsolete redirection functions: GetWindowFont(), GetWindowFontSize() - marked obsolete in v1.48, March 2016.
-
-Other Changes:
-
-- Added `io.OptCursorBlink` option to allow disabling cursor blinking. (#1427) [renamed to io.ConfigCursorBlink in 1.63]
-- Added `GetOverlayDrawList()` helper to quickly get access to a ImDrawList that will be rendered in front of every windows.
-- Added `GetFrameHeight()` helper which returns `(FontSize + style.FramePadding.y * 2)`.
-- Drag and Drop: Added Beta API to easily use drag and drop patterns between imgui widgets.
- - Setup a source on a widget with `BeginDragDropSource()`, `SetDragDropPayload()`, `EndDragDropSource()` functions.
- - Receive data with `BeginDragDropTarget()`, `AcceptDragDropPayload()`, `EndDragDropTarget()`.
- - See ImGuiDragDropFlags for various options.
- - The ColorEdit4() and ColorButton() widgets now support Drag and Drop.
- - The API is tagged as Beta as it still may be subject to small changes.
-- Drag and Drop: When drag and drop is active, tree nodes and collapsing header can be opened
- by hovering on them for 0.7 seconds.
-- Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should not affect users as the compile-time
- default is usually enough. (#473, #650)
-- Style: Added StyleColorsDark() style. (#707) [@dougbinks]
-- Style: Added StyleColorsLight() style. Best used with frame borders + thicker font than the default font. (#707)
-- Style: Added style.PopupRounding setting. (#1112)
-- Style: Added style.FrameBorderSize, style.WindowBorderSize, style.PopupBorderSize.
- Removed ImGuiWindowFlags_ShowBorders window flag!
- Borders are now fully set up in the ImGuiStyle structure. Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031)
-- Style: Various small changes to the classic style (most noticeably, buttons are now using blue shades). (#707)
-- Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
-- Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
-- Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. (#707)
-- Style: Made the ScaleAllSizes() helper rounds down every values so they are aligned on integers.
-- Focus: Added SetItemDefaultFocus(), which in the current (master) branch behave the same
- as doing `if (IsWindowAppearing()) SetScrollHere()`. In the navigation branch this will also
- set the default focus. Prefer using this when creating combo boxes with `BeginCombo()` so your
- code will be forward-compatible with gamepad/keyboard navigation features. (#787)
-- Combo: Pop-up grows horizontally to accommodate for contents that is larger then the parent
- combo button.
-- Combo: Added BeginCombo()/EndCombo() API which allows use to submit content of any form and
- manage your selection state without relying on indices.
-- Combo: Added ImGuiComboFlags_PopupAlignLeft flag to BeginCombo() to prioritize keeping the
- pop-up on the left side (for small-button-looking combos).
-- Combo: Added ImGuiComboFlags_HeightSmall, ImGuiComboFlags_HeightLarge, ImGuiComboFlags_HeightLargest
- to easily provide desired pop-up height.
-- Combo: You can use SetNextWindowSizeConstraints() before BeginCombo() to specify specific
- pop-up width/height constraints.
-- Combo: Offset popup position by border size so that a double border isn't so visible. (#707)
-- Combo: Recycling windows by using a stack number instead of a unique id, wasting less memory (like menus do).
-- InputText: Added ImGuiInputTextFlags_NoUndoRedo flag. (#1506, #1508) [@ibachar]
-- Window: Fixed auto-resize allocating too much space for scrollbar when SizeContents is
- bigger than maximum window size (fixes c0547d3). (#1417)
-- Window: Child windows with MenuBar use regular WindowPadding.y so layout look consistent as
- child or as a regular window.
-- Window: Begin(): Fixed appending into a child window with a second Begin() from a different
- window stack querying the wrong window for the window->Collapsed test.
-- Window: Calling IsItemActive(), IsItemHovered() etc. after a call to Begin() provides item
- data for the title bar, so you can easily test if the title bar is being hovered, etc. (#823)
-- Window: Made it possible to use SetNextWindowPos() on a child window.
-- Window: Fixed a one frame glitch. When an appearing window claimed the focus themselves, the
- title bar wouldn't use the focused color for one frame.
-- Window: Added ImGuiWindowFlags_ResizeFromAnySide flag to resize from any borders or from the
- lower-left corner of a window. This requires your backend to honor GetMouseCursor() requests
- for full usability. (#822)
-- Window: Sizing fixes when using SetNextWindowSize() on individual axes.
-- Window: Hide new window for one frame until they calculate their size.
- Also fixes SetNextWindowPos() given a non-zero pivot. (#1694)
-- Window: Made mouse wheel scrolling accommodate better to windows that are smaller than the scroll step.
-- Window: SetNextWindowContentSize() adjust for the size of decorations (title bar/menu bar),
- but _not_ for borders are we consistently make borders not affect layout.
- If you need a non-child window of an exact size with border enabled but zero window padding,
- you'll need to accommodate for the border size yourself.
-- Window: Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel
- event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar
- are also set. (#1380, #1502)
-- Window: Active Modal window always set the WantCaptureKeyboard flag. (#744)
-- Window: Moving window doesn't use accumulating MouseDelta so straying out of imgui boundaries keeps moved imgui window at the same cursor-relative position.
-- IsWindowFocused(): Added ImGuiFocusedFlags_ChildWindows flag to include child windows in the focused test. (#1382).
-- IsWindowFocused(): Added ImGuiFocusedFlags_RootWindow flag to start focused test from the root (top-most) window. Obsolete IsRootWindowFocused(). (#1382)
-- IsWindowHovered(): Added ImGuiHoveredFlags_ChildWindows flag to include child windows in the hovered test. (#1382).
-- IsWindowHovered(): Added ImGuiHoveredFlags_RootWindow flag to start hovered test from the root (top-most) window. The combination of both flags obsoletes IsRootWindowOrAnyChildHovered(). (#1382)
-- IsWindowHovered(): Fixed return value when an item is active to use the same logic as IsItemHovered(). (#1382, #1404)
-- IsWindowHovered(): Always return true when current window is being moved. (#1382)
-- Scrollbar: Fixed issues with vertical scrollbar flickering/appearing, typically when manually
- resizing and using a pattern of filling available height (e.g. full sized BeginChild).
-- Scrollbar: Minor graphical fix for when scrollbar don't have enough visible space to display the full grab.
-- Scrolling: Fixed padding and scrolling asymmetry where lower/right sides of a window wouldn't
- use WindowPadding properly + causing minor scrolling glitches.
-- Tree: TreePush with zero arguments was ambiguous. Resolved by making it call TreePush(const void*). [@JasonWilkins]
-- Tree: Renamed ImGuiTreeNodeFlags_AllowOverlapMode to ImGuiTreeNodeFlags_AllowItemOverlap. (#600, #1330)
-- MenuBar: Fixed minor rendering issues on the right size when resizing a window very small and using rounded window corners.
-- MenuBar: better software clipping to handle small windows, in particular child window don't have
- minimum constraints so we need to render clipped menus better.
-- BeginMenu(): Tweaked the Arrow/Triangle displayed on child menu items.
-- Columns: Clipping columns borders on Y axis on CPU because some Linux GPU drivers appears to
- be unhappy with triangle spanning large regions. (#125)
-- Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content
- sizes behavior (may be obsolete). (#1444, #125)
-- Columns: Columns width is no longer lost when dragging a column to the right side of the window,
- until releasing the mouse button you have a chance to save them. (#1499, #125). [@ggtucker]
-- Columns: Fixed dragging when using a same of columns multiple times in the frame. (#125)
-- Indent(), Unindent(): Allow passing negative values.
-- ColorEdit4(): Made IsItemActive() return true when picker pop-up is active. (#1489)
-- ColorEdit4(): Tweaked tooltip so that the color button aligns more correctly with text.
-- ColorEdit4(): Support drag and drop. Color buttons can be used as drag sources, and ColorEdit
- widgets as drag targets. (#143)
-- ColorPicker4(): Fixed continuously returning true when holding mouse button on the sat/value/alpha
- locations. We only return true on value change. (#1489)
-- NewFrame(): using literal strings in the most-frequently firing IM_ASSERT expressions to
- increase the odd of programmers seeing them (especially those who don't use a debugger).
-- NewFrame() now asserts if neither Render or EndFrame have been called. Exposed EndFrame().
- Made it legal to call EndFrame() more than one. (#1423)
-- ImGuiStorage: Added BuildSortByKey() helper to rebuild storage from scratch.
-- ImFont: Added GetDebugName() helper.
-- ImFontAtlas: Added missing Thai punctuation in the GetGlyphRangesThai() ranges. (#1396) [@nProtect]
-- ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Anti-aliasing is controlled via the regular style.AntiAliased flags.
-- ImDrawList: Added ImDrawList::AddImageRounded() helper. (#845) [@thedmd]
-- ImDrawList: Refactored to make ImDrawList independent of ImGui. Removed static variable in PathArcToFast() which caused linking issues to some.
-- ImDrawList: Exposed ImDrawCornerFlags, replaced occurrences of ~0 with an explicit ImDrawCornerFlags_All.
- NB: Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3).
-- ImVector: Added ImVector::push_front() helper.
-- ImVector: Added ImVector::contains() helper.
-- ImVector: insert() uses grow_capacity() instead of using grow policy inconsistent with push_back().
-- Internals: Remove requirement to define IMGUI_DEFINE_PLACEMENT_NEW to use the IM_PLACEMENT_NEW macro. (#1103)
-- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID flag from incorrectly
- setting the ActiveIdClickOffset field. This had no known effect within imgui code but could have
- affected custom drag and drop patterns. And it is more correct this way! (#1418)
-- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_AllowOverlapMode to avoid temporarily activating
-widgets on click before they have been correctly double-hovered. (#319, #600)
-- Internals: Added SplitterBehavior() helper. (#319)
-- Internals: Added IM_NEW(), IM_DELETE() helpers. (#484, #504, #1517)
-- Internals: Basic refactor of the settings API which now allows external elements to be loaded/saved.
-- Demo: Added ShowFontSelector() showing loaded fonts.
-- Demo: Added ShowStyleSelector() to select among default styles. (#707)
-- Demo: Renamed the emblematic ShowTestWindow() function to ShowDemoWindow().
-- Demo: Style Editor: Added a "Simplified settings" sections with check-boxes for border size and frame rounding. (#707, #1019)
-- Demo: Style Editor: Added combo box to select stock styles and select current font when multiple are loaded. (#707)
-- Demo: Style Editor: Using local storage so Save/Revert button makes more sense without code passing
- its storage. Added horizontal scroll bar. Fixed Save/Revert button to be always accessible. (#1211)
-- Demo: Console: Fixed context menu issue. (#1404)
-- Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would
- affect people who copied the Console code as is).
-- Demo: Constrained Resize: Added more test cases. (#1417)
-- Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window.
-- Demo: Layout: Removed unnecessary and misleading BeginChild/EndChild calls.
-- Demo: The "Color Picker with Palette" demo supports drag and drop. (#143)
-- Demo: Display better mouse cursor info for debugging backends.
-- Demo: Stopped using rand() function in demo code.
-- Examples: Added a handful of extra comments (about fonts, third-party libraries used in the examples, etc.).
-- Examples: DirectX9: Handle loss of D3D9 device (D3DERR_DEVICELOST). (#1464)
-- Examples: Added null_example/ which is helpful for quick testing on multiple compilers/settings without relying on graphics library.
-- Fix for using alloca() in "Clang with Microsoft Codechain" mode.
-- Various fixes, optimizations, comments.
-
-
------------------------------------------------------------------------
- VERSION 1.52 (2017-10-27)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.52
-
-Breaking Changes:
-
-- IO: `io.MousePos` needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing,
- instead of ImVec2(-1,-1) as previously) This is needed so we can clear `io.MouseDelta` field when
- the mouse is made available again.
-- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`.
- Kept inline redirection function (will obsolete).
-- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a
- transparent window background, uses `PushStyleColor()`. The old size parameter there was also
- misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`.
- Kept inline redirection function (will obsolete).
-- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced
- flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
-- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which
- allows to do the same and more. Keep inline redirection function.
-- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely
- the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
-- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in
- another window (e.g. click-dragging item from another window to this window). You can use the newly
- introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
-- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS`
- to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
-- Renamed ImFont::Glyph to ImFontGlyph. Kept redirection typedef (will obsolete).
-
-Other Changes:
-
-- ProgressBar: fixed rendering when straddling rounded area. (#1296)
-- SliderFloat, DragFloat: Using scientific notation e.g. "%.1e" in the displayed format string doesn't
- mistakenly trigger rounding of the value. [@MomentsInGraphics]
-- Combo, InputFloat, InputInt: Made the small button on the right side align properly with the
- equivalent colored button of ColorEdit4().
-- IO: Tweaked logic for `io.WantCaptureMouse` so it now outputs false when e.g. hovering over void
- while an InputText() is active. (#621) [@pdoane]
-- IO: Fixed `io.WantTextInput` from mistakenly outputting true when an activated Drag or Slider was
- previously turned into an InputText(). (#1317)
-- Misc: Added flags to `IsItemHovered()`, `IsWindowHovered()` to access advanced hovering-test behavior.
- Generally useful for pop-ups and drag and drop behaviors: (relates to ~#439, #1013, #143, #925)
- - `ImGuiHoveredFlags_AllowWhenBlockedByPopup`
- - `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`
- - `ImGuiHoveredFlags_AllowWhenOverlapped`
- - `ImGuiHoveredFlags_RectOnly`
-- Input: Added `IsMousePosValid()` helper.
-- Input: Added `GetKeyPressedAmount()` to easily measure press count when the repeat rate is faster than the frame rate.
-- Input/Focus: Disabled TAB and Shift+TAB when CTRL key is held.
-- CheckBox: Now rendering a tick mark instead of a full square.
-- ColorEdit4: Added "Copy as..." option in context menu. (#346)
-- ColorPicker: Improved ColorPicker hue wheel color interpolation. (#1313) [@thevaber]
-- ColorButton: Reduced bordering artifact that would be particularly visible with an opaque
- Col_FrameBg and FrameRounding enabled.
-- ColorButton: Fixed rendering color button with a checkerboard if the transparency comes from the global
- style.Alpha and not from the actual source color.
-- TreeNode: Added `ImGuiTreeNodeFlags_FramePadding` flag to conveniently create a tree node with full
- padding at the beginning of a line, without having to call `AlignTextToFramePadding()`.
-- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
-- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements
- without calling SameLine().
-- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout
- is active, but that isn't exposed yet!).
-- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
-- Window: Fixed title bar color of top-most window under a modal window.
-- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works
- better when window size constraints are used.
-- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which
- in turn would set enable the Appearing condition for that frame.
-- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow
- user creating a window called "Debug" without losing their custom flags.
-- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup
- with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move
- the parent window by clicking on SubChild. (#1381)
-- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
-- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening
- a context menu by right-clicking again. (~#439)
-- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
-- Popups: Added `OpenPopupOnItemClick()` helper which mimic `BeginPopupContextItem()` but doesn't do the BeginPopup().
-- MenuItem: Only activating on mouse release. [@Urmeli0815] (was already fixed in nav branch).
-- MenuItem: Made tick mark thicker (thick mark?).
-- MenuItem: Tweaks to be usable inside a menu bar (nb: it looks like a regular menu and thus is misleading,
- prefer using Button() and regular widgets in menu bar if you need to). (#1387)
-- ImDrawList: Fixed a rare draw call merging bug which could lead to undisplayed triangles. (#1172, #1368)
-- ImDrawList: Fixed a rare bug in `ChannelsMerge()` when all contents has been clipped, leading to
- an extraneous draw call being created. (#1172, #1368)
-- ImFont: Added `AddGlyph()` building helper for use by custom atlas builders.
-- ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas.
- You can map them as font glyphs, or use them for custom purposes.
- After the atlas is built you can query the position of your rectangles in the texture and then copy
- your data there. You can use this features to create e.g. full color font-mapped icons.
-- ImFontAtlas: Fixed fall-back handling when merging fonts, if a glyph was missing from the second font
- input it could have used a glyph from the first one. (#1349) [@inolen]
-- ImFontAtlas: Fixed memory leak on build failure case when stbtt_InitFont failed (generally due to
- incorrect or supported font type). (#1391) (@Moka42)
-- ImFontConfig: Added `RasterizerMultiply` option to alter the brightness of individual fonts at
- rasterization time, which may help increasing readability for some.
-- ImFontConfig: Added `RasterizerFlags` to pass options to custom rasterizer (e.g. the
- [imgui_freetype](https://github.com/ocornut/imgui_club/tree/master/imgui_freetype) rasterizer in imgui_club has such options).
-- ImVector: added resize() variant with initialization value.
-- Misc: Changed the internal name formatting of child windows identifier to use slashes
- (instead of dots) as separator, more readable.
-- Misc: Fixed compilation with `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` defined.
-- Misc: Marked all format+va_list functions with format attribute so GCC/Clang can warn about misuses.
-- Misc: Fixed compilation on NetBSD due to missing alloca.h (#1319) [@RyuKojiro]
-- Misc: Improved warnings compilation for newer versions of Clang. (#1324) (@waywardmonkeys)
-- Misc: Added `io.WantMoveMouse flags` (from Nav branch) and honored in Examples applications.
- Currently unused but trying to spread Examples applications code that supports it.
-- Misc: Added `IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS` support in imconfig.h to allow user
- reimplementing the `ImFormatString()` functions e.g. to use stb_printf(). (#1038)
-- Misc: [Windows] Fixed default Win32 `SetClipboardText()` handler leaving the Win32 clipboard
- handler unclosed on failure. [@pdoane]
-- Style: Added `ImGuiStyle::ScaleAllSizes(float)` helper to make it easier to have application
- transition e.g. from low to high DPI with a matching style.
-- Metrics: Draw window bounding boxes when hovering Pos/Size; List all draw layers; Trimming empty commands like Render() does.
-- Examples: OpenGL3: Save and restore sampler state. (#1145) [@nlguillemot]
-- Examples: OpenGL2, OpenGL3: Save and restore polygon mode. (#1307) [@JJscott]
-- Examples: DirectX11: Allow creating device with feature level 10 since we don't really need much for that example. (#1333)
-- Examples: DirectX9/10/12: Using the Win32 SetCapture/ReleaseCapture API to read mouse coordinates
- when they are out of bounds. (#1375) [@Gargaj, @ocornut]
-- Tools: Fixed binary_to_compressed_c tool to return 0 when successful. (#1350) [@benvanik]
-- Internals: Exposed more helpers and unfinished features in imgui_internal.h. (use at your own risk!).
-- Internals: A bunch of internal refactoring, hopefully haven't broken anything!
- Merged a bunch of internal changes from the upcoming Navigation branch.
-- Various tweaks, fixes and documentation changes.
-
-Beta Navigation Branch:
-(Lots of work has been done toward merging the Beta Gamepad/Keyboard Navigation branch (#787) in master.)
-(Please note that this branch is always kept up to date with master. If you are using the navigation branch, some of the changes include:)
-- Nav: Added `#define IMGUI_HAS_NAV` in imgui.h to ease sharing code between both branches. (#787)
-- Nav: MainMenuBar now releases focus when user gets out of the menu layer. (#787)
-- Nav: When applying focus to a window with only menus, the menu layer is automatically activated. (#787)
-- Nav: Added `ImGuiNavInput_KeyMenu` (~Alt key) aside from ImGuiNavInput_PadMenu input as it is
- one differentiator of pad vs keyboard that was detrimental to the keyboard experience.
- Although isn't officially supported, it makes the current experience better. (#787)
-- Nav: Move requests now wrap vertically inside Menus and Pop-ups. (#787)
-- Nav: Allow to collapse tree nodes with NavLeft and open them with NavRight. (#787, #1079).
-- Nav: It's now possible to navigate sibling of a menu-bar while navigating inside one of their child.
- If a Left<>Right navigation request fails to find a match we forward the request to the root menu. (#787, #126)
-- Nav: Fixed `SetItemDefaultFocus` from stealing default focus when we are initializing default focus for a menu bar layer. (#787)
-- Nav: Support for fall-back horizontal scrolling with PadLeft/PadRight (nb: fall-back scrolling
- is only used to navigate windows that have no interactive items). (#787)
-- Nav: Fixed tool-tip from being selectable in the window selection list. (#787)
-- Nav: `CollapsingHeader(bool*)` variant: fixed for `IsItemHovered()` not working properly in the nav branch. (#600, #787)
-- Nav: InputText: Fixed using Up/Down history callback feature when Nav is enabled. (#787)
-- Nav: InputTextMultiline: Fixed navigation/selection. Disabled selecting all when activating a multi-line text editor. (#787)
-- Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. (#787)
-- Nav: Various internal refactoring.
-
-
------------------------------------------------------------------------
- VERSION 1.51 (2017-08-24)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.51
-
-Breaking Changes:
-
-Work on dear imgui has been gradually resuming. It means that fixes and new features should be tackled at
-a faster rate than last year. However, in order to move forward with the library and get rid of some cruft,
-I have taken the liberty to be a little bit more aggressive than usual with API breaking changes.
-Read the details below and search for those names in your code! In the grand scheme of things,
-those changes are small and should not affect everyone, but this is technically our most aggressive
-release so far in term of API breakage.
-If you want to be extra forward-facing, you can enable `#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in
-your imconfig.h to disable the obsolete names/redirection.
-
-- Renamed `IsItemHoveredRect()` to `IsItemRectHovered()`. Kept inline redirection function (will obsolete).
-- Renamed `IsMouseHoveringWindow()` to `IsWindowRectHovered()` for consistency. Kept inline redirection function (will obsolete).
-- Renamed `IsMouseHoveringAnyWindow()` to `IsAnyWindowHovered()` for consistency. Kept inline redirection function (will obsolete).
-- Renamed `ImGuiCol_Columns***` enums to `ImGuiCol_Separator***`. Kept redirection enums (will obsolete).
-- Renamed `ImGuiSetCond***` types and enums to `ImGuiCond***`. Kept redirection enums (will obsolete).
-- Renamed `GetStyleColName()` to `GetStyleColorName()` for consistency. Unlikely to be used by end-user!
-- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload, which _might_ cause an "ambiguous call"
- compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicitly to fix.
-- Marked the weird `IMGUI_ONCE_UPON_A_FRAME` helper macro as obsolete. Prefer using the more explicit `ImGuiOnceUponAFrame`.
-- Changed `ColorEdit4(const char* label, float col[4], bool show_alpha = true)` signature to
- `ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)`, where flags 0x01 is a safe no-op
- (hello dodgy backward compatibility!). The new `ColorEdit4`/`ColorPicker4` functions have lots of available flags!
- Check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
-- Changed signature of `ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)`
- to `ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))`.
- This function was rarely used and was very dodgy (no explicit ID!).
-- Changed `BeginPopupContextWindow(bool also_over_items=true, const char* str_id=NULL, int mouse_button=1)`
- signature to `(const char* str_id=NULL, int mouse_button=1, bool also_over_items=true)`.
- This is perhaps the most aggressive change in this update, but note that the majority of users relied
- on default parameters completely, so this will affect only a fraction of users of this already rarely
- used function.
-- Removed `IsPosHoveringAnyWindow()`, which was partly broken and misleading. In the vast majority of cases,
- people using that function wanted to use `io.WantCaptureMouse` flag. Replaced with IM_ASSERT + a comment
- redirecting user to `io.WantCaptureMouse`. (#1237)
-- Removed the old `ValueColor()` helpers, they are equivalent to calling `Text(label)` + `SameLine()` + `ColorButton()`.
-- Removed `ColorEditMode()` and `ImGuiColorEditMode` type in favor of `ImGuiColorEditFlags` and
- parameters to the various Color*() functions. The `SetColorEditOptions()` function allows to
- initialize default but the user can still change them with right-click context menu.
- Commenting out your old call to `ColorEditMode()` may just be fine!
-
-Other Changes:
-
-- Added flags to `ColorEdit3()`, `ColorEdit4()`. The color edit widget now has a context-menu
- and access to the color picker. (#346)
-- Added flags to `ColorButton()`. (#346)
-- Added `ColorPicker3()`, `ColorPicker4()`. (#346) [@r-lyeh, @nem0, @thennequin, @dariomanesku and @ocornut]
- The API along with those of the updated `ColorEdit4()` was designed so you may use them in various
- situation and hopefully compose your own picker if required. There are a bunch of available flags,
- check the Demo window and comment for `ImGuiColorEditFlags_`.
- Some of the options it supports are: two color picker types (hue bar + sat/val rectangle,
- hue wheel + rotating sat/val triangle), display as u8 or float, lifting 0.0..1.0 constraints
- (currently rgba only), context menus, alpha bar, background checkerboard options, preview tooltip,
- basic revert. For simple use, calling the existing `ColorEdit4()` function as you did before
- will be enough, as you can now open the color picker from there.
-- Added `SetColorEditOptions()` to set default color options (e.g. if you want HSV over RGBA,
- float over u8, select a default picker mode etc. at startup time without a user intervention.
- Note that the user can still change options with the context menu unless disabled with
- `ImGuiColorFlags_NoOptions` or explicitly enforcing a display type/picker mode etc.).
-- Added user-facing `IsPopupOpen()` function. (#891) [@mkeeter]
-- Added `GetColorU32(u32)` variant that perform the style alpha multiply without a floating-point
- round trip, and helps makes code more consistent when using ImDrawList APIs.
-- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload.
-- Added `GetStyleColorVec4(ImGuiCol idx)` which is equivalent to accessing `ImGui::GetStyle().Colors[idx]`
- (aka return the raw style color without alpha alteration).
-- ImFontAtlas: Added `GlyphRangesBuilder` helper class, which makes it easier to build custom glyph ranges
- from your app/game localization data, or add into existing glyph ranges.
-- ImFontAtlas: Added `TexGlyphPadding` option. (#1282) [@jadwallis]
-- ImFontAtlas: Made it possible to override size of AddFontDefault() (even if it isn't really recommended!).
-- ImDrawList: Added `GetClipRectMin()`, `GetClipRectMax()` helpers.
-- Fixed Ini saving crash if the ImGuiWindowFlags_NoSavedSettings gets removed from a window after its creation (unlikely!). (#1000)
-- Fixed `PushID()`/`PopID()` from marking parent window as Accessed (which needlessly woke up the
- root "Debug" window when used outside of a regular window). (#747)
-- Fixed an assert when calling `CloseCurrentPopup()` twice in a row. [@nem0]
-- Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
-- Columns: Added `SetColumnWidth()`. (#913) [@ggtucker]
-- Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
-- Columns: Fixed first column appearing wider than others. (#1266)
-- Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar.
- The space is only allocated when needed. (#125, #913, #893, #1138)
-- Columns: Fixed the right-most column from registering its content width to the parent window,
- which led to various issues when using auto-resizing window or e.g. horizontal scrolling. (#519, #125, #913)
-- Columns: Refactored some of the columns code internally toward a better API (not yet exposed) + minor optimizations. (#913) [@ggtucker, @ocornut]
-- Popups: Most pop-ups windows can be moved by the user after appearing (if they don't have explicit
- positions provided by caller, or e.g. sub-menu pop-up). The previous restriction was totally arbitrary. (#1252)
-- Tooltip: `SetTooltip()` is expanded immediately into a window, honoring current font / styling setting.
- Add internal mechanism to override tooltips. (#862)
-- PlotHistogram: bars are drawn based on zero-line, so negative values are going under. (#828)
-- Scrolling: Fixed return values of `GetScrollMaxX()`, `GetScrollMaxY()` when both scrollbars were enabled.
- Tweak demo to display more data. (#1271) [@degracode]
-- Scrolling: Fixes for Vertical Scrollbar not automatically getting enabled if enabled Horizontal Scrollbar straddle the vertical limit. (#1271, #246)
-- Scrolling: `SetScrollHere()`, `SetScrollFromPosY()`: Fixed Y scroll aiming when Horizontal Scrollbar is enabled. (#665).
-- [Windows] Clipboard: Fixed not closing Win32 clipboard on early open failure path. (#1264)
-- Removed an unnecessary dependency on int64_t which failed on some older compilers.
-- Demo: Rearranged everything under Widgets in a more consistent way.
-- Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913)
-- Examples: OpenGL: Various makefiles for MINGW, Linux. (#1209, #1229, #1209) [@fr500, @acda]
-- Examples: Enabled vsync by default in example applications, so it doesn't confuse people that
- the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151).
-- Various other small fixes, tweaks, comments, optimizations.
-
-
------------------------------------------------------------------------
- VERSION 1.50 (2017-06-02)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.50
-
-Breaking Changes:
-
-- Added a void* user_data parameter to Clipboard function handlers. (#875)
-- SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window.
- This was sort of always the intent and hopefully breakage should be minimal.
-- Renamed ImDrawList::PathFill() - rarely used directly - to ImDrawList::PathFillConvex() for clarity and consistency.
-- Removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset.
-- Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f)
- for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
-- BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions
- as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple
- times to a same child from different locations of the stack id. If that's the case, generate an id with GetId()
- and use it instead of passing string to BeginChild().
-
-Other Changes:
-
-- InputText(): Added support for CTRL+Backspace (delete word).
-- InputText(): OSX uses Super+Arrows for home/end. Add Shortcut+Backspace support. (#650) [@michaelbartnett]
-- InputText(): Got rid of individual OSX-specific options in ImGuiIO, added a single io.OSXBehaviors flag. (#473, #650)
-- InputText(): Fixed pressing home key on last character when it isn't a trailing \n (#588, #815)
-- InputText(): Fixed state corruption/crash bug in stb_textedit.h redo logic when exhausting undo/redo char buffer. (#715. #681)
-- InputTextMultiline(): Fixed CTRL+DownArrow moving scrolling out of bounds.
-- InputTextMultiline(): Scrollbar fix for when input and latched internal buffers differs in
- a way that affects vertical scrollbar existence. (#725)
-- ImFormatString(): Fixed an overflow handling bug with implementation of vsnprintf() that do not return -1. (#793)
-- BeginChild(const char*) now applies stack id to provided label, consistent with other widgets. (#894, #713)
-- SameLine() with explicit X position is relative to left of group/columns. (ref #746, #125, #630)
-- SliderInt(), SliderFloat() supports reverse direction (where v_min > v_max). (#854)
-- SliderInt(), SliderFloat() better support for when v_min==v_max. (#919)
-- SliderInt(), SliderFloat() enforces writing back value when interacting, to be consistent with other widgets. (#919)
-- SliderInt, SliderFloat(): Fixed edge case where style.GrabMinSize being bigger than slider width can lead to a division by zero. (#919)
-- Added IsRectVisible() variation with explicit start-end positions. (#768) [@thedmd]
-- Fixed TextUnformatted() clipping bug in the large-text path when horizontal scroll has been applied. (#692, #246)
-- Fixed minor text clipping issue in window title when using font straying above usual line. (#699)
-- Fixed SetCursorScreenPos() fixed not adjusting CursorMaxPos as well.
-- Fixed scrolling offset when using SetScrollY(), SetScrollFromPosY(), SetScrollHere() with menu bar.
-- Fixed using IsItemActive() after EndGroup() or any widget using groups. (#840, #479)
-- Fixed IsItemActive() lagging by one frame on initial widget activation. (#840)
-- Fixed Separator() zero-height bounding box resulting in clipping when laying exactly on top line of clipping rectangle (#860)
-- Fixed PlotLines() PlotHistogram() calling with values_count == 0.
-- Fixed clicking on a window's void while staying still overzealously marking .ini settings as dirty. (#923)
-- Fixed assert triggering when a window has zero rendering but has a callback. (#810)
-- Scrollbar: Fixed rendering when sizes are negative to reduce glitches (which can happen with
- certain style settings and zero WindowMinSize).
-- EndGroup(): Made IsItemHovered() work when an item was activated within the group. (#849)
-- BulletText(): Fixed stopping to display formatted string after the '##' mark.
-- Closing the focused window restore focus to the first active root window in descending z-order. (part of #727)
-- Word-wrapping: Fixed a bug where we never wrapped after a 1 character word. [@sronsse]
-- Word-wrapping: Fixed TextWrapped() overriding wrap position if one is already set. (#690)
-- Word-wrapping: Fixed incorrect testing for negative wrap coordinates, they are perfectly legal. (#706)
-- ImGuiListClipper: Fixed automatic-height calc path dumbly having user display element 0 twice. (#661, #716)
-- ImGuiListClipper: Fix to behave within column. (#661, #662, #716)
-- ImDrawList: Renamed ImDrawList::PathFill() to ImDrawList::PathFillConvex() for clarity. (BREAKING API)
-- Columns: End() avoid calling Columns(1) if no columns set is open, not sure why it wasn't the
- case already (pros: faster, cons: exercise less code).
-- ColorButton(): Fix ColorButton showing wrong hex value for alpha. (#1068) [@codecat]
-- ColorEdit4(): better preserve inputting value out of 0..255 range, display then clamped in Hexadecimal form.
-- Shutdown() clear out some remaining pointers for sanity. (#836)
-- Added IMGUI_USE_BGRA_PACKED_COLOR option in imconfig.h (#767, #844) [@thedmd]
-- Style: Removed the inconsistent shadow under RenderCollapseTriangle() (~#707)
-- Style: Added ButtonTextAlign, ImGuiStyleVar_ButtonTextAlign. (#842)
-- ImFont: Allowing to use up to 0xFFFE glyphs in same font (increased from previous 0x8000).
-- ImFont: Added GetGlyphRangesThai() helper. [@nProtect]
-- ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character.
-- ImFont: Calculate and store the approximate texture surface to get an idea of how costly each source font is.
-- ImFontConfig: Added GlyphOffset to explicitly offset glyphs at font build time, useful for merged fonts.
- Removed MergeGlyphCenterV. (BREAKING API)
-- Clarified asserts in CheckStacksSize() when there is a stack mismatch.
-- Context: Support for #define-ing GImGui and IMGUI_SET_CURRENT_CONTEXT_FUNC to enable custom thread-based hackery (#586)
-- Updated stb_truetype.h to 1.14 (added OTF support, removed warnings). (#883, #976)
-- Updated stb_rect_pack.h to 0.10 (removed warnings). (#883)
-- Added ImGuiMouseCursor_None enum value for convenient usage by app/backends.
-- Clipboard: Added a void* user_data parameter to Clipboard function handlers. (#875) (BREAKING API)
-- Internals: Refactor internal text alignment options to use ImVec2, removed ImGuiAlign. (#842, #222)
-- Internals: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name. (#917)
-- OS/Windows: Fixed Windows default clipboard handler leaving its buffer unfreed on application's exit. (#714)
-- OS/Windows: No default IME handler when compiling for Windows using GCC. (#738)
-- OS/Windows: Now using _wfopen() instead of fopen() to allow passing in paths/filenames with UTF-8 characters. (#917)
-- Tools: binary_to_compressed_c: Avoid ?? trigraphs sequences in string outputs which break some older compilers. (#839)
-- Demo: Added an extra 3-way columns demo.
-- Demo: ShowStyleEditor: show font character map / grid in more details.
-- Demo: Console: Fixed a completion bug when multiple candidates are equals and match until the end.
-- Demo: Fixed 1-byte off overflow in the ShowStyleEditor() combo usage. (#783) [@bear24rw]
-- Examples: Accessing ImVector fields directly, feel less stl-y. (#810)
-- Examples: OpenGL*: Saving/restoring existing scissor rectangle for completeness. (#807)
-- Examples: OpenGL*: Saving/restoring active texture number (the value modified by glActiveTexture). (#1087, #1088, #1116)
-- Examples: OpenGL*: Saving/restoring separate color/alpha blend functions correctly. (#1120) [@greggman]
-- Examples: OpenGL2: Uploading font texture as RGBA32 to increase compatibility with users shaders for beginners. (#824)
-- Examples: Vulkan: Countless fixes and improvements. (#785, #804, #910, #1017, #1039, #1041,
- #1042, #1043, #1080) [@martty, @Loftilus, @ParticlePeter, @SaschaWillems]
-- Examples: DirectX9/10/10: Only call SetCursor(NULL) is io.MouseDrawCursor is set. (#585, #909)
-- Examples: DirectX9: Explicitly setting viewport to match that other examples are doing. (#937)
-- Examples: GLFW+OpenGL3: Fixed Shutdown() calling GL functions with NULL parameters if NewFrame was never called. (#800)
-- Examples: GLFW+OpenGL2: Renaming opengl_example/ to opengl2_example/ for clarity.
-- Examples: SDL+OpenGL: explicitly setting GL_UNPACK_ROW_LENGTH to reduce issues because SDL changes it. (#752)
-- Examples: SDL2: Added build .bat files for Win32.
-- Added various links to language/engine bindings.
-- Various other minor fixes, tweaks, comments, optimizations.
-
-
------------------------------------------------------------------------
- VERSION 1.49 (2016-05-09)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.49
-
-Breaking Changes:
-
-- Renamed `SetNextTreeNodeOpened()` to `SetNextTreeNodeOpen()` for consistency, no redirection.
-- Removed confusing set of `GetInternalState()`, `GetInternalStateSize()`, `SetInternalState()` functions.
- Now using `CreateContext()`, `DestroyContext()`, `GetCurrentContext()`, `SetCurrentContext()`.
- If you were using multiple contexts the change should be obvious and trivial.
-- Obsoleted old signature of `CollapsingHeader(const char* label, const char* str_id = NULL, bool display_frame = true, bool default_open = false)`,
- as extra parameters were badly designed and rarely used. Most uses were using 1 parameter and shouldn't affect you.
- You can replace the "default_open = true" flag in new API with `CollapsingHeader(label, ImGuiTreeNodeFlags_DefaultOpen)`.
-- Changed `ImDrawList::PushClipRect(ImVec4 rect)` to `ImDraw::PushClipRect(ImVec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false)`.
- Note that higher-level `ImGui::PushClipRect()` is preferable because it will clip at logic/widget level, whereas `ImDrawList::PushClipRect()` only affect your renderer.
-- Title bar (using ImGuiCol_TitleBg/ImGuiCol_TitleBgActive colors) isn't rendered over a window background
- (ImGuiCol_WindowBg color) anymore (see #655). If your TitleBg/TitleBgActive alpha was 1.0f or you are using
- the default theme it will not affect you. However if your TitleBg/TitleBgActive alpha was <1.0f you need to
- tweak your custom theme to readjust for the fact that we don't draw a WindowBg background behind the title bar.
- This helper function will convert an old TitleBg/TitleBgActive color into a new one with the same visual output,
- given the OLD color and the OLD WindowBg color. (Or If this is confusing, just pick the RGB value from
- title bar from an old screenshot and apply this as TitleBg/TitleBgActive. Or you may just create
- TitleBgActive from a tweaked TitleBg color.)
-
- ImVec4 ConvertTitleBgCol(const ImVec4& win_bg_col, const ImVec4& title_bg_col)
- {
- float new_a = 1.0f - ((1.0f - win_bg_col.w) * (1.0f - title_bg_col.w));
- float k = title_bg_col.w / new_a;
- return ImVec4((win_bg_col.x * win_bg_col.w + title_bg_col.x) * k, (win_bg_col.y * win_bg_col.w + title_bg_col.y) * k, (win_bg_col.z * win_bg_col.w + title_bg_col.z) * k, new_a);
- }
-
-Other changes:
-
-- New version of ImGuiListClipper helper calculates item height automatically.
- See comments and demo code. (#662, #661, #660)
-- Added SetNextWindowSizeConstraints() to enable basic min/max and programmatic size constraints on window. Added demo. (#668)
-- Added PushClipRect()/PopClipRect() (previously part of imgui_internal.h).
- Changed ImDrawList::PushClipRect() prototype. (#610)
-- Added IsRootWindowOrAnyChildHovered() helper. (#615)
-- Added TreeNodeEx() functions. (#581, #600, #190)
-- Added ImGuiTreeNodeFlags_Selected flag to display TreeNode as "selected". (#581, #190)
-- Added ImGuiTreeNodeFlags_AllowOverlapMode flag. (#600)
-- Added ImGuiTreeNodeFlags_NoTreePushOnOpen flag (#590).
-- Added ImGuiTreeNodeFlags_NoAutoOpenOnLog flag (previously private).
-- Added ImGuiTreeNodeFlags_DefaultOpen flag (previously private).
-- Added ImGuiTreeNodeFlags_OpenOnDoubleClick flag.
-- Added ImGuiTreeNodeFlags_OpenOnArrow flag.
-- Added ImGuiTreeNodeFlags_Leaf flag, always opened, no arrow, for convenience.
- For simple use case prefer using TreeAdvanceToLabelPos()+Text().
-- Added ImGuiTreeNodeFlags_Bullet flag, to add a bullet to Leaf node or replace Arrow with a bullet.
-- Added TreeAdvanceToLabelPos(), GetTreeNodeToLabelSpacing() helpers. (#581, #324)
-- Added CreateContext()/DestroyContext()/GetCurrentContext()/SetCurrentContext().
- Obsoleted nearly identical GetInternalState()/SetInternalState() functions. (#586, #269)
-- Added NewLine() to undo a SameLine() and as a shy reminder that horizontal layout support hasn't been implemented yet.
-- Added IsItemClicked() helper. (#581)
-- Added CollapsingHeader() variant with close button. (#600)
-- Fixed MenuBar missing lower border when borders are enabled.
-- InputText(): Fixed clipping of cursor rendering in case it gets out of the box (which can be forced w/ ImGuiInputTextFlags_NoHorizontalScroll. (#601)
-- Style: Changed default IndentSpacing from 22 to 21. (#581, #324)
-- Style: Fixed TitleBg/TitleBgActive color being rendered above WindowBg color, which was
- inconsistent and causing visual artifact. (#655)
- This broke the meaning of TitleBg and TitleBgActive. Only affect values where Alpha<1.0f.
- Fixed default theme. Read comments in "API BREAKING CHANGES" section to convert.
-- Relative rendering of order of Child windows creation is preserved, to allow more control with overlapping children. (#595)
-- Fixed GetWindowContentRegionMax() being off by ScrollbarSize amount when explicit SizeContents is set.
-- Indent(), Unindent(): optional non-default indenting width. (#324, #581)
-- Bullet(), BulletText(): Slightly bigger. Less polygons.
-- ButtonBehavior(): fixed subtle old bug when a repeating button would also return true on mouse
- release (barely noticeable unless RepeatRate is set to be very slow). (#656)
-- BeginMenu(): a menu that becomes disabled while open gets closed down, facilitate user's code. (#126)
-- BeginGroup(): fixed using within Columns set. (#630)
-- Fixed a lag in reading the currently hovered window when dragging a window. (#635)
-- Obsoleted 4 parameters version of CollapsingHeader(). Refactored code into TreeNodeBehavior. (#600, #579)
-- Scrollbar: minor fix for top-right rounding of scrollbar background when window has menu bar but no title bar.
-- MenuItem(): the check mark renders in disabled color when menu item is disabled.
-- Fixed clipping rectangle floating point representation to ensure renderer-side floating-point
- operations yield correct results in typical DirectX/GL settings. (#582, 597)
-- Fixed GetFrontMostModalRootWindow(), fixing missing fade-out when a combo pop was used stacked
- over a modal window. (#604)
-- ImDrawList: Added AddQuad(), AddQuadFilled() helpers.
-- ImDrawList: AddText() refactor, moving some code to ImFont, reserving less unused vertices when large vertical clipping occurs.
-- ImFont: Added RenderChar() helper.
-- ImFont: Added AddRemapChar() helper. (#609)
-- ImFontConfig: Clarified persistence requirement of GlyphRanges array. (#651)
-- ImGuiStorage: Added bool helper functions for completeness.
-- AddFontFromMemoryCompressedTTF(): Fix ImFontConfig propagation. (#587)
-- Renamed majority of use of the word "opened" to "open" for clarity. Renamed SetNextTreeNodeOpened() to SetNextTreeNodeOpen(). (#625, #579)
-- Examples: OpenGL3: Saving/restoring glActiveTexture() state. (#602)
-- Examples: DirectX9: save/restore all device state.
-- Examples: DirectX9: Removed dependency on d3dx9.h, d3dx9.lib, dxguid.lib so it can be used in
- a DirectXMath.h only environment. (#611)
-- Examples: DirectX10/X11: Apply depth-stencil state (no use of depth buffer). (#640, #636)
-- Examples: DirectX11/X11: Added comments on removing dependency on D3DCompiler. (#638)
-- Examples: SDL: Initialize video+timer subsystem only.
-- Examples: Apple/iOS: lowered XCode project deployment target from 10.7 to 10.11. (#598, #575)
-
-
------------------------------------------------------------------------
- VERSION 1.48 (2016-04-09)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.48
-
-Breaking Changes:
-
-- Consistently honoring exact width passed to PushItemWidth() (when positive), previously it would
- add extra FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
-- Style: removed `style.WindowFillAlphaDefault` which was confusing and redundant, baked alpha into
- `ImGuiCol_WindowBg` color. If you had a custom WindowBg color but didn't change WindowFillAlphaDefault,
- multiply WindowBg alpha component by 0.7. Renamed `ImGuiCol_TooltipBg` to `ImGuiCol_PopupBG`,
- applies to other types of pop-ups. `bg_alpha` parameter of 5-parameters version of Begin() is an override. (#337)
-- InputText(): Added BufTextLen field in ImGuiTextEditCallbackData. Requesting user to update it
- if the buffer is modified in the callback. Added a temporary length-check assert to minimize panic
- for the 3 people using the callback. (#541)
-- Renamed GetWindowFont() to GetFont(), GetWindowFontSize() to GetFontSize().
- Kept inline redirection function (will obsolete). (#340)
-
-Other Changes:
-
-- Consistently honoring exact width passed to PushItemWidth(), previously it would add extra
- FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
-- Fixed clipping of child windows within parent not taking account of child outer clipping
- boundaries (including scrollbar, etc.). (#506)
-- TextUnformatted(): Fixed rare crash bug with large blurb of text (2k+) not finished with
- a '\n' and fully above the clipping Y line. (#535)
-- IO: Added 'KeySuper' field to hold CMD keyboard modifiers for OS X. Updated all examples accordingly. (#473)
-- Added ImGuiWindowFlags_ForceVerticalScrollbar, ImGuiWindowFlags_ForceHorizontalScrollbar flags. (#476)
-- Added IM_COL32 macros to generate a U32 packed color, convenient for direct use of ImDrawList api. (#346)
-- Added GetFontTexUvWhitePixel() helper, convenient for direct use of ImDrawList api.
-- Selectable(): Added ImGuiSelectableFlags_AllowDoubleClick flag to allow user reacting
- on double-click. (@zapolnov) (#516)
-- Begin(): made the close button explicitly set the boolean to false instead of toggling it. (#499)
-- BeginChild()/EndChild(): fixed incorrect layout to allow widgets submitted after an auto-fitted child window. (#540)
-- BeginChild(): Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-bordered child window
- uses window padding. (#462)
-- Fixed InputTextMultiLine(), ListBox(), BeginChildFrame(), ProgressBar(): outer frame not
- honoring bordering. (#462, #503)
-- Fixed Image(), ImageButtion() rendering a rectangle 1 px too large on each axis. (#457)
-- SetItemAllowOverlap(): Promoted from imgui_internal.h to public imgui.h api. (#517)
-- Combo(): Right-most button stays highlighted when pop-up is open.
-- Combo(): Display pop-up above if there's isn't enough space below / or select largest side. (#505)
-- DragFloat(), SliderFloat(), InputFloat(): fixed cases of erroneously returning true repeatedly
- after a text input modification (e.g. "0.0" --> "0.000" would keep returning true). (#564)
-- DragFloat(): Always apply value when mouse is held/widget active, so that an always-resetting
- variable (e.g. non saved local) can be passed.
-- InputText(): OS X friendly behaviors: (@zhiayang), (#473)
- - Word movement uses ALT key;
- - Shortcuts uses CMD key;
- - Double-clicking text select a single word;
- - Jumping to next word sets cursor to end of current word instead of beginning of current word.
-- InputText(): Added BufTextLen in ImGuiTextEditCallbackData. Requesting user to maintain it
- if buffer is modified. Zero-ing structure properly before use. (#541)
-- CheckboxFlags(): Added support for testing/setting multiple flags at the same time. (@DMartinek) (#555)
-- TreeNode(), CollapsingHeader() fixed not being able to use "##" sequence in a formatted label.
-- ColorEdit4(): Empty label doesn't add InnerSpacing.x, matching behavior of other widgets. (#346)
-- ColorEdit4(): Removed unnecessary calls to scanf() when idle in hexadecimal edit mode.
-- BeginPopupContextItem(), BeginPopupContextWindow(): added early out optimization.
-- CaptureKeyboardFromApp() / CaptureMouseFromApp(): added argument to allow clearing the capture flag. (#533)
-- ImDrawList: Fixed index-overflow check broken by AddText() casting current index back to ImDrawIdx. (#514)
-- ImDrawList: Fixed incorrect removal of trailing draw command if it is a callback command.
-- ImDrawList: Allow windows with only a callback only to be functional. (#524)
-- ImDrawList: Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. (#457)
-- ImDrawList: Fixed ImDrawList::AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled(). (#457)
-- ImDrawList: AddCircle(), AddRect() takes optional thickness parameter.
-- ImDrawList: Added AddTriangle().
-- ImDrawList: Added PrimQuadUV() helper to ease custom rendering of textured quads (require primitive reserve).
-- ImDrawList: Allow AddText(ImFont\* font, float font_size, ...) variant to take NULL/0.0f as default.
-- ImFontAtlas: heuristic increase default texture width up for large number of glyphs. (#491)
-- ImTextBuffer: Fixed empty() helper which was utterly broken.
-- Metrics: allow to inspect individual triangles in draw calls.
-- Demo: added more draw primitives in the Custom Rendering example. (#457)
-- Demo: extra comments and example for PushItemWidth(-1) patterns.
-- Demo: InputText password demo filters out blanks. (#515)
-- Demo: Fixed malloc/free mismatch and leak when destructing demo console, if it has been used. (@fungos) (#536)
-- Demo: plot code doesn't use ImVector to avoid heap allocation and be more friendly to custom allocator users. (#538)
-- Fixed compilation on DragonFly BSD (@mneumann) (#563)
-- Examples: Vulkan: Added a Vulkan example (@Loftilus) (#549)
-- Examples: DX10, DX11: Saving/restoring most device state so dropping render function in your
- codebase shouldn't have DX device side-effects. (#570)
-- Examples: DX10, DX11: Fixed ImGui_ImplDX??_NewFrame() from recreating device objects if render isn't called (g_pVB not set).
-- Examples: OpenGL3: Fix BindVertexArray/BindBuffer order. (@nlguillemot) (#527)
-- Examples: OpenGL: skip rendering and calling glViewport() if we have zero-fixed buffer. (#486)
-- Examples: SDL2+OpenGL3: Fix context creation options. Made ImGui_ImplSdlGL3_NewFrame() signature
- match GL2 one. (#468, #463)
-- Examples: SDL2+OpenGL2/3: Fix for high-dpi displays. (@nickgravelyn)
-- Various extra comments and clarification in the code.
-- Various other fixes and optimizations.
-
-
------------------------------------------------------------------------
- VERSION 1.47 (2015-12-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.47
-
-Changes:
-
-- Rebranding "ImGui" -> "dear imgui" as an optional first name to reduce ambiguity with IMGUI term. (#21)
-- Added ProgressBar(). (#333)
-- InputText(): Added ImGuiInputTextFlags_Password mode: hide display, disable logging/copying to clipboard. (#237, #363, #374)
-- Added GetColorU32() helper to retrieve color given enum with global alpha and extra applied.
-- Added ImGuiIO::ClearInputCharacters() superfluous helper.
-- Fixed ImDrawList draw command merging bug where using PopClipRect() along with PushTextureID()/PopTextureID() functions
- would occasionally restore an incorrect clipping rectangle.
-- Fixed ImDrawList draw command merging so PushTextureID(XXX)/PopTextureID()/PushTextureID(XXX) sequence are now properly merged.
-- Fixed large popups positioning issues when their contents on either axis is larger than DisplaySize,
- and WindowPadding < DisplaySafeAreaPadding.
-- Fixed border rendering in various situations when using non-pixel aligned glyphs.
-- Fixed border rendering of windows to always contain the border within the window.
-- Fixed Shutdown() leaking font atlas data if NewFrame() was never called. (#396, #303)
-- Fixed int>void\* warnings for 64-bit architectures with fancy warnings enabled.
-- Renamed the dubious Color() helpers to ValueColor() - dangerously named, rarely used and probably to be made obsolete.
-- InputText(): Fixed and better handling of using keyboard while mouse button if being held and dragging. (#429)
-- InputText(): Replace OS IME (Input Method Editor) cursor on top-left when we are not text editing.
-- TreeNode(), CollapsingHeader(), Bullet(), BulletText(): various sizing and layout fixes to better support laying out
- multiple item with different height on same line. (#414, #282)
-- Begin(): Initial window creation with ImGuiWindowFlags_NoBringToFrontOnFocus flag pushes it at the front of global window list.
-- BeginPopupContextWindow() and BeginPopupContextVoid() reopen window on subsequent click. (#439)
-- ColorEdit4(): Fixed broken tooltip on hovering the color button. (actually fixes #373, #380)
-- ImageButton(): uses FrameRounding up to a maximum of available framing size. (#394)
-- Columns: Fixed bug with indentation within columns, also making code a bit shorter/faster. (#414, #125)
-- Columns: Columns set with no implicit id include the columns count within the id to reduce collisions. (#125)
-- Columns: Removed one unnecessary allocation when columns are not used by a window. (#125)
-- ImFontAtlas: Tweaked GetGlyphRangesJapanese() so it is easier to modify.
-- ImFontAtlas: Updated stb_rect_pack.h to 0.08.
-- Metrics: Fixed computing ImDrawCmd bounding box when the draw buffer have been unindexed.
-- Demo: Added a simple "Property Editor" demo applet. (#125, #414)
-- Demo: Fixed assertion in "Custom Rendering" demo when holding both mouse buttons. (#393)
-- Demo: Lots of extra comments, fixes.
-- Demo: Tweaks to Style Editor.
-- Examples: Not clearing input data/tex data in atlas (will be required for dynamic atlas anyway).
-- Examples: Added /Zi (output debug information) to Win32 batch files.
-- Examples: Various fixes for resizing window and recreating graphic context.
-- Examples: OpenGL2/3: Save/restore viewport as part of default render function. (#392, #441).
-- Examples; OpenGL3: Fixed gl3w.c for Linux when compiled with a C++ compiler. (#411)
-- Examples: DirectX: Removed assumption about Unicode build in example main.cpp. (#399)
-- Examples: DirectX10: Added DirectX10 example. (#424)
-- Examples: DirectX11: Downgraded requirement from shader model 5.0 to 4.0. (#420)
-- Examples: DirectX11: Removed Debug flag from graphics context. (#415)
-- Examples: Added SDL+OpenGL3 example. (#356)
-
-
------------------------------------------------------------------------
- VERSION 1.46 (2015-10-18)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.46
-
-Changes:
-
-- Begin*(): added ImGuiWindowFlags_NoFocusOnAppearing flag. (#314)
-- Begin*(): added ImGuiWindowFlags_NoBringToFrontOnFocus flag.
-- Added GetDrawData() alternative to setting a Render function pointer in ImGuiIO structure.
-- Added SetClipboardText(), GetClipboardText() helper shortcuts that user code can call directly without reading
- from the ImGuiIO structure (to match MemAlloc/MemFree)
-- Fixed handling of malformed UTF-8 at the end of a non-zero terminated string range.
-- Fixed mouse click detection when passing DeltaTime 0.0. (#338)
-- Fixed IsKeyReleased() and IsMouseReleased() returning true on the first frame.
-- Fixed using SetNextWindow\* functions on Modal windows with a ImGuiSetCond_Appearing condition. (#377)
-- IsMouseHoveringRect(): Added 'bool clip' parameter to disable clipping provided rectangle. (#316)
-- InputText(): added ImGuiInputTextFlags_ReadOnly flag. (#211)
-- InputText(): lose cursor/undo-stack when reactivating focus is buffer has changed size.
-- InputText(): fixed ignoring text inputs when ALT or ALTGR are pressed. (#334)
-- InputText(): fixed mouse-dragging not tracking the cursor when text doesn't fit. (#339)
-- InputText(): fixed cursor pixel-perfect alignment when horizontally scrolling.
-- InputText(): fixed crash when passing a buf_size==0 (which can be of use for read-only selectable text boxes). (#360)
-- InputFloat() fixed explicit precision modifier, both display and input were broken.
-- PlotHistogram(): improved rendering of histogram with a lot of values.
-- Dummy(): creates an item so functions such as IsItemHovered() can be used.
-- BeginChildFrame() helper: added the extra_flags parameter.
-- Scrollbar: fixed rounding of background + child window consistently have ChildWindowBg color under ScrollbarBg fill. (#355).
-- Scrollbar: background color less translucent in default style so it works better when changing background color.
-- Scrollbar: fixed minor rendering offset when borders are enabled. (#365)
-- ImDrawList: fixed 1 leak per ImDrawList using the ChannelsSplit() API (via Columns). (#318)
-- ImDrawList: fixed rectangle rendering glitches with width/height <= 1/2 and rounding enabled.
-- ImDrawList: AddImage() uv parameters default to (0,0) and (1,1).
-- ImFontAtlas: Added TexDesiredWidth and tweaked default cheapo best-width choice. (#327)
-- ImFontAtlas: Added GetGlyphRangesKorean() helper to retrieve unicode ranges for Korean. (#348)
-- ImGuiTextFilter::Draw() helper return bool and build when filter is modified.
-- ImGuiTextBuffer: added c_str() helper.
-- ColorEdit4(): fixed hovering the color button always showing 1.0 alpha. (#373)
-- ColorConvertFloat4ToU32() round the floats instead of truncating them.
-- Window: Fixed window lower-right clipping limit so it plays more friendly with both OpenGL and DirectX coordinates.
-- Internal: Extracted a EndFrame() function out of Render() but kept it internal/private + clarified some asserts. (#335)
-- Internal: Added missing IMGUI_API definitions in imgui_internal.h (#326)
-- Internal: ImLoadFileToMemory() return void\* instead of taking void*\* + allow optional int\* file_size.
-- Demo: Horizontal scrollbar demo allows to enable simultaneous scrollbars on both axes.
-- Tools: binary_to_compressed_c.cpp: added -nocompress option.
-- Examples: Added example for the Marmalade platform.
-- Examples: Added batch files to build Windows examples with VS.
-- Examples: OpenGL3: Saving/restoring more GL state correctly. (#347)
-- Examples: OpenGL2/3: Added msys2/mingw64 target to Makefiles.
-
-
------------------------------------------------------------------------
- VERSION 1.45 (2015-09-01)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.45
-
-Breaking Changes:
-
-- With the addition of better horizontal scrolling primitives I had to make some consistency fixes.
- `GetCursorPos()` `SetCursorPos()` `GetContentRegionMax()` `GetWindowContentRegionMin()` `GetWindowContentRegionMax()`
- are now incorporating the scrolling amount. They were incorrectly not incorporating this amount previously.
- It PROBABLY shouldn't break anything, but that depends on how you used them. Namely:
- - If you always used SetCursorPos() with values relative to GetCursorPos() there shouldn't be a problem.
- However if you used absolute coordinates, note that SetCursorPosY(100.0f) will put you at +100 from the
- initial Y position (which may be scrolled out of the view), NOT at +100 from the window top border.
- Since there wasn't any official scrolling value on X axis (past just manually moving the cursor) this can
- only affect you if you used to set absolute coordinates on the Y axis which is hopefully rare/unlikely,
- and trivial to fix.
- - The value of GetWindowContentRegionMax() isn't necessarily close to GetWindowWidth() if horizontally scrolling.
- Previously they were roughly interchangeable (roughly because the content region exclude window padding).
-
-Other Changes:
-
-- Added Horizontal Scrollbar via ImGuiWindowFlags_HorizontalScroll (#246).
-- Added GetScrollX(), GetScrollX(), GetScrollMaxX() apis (#246).
-- Added SetNextWindowContentSize(), SetNextWindowContentWidth() to explicitly set the content size of a window, which
- define the range of scrollbar. When set explicitly it also define the base value from which widget width are derived.
-- Added IO.WantTextInput telling when ImGui is expecting text input, so that e.g. OS on-screen keyboard can be enabled.
-- Added printf attribute to printf-like text formatting functions (Clang/GCC).
-- Added GetMousePosOnOpeningCurrentPopup() helper.
-- Added GetContentRegionAvailWidth() helper.
-- Malformed UTF-8 data don't terminate string, output 0xFFFD instead (#307).
-- ImDrawList: Added AddBezierCurve(), PathBezierCurveTo() API for cubic bezier curves (#311).
-- ImDrawList: Allow to override ImDrawIdx type (#292).
-- ImDrawList: Added an assert on overflowing index value (#292).
-- ImDrawList: Fixed issues with channels split/merge. Now functional without manually adding a draw cmd. Added comments.
-- ImDrawData: Added ScaleClipRects() helper useful when rendering scaled. (#287).
-- Fixed Bullet() inconsistent layout behavior when clipped.
-- Fixed IsWindowHovered() not taking account of window hoverability (may be disabled because of a popup).
-- Fixed InvisibleButton() not honoring negative size consistently with other widgets that do so.
-- Fixed OpenPopup() accessing current window, effectively opening "Debug" when called from an empty window stack.
-- TreeNode(): Fixed IsItemHovered() result being inconsistent with interaction visuals (#282).
-- TreeNode(): Fixed mouse interaction padding past the node label being accounted for in layout (#282).
-- BeginChild(): Passing a ImGuiWindowFlags_NoMove inhibits moving parent window from this child.
-- BeginChild() fixed missing rounding for child sizes which leaked into layout and have items misaligned.
-- Begin(): Removed default name = "Debug" parameter. We already have a "Debug" window pushed to the stack in
- the first place so it's not really a useful default.
-- Begin(): Minor fixes with windows main clipping rectangle (e.g. child window with border).
-- Begin(): Window flags are only read on the first call of the frame. Subsequent calls ignore flags, which allows
- appending to a window without worrying about flags.
-- InputText(): ignore character input when ctrl/alt are held. (Normally those text input are ignored by most wrappers.) (#279).
-- Demo: Fixed incorrectly formed string passed to Combo (#298).
-- Demo: Added simple Log demo.
-- Demo: Added horizontal scrolling example + enabled in console, log and child examples (#246).
-- Style: made scrollbars rounded by default. Because nice. Minor menu bar background alpha tweak. (#246)
-- Metrics: display indices along with triangles count (#299) and some internal state.
-- ImGuiTextFilter::PassFilter() supports string range. Added [] helper to ImGuiTextBuffer.
-- ImGuiTextFilter::Draw() default parameter width=0.0f for no override, allow override with negative values.
-- Examples: OpenGL2/OpenGL3: fix for retina displays. Default font current lack crispness.
-- Examples: OpenGL2/OpenGL3: save/restore more GL state correctly.
-- Examples: DirectX9/DirectX11: resizing buffers dynamically (#299).
-- Examples: DirectX9/DirectX11: added missing middle mouse button to Windows event handler.
-- Examples: DirectX11: fix for Visual Studio 2015 presumably shipping with an updated version of DX11.
-- Examples: iOS: fixed missing files in project.
-
-
------------------------------------------------------------------------
- VERSION 1.44 (2015-08-08)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.44
-
-Breaking Changes:
-
-- imgui.cpp has been split intro extra files: imgui_demo.cpp, imgui_draw.cpp, imgui_internal.h.
- Add the two extra .cpp to your project or #include them from another .cpp file. (#219)
-
-Other Changes:
-
-- Internal data structure and several useful functions are now exposed in imgui_internal.h. This should make it easier
- and more natural to extend ImGui. However please note that none of the content in imgui_internal.h is guaranteed
- for forward-compatibility and code using those types/functions may occasionally break. (#219)
-- All sample code is in imgui_demo.cpp. Please keep this file in your project and consider allowing your code to call
- the ShowTestWindow() function as de facto guide to ImGui features. It will be stripped out by the linker when unused.
-- Added GetContentRegionAvail() helper (basically GetContentRegionMax() - GetCursorPos()).
-- Added ImGuiWindowFlags_NoInputs for totally input-passthru window.
-- Button(): honor negative size consistently with other widgets that do so (width -100 to align the button 100 pixels
- before the right-most position of the contents region).
-- InputTextMultiline(): honor negative size consistently with other widgets that do so.
-- Combo() clamp popup to lower edge of visible area.
-- InputInt(): value doesn't pass through an int>float>int casting chain, fix handling lost of precision with "large" integer.
-- InputInt() allow hexadecimal input (awkwardly via ImGuiInputTextFlags_CharsHexadecimal but we will allow format
- string in InputInt* later).
-- Checkbox(), RadioButton(): fixed scaling of checkbox and radio button for the filling of "active" visual.
-- Columns: never assume horizontal space for scrollbar if NoScrollbar flag is explicitly set.
-- Slider: fixed using FramePadding between frame and grab visual. Scaling that spacing would look odd.
-- Fixed lower-right resize grip hit box not scaling along with its rendered size (#287)
-- ImDrawList: Fixed angles in ImDrawList::PathArcTo(), PathArcToFast() (v1.43) being off by an extra PI for no reason.
-- ImDrawList: Added ImDrawList::AddText() shorthand helper.
-- ImDrawList: Add missing support for anti-aliased thick-lines (#133, also ref #288)
-- ImFontAtlas: Added AddFontFromMemoryCompressedBase85TTF() to load base85 encoded font string. Default font encoded
- as base85 saves ~100 lines / 26 KB of source code. Added base85 output to the binary_to_compressed_c tool.
-- Build fix for MinGW (#276).
-- Examples: OpenGL3: Fixed running on script core profiles for OSX (#277).
-- Examples: OpenGL3: Simplified code using glBufferData for vertices as well (#277, #278)
-- Examples: DirectX11: Clear font texture view to ensure Release() doesn't get called twice (#290).
-- Updated to stb_truetype 1.07 (back to vanilla version as our minor changes are now in master & fix unlikely assert
- with odd fonts (#280)
-
-
------------------------------------------------------------------------
- VERSION 1.43 (2015-07-17)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.43
-
-Breaking Changes:
-
-- This is a rather important release and we unfortunately had to break the rendering API.
- ImGui now requires you to render indexed vertices instead of non-indexed ones. The fix should be very easy.
- Sorry for that! This change is saving a fair amount of CPU/GPU and enables us to get anti-aliasing for a marginal cost.
- Each ImDrawList now contains both a vertex buffer and an index buffer. For each command, render ElemCount/3 triangles
- using indices from the index buffer.
-- If you are using a vanilla copy of one of the imgui_impl_XXXX.cpp provided in the example, you just need to update
- your copy and you can ignore the rest.
-- The signature of the io.RenderDrawListsFn handler has changed
- From: ImGui_XXXX_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_count)
- To: ImGui_XXXX_RenderDrawLists(ImDrawData* draw_data)
- With: argument 'cmd_lists' -> 'draw_data->CmdLists'
- argument 'cmd_lists_count' -> 'draw_data->CmdListsCount'
- ImDrawList 'commands' -> 'CmdBuffer'
- ImDrawList 'vtx_buffer' -> 'VtxBuffer'
- ImDrawList n/a -> 'IdxBuffer' (new)
- ImDrawCmd 'vtx_count' -> 'ElemCount'
- ImDrawCmd 'clip_rect' -> 'ClipRect'
- ImDrawCmd 'user_callback' -> 'UserCallback'
- ImDrawCmd 'texture_id' -> 'TextureId'
-- If you REALLY cannot render indexed primitives, you can call the draw_data->DeIndexAllBuffers() method to de-index
- the buffers. This is slow and a waste of CPU/GPU. Prefer using indexed rendering!
- Refer to code in the examples/ folder or ask on the GitHub if you are unsure of how to upgrade. Please upgrade!
-
-Other Changes:
-
-- Added anti-aliasing on lines and shapes based on primitives by @MikkoMononen (#133).
- Between the use of indexed-rendering and the fact that the entire rendering codebase has been optimized and massaged
- enough, with anti-aliasing enabled ImGui 1.43 is now running FASTER than 1.41.
- Made some extra effort in making the code run faster in your typical Debug build.
-- Anti-aliasing can be disabled in the ImGuiStyle structure via the AntiAliasedLines/AntiAliasedShapes fields for further gains.
-- ImDrawList: Added AddPolyline(), AddConvexPolyFilled() with optional anti-aliasing.
-- ImDrawList: Added stateful path building and stroking API. PathLineTo(), PathArcTo(), PathRect(), PathFill(), PathStroke()
- with optional anti-aliasing.
-- ImDrawList: Added AddRectFilledMultiColor() helper.
-- ImDrawList: Added multi-channel rendering so out of order elements can be rendered in separate channels and then merged
- back together (used by columns).
-- ImDrawList: Fixed merging draw commands when equal clip rectangles are in the two first commands.
-- ImDrawList: Fixed window draw lists not destructed properly on Shutdown().
-- ImDrawData: Added DeIndexAllBuffers() helper.
-- Added lots of new font options ImFontAtlas::AddFont() and the new ImFontConfig structure.
- - Added support for oversampling (ImFontConfig: OversampleH, OversampleV) and sub-pixel positioning (ImFontConfig: PixelSnapH).
- Oversampling allows sub-pixel positioning but can also be used as a way to get some leeway with scaling fonts without re-rasterizing.
- - Added GlyphExtraSpacing option to add extra horizontal spacing between characters (#242).
- - Added MergeMode option to merge glyphs from different font inputs into a same font (#182, #232).
- - Added FontDataOwnedByAtlas option to keep ownership from the TTF data buffer and request the atlas to make a copy (#220).
-- Updated to stb_truetype 1.06 (+ minor mods) with better font rasterization.
-- InputText: Added ImGuiInputTextFlags_NoHorizontalScroll flag.
-- InputText: Added ImGuiInputTextFlags_AlwaysInsertMode flag.
-- InputText: Added HasSelection() helper in ImGuiTextEditCallbackData as a clarification.
-- InputText: Fix for using END key on a multi-line text editor (#275)
-- Columns: Dispatch render of each column in a sub-draw list and merge on closure, saving a lot of draw calls! (#125)
-- Popups: Fixed Combo boxes inside menus. (#272)
-- Style: Added GrabRounding setting to make the sliders etc. grabs rounded.
-- Changed SameLine() parameters from int to float.
-- Fixed incorrect assert triggering when code stole ActiveID from user moving a window by calling e.g. SetKeyboardFocusHere().
-- Fixed CollapsingHeader() label rendering outside its frame in columns context where ClipRect max isn't aligned with the
- right-side of the header.
-- Metrics window: calculate bounding box of actual vertices when hovering a draw list.
-- Examples: Showing more information in the Fonts section.
-- Examples: Added a gratuitous About window.
-- Examples: Updated all examples code (OpenGL/DX9/DX11/SDL/Allegro/iOS) to use indexed rendering.
-- Examples: Fixed the SDL2 example to support Unicode text input (#274).
-
-
------------------------------------------------------------------------
- VERSION 1.42 (2015-07-08)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.42
-
-Breaking Changes:
-
-- Renamed SetScrollPosHere() to SetScrollHere(). Kept inline redirection function (will obsolete).
-- Renamed GetScrollPosY() to GetScrollY(). Necessary to reduce confusion and make scrolling API consistent,
- because positions (e.g. cursor position) are not equivalent to scrolling amount.
-- Removed obsolete GetDefaultFontData() function that would assert anyway.
- If you are updating from <1.30 you'll get a compile error instead of an assertion. (obsoleted 2015/01/11)
-
-Other Changes:
-
-- Added SDL2 example application (courtesy of @CedricGuillemet)
-- Added iOS example application (courtesy of @joeld42)
-- Added Allegro 5 example application (courtesy of @bggd)
-- Added TitleBgActive color in style so focused window is made visible. (#253)
-- Added CaptureKeyboardFromApp() / CaptureMouseFromApp() to manually enforce inputs capturing.
-- Added DragFloatRange2() DragIntRange2() helpers. (#76)
-- Added a Y centering ratio to SetScrollFromCursorPos() which can be used to aim the top
- or bottom of the window. (#150)
-- Added SetScrollY(), SetScrollFromPos(), GetCursorStartPos() for manual scrolling manipulations. (#150).
-- Added GetKeyIndex() helper for converting from ImGuiKey_\* enum to user's keycodes.
- Basically pulls from io.KeysMap[].
-- Added missing ImGuiKey_PageUp, ImGuiKey_PageDown so more UI code can be written without
- referring to implementation-side keycodes.
-- MenuItem() can be activated on release. (#245)
-- Allowing NewFrame() with DeltaTime==0.0f to not assert.
-- Fixed IsMouseDragging(). (#260)
-- Fixed PlotLines(), PlotHistogram() using incorrect hovering test so they would show their tooltip even when there is
- a popup between mouse and the graph.
-- Fixed window padding being reported incorrectly for child windows with borders when parent have no borders.
-- Fixed a bug with TextUnformatted() clipping of long text blob when clipping y1 line sits on the first line of text. (#257)
-- Fixed text baseline alignment of small button (no padding) after regular buttons.
-- Fixed ListBoxHeader() not honoring negative sizes the same way as BeginChild() or BeginChildFrame(). (#263)
-- Fixed warnings for more pedantic compiler settings (#258).
-- ImVector<> cannot be re-defined anymore, cannot be replaced with std::vector<>.
- Allowed us to clean up and optimize lots of code. Yeah! (#262)
-- ImDrawList: store pointer to their owner name for easier auditing/debugging.
-- Examples: added scroll tracking example with SetScrollFromCursorPos().
-- Examples: metrics windows render clip rectangle when hovering over a draw call.
-- Lots of small optimization (particularly to run faster on unoptimized builds) and tidying up.
-- Added font links in extra_fonts/ + instructions for using compressed fonts in C array.
-
-
------------------------------------------------------------------------
- VERSION 1.41 (2015-06-26)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.41
-
-Breaking Changes:
-
-- Changed ImageButton() default bg_col parameter from (0,0,0,1) (black) to (0,0,0,0) (transparent).
- Only makes a difference when texture have transparency.
-- Changed Selectable() API from (label, selected, size) to (label, selected, flags, size).
- Size override should be used very rarely so hopefully it doesn't affect many people. Sorry!
-
-Other Changes:
-
-- Added InputTextMultiline() multi-line text editor, vertical scrolling, selection, optimized
- enough to handle rather big chunks of text in stateless context (thousands of lines are ok),
- option for allowing Tab to be input, option for validating with Return or Ctrl+Return (#200).
-- Added modal window API, BeginPopupModal(), follows the popup api scheme. Modal windows can be closed
- by clicking outside. By default the rest of the screen is dimmed (using ImGuiCol_ModalWindowDarkening).
- Modal windows can be stacked.
-- Added GetGlyphRangesCyrillic() helper (#237).
-- Added SetNextWindowPosCenter() to center a window prior to knowing its size. (#249)
-- Added IsWindowHovered() helper.
-- Added IsMouseReleased(), IsKeyReleased() helpers to allow to user to avoid tracking them. (#248)
-- Allow Set*WindowSize() calls to be used with popups.
-- Window: AutoFit can be triggered on each axis separately via SetNextWindowSize(), etc.
-- Window: fixed scrolling with mouse wheel while window was collapsed.
-- Window: fixed mouse wheel scroll issues.
-- DragFloat(), SliderFloat(): Fixed rounding of negative numbers which sometime made the negative lower bound unreachable.
-- InputText(): lifted character count limit.
-- InputText(): fixes in case of using per-window font scaling.
-- Selectable(), MenuItem(): do not use frame rounding for hovering/selection.
-- Selectable(): Added flag ImGuiSelectableFlags_DontClosePopups.
-- Selectable(): Added flag ImGuiSelectableFlags_SpanAllColumns (#125).
-- Combo(): Fixed issue with activating a Combo() not taking active id (#241).
-- ColorButton(), ColorEdit4(): fix to ensure that the colored square stays square when
- non-default padding settings are used.
-- BeginChildFrame(): returns bool like BeginChild() for clipping.
-- SetScrollPosHere(): takes account of item height + more accurate centering + fixed precision issue.
-- ImFont: ignoring '\r'.
-- ImFont: added GetCharAdvance() helper. Exposed font Ascent and font Descent.
-- ImFont: additional rendering optimizations.
-- Metrics windows display storage size.
-
-
------------------------------------------------------------------------
- VERSION 1.40 (2015-05-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.40
-
-Breaking Changes:
-
-- The BeginPopup() API (introduced in 1.37) had to be changed to allow for stacked popups and menus.
- Use OpenPopup() to toggle the opened state and BeginPopup() to append.**
-- The third parameter of Button(), 'repeat_if_held' has been removed. While it's been very rarely used,
- some code will possibly break if you didn't rely on the default parameter.
- Use PushButtonRepeat()/PopButtonRepeat() to configure repeat.
-- Renamed IsRectClipped() to !IsRectVisible() for consistency (opposite return value!).
- Kept inline redirection function (will obsolete)
-- Renamed GetWindowCollapsed() to IsWindowCollapsed() for consistency.
- Kept inline indirection function (will obsolete).
-
-Other Changes:
-
-- Menus: Added a menu system! Menus are typically populated with menu items and sub-menus,
- but you can add any sort of widgets in them (buttons, text inputs, sliders, etc.). (#126)
-- Menus: Added MenuItem() to append a menu item. Optional shortcut display, acts a button & toggle
- with checked/unchecked state, disabled mode. Menu items can be used in any window.
-- Menus: Added BeginMenu() to append a sub-menu. Note that you generally want to add sub-menu inside a popup or a menu-bar.
- They will work inside a normal window but it will be a bit unusual.
-- Menus: Added BeginMenuBar() to append to window menu-bar (set ImGuiWindowFlags_MenuBar to enable).
-- Menus: Added BeginMainMenuBar() helper to append to a fullscreen main menu-bar.
-- Popups: Support for stacked popups. Each popup level inhibit inputs to lower levels. The menus system is based on this. (#126).
-- Popups: Added BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid() to
- create a popup window on mouse-click.
-- Popups: Popups have borders by default (#197), attenuated border alpha in default theme.
-- Popups & Tooltip: Fit within display. Handling various positioning/sizing/scrolling edge
- cases. Better hysteresis when moving in corners. Tooltip always tries to stay away from mouse-cursor.
-- Added ImGuiStorage::GetVoidPtrRef() for manipulating stored void*.
-- Added IsKeyDown() IsMouseDown() as convenience and for consistency with existing functions
- (instead of reading them from IO structures).
-- Added Dummy() helper to advance layout by a given size. Unlike InvisibleButton() this doesn't catch any click.
-- Added configurable io.KeyRepeatDelay, io.KeyRepeatRate keyboard and mouse repeat rate.
-- Added PushButtonRepeat() / PopButtonRepeat() to enable hold-button-to-repeat press on any button.
-- Removed the third 'repeat' parameter of Button().
-- Added IsAnyItemHovered() helper.
-- Added GetItemsLineHeightWithSpacing() helper.
-- Added ImGuiListClipper helper for clipping large list of evenly sized items, to avoid using CalcListClipping() directly.
-- Separator: within group start on group horizontal offset. (#205)
-- InputText: Fixed incorrect edit state after text buffer is appended to by user via the callback. (#206)
-- InputText: CTRL+letter-key shortcuts (e.g. CTRL+C/V/X) makes sure only CTRL is pressed. (#214)
-- InputText: Fixed cursor generating a zero-width wire-frame rectangle turning into a division by zero (would go unnoticed
- unless you trapped exceptions).
-- InputFloatN/InputIntN: Flags parameter added to match scalar versions. (#218)
-- Selectable: Horizontal filling not declared to ItemSize() so Selectable(),SameLine() works and we can better auto-fit the window.
-- Selectable: Handling text baseline alignment for line that aren't of text height.
-- Combo: Empty label doesn't add ItemInnerSpacing alignment, matching other widgets.
-- EndGroup: Carries the text base offset from the last line of the group (sort of incorrect but better than nothing,
- should use the first line of the group, will implement in the future).
-- Columns: distinguish columns-set ID from other widgets as a convenience, added asserts and sailors.
-- ListBox: ListBox() function only use public API to encourage creating custom versions. ListBoxHeader() can return false.
-- ListBox: Uses ImGuiListClipper and assume items of matching height, so large lists can be handled.
-- Plot: overlay label clipped within frame when not fitting.
-- Window: Added ImGuiSetCond_Appearing to test the hidden->visible transition in SetWindow***/SetNextWindow*** functions.
-- Window: Auto-fitting cancel out one worth of vertical spacing for vertical symmetry (like what group and tooltip do).
-- Window: Default item width for auto-resizing windows expressed as a factor of font height, scales better with different font.
-- Window: Fixed auto-fit calculation mismatch of whether a scrollbar will be added by maximum height
- clamping. Also honor NoScrollBar in the case of height clamping, not adding extra horizontal space.
-- Window: Hovering require to hover same child window. Reverted 860cf57 (December 3). Might break something if you have
- child overlapping items in parent window.
-- Window: Fixed appending multiple times to an existing child via multiple BeginChild/EndChild calls to same child name.
- Allows a simple form of out-of-order appending.
-- Window: Fixed auto-filling child window using WindowMinSize at their minimum size, irrelevant.
-- Metrics: Added io.MetricsActiveWindows counter. (#213.
-- Metrics: Added io.MetricsAllocs counter (number of active memory allocations).
-- Metrics: ShowMetricsWindow() shows popups stack, allocations.
-- Style: Added style.DisplayWindowPadding to prevent windows from reaching edges of display
- (similar to style.DisplaySafeAreaPadding which is still in effect and also affect popups/tooltips).
-- Style: Removed style.AutoFitPadding, using style.WindowPadding makes more sense (the default values were already the same).
-- Style: Added style.ScrollbarRounding. (#212)
-- Style: Added ImGuiCol_TextDisabled for disabled text. Added TextDisabled() helper.
-- Style: Added style.WindowTitleAlign alignment options, to e.g. center title on windows. (#222)
-- ImVector: tweak growth strategy, matches vector from VS2010.
-- ImFontAtlas: Added ClearFonts(), making the different clear funcs more explicit. (#224)
-- ImFontAtlas: Fixed appending new fonts without clearing existing fonts. Clearing input data left to application. (#224)
-- ImDrawList: Merge draw command better, cases of multiple Begin/End gets merged properly.
-- Store common stacked settings contiguously in memory to avoid heap allocation for unused features, and reduce cache misses.
-- Shutdown() tests for g.IO.Fonts not being NULL to ease use of multiple ImGui contexts. (#207)
-- Added IMGUI_DISABLE_OBSOLETE_FUNCTIONS define to disable the functions that are meant to be removed.
-- Examples: Added ? marks with tooltips next to various widgets. Added more comments in the demo window.
-- Examples: Added Menu-bar example.
-- Examples: Added Simple Layout example.
-- Examples: AutoResize demo doesn't use TextWrapped().
-- Examples: Console example uses standard malloc/free, makes more sense as a copy & pastable example.
-- Examples: DirectX9/11: Fixed key mapping for down arrow.
-- Examples: DirectX9/11: hide OS cursor if ImGui is drawing it. (#155)
-- Examples: DirectX11: explicitly set rasterizer state.
-- Examples: OpenGL3: Add conditional compilation of forward compat as required by glfw on OSX. (#229)
-- Fixed build with Visual Studio 2008 (possibly earlier versions as well).
-- Other fixes, comments, tweaks.
-
-
------------------------------------------------------------------------
- VERSION 1.38 (2015-04-20)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.38
-
-Breaking Changes:
-
-- Renamed IsClipped() to IsRectClipped(). Kept inline redirection function (will obsolete).
-- Renamed ImDrawList::AddArc() to ImDrawList::AddArcFast().
-
-Other Changes:
-
-- Added DragFloat(), DragInt() widget, click and drag to adjust value with given step.
- Hold SHIFT/ALT to speed-up/slow-down. Double-click or CTRL+click to input text.
- Passing min >= max makes the widget unbounded.
-- Added DragFloat2(), DragFloat3(), DragFloat4(), DragInt2(), DragInt3(), DragInt4() helper variants.
-- Added ShowMetricsWindow() which is mainly useful to debug ImGui internals.
-- Added IO.MetricsRenderVertices counter.
-- Added ResetMouseDragDelta() for iterative dragging operations.
-- Added ImFontAtlas::AddFontFromCompressedTTF() helper + binary_to_compressed_c.cpp tool to
- compress a file and create a .c array from it.
-- Added PushId() GetId() variants that takes string range to avoid user making unnecessary copies.
-- Added IsItemVisible().
-- Fixed IsRectClipped() incorrectly returning false when log is enabled.
-- Slider: visual fix in the unlikely that style.GrabMinSize is larger than a slider.
-- SliderFloat: removed support for unbound slider (using FLT_MAX), caused various inconsistency. Use InputFloat()/DragFloat().
-- ColorEdit4: hide components prefix if there's no space for them.
-- Combo: adding frame padding inside the combo box.
-- Columns: mouse dragging uses absolute mouse coordinates.Fixed dragging left-most column of an auto-resizable window. #125
-- Selectable: render highlight into AutoFitPadding region but do not extend it, fixing visual gap.
-- Focus: Allow SetWindowFocus(NULL) to remove focus.
-- Focus: Clicking on void (outside an ImGui windows) loses keyboard-focus so application can use TAB.
-- Popup: Fixed hovering over a popup's child (popups disable hovering on other windows but not their childs) #197
-- Fixed active widget not releasing its active state while being clipped.
-- Fixed user-facing version of IsItemHovered() ignoring overlapping windows.
-- Fixed label vertical alignment for InputInt2(), InputInt3(), InputInt4().
-- Fixed new collapsed auto-resizing window with saved .ini settings not calculating their initial width #176
-- Fixed Begin() returning true on collapsed windows that had loaded settings #176
-- Fixed style.DisplaySafeAreaPadding handling from being applied on window prior to them auto-fitting.
-- ShowTestWindow(): added examples for DragFloat, DragInt and only custom label embedded in format strings.
-- ShowTestWindow(): fixed "manipulating titles" example not doing the right thing, broken in ff35d24
-- Examples: OpenGL/GLFW: Fixed modifier key state setting in GLFW callbacks.
-- Examples: OpenGL/GLFW: Added glBindTexture(0) in OpenGL fixed pipeline examples.
- Save restore current program and texture in the OpenGL3 example.
-- Examples: DirectX11: Removed unnecessary vertices conversion and CUSTOMVERTEX types.
-- Comments, fixes, tweaks.
-
-
------------------------------------------------------------------------
- VERSION 1.37 (2015-03-26)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.37
-
-Other Changes:
-
-- Added a more convenient three parameters version of Begin() which covers the common uses better.
-- Added mouse cursor types handling (resize, move, text input cursors, etc.) that user
- can query with GetMouseCursor(). Added demo and instructions in ShowTestWindow().
-- Added embedded mouse cursor data for MouseDrawCursor software cursor rendering, for consoles/tablets/etc. (#155).
-- Added first version of BeginPopup/EndPopup() helper API to create popup menus. Popups automatically
- lock their position to the mouse cursor when first appearing. They close automatically when clicking
- outside, and inhibit hovering items from other windows when active (to allow for clicking outside). (#126)
-- Added thickness parameter to ImDrawList::AddLine().
-- Added ImDrawList::PushClipRectFullScreen() helper.
-- Added style.DisplaySafeAreaPadding which was previously hard-coded.
- (useful if you can't see the edges of your display, e.g. TV screens).
-- Added CalcItemRectClosestPoint() helper.
-- Added GetMouseDragDelta(), IsMouseDragging() helpers, given a mouse button and an optional
- "unlock" threshold. Added io.MouseDragThreshold setting. (#167)
-- IsItemHovered() return false if another widget is active, aka we can't use what we are hovering now.
-- Added IsItemHoveredRect() if old behavior of IsItemHovered() is needed (e.g. for implementing
- the drop side of a drag'n drop operation).
-- IsItemHovered() include space taken by label and behave consistently for all widgets (#145)
-- Auto-filling child window feed their content size to parent (#170)
-- InputText() removed the odd ~ characters when clipping.
-- InputText() update its width in case of resize initiated programmatically while the widget is active.
-- InputText() last active preserve scrolling position. Reset scroll if widget size becomes bigger than contents.
-- Selectable(): not specifying a width defaults to using max of label width and remaining width.
-- Selectable(const char*, bool) version has bool defaulting to false.
-- Selectable(): fixed misusage of GetContentRegionMax().x leaking into auto-fitting.
-- Windows starting Collapsed runs initial auto-fit to retrieve a width for their title bar (#175)
-- Fixed new window from having an incorrect content size on their first frame, if queried by user.
- Fixed SetWindowPos/SetNextWindowPos having a side-effect size computation (#175)
-- InputFloat(): fixed label alignment if total widget width forcefully bigger than space available.
-- Auto contents size aware of enforced vertical scrollbar if window is larger than display size.
-- Fixed new windows auto-fitting bigger than their .ini saved size.
- This was a bug but it may be a desirable effect sometimes, may reconsider it.
-- Fixed negative clipping rectangle when collapsing windows that could affect manual
- submission to ImDrawList and end-user rendering function if unhandled (#177)
-- Fixed bounding measurement of empty groups (fix #162)
-- Fixed assignment order in Begin() making auto-fit size effectively lag by one frame. Also disabling
- "clamp into view" while windows are auto-fitting so that auto-fitting window in corners don't get pushed away.
-- Fixed MouseClickedPos not updated on double-click update (#167)
-- Fixed MouseDrawCursor feature submitting an empty trailing command in the draw list.
- Fixed unmerged draw calls for software mouse cursor.
-- Fixed double-clicking on resize grip keeping the grip active if mouse button is kept held.
-- Bounding box tests exclude higher bound, so touching items (zero spacing) don't report double hover when cursor is on edge.
-- Setting io.LogFilename to NULL disable default LogToFile() (part of #175)
-- Tweak stb_textedit integration to be lenient if another piece of code are leaking their STB_TEXTEDIT definitions/symbols.
-- Shutdown() freeing a few extra vectors so they don't have to freed by destruction (#169)
-- Examples: OpenGL2/3 examples automatically hide the OS mouse cursor if software cursor rendering is used.
-- ShowTestWindow: Added Widgets Alignment demo under Layout section
-- ShowTestWindow: Added simple dragging widget example.
-- ShowTestWindow: Graph has checkbox under the label, also demo using BeginGroup/EndGroup().
-- ShowTestWindow: Using SetNextWindowSize() in examples to encourage its use.
-- Fixes, tweaks, comments.
-
-
------------------------------------------------------------------------
- VERSION 1.36 (2015-03-18)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.36
-
-Other Changes:
-
-- Added ImGui::GetVersion(), IMGUI_VERSION (#127)
-- Added BeginGroup()/EndGroup() layout tools (#160).
-- Added Indent() / Unindent().
-- Added InputInt2(), InputInt3(), InputInt4() for completeness.
-- Added GetItemRectSize().
-- Added VSliderFloat(), VSliderInt(), vertical sliders.
-- Added IsRootWindowFocused(), IsRootWindowOrAnyChildFocused().
-- Added io.KeyAlt + support in examples apps, in prevision for future usage of Alt modifier (was missing).
-- Added ImGuiStyleVar_GrabMinSize enum value for PushStyleVar().
-- Various fixes related to vertical alignment of text after widget of varied sizes.
- Allow for multiple blocks of multiple lines text on the same "line". Added demos.
-- Explicit size passed to Plot*(), Button() includes the frame padding.
-- Style: Changed default Border and Column border colors to be most subtle.
-- Renamed style.TreeNodeSpacing to style.IndentSpacing, ImGuiStyleVar_TreeNodeSpacing to ImGuiStyleVar_IndentSpacing.
-- Renamed GetWindowIsFocused() to IsWindowFocused(), kept inline redirection with old name (will obsolete).
-- Renamed GetItemRectMin()/GetItemRectMax() to GetItemRectMin()/GetItemRectMax(), kept inline redirection with old name (will obsolete).
-- Sliders: Fast-path when power=1.0f, also makes code easier to read.
-- Sliders: Fixed parsing of decimal precision back from format string when using %%.
-- Sliders: Fixed hovering bounding test excluding padding between outer frame and grab (there was a few pixels dead-zone).
-- Separator() logs itself as text when passing through text log.
-- Optimization: TreeNodeV() early out if SkipItems is set without formatting.
-- Moved various static buffers into state. Increase the formatted string buffer from 1K to 3K.
-- Examples: Example console keeps focus on input box at all times.
-- Examples: Updated to GLFW 3.1. Moved to examples/libs/ folder.
-- Examples: Added 64-bit projects for MSVC.
-- Examples: Increase warning level from /W3 to /W4 for MSVC.
-- Examples: DirectX9: fixed duplicate creation of vertex buffer.
-- Renamed internal type ImGuiAabb to ImRect. Changed mentions of 'box' or 'aabb' to say 'rect'.
-- Tweaks, minor fixes and comments.
-
-
------------------------------------------------------------------------
- VERSION 1.35 (2015-03-09)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.35
-
-Other Changes:
-
-- Examples: refactored all examples application to make it easier to isolate and grab the
- code you need for OpenGL 2/3, DirectX 9/11, and toward a more sensible format for samples.
-- Scrollbar grab have a minimum size (style.GrabSizeMin), always visible even with huge
- scroll amount. (#150).
-- Scrollbar: Clicking inside the grab box doesn't modify scroll value. Subsequent movement always relative.
-- Added "###" labelling syntax to pass a label that isn't part of the hashed ID (#107), e.g. ("%d###static_id",rand()).
-- Added GetColumnIndex(), GetColumnsCount() (#154)
-- Added GetScrollPosY(), GetScrollMaxY().
-- Fixed the Chinese/Japanese glyph ranges; include missing punctuations (#156)
-- Fixed Combo() and ListBox() labels not included in declared size, for use with SameLine(), etc. (fix #149, #151).
-- Fixed ListBoxHeader() incorrect handling of SkipItems early out when window is collapsed.
-- Fixed using IsItemHovered() after EndChild() (#151)
-- Fixed malformed UTF-8 decoding errors leading to infinite loops (#158)
-- InputText() handles buffer limit correctly for multi-byte UTF-8 characters, won't insert
- an incomplete UTF-8 character when reaching buffer limit (fix #158)
-- Handle double-width space (0x3000) in various places the same as single-width spaces,
- for Chinese/Japanese users.
-- Collapse triangle uses text color (not border color).
-- Fixed font fallback glyph width.
-- Renamed style.ScrollBarWidth to style.ScrollbarWidth to be consistent with other casing.
-- Windows: setup a default handler for ImeSetInputScreenPosFn so the IME dialog
- (for Japanese/Chinese, etc.) is positioned correctly as you input text.
-- Windows: default clipboard handlers for Windows handle UTF-8.
-- Examples: Fixed DirectX 9/11 examples applications handling of Microsoft IME.
-- Examples: Allow DirectX 9/11 examples applications to resize the window.
-- ShowTestWindow: Fixed "undo" button of custom rendering applet.
-- ShowTestWindow: Added "Manipulating Window Title" example.
-
-
------------------------------------------------------------------------
- VERSION 1.34 (2015-03-02)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.34
-
-Other Changes:
-
-- Added Bullet() helper - equivalent to BulletText(""), SameLine().
-- Added SetWindowFocus(), SetWindowFocus(const char*), SetNextWindowFocus() (#146)
-- Added SetWindowPos(), SetWindowSize(), SetWindowCollaposed() given a window name.
-- Added SetNextTreeNodeOpened() with optional condition flag in replacement of OpenNextNode()
- and consistent with other API.
-- Renamed ImGuiSetCondition_* to ImGuiSetCond_* and ImGuiCondition_FirstUseThisSession to ImGuiCond_Once.
-- Added missing definition for ImGui::GetWindowCollapsed().
-- Fixed GetGlyphRangesJapanese() actually missing katakana ranges and a few useful extensions.
-- Fixed clicking on a widget in a child window not focusing the parent window (#147).
-- Fixed clicking on empty space of child window not setting keyboard focus for the child window (#147).
-- Fixed IsItemHovered() behaving differently on Combo() (#145)
-- Fixed ColumnOffsets storage not honoring SetStateStorage() (not very useful but consistent).
-- Examples: Removed dependency on Glew for OpenGL examples. Removed Glew binaries for Windows.
-- Examples: Fixed link warning for OpenGL windows examples.
-- Comments, tweaks.
-
------------------------------------------------------------------------
- VERSION 1.33b (2015-02-23)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.33b
-
-Other Changes:
-
-- Fixed resizing columns.
-
-
------------------------------------------------------------------------
- VERSION 1.33 (2015-02-22)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.33
-
-Other Changes:
-
-- InputText: having a InputText widget active doesn't steal mouse inputs from clicking on
- a button before losing focus (relate to #134)
-- InputText: cursor/selection/undo stack persist when using other widgets and getting back to same (#134).
-- InputText: fix effective buffer size being smaller than necessary by 1 byte (so if you give
- 3 bytes you can input 2 ascii chars + zero terminator, which is correct).
-- Added IsAnyItemActive().
-- Child window explicitly inherit collapse state from parent (so if user keeps submitting items
- even thought Begin has returned 'false' the child items will be clipped faster).
-- BeginChild() return a bool the same way Begin() does. if true you can skip submitting content.
-- Removed extraneous (1,1) padding on child window (pointed out in #125)
-- Columns: doesn't bail out when SkipItems is set (fix #136)
-- Columns: Separator() within column correctly vertical offset all cells (pointed out in #125)
-- GetColumnOffset() / SetColumnOffset() handles padding values more correctly so matching columns
- can be lined up between a parent and a child window (cf. #125)
-- Fix ImFont::BuildLookupTable() potential dangling pointer dereference (fix #131)
-- Fix hovering of child window extending past their parent not taking account of parent clipping
- rectangle (fix #137)
-- Sliders: value text is clipped inside the frame when resizing sliders to be small.
-- ImGuITextFilter::Draw() use regular width call rather than computing its own arbitrary width.
-- ImGuiTextFilter: can take a default filter string during construction.
-
-
------------------------------------------------------------------------
- VERSION 1.32 (2015-02-11)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.32
-
-Other Changes:
-
-- Added Selectable() building block for various list boxes, combo boxes, etc.
-- Added ListBox() (#129).
-- Added ListBoxHeader(), ListBoxFooter() for customized list traversal and creating multi-selection boxes.
-- Fixed title bar text clipping issue (fix #128).
-- InputText: added ImGuiInputTextFlags_CallbackCharFilter system for filtering/replacement (#130).
- Callback now passed an "EventFlag" parameter.
-- InputText: Added ImGuiInputTextFlags_CharsUppercase and ImGuiInputTextFlags_CharsNoBlank stock filters.
-- PushItemWidth() can take negative value to right-align items.
-- Optimization: Columns offsets cached to avoid unnecessary binary search.
-- Optimization: Optimized CalcTextSize() function by about 25% (they are often the bottleneck when
- submitting thousands of clipped items).
-- Added ImGuiCol_ChildWindowBg, ImGuiStyleVar_ChildWindowRounding for completeness and flexibility.
-- Added BeginChild() variant that takes an ImGuiID.
-- Tweak default ImGuiCol_HeaderActive color to be less bright.
-- Calculate framerate for the user (IO.Framerate), as a purely luxurious feature and to reduce sample code size a little.
-
-
------------------------------------------------------------------------
- VERSION 1.31 (2015-02-08)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.31
-
-Other Changes:
-
-- Added ImGuiWindowFlags_NoCollapse flag.
-- Added a way to replace the internal state pointer so that we can optionally share it between
- modules (e.g. multiple DLLs).
-- Added tint_col parameter to ImageButton().
-- Added CalcListClipping() helper to perform faster/coarse clipping on user side
- (when manipulating lists with thousands of items).
-- Added GetCursorPosX() / GetCursorPosY() shortcuts.
-- Renamed GetTextLineSpacing() to GetTextLineHeightWithSpacing().
-- Combo box always appears above other child windows of a same parent.
-- Combo/Label: label is properly clipped inside the frame (#23).
-- Added cpu-side text clipping functions which are used in some instances to avoid extra draw calls.
-- InputText: Filtering private Unicode range 0xE000-0xF8FF.
-- Fixed holding button over scrollbar creating a small feedback loop with calculation of contents size.
-- Calling SetCursorPos() automatically extends the contents size.
-- Track ownership of mouse clicks. Avoid requesting IO.WantCaptureMouse if initial click was outside of ImGui.
-- Removed the dependency on realloc().
-- Other fixes, tweaks and comments.
-
-
------------------------------------------------------------------------
- VERSION 1.30 (2015-02-01)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.30
-
-Breaking Changes:
-
-- Big update! Initialization had to be changed. You don't need to load PNG data anymore. The
- new system gives you uncompressed texture data.
- - This sequence:
- const void* png_data;
- unsigned int png_size;
- ImGui::GetDefaultFontData(NULL, NULL, &png_data, &png_size);
- // <Copy to GPU>
- - Became:
- unsigned char* pixels;
- int width, height;
- // io.Fonts->AddFontFromFileTTF("myfontfile.ttf", 24.0f); // Optionally load another font
- io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
- // <Copy to GPU>
- io.Fonts->TexID = (your_texture_identifier);
- - PixelCenterOffset has been removed and isn't a necessary setting anymore. Offset your
- projection matrix by 0.5 if you have rendering problems.
-
-Other Changes:
-
-- Loading TTF files with stb_truetype.h.
-- We still embed a compressed pixel-perfect TTF version of ProggyClean for convenience.
-- Runtime font rendering is a little faster than previously.
-- You can load multiple fonts with multiple size inside the font atlas. Rendering with multiple
- fonts are still merged into a single draw call whenever possible.
-- The system handles UTF-8 and provide ranges to easily load e.g. characters for Japanese display.
-- Added PushFont() / PopFont().
-- Added Image() and ImageButton() to display your own texture data.
-- Added callback system in command-list. This can be used if you want to do your own rendering
- (e.g. render a 3D scene) inside ImGui widgets.
-- Added IsItemActive() to tell if last widget is being held / modified (as opposed to just
- being hovered). Useful for custom dragging behaviors.
-- Style: Added FrameRounding setting for a more rounded look (default to 0 for now).
-- Window: Fixed using multiple Begin/End pair on the same window.
-- Window: Fixed style.WindowMinSize not being honored properly.
-- Window: Added SetCursorScreenPos() helper (WindowPos+CursorPos = ScreenPos).
-- ColorEdit3: clicking on color square change the edition. The toggle button is hidden by default.
-- Clipboard: Fixed logging to clipboard on architectures where va_list are passed by reference to vsnprintf.
-- Clipboard: Improve memory reserve policy for Clipboard / ImGuiTextBuffer.
-- Tooltip: Always auto-resize.
-- Tooltip: Fixed TooltigBg color not being honored properly.
-- Tooltip: Allow SetNextWindowPos() to be used on tooltips.
-- Added io.DisplayVisibleMin / io.DisplayVisibleMax to ease integration of virtual / scrolling display.
-- Added Set/GetVoidPtr in ImGuiStorage.
-- Added ColorConvertHSVtoRGB, ColorConvertRGBtoHSV, ColorConvertFloat4ToU32 helpers.
-- Added ImColor() inline helper to easily convert colors to packed 4x1 byte or 4x1 float formats.
-- Added io.MouseDrawCursor option to draw a mouse cursor for now (on systems that don't have one)
-- Examples: Added custom drawing app example for using ImDrawList api.
-- Lots of others fixes, tweaks and comments!
-
-
------------------------------------------------------------------------
- VERSION 1.20 (2015-01-07)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.20
-
-- Fixed InputInt() InputFloat() label not declaring their width, breaking usage of SameLine().
-- Fixed hovering of combo boxes that extend beyond the parent window limits.
-- Fixed text input of Unicode character in the 128-255 range.
-- Fixed clipboard pasting into an InputText box not filtering the characters according to contents semantic.
-- Dragging outside area of a widget while it is active doesn't trigger hover on other widgets.
-- Activating widget bring parent window to front if not already.
-- Checkbox and Radio buttons activate on click-release to be consistent with other widgets and most UI.
-- InputText() now consumes input characters immediately so they cannot be reused if
- ImGui::Update is called again with a call to ImGui::Render(). (fixes #105)
-- Examples: Console: added support for History callbacks + some cleanup.
-- Various small optimizations.
-- Cleanup and other fixes.
-
-
------------------------------------------------------------------------
- VERSION 1.19 (2014-12-30)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.19
-
-- Tightening default style a little.
-- Added ImGuiStyleVar_WindowRounding enum for PushStyleVar() API.
-- Added SliderInt2(), SliderInt3(), SliderInt4() for consistency.
-- Widgets more consistently handle empty labels (starting with ## mark) for their size calculation.
-- Fixed crashing with zero sized frame-buffer.
-- Fixed ImGui::Combo() not registering its size properly when clipped out of screen.
-- Renamed second parameter to Begin() to 'bool* p_opened' to be a little more self-explanatory.
- Added more comments on the use of Begin().
-- Logging: Added LogText() to pass text straight to the log output (tty/clipboard/file) without rendering it.
-- Logging: Added LogFinish() to stop logging at an arbitrary point.
-- Logging: Log depth padding relative to start depth.
-- Logging: Tree nodes and headers looking better when logged to text.
-- Logging: Log outputs \r\n under Windows to play it nicely with \n unaware tools such as Notepad.
-- Style editor: added a button to output colors to clipboard/tty.
-- OpenGL3 example: fix growing of VBO.
-- Cleanup and other minor fixes.
-
-
------------------------------------------------------------------------
- VERSION 1.18 (2014-12-11)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.18
-
-- Added ImGuiWindowFlags_NoScrollWithMouse, disable mouse wheel scrolling on a window.
-- Added ImGuiWindowFlags_NoSavedSettings, disable loading/saving window state to .ini file.
-- Added SetNextWindowPos(), SetNextWindowSize(), SetNextWindowCollapsed() API along
- with SetWindowPos(), SetWindowSize(), SetWindowCollapsed(). All functions include an
- optional second parameter to easily set current value vs session default value vs.
- persistent default value.
-- Removed rarely useful SetNewWindowDefaultPos() in favor of new API.
-- Fixed hovering of lower-right resize grip when it is above a child window.
-- Fixed InputInt() writing to output when it doesn't need to.
-- Added IMGUI_INCLUDE_IMGUI_USER_H define to include user file at the bottom of imgui.h without modifying the vanilla distribution.
-- ImGuiStorage helper can store float + added helpers to get pointer to stored data.
-- Setup Travis CI integration. Builds the OpenGL examples on Linux with GCC and Clang.
-- Examples: Added a "Fixed overlay" example in ShowTestWindow().
-- Examples: Re-added OpenGL 3 programmable-pipeline example (along with the existing fixed pipeline example).
-- Examples: OpenGL examples can now resize the application window.
-- Other minor fixes and comments.
-
-
------------------------------------------------------------------------
- VERSION 1.17 (2014-12-03)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.17
-
-- Added ImGuiWindowFlags_AlwaysAutoResize + example app.
-- Calling ImGui::SetWindowSize(0,0) force an autofit without zero-sizing first.
-- ImGui::InputText() support for completion/history/custom callback + added fancy completion example in the console demo app.
-- Not word-wrapping on apostrophes.
-- Increased visibility of check box and radio button with smaller size.
-- Smooth mouse scrolling on OSX (uses floating point scroll/wheel input).
-- New version of IMGUI_ONCE_UPON_A_FRAME helper macro that works with all compilers.
-- Moved IO.Font*** options to inside the IO.Font-> structure.
-- Added IO.FontGlobalScale setting (in addition to Font->Scale per individual font).
-- Fixed more Clang -Weverything warnings.
-- Examples: Added DirectX11 example application.
-- Examples: Created single .sln solution for all example projects.
-- Examples: Fixed DirectX9 example window initially showing an hourglass cursor.
-- Examples: Removed Microsoft IME handler in examples, too niche/confusing. Moved equivalent code to imgui.cpp instruction block.
-
-
------------------------------------------------------------------------
- VERSION 1.16b (2014-11-21)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.16b
-
-- Fix broken PopStyleVar() crashing.
-
-
------------------------------------------------------------------------
- VERSION 1.16 (2014-11-21)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.16
-
-- General fixing of Columns API to allow filling a cell with multiple widgets before switching to the next column.
-- Added documentation INDEX to top of imgui.cpp.
-- Fixed unaligned memory access for Emscripten compatibility.
-- Various pedantic warning fixes (now testing with Clang).
-- Added extra asserts to catch incorrect usage.
-- PushStyleColor() / PushStyleVar() can be used outside the scope of a window (namely to change
- variables that are used within the Begin() call).
-- PushTextWrapPos() defaults to 0.0 (right-end of current drawing region).
-- Fixed compatibility with std::vector if user decide to #define ImVector.
-- MouseWheel input is now normalized.
-- Added IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT compile-time option to redefine the vertex layout.
-- Style editor: colors listed inside a scrolling region.
-- Examples: tweaks and fixes.
-
-
------------------------------------------------------------------------
- VERSION 1.15 (2014-11-07)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.15
-
-- Renamed IsHovered() to IsItemHovered().
-- Added word-wrapping API: TextWrapped(), PushTextWrapPos(), PopTextWrapPos().
-- Added IsItemFocused() to tell if last widget is being focused for keyboard input.
-- Added overloads of ImGui::PlotLines() and ImGui::PlotHistogram() taking a function pointer to get values.
-- Added SetWindowSize().
-- Added GetContentRegionMax() supporting columns. Some bug fixes with using columns.
-- Added PushStyleVar(),PopStyleVar() helpers to modify style from user code.
-- Added dummy IMGUI_API definition in front of all entry-points for silly DLL action.
-- Allowing BeginChild() allows to specify negative sizes to specify "use remaining minus xx".
-- Windows with the NoResize flag can still use auto-fitting.
-- Added a simple example console into the demo window.
-- Comments and fixes.
-
-
------------------------------------------------------------------------
- VERSION 1.14 (2014-10-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.14
-
-- Comments and fixes.
-- Added SetKeyboardFocusHere() to set input focus from code.
-- Added GetWindowFont(), GetWindowFontSize() for users of the low-level ImDrawList API.
-- Added a UserData void *pointer so that the callback functions can access user state
- "Just in case a project has adverse reactions to adding globals or statics in their own code."
-- Renamed IMGUI_INCLUDE_IMGUI_USER_CPP to IMGUI_INCLUDE_IMGUI_USER_INL
-
-
-----------------------------------------------------------------------
- VERSION 1.13 (2014-09-30)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.13
-
-- Added support for UTF-8 for international text display and text edition/input (if the font supports it).
-- Added sample "M+ font" by Coji Morishita in extra_fonts/ to display Japanese text.
-- Added IO.ImeSetInputScreenPosFn callback for positioning OS IME input.
-- Added IO.FontFallbackGlyph (default to '?').
-- OpenGL example: added commented code to load custom font from file-system.
-- OpenGL example: shared makefile for Linux and MacOSX.
-
-
-----------------------------------------------------------------------
- VERSION 1.12 (2014-09-24)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.12
-
-- Added IO.FontBaseScale value for easy scaling of all windows.
-- Added IsMouseHoveringWindow(), IsMouseHoveringAnyWindow(), IsPosHoveringAnyWindow() helpers.
-- Added va_list variations of all functions taking ellipsis (...) parameters.
-- Added section in documentation to explicitly document cases of API breaking changes (e.g. renamed IM_MALLOC below).
-- Moved IM_MALLOC / IM_FREE defines. to IO structure members that can be set at runtime
- (also allowing precompiled ImGui to cover more use cases).
-- Fixed OpenGL samples for Retina display.
-- Comments and minor fixes.
-
-
-----------------------------------------------------------------------
- VERSION 1.11 (2014-09-10)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.11
-
-- Added more comments in the code.
-- Made radio buttons render ascii when logged into tty/file/clipboard.
-- Added ImGuiInputTextFlags_EnterReturnsTrue flag to InputText() and variants.
-- Added #define IMGUI_INCLUDE_IMGUI_USER_CPP to optionally include imgui_user.cpp from the end of imgui.cpp
-- Fixed file-descriptor leak if ImBitmapFont::LoadFromFile() calls to fseek/ftell fails.
-
-
-----------------------------------------------------------------------
- VERSION 1.10 (2014-08-31)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.10
-
-- User can override memory allocators by #define-ing IM_MALLOC, IM_FREE, IM_REALLOC,
-- Added SetCursorPosX(), SetCursorPosY() shortcuts.
-- Checkbox() returns true when pressed.
-- Added optional external fonts data in extra_fonts/ for reference.
-- Removed the need to setup IO.FontHeight when using a custom font.
-- Added comments on external fonts usage.
-
-
-----------------------------------------------------------------------
- VERSION 1.09 (2014-08-28)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.09
-
-Breaking Changes:
-
-- The behavior of PixelCenterOffset changed! You may need to change your value if you had set
- it to non-default in your code and/or offset your projection matrix by 0.5 pixels. It is
- likely that the default PixelCenterOffset value of 0.0 is now suitable unless your rendering
- uses some form of multisampling.
-
-Other Changes:
-
-- Various minor render tweaks and fixes. Better support for renderers using multisampling.
-- Moved IMGUI_FONT_TEX_UV_FOR_WHITE #define to a variable in the IO structure so font can be changed at runtime.
-- Minor other fixes, tweaks, comments.
-
-
-----------------------------------------------------------------------
- VERSION 1.08 (2014-08-25)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.08
-
-- Fixed ImGuiTextFilter trimming of leading/trailing blanks.
-- Fixed file descriptor leak on LoadSettings() failure.
-- Fix type conversion compiler warnings.
-- Added basic sizes edition in the style editor.
-- Added CalcTextSize(), GetCursorScreenPos() functions.
-- Disable client state in OpenGL example after rendering.
-- Converted all Tabs to Spaces in sources.
-
-
-----------------------------------------------------------------------
- VERSION 1.07 (2014-08-18)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.07
-
-- Added InputFloat4(), SliderFloat4() helpers.
-- Added global Alpha in ImGuiStyle structure. When Alpha=0.0, ImGui skips most of logic
- and all rendering processing.
-- Fix clipping of title bar text.
-- Fix to allow the user to call NewFrame() multiple times without calling Render().
-- Reduce inner window clipping to take account for the extend of CollapsingHeader() - share
- same clipping rectangle.
-- Fix for child windows with inverted clip rectangles (when scrolled and out of screen, Etc.).
-- Minor fixes, tweaks, comments.
-
-
-----------------------------------------------------------------------
- VERSION 1.06 (2014-08-15)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.06
-
-- Added BeginTooltip()/EndTooltip() helpers to create tooltips with custom contents.
-- Added TextColored() helper.
-- Added a 'stride' parameter to PlotLines() / PlotHistogram().
-- Fixed PlotLines() / PlotHistogram() from occasionally wrapping back to the most-left value.
-- TreeNode() / CollapsingHeader() ignore clicks when CTRL or SHIFT are held.
-- Slowed down mouse wheel scrolling inside combo boxes.
-- Minor tweaks.
-- Fixed trailing '\n' in text strings reporting extra line height.
-- Fixed tooltip position needlessly leaking into .ini file.
-- Fixed invalid .ini file data persistently being saved back into the file.
-
-
-----------------------------------------------------------------------
- VERSION 1.05 (2014-08-14)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.05
-
-- Added default clipboard functions for Windows + "private" clipboard on other systems (user can still override).
-- Fixed logarithmic sliders and HSV conversions on Mac/Linux.
-- Tidying up example applications so it looks easier to just grab code.
-- Added GetItemBoxMin(), GetItemBoxMax().
-- Tweaks, more consistent #define names.
-- Fix for doing multiple Begin()/End() during the same frame.
-
-
-----------------------------------------------------------------------
- VERSION 1.04 (2014-08-13)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.04
-
-- Fixes (v1.03 introduced a bug with combo box & scissoring bug OpenGL sample).
-- Added ImGui::InputFloat2() and ImGui::SliderFloat2() functions.
-
-
-----------------------------------------------------------------------
- VERSION 1.03 (2014-08-13)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.03
-
-- OpenGL example now use the fixed function-pipeline + cleanups, down by 150 lines.
-- Added quick & dirty Makefiles for MacOSX and Linux.
-- Simplified the DrawList system, ImDrawCmd include the clipping rectangle + some optimizations.
-- Fixed warnings for more stringent compilation settings.
-
-
-----------------------------------------------------------------------
- VERSION 1.02 (2014-08-12)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.02
-
-- Comments.
-- Portability fixes.
-- Fixing and tidying up sample applications.
-- Checkboxes and radio buttons can be clicked on their labels as well as their icon.
-- Checkboxes and radio buttons display in a different color when hovered.
-
-
-----------------------------------------------------------------------
- VERSION 1.01 (2014-08-11)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.01
-
-- Added PixelCenterOffset for OpenGL/DirectX compatibility.
-- Commented and tweaked samples.
-- Added Git ignore list.
-
-
-----------------------------------------------------------------------
- VERSION 1.00 (2014-08-10)
------------------------------------------------------------------------
-
-Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.00
-
-- Initial release.
-
diff --git a/libs/imgui-1.92.1/docs/CONTRIBUTING.md b/libs/imgui-1.92.1/docs/CONTRIBUTING.md
deleted file mode 100644
index fb946c4..0000000
--- a/libs/imgui-1.92.1/docs/CONTRIBUTING.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Contributing Guidelines
-
-## Index
-
-- [Getting Started & General Advice](#getting-started--general-advice)
-- [Issues vs Discussions](#issues-vs-discussions)
-- [How to open an Issue](#how-to-open-an-issue)
-- [How to open a Pull Request](#how-to-open-a-pull-request)
-- [Copyright / Contributor License Agreement](#copyright--contributor-license-agreement)
-
-## Getting Started & General Advice
-
-- Article: [How To Ask Good Questions](https://bit.ly/3nwRnx1).
-- Please browse the [Wiki](https://github.com/ocornut/imgui/wiki) to find code snippets, links and other resources (e.g. [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started), [Useful extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions)).
-- Please read [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) if your question relates to setting up Dear ImGui.
-- Please read [docs/FAQ.md](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md).
-- Please read [docs/FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md) if your question relates to fonts or text.
-- Please run `ImGui::ShowDemoWindow()` to explore the demo and its sources.
-- Please use the search function of your IDE to search for symbols and comments related to your situation.
-- Please use the search function of GitHub to look for similar topics (always include 'Closed' issues/pr in your search).
-- You may [browse issues by Labels](https://github.com/ocornut/imgui/labels).
-- Please use a web search engine to look for similar issues.
-- If you get a crash or assert, use a debugger to locate the line triggering it and read the comments around.
-- Please don't be a [Help Vampire](https://slash7.com/2006/12/22/vampires/).
-
-## 'Issues' vs 'Discussions'
-
-We are happy to use 'Issues' for many type of open-ended questions. We are encouraging 'Issues' becoming an enormous, centralized and cross-referenced database of Dear ImGui contents.
-
-Only if you:
-- Cannot BUILD or LINK examples.
-- Cannot BUILD, or LINK, or RUN Dear ImGui in your application or custom engine.
-- Cannot LOAD a font.
-
-Then please [use the Discussions forums](https://github.com/ocornut/imgui/discussions) instead of opening an issue.
-
-If Dear ImGui is successfully showing in your app and you have used Dear ImGui before, you can open an Issue. Any form of discussions is welcome as a new issue.
-
-## How to open an issue
-
-You may use the Issue Tracker to submit bug reports, feature requests or suggestions. You may ask for help or advice as well. But **PLEASE CAREFULLY READ THIS WALL OF TEXT. ISSUES IGNORING THOSE GUIDELINES MAY BE CLOSED. USERS IGNORING THOSE GUIDELINES MIGHT BE BLOCKED.**
-
-Please do your best to clarify your request. The amount of incomplete or ambiguous requests due to people not following those guidelines is often overwhelming. Issues created without the requested information may be closed prematurely. Exceptionally entitled, impolite, or lazy requests may lead to bans.
-
-**PLEASE UNDERSTAND THAT OPEN-SOURCE SOFTWARE LIVES OR DIES BY THE AMOUNT OF ENERGY MAINTAINERS CAN SPARE. WE HAVE LOTS OF STUFF TO DO. THIS IS AN ATTENTION ECONOMY AND MANY LAZY OR MINOR ISSUES ARE HOGGING OUR ATTENTION AND DRAINING ENERGY, TAKING US AWAY FROM MORE IMPORTANT WORK.**
-
-Steps:
-
-- Article: [How To Ask Good Questions](https://bit.ly/3nwRnx1).
-- **PLEASE DO FILL THE REQUESTED NEW ISSUE TEMPLATE.** Including Dear ImGui version number, branch name, platform/renderer back-ends (imgui_impl_XXX files), operating system.
-- **Try to be explicit with your GOALS, your EXPECTATIONS and what you have tried**. Be mindful of [The XY Problem](http://xyproblem.info/). What you have in mind or in your code is not obvious to other people. People frequently discuss problems and suggest incorrect solutions without first clarifying their goals. When requesting a new feature, please describe the usage context (how you intend to use it, why you need it, etc.). If you tried something and it failed, show us what you tried.
-- **Please INCLUDE CODE. Provide a Minimal, Complete, and Verifiable Example ([MCVE](https://stackoverflow.com/help/mcve)) to demonstrate your problem**. An ideal submission includes a small piece of code that anyone can paste into one of the examples applications (examples/../main.cpp) or demo (imgui_demo.cpp) to understand and reproduce it. **Narrowing your problem to its shortest and purest form is the easiest way to understand it, explain it and fix it**. Please test your shortened code to ensure it exhibits the problem. **Often while creating the MCVE you will solve the problem!** Many questions that are missing a standalone verifiable example are missing the actual cause of their issue in the description, which ends up wasting everyone's time.
-- **Attach screenshots (or GIF/video) to clarify the context**. They often convey useful information that is omitted by the description. You can drag pictures/files in the message edit box. Avoid using 3rd party image hosting services, prefer the long-term longevity of GitHub attachments (you can drag pictures into your post). On Windows, you can use [ScreenToGif](https://www.screentogif.com/) to easily capture .gif files.
-- **If you are discussing an assert or a crash, please provide a debugger callstack**. Never state "it crashes" without additional information. If you don't know how to use a debugger and retrieve a callstack, learning about it will be useful.
-- **Please make sure that your project has asserts enabled.** Calls to IM_ASSERT() are scattered in the code to help catch common issues. When an assert is triggered read the comments around it. By default IM_ASSERT() calls the standard assert() function. To verify that your asserts are enabled, add the line `IM_ASSERT(false);` in your main() function. Your application should display an error message and abort. If your application doesn't report an error, your asserts are disabled.
-- Please state if you have made substantial modifications to your copy of Dear ImGui or the back-end.
-- If you are not calling Dear ImGui directly from C++, please provide information about your Language and the wrapper/binding you are using.
-- Be mindful that messages are being sent to the mailbox of "Watching" users. Try to proofread your messages before sending them. Edits are not seen by those users unless they browse the site.
-
-**Some unfortunate words of warning**
-- If you are involved in cheating schemes (e.g. DLL injection) for competitive online multiplayer games, please don't post here. We won't answer and you will be blocked. It doesn't matter if your question relates to said project. We've had too many of you and need to protect our time and sanity.
-- Due to frequent abuse of this service from the aforementioned users, if your GitHub account is anonymous and was created five minutes ago please understand that your post will receive more scrutiny and incomplete questions will be harshly dismissed.
-
-If you have been using Dear ImGui for a while or have been using C/C++ for several years or have demonstrated good behavior here, it is ok to not fulfill every item to the letter. Those are guidelines and experienced users or members of the community will know which information is useful in a given context.
-
-## How to open a Pull Request
-
-- **Please understand that by submitting a PR you are also submitting a request for the maintainer to review your code and then take over its maintenance.** PR should be crafted both in the interest of the end-users and also to ease the maintainer into understanding and accepting it.
-- Many PRs are useful to demonstrate a need and a possible solution but aren't adequate for merging (causing other issues, not seeing other aspects of the big picture, etc.). In doubt, don't hesitate to push a PR because that is always the first step toward pointing toward a problem, and finding the mergeable solution! Even if a PR stays unmerged for a long time, its presence can be useful for other users and helps toward finding a general solution.
-- **When adding a feature,** please describe the usage context (how you intend to use it, why you need it, etc.). Be mindful of [The XY Problem](http://xyproblem.info/).
-- **When fixing a warning or compilation problem,** please post the compiler log and specify the compiler version and platform you are using.
-- **Attach screenshots (or GIF/video) to clarify the context and demonstrate the feature at a glance.** You can drag pictures/files in the message edit box. Prefer the long-term longevity of GitHub attachments over 3rd party hosting (you can drag pictures into your post).
-- **Make sure your code follows the coding style already used in the codebase:** 4 spaces indentations (no tabs), `local_variable`, `FunctionName()`, `MemberName`, `// Text Comment`, `//CodeComment();`, C-style casts, etc.. We don't use modern C++ idioms and tend to use only a minimum of C++11 features. The applications under examples/ are generally less consistent because they sometimes try to mimic the coding style often adopted by a certain ecosystem (e.g. DirectX-related code tend to use the style of their sample).
-- **Make sure you create a branch dedicated to the pull request**. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR (we can still cherry-pick individual commits).
-
-## Copyright / Contributor License Agreement
-
-Any code you submit will become part of the repository and be distributed under the [Dear ImGui license](https://github.com/ocornut/imgui/blob/master/LICENSE.txt). By submitting code to the project you agree that the code is your work and that you can give it to the project.
-
-You also agree by submitting your code that you grant all transferable rights to the code to the project maintainer, including for example re-licensing the code, modifying the code, and distributing it in source or binary forms. Specifically, this includes a requirement that you assign copyright to the project maintainer. For this reason, do not modify any copyright statements in files in any PRs.
-
diff --git a/libs/imgui-1.92.1/docs/EXAMPLES.md b/libs/imgui-1.92.1/docs/EXAMPLES.md
deleted file mode 100644
index 20851c1..0000000
--- a/libs/imgui-1.92.1/docs/EXAMPLES.md
+++ /dev/null
@@ -1,236 +0,0 @@
-_(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md or view this file with any Markdown viewer)_
-
-## Dear ImGui: Examples
-
-**The [examples/](https://github.com/ocornut/imgui/blob/master/examples) folder example applications (standalone, ready-to-build) for variety of
-platforms and graphics APIs.** They all use standard backends from the [backends/](https://github.com/ocornut/imgui/blob/master/backends) folder (see [docs/BACKENDS.md](https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md)).
-
-The purpose of Examples is to showcase integration with backends, let you try Dear ImGui, and guide you toward
-integrating Dear ImGui in your own application/game/engine.
-**Once Dear ImGui is setup and running, run and refer to `ImGui::ShowDemoWindow()` in imgui_demo.cpp for usage of the end-user API.**
-
-You can find Windows binaries for some of those example applications at:
- https://www.dearimgui.com/binaries
-
-
-### Getting Started
-
-Integration in a typical existing application, should take <20 lines when using standard backends.
-
-```cpp
-At initialization:
- call ImGui::CreateContext()
- call ImGui_ImplXXXX_Init() for each backend.
-
-At the beginning of your frame:
- call ImGui_ImplXXXX_NewFrame() for each backend.
- call ImGui::NewFrame()
-
-At the end of your frame:
- call ImGui::Render()
- call ImGui_ImplXXXX_RenderDrawData() for your Renderer backend.
-
-At shutdown:
- call ImGui_ImplXXXX_Shutdown() for each backend.
- call ImGui::DestroyContext()
-```
-
-Main resource:
-- Read **[Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) wiki guide** for detailed examples of how to integrate Dear ImGui in an existing application.
-
-Additional resources:
-- Read FAQ at https://www.dearimgui.com/faq
-- Read 'PROGRAMMER GUIDE' section in imgui.cpp.
-- Read the comments and instruction at the top of each file.
-
-If you are using any of the backends provided here, you can add the backends/imgui_impl_xxxx(.cpp,.h)
-files to your project and use as-in. Each imgui_impl_xxxx.cpp file comes with its own individual
-Changelog, so if you want to update them later it will be easier to catch up with what changed.
-
-
-### Examples Applications
-
-[example_allegro5/](https://github.com/ocornut/imgui/blob/master/examples/example_allegro5/) <BR>
-Allegro 5 example. <BR>
-= main.cpp + imgui_impl_allegro5.cpp
-
-[example_android_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_android_opengl3/) <BR>
-Android + OpenGL3 (ES) example. <BR>
-= main.cpp + imgui_impl_android.cpp + imgui_impl_opengl3.cpp
-
-[example_apple_metal/](https://github.com/ocornut/imgui/tree/master/examples/example_apple_metal/) <BR>
-OSX & iOS + Metal example. <BR>
-= main.m + imgui_impl_osx.mm + imgui_impl_metal.mm <BR>
-It is based on the "cross-platform" game template provided with Xcode as of Xcode 9.
-(NB: imgui_impl_osx.mm is currently not as feature complete as other platforms backends.
-You may prefer to use the GLFW Or SDL backends, which will also support Windows and Linux.)
-
-[example_apple_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_apple_opengl2/) <BR>
-OSX + OpenGL2 example. <BR>
-= main.mm + imgui_impl_osx.mm + imgui_impl_opengl2.cpp <BR>
-(NB: imgui_impl_osx.mm is currently not as feature complete as other platforms backends.
- You may prefer to use the GLFW Or SDL backends, which will also support Windows and Linux.)
-
-[example_glfw_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_wgpu/) <BR>
-GLFW + WebGPU example. Supports Emscripten (web) or Dawn (desktop) <BR>
-= main.cpp + imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
-Note that the 'example_glfw_opengl3' and 'example_sdl2_opengl3' examples also supports Emscripten!
-
-[example_glfw_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_metal/) <BR>
-GLFW (Mac) + Metal example. <BR>
-= main.mm + imgui_impl_glfw.cpp + imgui_impl_metal.mm
-
-[example_glfw_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_opengl2/) <BR>
-GLFW + OpenGL2 example (legacy, fixed pipeline). <BR>
-= main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp <BR>
-**DO NOT USE THIS IF YOUR CODE/ENGINE IS USING MODERN GL or WEBGL (SHADERS, VBO, VAO, etc.)** <BR>
-This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
-If your code is using GL3+ context or any semi modern GL calls, using this renderer is likely to
-make things more complicated, will require your code to reset many GL attributes to their initial
-state, and might confuse your GPU driver. One star, not recommended.
-
-[example_glfw_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_opengl3/) <BR>
-GLFW (Win32, Mac, Linux) + OpenGL3+/ES2/ES3 example (modern, programmable pipeline). <BR>
-= main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp <BR>
-This uses more modern GL calls and custom shaders.<BR>
-This support building with Emscripten and targeting WebGL.<BR>
-Prefer using that if you are using modern GL or WebGL in your application.
-
-[example_glfw_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_vulkan/) <BR>
-GLFW (Win32, Mac, Linux) + Vulkan example. <BR>
-= main.cpp + imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp <BR>
-This is quite long and tedious, because: Vulkan.
-For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
-
-[example_glut_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_glut_opengl2/) <BR>
-GLUT (e.g., FreeGLUT on Linux/Windows, GLUT framework on OSX) + OpenGL2 example. <BR>
-= main.cpp + imgui_impl_glut.cpp + imgui_impl_opengl2.cpp <BR>
-Note that GLUT/FreeGLUT is largely obsolete software, prefer using GLFW or SDL.
-
-[example_null/](https://github.com/ocornut/imgui/blob/master/examples/example_null/) <BR>
-Null example, compile and link imgui, create context, run headless with no inputs and no graphics output. <BR>
-= main.cpp <BR>
-This is used to quickly test compilation of core imgui files in as many setups as possible.
-Because this application doesn't create a window nor a graphic context, there's no graphics output.
-
-[example_sdl2_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_directx11/) <BR>
-SDL2 + DirectX11 example, Windows only. <BR>
-= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_dx11.cpp <BR>
-This to demonstrate usage of DirectX with SDL2.
-
-[example_sdl2_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_metal/) <BR>
-SDL2 + Metal example, Mac only. <BR>
-= main.mm + imgui_impl_sdl2.cpp + imgui_impl_metal.mm
-
-[example_sdl2_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl2/) <BR>
-SDL2 (Win32, Mac, Linux etc.) + OpenGL example (legacy, fixed pipeline). <BR>
-= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp <BR>
-**DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING GL OR WEBGL (SHADERS, VBO, VAO, etc.)** <BR>
-This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
-If your code is using GL3+ context or any semi modern GL calls, using this renderer is likely to
-make things more complicated, will require your code to reset many GL attributes to their initial
-state, and might confuse your GPU driver. One star, not recommended.
-
-[example_sdl2_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl3/) <BR>
-SDL2 (Win32, Mac, Linux, etc.) + OpenGL3+/ES2/ES3 example. <BR>
-= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp <BR>
-This uses more modern GL calls and custom shaders. <BR>
-This support building with Emscripten and targeting WebGL.<BR>
-Prefer using that if you are using modern GL or WebGL in your application.
-
-[example_sdl2_sdlrenderer2/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_sdlrenderer2/) <BR>
-SDL2 (Win32, Mac, Linux, etc.) + SDL_Renderer for SDL2 example.<BR>
-= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp <BR>
-This requires SDL 2.0.18+ (released November 2021) <BR>
-
-[example_sdl2_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_vulkan/) <BR>
-SDL2 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
-= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_vulkan.cpp <BR>
-This is quite long and tedious, because: Vulkan. <BR>
-For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
-
-[example_sdl3_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_opengl3/) <BR>
-SDL3 (Win32, Mac, Linux, etc.) + OpenGL3+/ES2/ES3 example. <BR>
-= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp <BR>
-This uses more modern GL calls and custom shaders. <BR>
-This support building with Emscripten and targeting WebGL.<BR>
-
-[example_sdl3_sdlgpu3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_sdlgpu3/) <BR>
-SDL3 (Win32, Mac, Linux, etc.) + SDL_GPU for SDL3 example.<BR>
-= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_sdlrenderer3.cpp <BR>
-
-[example_sdl3_sdlrenderer3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_sdlrenderer3/) <BR>
-SDL3 (Win32, Mac, Linux, etc.) + SDL_Renderer for SDL3 example.<BR>
-= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_sdlrenderer3.cpp <BR>
-
-[example_sdl3_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_vulkan/) <BR>
-SDL3 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
-= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_vulkan.cpp <BR>
-This is quite long and tedious, because: Vulkan. <BR>
-For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
-
-[example_win32_directx9/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx9/) <BR>
-DirectX9 example, Windows only. <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx9.cpp
-
-[example_win32_directx10/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx10/) <BR>
-DirectX10 example, Windows only. <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx10.cpp
-
-[example_win32_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx11/) <BR>
-DirectX11 example, Windows only. <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx11.cpp
-
-[example_win32_directx12/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx12/) <BR>
-DirectX12 example, Windows only. <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx12.cpp <BR>
-This is quite long and tedious, because: DirectX12.
-
-[example_win32_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_opengl3/) <BR>
-Raw Windows + OpenGL3 example (modern, programmable pipeline) <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_opengl3.cpp <BR>
-
-[example_win32_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_vulkan/) <BR>
-Raw Windows + Vulkan example <BR>
-= main.cpp + imgui_impl_win32.cpp + imgui_impl_vulkan.cpp <BR>
-
-
-### Miscellaneous
-
-**Building**
-
-Unfortunately, nowadays it is still tedious to create and maintain portable build files using external
-libraries (the kind we're using here to create a window and render 3D triangles) without relying on
-third party software and build systems. For most examples here we choose to provide:
- - Makefiles for Linux/OSX
- - Batch files for Visual Studio 2008+
- - A .sln project file for Visual Studio 2012+
- - Xcode project files for the Apple examples
-Please let us know if they don't work with your setup!
-You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those
-directly with a command-line compiler.
-
-If you are interested in using Cmake to build and links examples, see:
- https://github.com/ocornut/imgui/pull/1713 and https://github.com/ocornut/imgui/pull/3027
-
-**About mouse cursor latency**
-
-Dear ImGui does not introduce significant extra lag for most behaviors,
-e.g. the last value passed to 'io.AddMousePosEvent()' before NewFrame() will result in windows being moved
-to the right spot at the time of EndFrame()/Render(). At 60 FPS your experience should be pleasant.
-
-However, consider that OS mouse cursors are typically rendered through a very specific hardware-accelerated
-path, which makes them feel smoother than the majority of content rendered via regular graphics API (including,
-but not limited to Dear ImGui windows). Because UI rendering and interaction happens on the same plane
-as the mouse, that disconnect may be jarring to particularly sensitive users.
-You may experiment with enabling the io.MouseDrawCursor flag to request Dear ImGui to draw a mouse cursor
-using the regular graphics API, to help you visualize the difference between a "hardware" cursor and a
-regularly rendered software cursor.
-However, rendering a mouse cursor at 60 FPS will feel sluggish, so you likely won't want to enable that at
-all times. It might be beneficial for the user experience to switch to a software rendered cursor _only_
-when an interactive drag is in progress.
-
-Note that some setup configurations or GPU drivers may introduce additional display lag depending on their settings.
-If you notice that dragging windows is laggy and you are not sure what the cause is: try drawing a simple
-2D shape directly under the mouse cursor to help identify the issue!
-
diff --git a/libs/imgui-1.92.1/docs/FAQ.md b/libs/imgui-1.92.1/docs/FAQ.md
deleted file mode 100644
index 10fb603..0000000
--- a/libs/imgui-1.92.1/docs/FAQ.md
+++ /dev/null
@@ -1,768 +0,0 @@
-# FAQ (Frequently Asked Questions)
-
-You may link to this document using short form:
- https://www.dearimgui.com/faq
-or its real address:
- https://github.com/ocornut/imgui/blob/master/docs/FAQ.md
-or view this file with any Markdown viewer.
-
-
-## Index
-
-| **Q&A: Basics** |
-:---------------------------------------------------------- |
-| [Where is the documentation?](#q-where-is-the-documentation) |
-| [What is this library called?](#q-what-is-this-library-called) |
-| [Which version should I get?](#q-which-version-should-i-get) |
-| **Q&A: Integration** |
-| **[How to get started?](#q-how-to-get-started)** |
-| **[How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-my-application)** |
-| [How can I enable keyboard or gamepad controls?](#q-how-can-i-enable-keyboard-or-gamepad-controls) |
-| [How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)](#q-how-can-i-use-this-on-a-machine-without-mouse-keyboard-or-screen-input-share-remote-display) |
-| [How can I create my own backend?](q-how-can-i-create-my-own-backend)
-| [I integrated Dear ImGui in my engine and little squares are showing instead of text...](#q-i-integrated-dear-imgui-in-my-engine-and-little-squares-are-showing-instead-of-text) |
-| [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around) |
-| [I integrated Dear ImGui in my engine and some elements are displaying outside their expected windows boundaries...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-displaying-outside-their-expected-windows-boundaries) |
-| **Q&A: Usage** |
-| **[About the ID Stack system..<br>Why is my widget not reacting when I click on it?<br>Why is the wrong widget reacting when I click on one?<br>How can I have widgets with an empty label?<br>How can I have multiple widgets with the same label?<br>How can I have multiple windows with the same label?](#q-about-the-id-stack-system)** |
-| [How can I display an image?](#q-how-can-i-display-an-image)<br>[What are ImTextureID/ImTextureRef?](#q-what-are-imtextureidimtextureref)|
-| [How can I use maths operators with ImVec2?](#q-how-can-i-use-maths-operators-with-imvec2) |
-| [How can I use my own maths types instead of ImVec2/ImVec4?](#q-how-can-i-use-my-own-maths-types-instead-of-imvec2imvec4) |
-| [How can I interact with standard C++ types (such as std::string and std::vector)?](#q-how-can-i-interact-with-standard-c-types-such-as-stdstring-and-stdvector) |
-| [How can I display custom shapes? (using low-level ImDrawList API)](#q-how-can-i-display-custom-shapes-using-low-level-imdrawlist-api) |
-| **Q&A: Fonts, Text** |
-| [How should I handle DPI in my application?](#q-how-should-i-handle-dpi-in-my-application) |
-| [How can I load a different font than the default?](#q-how-can-i-load-a-different-font-than-the-default) |
-| [How can I easily use icons in my application?](#q-how-can-i-easily-use-icons-in-my-application) |
-| [How can I load multiple fonts?](#q-how-can-i-load-multiple-fonts) |
-| [How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic?](#q-how-can-i-display-and-input-non-latin-characters-such-as-chinese-japanese-korean-cyrillic) |
-| **Q&A: Concerns** |
-| [Who uses Dear ImGui?](#q-who-uses-dear-imgui) |
-| [Can you create elaborate/serious tools with Dear ImGui?](#q-can-you-create-elaborateserious-tools-with-dear-imgui) |
-| [Can you reskin the look of Dear ImGui?](#q-can-you-reskin-the-look-of-dear-imgui) |
-| [Why using C++ (as opposed to C)?](#q-why-using-c-as-opposed-to-c) |
-| **Q&A: Community** |
-| [How can I help?](#q-how-can-i-help) |
-
-
-# Q&A: Basics
-
-### Q: Where is the documentation?
-
-**This library is poorly documented at the moment and expects the user to be acquainted with C/C++.**
-- The [Wiki](https://github.com/ocornut/imgui/wiki) is a hub to many resources and links.
-- Handy [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide to integrate Dear ImGui in an existing application.
-- 20+ standalone example applications using e.g. OpenGL/DirectX are provided in the [examples/](https://github.com/ocornut/imgui/blob/master/examples/) folder to explain how to integrate Dear ImGui with your own engine/application. You can run those applications and explore them.
-- See demo code in [imgui_demo.cpp](https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp) and particularly the `ImGui::ShowDemoWindow()` function. The demo covers most features of Dear ImGui, so you can read the code and see its output.
-- See documentation: [Backends](https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md), [Examples](https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md), [Fonts](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md).
-- See documentation and comments at the top of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp) + general API comments in [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h).
-- The [Glossary](https://github.com/ocornut/imgui/wiki/Glossary) page may be useful.
-- The [Issues](https://github.com/ocornut/imgui/issues) and [Discussions](https://github.com/ocornut/imgui/discussions) sections can be searched for past questions and issues.
-- Your programming IDE is your friend, find the type or function declaration to find comments associated with it.
-- The `ImGui::ShowMetricsWindow()` function exposes lots of internal information and tools. Although it is primarily designed as a debugging tool, having access to that information tends to help understands concepts.
-
-##### [Return to Index](#index)
-
----
-
-### Q. What is this library called?
-
-**This library is called Dear ImGui**. Please refer to it as Dear ImGui (not ImGui, not IMGUI).
-
-(The library misleadingly started its life in 2014 as "ImGui" due to the fact that I didn't give it a proper name when I released 1.0, and had no particular expectation that it would take off. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations e.g. Unity uses it own implementation of the IMGUI paradigm. To reduce the ambiguity without affecting existing code bases, I have decided in December 2015 a fully qualified name "Dear ImGui" for this library.
-
-##### [Return to Index](#index)
-
----
-
-### Q: Which version should I get?
-I occasionally tag [Releases](https://github.com/ocornut/imgui/releases) but it is generally safe and recommended to sync to master/latest. The library is fairly stable and regressions tend to be fixed fast when reported.
-
-You may use the ['docking'](https://github.com/ocornut/imgui/tree/docking) branch which includes:
-- [Docking features](https://github.com/ocornut/imgui/wiki/Docking)
-- [Multi-viewport features](https://github.com/ocornut/imgui/wiki/Multi-Viewports)
-
-Many projects are using this branch and it is kept in sync with master regularly.
-
-##### [Return to Index](#index)
-
-----
-
-# Q&A: Integration
-
-### Q: How to get started?
-
-Read [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started). <BR>
-Read [docs/EXAMPLES.md](https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md). <BR>
-Read [docs/BACKENDS.md](https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md). <BR>
-Read `PROGRAMMER GUIDE` section of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp). <BR>
-The [Wiki](https://github.com/ocornut/imgui/wiki) is a hub to many resources and links.
-
-For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions).
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?
-
-You can read the `io.WantCaptureMouse`, `io.WantCaptureKeyboard` and `io.WantTextInput` flags from the ImGuiIO structure.
-- When `io.WantCaptureMouse` is set, you need to discard/hide the mouse inputs from your underlying application.
-- When `io.WantCaptureKeyboard` is set, you need to discard/hide the keyboard inputs from your underlying application.
-- When `io.WantTextInput` is set, you can notify your OS/engine to popup an on-screen keyboard, if available (e.g. on a mobile phone, or console OS).
-
-Important: you should always pass your mouse/keyboard inputs to Dear ImGui, regardless of the value `io.WantCaptureMouse`/`io.WantCaptureKeyboard`. This is because e.g. we need to detect that you clicked in the void to unfocus its own windows, and other reasons.
-
-```cpp
-void MyLowLevelMouseButtonHandler(int button, bool down)
-{
- // (1) ALWAYS forward mouse data to ImGui! This is automatic with default backends. With your own backend:
- ImGuiIO& io = ImGui::GetIO();
- io.AddMouseButtonEvent(button, down);
-
- // (2) ONLY forward mouse data to your underlying app/game.
- if (!io.WantCaptureMouse)
- my_game->HandleMouseData(...);
-}
-```
-
-**Note:** The `io.WantCaptureMouse` is more correct that any manual attempt to "check if the mouse is hovering a window" (don't do that!). It handles mouse dragging correctly (both dragging that started over your application or over a Dear ImGui window) and handle e.g. popup and modal windows blocking inputs.
-
-**Note:** Text input widget releases focus on the "KeyDown" event of the Return key, so the subsequent "KeyUp" event that your application receive will typically have `io.WantCaptureKeyboard == false`. Depending on your application logic it may or not be inconvenient to receive that KeyUp event. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I enable keyboard or gamepad controls?
-- The gamepad/keyboard navigation is fairly functional and keeps being improved. The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable. Gamepad support is particularly useful to use Dear ImGui on a game console (e.g. PS4, Switch, XB1) without a mouse connected!
-- Keyboard: set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard` to enable.
-- Gamepad: set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad` to enable (with a supporting backend).
-- See [Control Sheets for Gamepads](https://www.dearimgui.com/controls_sheets) (reference PNG/PSD for PS4, XB1, Switch gamepads).
-- See `USING GAMEPAD/KEYBOARD NAVIGATION CONTROLS` section of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp) for more details.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)
-- You can share your computer mouse seamlessly with your console/tablet/phone using solutions such as [Synergy](https://symless.com/synergy)
-This is the preferred solution for developer productivity.
-In particular, the [micro-synergy-client repository](https://github.com/symless/micro-synergy-client) has simple
-and portable source code (uSynergy.c/.h) for a small embeddable client that you can use on any platform to connect
-to your host computer, based on the Synergy 1.x protocol. Make sure you download the Synergy 1 server on your computer.
-Console SDK also sometimes provide equivalent tooling or wrapper for Synergy-like protocols.
-- Game console users: consider emulating a mouse cursor with DualShock4 touch pad or a spare analog stick as a mouse-emulation fallback.
-- You may also use a third party solution such as [netImgui](https://github.com/sammyfreg/netImgui), [Remote ImGui](https://github.com/JordiRos/remoteimgui) or [imgui-ws](https://github.com/ggerganov/imgui-ws) which sends the vertices to render over the local network, allowing you to use Dear ImGui even on a screen-less machine. See [Wiki](https://github.com/ocornut/imgui/wiki) index for most details.
-- For touch inputs, you can increase the hit box of widgets (via the `style.TouchPadding` setting) to accommodate for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing for screen real-estate and precision.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I create my own backend?
-- See [docs/BACKENDS.md](https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md).
-- See Documentation at the top of imgui.cpp.
-
-##### [Return to Index](#index)
-
----
-
-### Q: I integrated Dear ImGui in my engine and little squares are showing instead of text...
-Your renderer backend is not using the font texture correctly or it hasn't been uploaded to the GPU.
-- If this happens using standard backends (before 1.92): A) have you modified the font atlas after `ImGui_ImplXXX_NewFrame()`? B) maybe the texture failed to upload, which **can if your texture atlas is too big**. Also see [docs/FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md).
-- If this happens using standard backends (after 1.92): please report.
-- If this happens with a custom backend: make sure you have uploaded the font texture to the GPU, that all shaders are rendering states are setup properly (e.g. texture is bound). Compare your code to existing backends and use a graphics debugger such as [RenderDoc](https://renderdoc.org) to debug your rendering states.
-
-##### [Return to Index](#index)
-
----
-
-### Q: I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around...
-### Q: I integrated Dear ImGui in my engine and some elements are displaying outside their expected windows boundaries...
-You are probably mishandling the clipping rectangles in your render function.
-Each draw command needs the triangle rendered using the clipping rectangle provided in the ImDrawCmd structure (`ImDrawCmd->CllipRect`).
-Rectangles provided by Dear ImGui are defined as
-`(x1=left,y1=top,x2=right,y2=bottom)`
-and **NOT** as
-`(x1,y1,width,height)`.
-Refer to rendering backends in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder for references of how to handle the `ClipRect` field.
-For example, the [DirectX11 backend](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp) does this:
-```cpp
-// Project scissor/clipping rectangles into framebuffer space
-ImVec2 clip_off = draw_data->DisplayPos;
-ImVec2 clip_min(pcmd->ClipRect.x - clip_off.x, pcmd->ClipRect.y - clip_off.y);
-ImVec2 clip_max(pcmd->ClipRect.z - clip_off.x, pcmd->ClipRect.w - clip_off.y);
-if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
- continue;
-
-// Apply scissor/clipping rectangle
-const D3D11_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
-ctx->RSSetScissorRects(1, &r);
-```
-
-##### [Return to Index](#index)
-
----
-
-# Q&A: Usage
-
-### Q: About the ID Stack system...
-### Q: Why is my widget not reacting when I click on it?
-### Q: Why is the wrong widget reacting when I click on one?
-### Q: How can I have widgets with an empty label?
-### Q: How can I have multiple widgets with the same label?
-### Q: How can I have multiple windows with the same label?
-
-**USING THE SAME LABEL+ID IS THE MOST COMMON USER MISTAKE!**
-<br>**USING AN EMPTY LABEL IS THE SAME AS USING THE SAME LABEL AS YOUR PARENT WIDGET!**
-<table>
-<tr>
-<td><img src="https://github.com/user-attachments/assets/776a8315-1164-4178-9a8c-df52e0ff28aa"></td>
-<td>
-<pre lang="cpp">
-ImGui::Begin("Incorrect!");
-ImGui::DragFloat2("My value", &objects[0]->pos.x);
-ImGui::DragFloat2("My value", &objects[1]->pos.x);
-ImGui::DragFloat2("My value", &objects[2]->pos.x);
-ImGui::End();
-&nbsp;
-ImGui::Begin("Correct!");
-ImGui::DragFloat2("My value", &objects[0]->pos.x);
-ImGui::DragFloat2("My value##2", &objects[1]->pos.x);
-ImGui::DragFloat2("My value##3", &objects[2]->pos.x);
-ImGui::End();
-&nbsp;
-ImGui::Begin("Also Correct!");
-for (int n = 0; n < 3; n++)
-{
- ImGui::PushID(n);
- ImGui::DragFloat2("My value", &objects[n]->pos.x);
- ImGui::PopID();
-}
-ImGui::End();
-</pre>
-</td>
-</tr>
-</table>
-
-A primer on labels and the ID Stack...
-
-Dear ImGui internally needs to uniquely identify UI elements.
-Elements that are typically not clickable (such as calls to the Text functions) don't need an ID.
-Interactive widgets (such as calls to Button buttons) need a unique ID.
-
-**Unique IDs are used internally to track active widgets and occasionally associate state to widgets.<BR>
-Unique IDs are implicitly built from the hash of multiple elements that identify the "path" to the UI element.**
-
-Since Dear ImGui 1.85, you can use `Demo>Tools>ID Stack Tool` or call `ImGui::ShowIDStackToolWindow()`. The tool display intermediate values leading to the creation of a unique ID, making things easier to debug and understand.
-
-![Stack tool](https://user-images.githubusercontent.com/8225057/136235657-a0ea5665-dcd1-423f-9be6-dc3f8ced8f12.png)
-
-- Unique ID are often derived from a string label and at minimum scoped within their host window:
-```cpp
-Begin("MyWindow");
-Button("OK"); // Label = "OK", ID = hash of ("MyWindow", "OK")
-Button("Cancel"); // Label = "Cancel", ID = hash of ("MyWindow", "Cancel")
-End();
-```
-- Other elements such as tree nodes, etc. also pushes to the ID stack:
-```cpp
-Begin("MyWindow");
-if (TreeNode("MyTreeNode"))
-{
- Button("OK"); // Label = "OK", ID = hash of ("MyWindow", "MyTreeNode", "OK")
- TreePop();
-}
-End();
-```
-- Two items labeled "OK" in different windows or different tree locations won't collide:
-```cpp
-Begin("MyFirstWindow");
-Button("OK"); // Label = "OK", ID = hash of ("MyFirstWindow", "OK")
-End();
-Begin("MyOtherWindow");
-Button("OK"); // Label = "OK", ID = hash of ("MyOtherWindow", "OK")
-End();
-```
-
-- If you have a same ID twice in the same location, you'll have a conflict:
-```cpp
-Begin("MyWindow");
-Button("OK");
-Button("OK"); // ERROR: ID collision with the first button! Interacting with either button will trigger the first one.
-Button(""); // ERROR: ID collision with Begin("MyWindow")!
-End();
-```
-Fear not! This is easy to solve and there are many ways to solve it!
-
-- Solving ID conflict in a simple/local context:
-When passing a label you can optionally specify extra ID information within the string itself.
-Use "##" to pass a complement to the ID that won't be visible to the end-user.
-This helps solve the simple collision cases when you know e.g. at compilation time which items
-are going to be created:
-```cpp
-Begin("MyWindow");
-Button("Play"); // Label = "Play", ID = hash of ("MyWindow", "Play")
-Button("Play##foo1"); // Label = "Play", ID = hash of ("MyWindow", "Play##foo1") // Different from other buttons
-Button("Play##foo2"); // Label = "Play", ID = hash of ("MyWindow", "Play##foo2") // Different from other buttons
-Button("##foo"); // Label = "", ID = hash of ("MyWindow", "##foo") // Different from window
-End();
-```
-- If you want to completely hide the label, but still need an ID:
-```cpp
-Checkbox("##On", &b); // Label = "", ID = hash of (..., "##On") // No visible label, just a checkbox!
-```
-- Occasionally/rarely you might want to change a label while preserving a constant ID. This allows
-you to animate labels. For example, you may want to include varying information in a window title bar,
-but windows are uniquely identified by their ID. Use "###" to pass a label that isn't part of ID:
-```cpp
-Button("Hello###ID"); // Label = "Hello", ID = hash of (..., "###ID")
-Button("World###ID"); // Label = "World", ID = hash of (..., "###ID") // Same ID, different label
-
-sprintf(buf, "My game (%f FPS)###MyGame", fps);
-Begin(buf); // Variable title, ID = hash of "MyGame"
-```
-- Solving ID conflict in a more general manner:
-Use `PushID()` / `PopID()` to create scopes and manipulate the ID stack, as to avoid ID conflicts
-within the same window. This is the most convenient way of distinguishing ID when iterating and
-creating many UI elements programmatically.
-You can push a pointer, a string, or an integer value into the ID stack.
-Remember that IDs are formed from the concatenation of _everything_ pushed into the ID stack.
-At each level of the stack, we store the seed used for items at this level of the ID stack.
-```cpp
-Begin("Window");
-for (int i = 0; i < 100; i++)
-{
- PushID(i); // Push i to the id tack
- Button("Click"); // Label = "Click", ID = hash of ("Window", i, "Click")
- PopID();
-}
-for (int i = 0; i < 100; i++)
-{
- MyObject* obj = Objects[i];
- PushID(obj);
- Button("Click"); // Label = "Click", ID = hash of ("Window", obj pointer, "Click")
- PopID();
-}
-for (int i = 0; i < 100; i++)
-{
- MyObject* obj = Objects[i];
- PushID(obj->Name);
- Button("Click"); // Label = "Click", ID = hash of ("Window", obj->Name, "Click")
- PopID();
-}
-End();
-```
-- You can stack multiple prefixes into the ID stack:
-```cpp
-Button("Click"); // Label = "Click", ID = hash of (..., "Click")
-PushID("node");
- Button("Click"); // Label = "Click", ID = hash of (..., "node", "Click")
- PushID(my_ptr);
- Button("Click"); // Label = "Click", ID = hash of (..., "node", my_ptr, "Click")
- PopID();
-PopID();
-```
-- Tree nodes implicitly create a scope for you by calling `PushID()`:
-```cpp
-Button("Click"); // Label = "Click", ID = hash of (..., "Click")
-if (TreeNode("node")) // <-- this function call will do a PushID() for you (unless instructed not to, with a special flag)
-{
- Button("Click"); // Label = "Click", ID = hash of (..., "node", "Click")
- TreePop();
-}
-```
-
-When working with trees, IDs are used to preserve the open/close state of each tree node.
-Depending on your use cases you may want to use strings, indices, or pointers as ID.
-- e.g. when following a single pointer that may change over time, using a static string as ID
-will preserve your node open/closed state when the targeted object change.
-- e.g. when displaying a list of objects, using indices or pointers as ID will preserve the
-node open/closed state differently. See what makes more sense in your situation!
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I display an image?
-### Q: What are ImTextureID/ImTextureRef?
-
-**Short explanation:**
-- Refer to [Image Loading and Displaying Examples](https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples) on the [Wiki](https://github.com/ocornut/imgui/wiki).
-- You may use functions such as `ImGui::Image()`, `ImGui::ImageButton()` or lower-level `ImDrawList::AddImage()` to emit draw calls that will use your own textures.
-- Actual textures are identified in a way that is up to the user/engine. Those identifiers are stored and passed as an opaque ImTextureID value.
-- By default ImTextureID can store up to 64-bits. You may `#define` it to a custom type/structure if you need.
-- Loading image files from the disk and turning them into a texture is not within the scope of Dear ImGui (for a good reason), but the examples linked above may be useful references.
-
-**Details:**
-
-1.92 introduced `ImTextureRef` in June 2025.
-- Most drawing functions using ImTextureID were changed to use ImTextureRef.
-- We intentionally do not provide an implicit ImTextureRef -> ImTextureID cast operator because it is technically lossy to convert ImTextureRef to ImTextureID before rendering.
-
-**ImTextureID = backend specific, low-level identifier for a texture uploaded in GPU/graphics system.**
-- When a Rendered Backend creates a texture, it store its native identifier into a ImTextureID value (e.g. Used by DX11 backend to a `ID3D11ShaderResourceView*`; Used by OpenGL backends to store `GLuint`; Used by SDLGPU backend to store a `SDL_GPUTextureSamplerBinding*`, etc.).
-- User may submit their own textures to e.g. ImGui::Image() function by passing the same type.
-- During the rendering loop, the Renderer Backend retrieve the ImTextureID, which stored inside a ImTextureRef, which is stored inside ImDrawCmd.
-- Compile-time type configuration:
- - To use something other than a 64-bit value: add '#define ImTextureID MyTextureType*' in your imconfig.h file.
- - This can be whatever to you want it to be! read the FAQ entry about textures for details.
- - You may decide to store a higher-level structure containing texture, sampler, shader etc. with various constructors if you like. You will need to implement ==/!= operators.
-
-**ImTextureRef = higher-level identifier for a texture.**
-- The identifier is valid even before the texture has been uploaded to the GPU/graphics system.
-- This is what gets passed to functions such as `ImGui::Image()`, `ImDrawList::AddImage()`.
-- This is what gets stored in draw commands (`ImDrawCmd`) to identify a texture during rendering.
- - When a texture is created by user code (e.g. custom images), we directly stores the low-level `ImTextureID`.
- - When a texture is created by the backend, we stores a `ImTextureData*` which becomes an indirection to extract the `ImTextureID` value during rendering, after texture upload has happened.
- - There is no constructor to create a `ImTextureID` from a `ImTextureData*` as we don't expect this to be useful to the end-user, and it would be erroneously called by many legacy code.
- - If you want to bind the current atlas when using custom rectangle, you can use `io.Fonts->TexRef`.
- - Binding generators for languages such as C (which don't have constructors), should provide a helper, e.g. `inline ImTextureRef ImTextureRefFromID(ImTextureID tex_id) { ImTextureRef tex_ref = { ._TexData = NULL, .TexID = tex_id }; return tex_ref; }`
-
-**Please read documentations or tutorials on your graphics API to understand how to display textures on the screen before moving onward.**
-
-Long explanation:
-- Dear ImGui's job is to create "meshes", defined in a renderer-agnostic format made of draw commands and vertices. At the end of the frame, those meshes (ImDrawList) will be displayed by your rendering function. They are made up of textured polygons and the code to render them is generally fairly short (a few dozen lines). In the examples/ folder, we provide functions for popular graphics APIs (OpenGL, DirectX, etc.).
-- Each rendering function decides on a data type to represent "textures". The concept of what is a "texture" is entirely tied to your underlying engine/graphics API.
-We carry the information to identify a "texture" in the ImTextureID type, which itself tends to be stored inside a ImTextureRef.
-ImTextureID default to ImU64 aka 8 bytes worth of data: just enough to store one pointer or integer of your choice.
-Dear ImGui doesn't know or understand what you are storing in ImTextureID, it merely passes values until they reach your rendering function.
-- In the [examples/](https://github.com/ocornut/imgui/tree/master/examples) backends, for each graphics API we decided on a type that is likely to be a good representation for specifying an image from the end-user perspective. This is what the _examples_ rendering functions are using:
-```cpp
-OpenGL:
-- ImTextureID should contains 'GLuint' (GL texture identifier).
-- See ImGui_ImplOpenGL3_RenderDrawData() function in imgui_impl_opengl3.cpp
-```
-```cpp
-DirectX9:
-- ImTextureID should contain a 'LPDIRECT3DTEXTURE9' (pointer).
-- See ImGui_ImplDX9_RenderDrawData() function in imgui_impl_dx9.cpp
-```
-```cpp
-DirectX11:
-- ImTextureID should contain a 'ID3D11ShaderResourceView*' (pointer)
-- See ImGui_ImplDX11_RenderDrawData() function in imgui_impl_dx11.cpp
-```
-```cpp
-DirectX12:
-- ImTextureID should contain a 'D3D12_GPU_DESCRIPTOR_HANDLE' (always 64-bits)
-- See ImGui_ImplDX12_RenderDrawData() function in imgui_impl_dx12.cpp
-```
-For example, in the OpenGL example backend we store raw OpenGL texture identifier (GLuint) inside ImTextureID.
-Whereas in the DirectX11 example backend we store a pointer to ID3D11ShaderResourceView inside ImTextureID, which is a higher-level structure tying together both the texture and information about its format and how to read it.
-
-- If you have a custom engine built over e.g. OpenGL, instead of passing GLuint around you may decide to use a high-level data type to carry information about the texture as well as how to display it (shaders, etc.). The decision of what to use as ImTextureID can always be made better by knowing how your codebase is designed. If your engine has high-level data types for "textures" and "material" then you may want to use them.
-If you are starting with OpenGL or DirectX or Vulkan and haven't built much of a rendering engine over them, keeping the default ImTextureID representation suggested by the example backends is probably the best choice.
-(Advanced users may also decide to keep a low-level type in ImTextureID, use ImDrawList callback and pass information to their renderer)
-
-User code may do:
-```cpp
-// Cast our texture type to ImTextureID
-MyTexture* texture = g_CoffeeTableTexture;
-ImGui::Image((ImTextureID)(intptr_t)texture, ImVec2(texture->Width, texture->Height));
-```
-The renderer function called after ImGui::Render() will receive that same value that the user code passed:
-```cpp
-// Cast ImTextureID stored in the draw command as our texture type
-MyTexture* texture = (MyTexture*)(intptr_t)pcmd->GetTexID();
-MyEngineBindTexture2D(texture);
-```
-Once you understand this design, you will understand that loading image files and turning them into displayable textures is not within the scope of Dear ImGui.
-This is by design and is a good thing because it means your code has full control over your data types and how you display them.
-If you want to display an image file (e.g. PNG file) on the screen, please refer to documentation and tutorials for the graphics API you are using.
-
-Refer to [Image Loading and Displaying Examples](https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples) on the [Wiki](https://github.com/ocornut/imgui/wiki) to find simplified examples for loading textures with OpenGL, DirectX9 and DirectX11.
-
-C/C++ tip: a u64 is 8 bytes. You may safely store any pointer or integer into it by casting your value to ImTextureID, and vice-versa.
-Because both end-points (user code and rendering function) are under your control, you know exactly what is stored inside the ImTextureID.
-Here are some examples:
-```cpp
-GLuint my_tex = XXX;
-ImTextureID my_imtexid;
-my_imtexid = (ImTextureID)(intptr_t)my_tex; // cast a GLuint into a ImTextureID (we don't take its address! we just copy the address)
-my_tex = (GLuint)(intptr_t)my_imtexid; // cast a ImTextureID into a GLuint
-
-ID3D11ShaderResourceView* my_dx11_srv = XXX;
-ImTextureID my_imtexid;
-my_imtexid = (ImTextureID)(intptr_t)my_dx11_srv; // cast a ID3D11ShaderResourceView* into an opaque ImTextureID
-my_dx11_srv = (ID3D11ShaderResourceView*)(intptr_t)_my_imtexid; // cast a ImTextureID into a ID3D11ShaderResourceView*
-```
-Finally, you may call `ImGui::ShowMetricsWindow()` to explore/visualize/understand how the ImDrawList are generated.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I use maths operators with ImVec2?
-
-We do not export maths operators by default in imgui.h in order to not conflict with the use of your own maths types and maths operators. As a convenience, you may use `#define IMGUI_DEFINE_MATH_OPERATORS` + `#include "imgui.h"` to access our basic maths operators.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I use my own maths types instead of ImVec2/ImVec4?
-
-You can setup your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file with `IM_VEC2_CLASS_EXTRA`/`IM_VEC4_CLASS_EXTRA` macros to add implicit type conversions to our own maths types.
-This way you will be able to use your own types everywhere, e.g. passing `MyVector2` or `glm::vec2` to ImGui functions instead of `ImVec2`.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I interact with standard C++ types (such as std::string and std::vector)?
-- Being highly portable (backends/bindings for several languages, frameworks, programming styles, obscure or older platforms/compilers), and aiming for compatibility & performance suitable for every modern real-time game engine, Dear ImGui does not use any of std C++ types. We use raw types (e.g. char* instead of std::string) because they adapt to more use cases.
-- To use ImGui::InputText() with a std::string or any resizable string class, see [misc/cpp/imgui_stdlib.h](https://github.com/ocornut/imgui/blob/master/misc/cpp/imgui_stdlib.h).
-- To use combo boxes and list boxes with `std::vector` or any other data structure: the `BeginCombo()/EndCombo()` API
-lets you iterate and submit items yourself, so does the `ListBoxHeader()/ListBoxFooter()` API.
-Prefer using them over the old and awkward `Combo()/ListBox()` api.
-- Generally for most high-level types you should be able to access the underlying data type.
-You may write your own one-liner wrappers to facilitate user code (tip: add new functions in ImGui:: namespace from your code).
-- Dear ImGui applications often need to make intensive use of strings. It is expected that many of the strings you will pass
-to the API are raw literals (free in C/C++) or allocated in a manner that won't incur a large cost on your application.
-Please bear in mind that using `std::string` on applications with a large amount of UI may incur unsatisfactory performances.
-Modern implementations of `std::string` often include small-string optimization (which is often a local buffer) but those
-are not configurable and not the same across implementations.
-- If you are finding your UI traversal cost to be too large, make sure your string usage is not leading to an excessive amount
-of heap allocations. Consider using literals, statically sized buffers, and your own helper functions. A common pattern
-is that you will need to build lots of strings on the fly, and their maximum length can be easily scoped ahead.
-One possible implementation of a helper to facilitate printf-style building of strings: https://github.com/ocornut/Str
-This is a small helper where you can instance strings with configurable local buffers length. Many game engines will
-provide similar or better string helpers.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I display custom shapes? (using low-level ImDrawList API)
-
-- You can use the low-level `ImDrawList` api to render shapes within a window.
-```cpp
-ImGui::Begin("My shapes");
-
-ImDrawList* draw_list = ImGui::GetWindowDrawList();
-
-// Get the current ImGui cursor position
-ImVec2 p = ImGui::GetCursorScreenPos();
-
-// Draw a red circle
-draw_list->AddCircleFilled(ImVec2(p.x + 50, p.y + 50), 30.0f, IM_COL32(255, 0, 0, 255));
-
-// Draw a 3 pixel thick yellow line
-draw_list->AddLine(ImVec2(p.x, p.y), ImVec2(p.x + 100.0f, p.y + 100.0f), IM_COL32(255, 255, 0, 255), 3.0f);
-
-// Advance the ImGui cursor to claim space in the window (otherwise the window will appear small and needs to be resized)
-ImGui::Dummy(ImVec2(200, 200));
-
-ImGui::End();
-```
-![ImDrawList usage](https://raw.githubusercontent.com/wiki/ocornut/imgui/tutorials/CustomRendering01.png)
-
-- Refer to "Demo > Examples > Custom Rendering" in the demo window and read the code of `ShowExampleAppCustomRendering()` in `imgui_demo.cpp` from more examples.
-- To generate colors: you can use the macro `IM_COL32(255,255,255,255)` to generate them at compile time, or use `ImGui::GetColorU32(IM_COL32(255,255,255,255))` or `ImGui::GetColorU32(ImVec4(1.0f,1.0f,1.0f,1.0f))` to generate a color that is multiplied by the current value of `style.Alpha`.
-- Math operators: if you have setup `IM_VEC2_CLASS_EXTRA` in `imconfig.h` to bind your own math types, you can use your own math types and their natural operators instead of ImVec2. ImVec2 by default doesn't export any math operators in the public API. You may use `#define IMGUI_DEFINE_MATH_OPERATORS` `#include "imgui.h"` to use our math operators, but instead prefer using your own math library and set it up in `imconfig.h`.
-- You can use `ImGui::GetBackgroundDrawList()` or `ImGui::GetForegroundDrawList()` to access draw lists which will be displayed behind and over every other Dear ImGui window (one bg/fg drawlist per viewport). This is very convenient if you need to quickly display something on the screen that is not associated with a Dear ImGui window.
-- You can also create your own empty window and draw inside it. Call Begin() with the NoBackground | NoDecoration | NoSavedSettings | NoInputs flags (The `ImGuiWindowFlags_NoDecoration` flag itself is a shortcut for NoTitleBar | NoResize | NoScrollbar | NoCollapse). Then you can retrieve the ImDrawList* via `GetWindowDrawList()` and draw to it in any way you like.
-- You can create your own ImDrawList instance. You'll need to initialize them with `ImGui::GetDrawListSharedData()`, or create your own instancing `ImDrawListSharedData`, and then call your renderer function with your own ImDrawList or ImDrawData data.
-- Looking for fun? The [ImDrawList coding party 2020](https://github.com/ocornut/imgui/issues/3606) thread is full of "don't do this at home" extreme uses of the ImDrawList API.
-
-##### [Return to Index](#index)
-
----
-
-# Q&A: Fonts, Text
-
-### Q: How should I handle DPI in my application?
-
-Since 1.92 (June 2025) fonts may be dynamically used at any size.
-
-**Scaling fonts**
-
-To change font size:
-```cpp
-ImGui::PushFont(NULL, 42.0f);
-```
-To change font and font size:
-```cpp
-ImGui::PushFont(new_font, 42.0f);
-```
-To scale all fonts:
-```cpp
-style.FontScaleDpi = 2.0f;
-```
-In `docking` branch or with multi-viewports:
-```cpp
-io.ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
-io.ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
-```
-
-**Scaling style** (paddings, spacings, thicknesses)
-
-This is still massively work in progress, expect turbulence.
-Style values are currently not easily scalable dynamically.
-For single viewport application you can call once:
-```cpp
-style.ScaleAllSizes(factor); // call once!
-```
-If you need to change the scaling factor, it is currently most practical to reset the style and call this again with a new value.
-
-Your UI code should avoid using hardcoded constants for size and positioning. Prefer to express values as multiple of reference values such as `ImGui::GetFontSize()` or `ImGui::GetFrameHeight()`. So e.g. instead of seeing a hardcoded height of 500 for a given item/window, you may want to use `30*ImGui::GetFontSize()` instead.
-
-Down the line Dear ImGui will provide a variety of standardized reference values to facilitate using this. This is expected to happen during subsequent 1.92.x releases.
-
-Applications in the `examples/` folder are partly DPI aware but they are unable to load a custom font from the file-system, so they look ugly (may change that in the future).
-
-The reason DPI is not auto-magically solved in stock examples is that we don't yet have a satisfying solution for the "multi-dpi" problem (using the `docking` branch: when multiple viewport windows are over multiple monitors using different DPI scales) specifically for the `ImGuiStyle` structure. Fonts are however now perfectly scalable.
-
-**On Windows, you need to inform Windows that your application is DPI aware!**
-If this is not done, Windows will scale the application window and the UI text will be blurry. Potential solutions to indicate DPI awareness on Windows are:
-- For SDL2: the flag `SDL_WINDOW_ALLOW_HIGHDPI` needs to be passed to `SDL_CreateWindow()` + call `::SetProcessDPIAware()`.
-- For SDL3: the flag `SDL_WINDOW_HIGH_PIXEL_DENSITY` needs to be passed to `SDL_CreateWindow()`.
-- For GLFW: this is done automatically.
-- For other Windows projects with other backends, or wrapper projects:
- - We provide a `ImGui_ImplWin32_EnableDpiAwareness()` helper method in the Win32 backend.
- - Use an [application manifest file](https://learn.microsoft.com/en-us/windows/win32/hidpi/setting-the-default-dpi-awareness-for-a-process) to set the `<dpiAware>` property.
-
-### Q: How can I load a different font than the default?
-Use the font atlas to load the TTF/OTF file you want:
-
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels);
-io.Fonts->GetTexDataAsRGBA32() or GetTexDataAsAlpha8()
-```
-
-Default is ProggyClean.ttf, monospace, rendered at size 13, embedded in dear imgui's source code.
-
-(Tip: monospace fonts are convenient because they allow to facilitate horizontal alignment directly at the string level.)
-
-(Read the [docs/FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md) file for more details about font loading.)
-
-New programmers: remember that in C/C++ and most programming languages if you want to use a
-backslash \ within a string literal, you need to write it double backslash "\\":
-
-```cpp
-io.Fonts->AddFontFromFileTTF("MyFolder\MyFont.ttf", size); // WRONG (you are escaping the M here!)
-io.Fonts->AddFontFromFileTTF("MyFolder\\MyFont.ttf", size); // CORRECT (Windows only)
-io.Fonts->AddFontFromFileTTF("MyFolder/MyFont.ttf", size); // ALSO CORRECT
-```
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I easily use icons in my application?
-The most convenient and practical way is to merge an icon font such as FontAwesome inside your
-main font. Then you can refer to icons within your strings.
-Read the [docs/FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md) file for more details about icons font loading.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I load multiple fonts?
-
-Use the font atlas to pack them into a single texture. Read [docs/FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md) for more details.
-
-##### [Return to Index](#index)
-
----
-
-### Q: How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic?
-
-Since 1.92 (June 2025) and with an updated backend, it is not necessary to specify glyph ranges at all.
-
-Before 1.92, when loading a font, pass custom Unicode ranges to specify the glyphs to load.
-```cpp
-// [BEFORE 1.92]
-// Add default Japanese ranges
-io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, nullptr, io.Fonts->GetGlyphRangesJapanese());
-
-// Or create your own custom ranges (e.g. for a game you can feed your entire game script and only build the characters the game need)
-ImVector<ImWchar> ranges;
-ImFontGlyphRangesBuilder builder;
-builder.AddText("Hello world"); // Add a string (here "Hello world" contains 7 unique characters)
-builder.AddChar(0x7262); // Add a specific character
-builder.AddRanges(io.Fonts->GetGlyphRangesJapanese()); // Add one of the default ranges
-builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted)
-io.Fonts->AddFontFromFileTTF("myfontfile.ttf", 16.0f, nullptr, ranges.Data);
-```
-
-All your strings need to use UTF-8 encoding.
-You need to tell your compiler to use UTF-8, or in C++11 you can encode a string literal in UTF-8 by using the u8"hello" syntax.
-Specifying literal in your source code using a local code page (such as CP-923 for Japanese or CP-1251 for Cyrillic) will NOT work!
-See [About UTF-8 Encoding](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md#about-utf-8-encoding) section
-of [FONTS.md](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md) for details about UTF-8 Encoding.
-
-Text input: it is up to your application to pass the right character code by calling `io.AddInputCharacter()`.
-The applications in examples/ are doing that.
-Windows: you can use the WM_CHAR or WM_UNICHAR or WM_IME_CHAR message (depending if your app is built using Unicode or MultiByte mode).
-You may also use `MultiByteToWideChar()` or `ToUnicode()` to retrieve Unicode codepoints from MultiByte characters or keyboard state.
-Windows: if your language is relying on an Input Method Editor (IME), you can write your HWND to `ImGui::GetMainViewport()->PlatformHandleRaw`
-for the default implementation of `GetPlatformIO().Platform_SetImeDataFn()` to set your Microsoft IME position correctly.
-
-##### [Return to Index](#index)
-
----
-
-# Q&A: Concerns
-
-### Q: Who uses Dear ImGui?
-
-You may take a look at:
-
-- [Quotes](https://github.com/ocornut/imgui/wiki/Quotes)
-- [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)
-- [Funding & Sponsors](https://github.com/ocornut/imgui/wiki/Funding)
-- [Gallery](https://github.com/ocornut/imgui/issues?q=label%3Agallery)
-
-##### [Return to Index](#index)
-
----
-
-### Q: Can you create elaborate/serious tools with Dear ImGui?
-
-Yes. People have written game editors, data browsers, debuggers, profilers, and all sorts of non-trivial tools with the library. In my experience, the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
-
-Dear ImGui is very programmer-centric and the immediate-mode GUI paradigm might require you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient, and powerful.
-
-Dear ImGui is built to be efficient and scalable toward the needs for AAA-quality applications running all day. The IMGUI paradigm offers different opportunities for optimization than the more typical RMGUI paradigm.
-
-##### [Return to Index](#index)
-
----
-
-### Q: Can you reskin the look of Dear ImGui?
-
-Somewhat. You can alter the look of the interface to some degree: changing colors, sizes, padding, rounding, and fonts. However, as Dear ImGui is designed and optimized to create debug tools, the amount of skinning you can apply is limited. There is only so much you can stray away from the default look and feel of the interface. Dear ImGui is NOT designed to create a user interface for games, although with ingenious use of the low-level API you can do it.
-
-A reasonably skinned application may look like (screenshot from [#2529](https://github.com/ocornut/imgui/issues/2529#issuecomment-524281119)):
-![minipars](https://user-images.githubusercontent.com/314805/63589441-d9794f00-c5b1-11e9-8d96-cfc1b93702f7.png)
-
-##### [Return to Index](#index)
-
----
-
-### Q: Why using C++ (as opposed to C)?
-
-Dear ImGui takes advantage of a few C++ language features for convenience but nothing anywhere Boost insanity/quagmire. Dear ImGui doesn't use any C++ header file. Dear ImGui uses a very small subset of C++11 features. In particular, function overloading and default parameters are used to make the API easier to use and code terser. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors, and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-
-There is an auto-generated [c-api for Dear ImGui (cimgui)](https://github.com/cimgui/cimgui) by Sonoro1234 and Stephan Dilly. It is designed for creating bindings to other languages. If possible, I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for various third-party bindings.
-
-##### [Return to Index](#index)
-
----
-
-# Q&A: Community
-
-### Q: How can I help?
-- Businesses: please reach out to `omar AT dearimgui.com` if you work in a place using Dear ImGui! We can discuss ways for your company to fund development via invoiced technical support, maintenance, or sponsoring contacts. This is among the most useful thing you can do for Dear ImGui. With increased funding, we can hire more people to work on this project. Please see [Funding](https://github.com/ocornut/imgui/wiki/Funding) page.
-- Individuals: you can support continued maintenance and development via PayPal donations. See [README](https://github.com/ocornut/imgui/blob/master/docs/README.md).
-- If you are experienced with Dear ImGui and C++, look at [GitHub Issues](https://github.com/ocornut/imgui/issues), [GitHub Discussions](https://github.com/ocornut/imgui/discussions), the [Wiki](https://github.com/ocornut/imgui/wiki), read [docs/TODO.txt](https://github.com/ocornut/imgui/blob/master/docs/TODO.txt), and see how you want to help and can help!
-- Disclose your usage of Dear ImGui via a dev blog post, a tweet, a screenshot, a mention somewhere, etc.
-You may post screenshots or links in the [gallery threads](https://github.com/ocornut/imgui/issues?q=label%3Agallery). Visuals are ideal as they inspire other programmers. Disclosing your use of Dear ImGui helps the library grow credibility, and helps other teams and programmers with taking decisions.
-- If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues or sometimes incomplete PR.
-
-##### [Return to Index](#index)
-
diff --git a/libs/imgui-1.92.1/docs/FONTS.md b/libs/imgui-1.92.1/docs/FONTS.md
deleted file mode 100644
index ce08f17..0000000
--- a/libs/imgui-1.92.1/docs/FONTS.md
+++ /dev/null
@@ -1,605 +0,0 @@
-_(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/FONTS.md or view this file with any Markdown viewer)_
-
-## Dear ImGui: Using Fonts
-
-The code in imgui.cpp embeds a copy of [ProggyClean.ttf](http://proggyfonts.net) (by Tristan Grimmer),
-a 13 pixels high, pixel-perfect font used by default. We embed it in the source code so you can use Dear ImGui without any file system access. ProggyClean does not scale smoothly, therefore it is recommended that you load your own file when using Dear ImGui in an application aiming to look nice and wanting to support multiple resolutions.
-
-You may also load external .TTF/.OTF files.
-In the [misc/fonts/](https://github.com/ocornut/imgui/tree/master/misc/fonts) folder you can find a few suggested fonts, provided as a convenience.
-
-**Also read the FAQ:** https://www.dearimgui.com/faq (there is a Fonts section!)
-
-## Index
-- [Troubleshooting](#troubleshooting)
-- [New! Dynamic Fonts system in 1.92 (June 2025)](#new-dynamic-fonts-system-in-192-june-2025)
-- [How should I handle DPI in my application?](#how-should-i-handle-dpi-in-my-application)
-- [Fonts Loading Instructions](#fonts-loading-instructions)
-- [Loading Font Data from Memory](#loading-font-data-from-memory)
-- [Loading Font Data Embedded In Source Code](#loading-font-data-embedded-in-source-code)
-- [Using Icon Fonts](#using-icon-fonts)
- - [Excluding Overlapping Ranges](#excluding-overlapping-ranges)
-- [Using FreeType Rasterizer (imgui_freetype)](#using-freetype-rasterizer-imgui_freetype)
-- [Using Colorful Glyphs/Emojis](#using-colorful-glyphsemojis)
-- [Using Custom Glyph Ranges](#using-custom-glyph-ranges)
-- [Using Custom Colorful Icons](#using-custom-colorful-icons)
-- [About Filenames](#about-filenames)
-- [About UTF-8 Encoding](#about-utf-8-encoding)
-- [Debug Tools](#debug-tools)
-- [Credits/Licenses For Fonts Included In Repository](#creditslicenses-for-fonts-included-in-repository)
-- [Font Links](#font-links)
-
----------------------------------------
-
-## Troubleshooting
-
-**A vast majority of font and text related issues encountered comes from 4 things:**
-
-### (1) Invalid filename due to use of `\` or unexpected working directory.
-
-See [About Filenames](#about-filenames). AddFontXXX() functions should assert if the filename is incorrect.
-
-### (2) Invalid UTF-8 encoding of your non-ASCII strings.
-
-See [About UTF-8 Encoding](#about-utf-8-encoding). Use the encoding viewer to confirm encoding of string literal in your source code is correct.
-
-### (3) Missing glyph ranges.
-
-🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary.**
-
-⏪ Before 1.92: you need to load a font with explicit glyph ranges if you want to use non-ASCII characters. See [Fonts Loading Instructions](#fonts-loading-instructions). Use [Debug Tools](#debug-tools) confirm loaded fonts and loaded glyph ranges.
-
-This was a previous constraint of Dear ImGui (lifted in 1.92): when loading a font you need to specify which characters glyphs to load.
-All loaded fonts glyphs are rendered into a single texture atlas ahead of time. Calling either of `io.Fonts->GetTexDataAsAlpha8()`, `io.Fonts->GetTexDataAsRGBA32()` or `io.Fonts->Build()` will build the atlas. This is generally called by the Renderer backend, e.g. `ImGui_ImplDX11_NewFrame()` calls it. **If you use custom glyphs ranges, make sure the array is persistent** and available during the calls to `GetTexDataAsAlpha8()/GetTexDataAsRGBA32()/Build()`.
-
-### (4) Font atlas texture fails to upload to GPU.
-
-🆕 **Since 1.92, with an up to date backend: atlas is built incrementally and dynamically resized, this is less likely to happen**
-
-:rewind: This is often of byproduct of point 3. If you have large number of glyphs or multiple fonts, the texture may become too big for your graphics API. **The typical result of failing to upload a texture is if every glyph or everything appears as empty white rectangles.** Mind the fact that some graphics drivers have texture size limitation. If you are building a PC application, mind the fact that your users may use hardware with lower limitations than yours.
-
-![empty squares](https://github.com/user-attachments/assets/68b50fb5-8b9d-4c38-baec-6ac384f06d26)
-
-Some solutions:
-- You may reduce oversampling, e.g. `font_config.OversampleH = 1`, this will half your texture size for a quality loss.
- Note that while OversampleH = 2 looks visibly very close to 3 in most situations, with OversampleH = 1 the quality drop will be noticeable. Read about oversampling [here](https://github.com/nothings/stb/blob/master/tests/oversample).
-- Reduce glyphs ranges by calculating them from source localization data.
- You can use the `ImFontGlyphRangesBuilder` for this purpose and rebuilding your atlas between frames when new characters are needed. This will be the biggest win!
-- Set `io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight;` to disable rounding the texture height to the next power of two.
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## New! Dynamic Fonts system in 1.92 (June 2025)
-
-v1.92 introduces a newer, dynamic font system. It requires backend to support the `ImGuiBackendFlags_HasTextures` feature:
-- Users of icons, Asian and non-English languages do not need to pre-build all glyphs ahead of time. Saving on loading time, memory, and also reducing issues with missing glyphs. Specifying glyph ranges is not needed anymore.
-- `PushFont(NULL, new_size)` may be used anytime to change font size.
-- Packing custom rectangles is more convenient as pixels may be written to immediately.
-- Any update to fonts previously required backend specific calls to re-upload the texture, and said calls were not portable across backends. It is now possible to scale fonts etc. in a way that doesn't require you to make backend-specific calls.
-- It is possible to plug a custom loader/backend to any font source.
-
-See [#8465](https://github.com/ocornut/imgui/issues/8465) for more details.
-
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## How should I handle DPI in my application?
-
-See [FAQ entry](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-should-i-handle-dpi-in-my-application).
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Fonts Loading Instructions
-
-**Load default font:**
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontDefault();
-```
-
-**Load .TTF/.OTF file with:**
-
-🆕 **Since 1.92, with an up to date backend: passing a size is not necessary**
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontFromFileTTF("font.ttf");
-```
-:rewind: **Before 1.92, or without an up to date backend:**
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels);
-```
-If you get an assert stating "Could not load font file!", your font filename is likely incorrect. Read [About filenames](#about-filenames) carefully.
-
-**Load multiple fonts:**
-```cpp
-// Init
-ImGuiIO& io = ImGui::GetIO();
-ImFont* font1 = io.Fonts->AddFontFromFileTTF("font.ttf",);
-ImFont* font2 = io.Fonts->AddFontFromFileTTF("anotherfont.otf");
-```
-
-In your application loop, select which font to use:
-```cpp
-ImGui::Text("Hello"); // use the default font (which is the first loaded font)
-ImGui::PushFont(font2, 0.0f); // change font, keep current size
-ImGui::Text("Hello with another font");
-ImGui::PopFont();
-```
-
-**For advanced options create a ImFontConfig structure and pass it to the AddFont() function (it will be copied internally):**
-```cpp
-ImFontConfig config;
-config.OversampleH = 1.0f;
-ImFont* font = io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, &config);
-```
-
-**Combine multiple fonts into one:**
-
-🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary.**
-```cpp
-// Load a first font
-ImFont* font = io.Fonts->AddFontDefault();
-ImFontConfig config;
-config.MergeMode = true;
-io.Fonts->AddFontFromFileTTF("DroidSans.ttf", 0.0f, &config); // Merge into first font to add e.g. Asian characters
-io.Fonts->AddFontFromFileTTF("fontawesome-webfont.ttf", 0.0f, &config); // Merge into first font to add Icons
-io.Fonts->Build();
-```
-:rewind: **Before 1.92, or without an up to date backend:**
-```cpp
-// Load a first font
-ImFont* font = io.Fonts->AddFontDefault();
-
-// Add character ranges and merge into the previous font
-// The ranges array is not copied by the AddFont* functions and is used lazily
-// so ensure it is available at the time of building or calling GetTexDataAsRGBA32().
-static const ImWchar icons_ranges[] = { 0xf000, 0xf3ff, 0 }; // Will not be copied by AddFont* so keep in scope.
-ImFontConfig config;
-config.MergeMode = true;
-io.Fonts->AddFontFromFileTTF("DroidSans.ttf", 18.0f, &config, io.Fonts->GetGlyphRangesJapanese()); // Merge into first font
-io.Fonts->AddFontFromFileTTF("fontawesome-webfont.ttf", 18.0f, &config, icons_ranges); // Merge into first font
-io.Fonts->Build();
-```
-
-**Add a fourth parameter to bake specific font ranges only:**
-
-🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary. All the GetGlyphRangesXXX() functions are marked obsolete.**
-```cpp
-// Basic Latin, Extended Latin
-io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, nullptr, io.Fonts->GetGlyphRangesDefault());
-
-// Default + Selection of 2500 Ideographs used by Simplified Chinese
-io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, nullptr, io.Fonts->GetGlyphRangesChineseSimplifiedCommon());
-
-// Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
-io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, nullptr, io.Fonts->GetGlyphRangesJapanese());
-```
-See [Using Custom Glyph Ranges](#using-custom-glyph-ranges) section to create your own ranges.
-
-**Example loading and using a Japanese font:**
-
-🆕 **Since 1.92, with an up to date backend:**
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontFromFileTTF("NotoSansCJKjp-Medium.otf");
-```
-
-:rewind: **Before 1.92, or without an up to date backend:**
-```cpp
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontFromFileTTF("NotoSansCJKjp-Medium.otf", 20.0f, nullptr, io.Fonts->GetGlyphRangesJapanese());
-```
-
-```cpp
-ImGui::Text(u8"こんにちは!テスト %d", 123);
-if (ImGui::Button(u8"ロード"))
-{
- // do stuff
-}
-ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
-ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
-```
-
-![sample code output](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/code_sample_02_jp.png)
-<br>_(settings: Dark style (left), Light style (right) / Font: NotoSansCJKjp-Medium, 20px / Rounding: 5)_
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Loading Font Data from Memory
-
-```cpp
-ImFont* font = io.Fonts->AddFontFromMemoryTTF(data, data_size, size_pixels, ...);
-```
-
-IMPORTANT: `AddFontFromMemoryTTF()` by default transfer ownership of the data buffer to the font atlas, which will attempt to free it on destruction.
-This was to avoid an unnecessary copy, and is perhaps not a good API (a future version will redesign it).
-If you want to keep ownership of the data and free it yourself, you need to clear the `FontDataOwnedByAtlas` field:
-
-```cpp
-ImFontConfig font_cfg;
-font_cfg.FontDataOwnedByAtlas = false;
-ImFont* font = io.Fonts->AddFontFromMemoryTTF(data, data_size, size_pixels, &font_cfg);
-```
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Loading Font Data Embedded In Source Code
-
-- Compile and use [binary_to_compressed_c.cpp](https://github.com/ocornut/imgui/blob/master/misc/fonts/binary_to_compressed_c.cpp) to create a compressed C style array that you can embed in source code.
-- See the documentation in [binary_to_compressed_c.cpp](https://github.com/ocornut/imgui/blob/master/misc/fonts/binary_to_compressed_c.cpp) for instructions on how to use the tool.
-- You may find a precompiled version binary_to_compressed_c.exe for Windows inside the demo binaries package (see [README](https://github.com/ocornut/imgui/blob/master/docs/README.md)).
-- The tool can optionally output Base85 encoding to reduce the size of _source code_ but the read-only arrays in the actual binary will be about 20% bigger.
-
-Then load the font with:
-```cpp
-ImFont* font = io.Fonts->AddFontFromMemoryCompressedTTF(compressed_data, compressed_data_size, size_pixels, ...);
-```
-or
-```cpp
-ImFont* font = io.Fonts->AddFontFromMemoryCompressedBase85TTF(compressed_data_base85, size_pixels, ...);
-```
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Using Icon Fonts
-
-Using an icon font (such as [FontAwesome](http://fontawesome.io) or [OpenFontIcons](https://github.com/traverseda/OpenFontIcons)) is an easy and practical way to use icons in your Dear ImGui application.
-A common pattern is to merge the icon font within your main font, so you can embed icons directly from your strings without having to change fonts back and forth.
-
-To refer to the icon UTF-8 codepoints from your C++ code, you may use those headers files created by Juliette Foucaut: https://github.com/juliettef/IconFontCppHeaders.
-
-So you can use `ICON_FA_SEARCH` as a string that will render as a "Search" icon.
-
-🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary. You can omit this parameter.**
-Example Setup:
-```cpp
-// Merge icons into default tool font
-#include "IconsFontAwesome.h"
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontDefault();
-ImFontConfig config;
-config.MergeMode = true;
-config.GlyphMinAdvanceX = 13.0f; // Use if you want to make the icon monospaced
-io.Fonts->AddFontFromFileTTF("fonts/fontawesome-webfont.ttf", 13.0f, &config);
-```
-:rewind: **Before 1.92:**
-```cpp
-// Merge icons into default tool font
-#include "IconsFontAwesome.h"
-ImGuiIO& io = ImGui::GetIO();
-io.Fonts->AddFontDefault();
-
-ImFontConfig config;
-config.MergeMode = true;
-config.GlyphMinAdvanceX = 13.0f; // Use if you want to make the icon monospaced
-static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
-io.Fonts->AddFontFromFileTTF("fonts/fontawesome-webfont.ttf", 13.0f, &config, icon_ranges);
-```
-Example Usage:
-```cpp
-// Usage, e.g.
-ImGui::Text("%s among %d items", ICON_FA_SEARCH, count);
-ImGui::Button(ICON_FA_SEARCH " Search");
-// C string _literals_ can be concatenated at compilation time, e.g. "hello" " world"
-// ICON_FA_SEARCH is defined as a string literal so this is the same as "A" "B" becoming "AB"
-```
-See Links below for other icons fonts and related tools.
-
-**Monospace Icons?**
-
-To make your icon look more monospace and facilitate alignment, you may want to set the `ImFontConfig::GlyphMinAdvanceX` value when loading an icon font.
-If you `GlyphMinAdvanceX` you need to pass a `font_size` to `AddFontXXX()` calls, as the MinAdvanceX value will be specified for the given size and scaled otherwise.
-
-**Screenshot**
-
-Here's an application using icons ("Avoyd", https://www.avoyd.com):
-![avoyd](https://user-images.githubusercontent.com/8225057/81696852-c15d9e80-9464-11ea-9cab-2a4d4fc84396.jpg)
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-### Excluding Overlapping Ranges
-
-🆕 **Since 1.92, with an up to date backend: glyphs ranges are ignored**: when loading a glyph, input fonts in the merge list are queried in order. The first font which has the glyph loads it.
-<BR>‼️ **If you are merging several fonts, you may have undesirable overlapping ranges.** You can use `ImFontConfig::GlyphExcludeRanges[] `to specify ranges to ignore in a given Input.
-
-```cpp
-// Add Font Source 1 but ignore ICON_MIN_FA..ICON_MAX_FA range
-static ImWchar exclude_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
-ImFontConfig cfg1;
-cfg1.GlyphExcludeRanges = exclude_ranges;
-io.Fonts->AddFontFromFileTTF("segoeui.ttf", 0.0f, &cfg1);
-
-// Add Font Source 2, which expects to use the range above
-ImFontConfig cfg2;
-cfg2.MergeMode = true;
-io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
-```
-Another (silly) example:
-```cpp
-// Remove 'A'-'Z' from first font
-static ImWchar exclude_ranges[] = { 'A', 'Z', 0 };
-ImFontConfig cfg1;
-cfg1.GlyphExcludeRanges = exclude_ranges;
-io.Fonts->AddFontFromFileTTF("segoeui.ttf", 0.0f, &cfg1);
-
-// Load another font to fill the gaps
-ImFontConfig cfg2;
-cfg2.MergeMode = true;
-io.Fonts->AddFontFromFileTTF("Roboto-Medium.ttf", 0.0f, &cfg2);
-```
-![image](https://github.com/user-attachments/assets/f3d751d3-1aee-4698-bd9b-f511902f56bb)
-
-You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate understanding which font input is providing which glyph.
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Using FreeType Rasterizer (imgui_freetype)
-
-- Dear ImGui uses [stb_truetype.h](https://github.com/nothings/stb/) to rasterize fonts (with optional oversampling). This technique and its implementation are not ideal for fonts rendered at small sizes, which may appear a little blurry or hard to read.
-- You can however use `imgui_freetype.cpp` from the [misc/freetype/](https://github.com/ocornut/imgui/tree/master/misc/freetype) folder. Compile with this file and add `#define IMGUI_ENABLE_FREETYPE` to your imconfig.h file or build system to automatically activate it.
-- FreeType supports auto-hinting which tends to improve the readability of small fonts. It makes a big difference especially at smaller resolutions.
-- Read documentation in the [misc/freetype/](https://github.com/ocornut/imgui/tree/master/misc/freetype) folder.
-- Correct sRGB space blending will have an important effect on your font rendering quality.
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Using Colorful Glyphs/Emojis
-
-- Rendering of colored emojis is supported by imgui_freetype with FreeType 2.10+.
-- You will need to load fonts with the `ImGuiFreeTypeBuilderFlags_LoadColor` flag.
-- Emojis are frequently encoded in upper Unicode layers (character codes >0x10000) and will need dear imgui compiled with `IMGUI_USE_WCHAR32`.
-- Not all types of color fonts are supported by FreeType at the moment.
-- Stateful Unicode features such as skin tone modifiers are not supported by the text renderer.
-
-![colored glyphs](https://user-images.githubusercontent.com/8225057/106171241-9dc4ba80-6191-11eb-8a69-ca1467b206d1.png)
-
-```cpp
-io.Fonts->AddFontFromFileTTF("../../../imgui_dev/data/fonts/NotoSans-Regular.ttf", 16.0f);
-static ImWchar ranges[] = { 0x1, 0x1FFFF, 0 };
-static ImFontConfig cfg;
-cfg.MergeMode = true;
-cfg.FontLoaderFlags |= ImGuiFreeTypeLoaderFlags_LoadColor;
-io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\seguiemj.ttf", 16.0f, &cfg);
-```
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Using Custom Glyph Ranges
-
-🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary. Therefore this is not really useful any more.**
-
-:rewind: You can use the `ImFontGlyphRangesBuilder` helper to create glyph ranges based on text input. For example: for a game where your script is known, if you can feed your entire script to it and only build the characters the game needs.
-```cpp
-ImVector<ImWchar> ranges;
-ImFontGlyphRangesBuilder builder;
-builder.AddText("Hello world"); // Add a string (here "Hello world" contains 7 unique characters)
-builder.AddChar(0x7262); // Add a specific character
-builder.AddRanges(io.Fonts->GetGlyphRangesJapanese()); // Add one of the default ranges
-builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted)
-
-io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, nullptr, ranges.Data);
-io.Fonts->Build(); // Build the atlas while 'ranges' is still in scope and not deleted.
-```
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Using Custom Colorful Icons
-
-🆕 **Since 1.92, with an up to date backend: this system has been revamped.**
-
-TL;DR; With the new system, it is recommended that you create a custom `ImFontLoader` and register your fonts with it.
-`AddCustomRectFontGlyph()` has been obsoleted because its API does not make much sense with resizable fonts.
-
-You can ask questions in [#8466](https://github.com/ocornut/imgui/issues/8466).
-
-:rewind: **Before 1.92:**
-
-As an alternative to rendering colorful glyphs using imgui_freetype with `ImGuiFreeTypeBuilderFlags_LoadColor`, you may allocate your own space in the texture atlas and write yourself into it. **(This is a BETA api, use if you are familiar with dear imgui and with your rendering backend)**
-
-- You can use the `ImFontAtlas::AddCustomRect()` and `ImFontAtlas::AddCustomRectFontGlyph()` api to register rectangles that will be packed into the font atlas texture. Register them before building the atlas, then call Build()`.
-- You can then use `ImFontAtlas::GetCustomRect(int)` to query the position/size of your rectangle within the texture, and blit/copy any graphics data of your choice into those rectangles.
-- This API is beta because it is likely to change in order to support multi-dpi (multiple viewports on multiple monitors with varying DPI scale).
-
-#### Pseudo-code:
-```cpp
-// Add font, then register two custom 13x13 rectangles mapped to glyph 'a' and 'b' of this font
-ImFont* font = io.Fonts->AddFontDefault();
-int rect_ids[2];
-rect_ids[0] = io.Fonts->AddCustomRectFontGlyph(font, 'a', 13, 13, 13+1);
-rect_ids[1] = io.Fonts->AddCustomRectFontGlyph(font, 'b', 13, 13, 13+1);
-
-// Build atlas
-io.Fonts->Build();
-
-// Retrieve texture in RGBA format
-unsigned char* tex_pixels = nullptr;
-int tex_width, tex_height;
-io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_width, &tex_height);
-
-for (int rect_n = 0; rect_n < IM_ARRAYSIZE(rect_ids); rect_n++)
- if (const ImTextureRect* rect = io.Fonts->GetCustomRect(rect_ids[rect_n]))
- {
- // Fill the custom rectangle with red pixels (in reality you would draw/copy your bitmap data here!)
- for (int y = 0; y < rect->Height; y++)
- {
- ImU32* p = (ImU32*)tex_pixels + (rect->Y + y) * tex_width + (rect->X);
- for (int x = rect->Width; x > 0; x--)
- *p++ = IM_COL32(255, 0, 0, 255);
- }
- }
-```
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## About Filenames
-
-**Please note that many new C/C++ users have issues loading their files _because the filename they provide is wrong_ due to incorrect assumption of what is the current directory.**
-
-Two things to watch for:
-
-(1) In C/C++ and most programming languages if you want to use a backslash `\` within a string literal, you need to write it double backslash `\\`. At it happens, Windows uses backslashes as a path separator, so be mindful.
-```cpp
-io.Fonts->AddFontFromFileTTF("MyFiles\MyImage01.jpg", ...); // This is INCORRECT!!
-io.Fonts->AddFontFromFileTTF("MyFiles\\MyImage01.jpg", ...); // This is CORRECT
-```
-In some situations, you may also use `/` path separator under Windows.
-
-(2) Make sure your IDE/debugger settings starts your executable from the right working (current) directory. In Visual Studio you can change your working directory in project `Properties > General > Debugging > Working Directory`. People assume that their execution will start from the root folder of the project, where by default it often starts from the folder where object or executable files are stored.
-```cpp
-io.Fonts->AddFontFromFileTTF("MyImage01.jpg", ...); // Relative filename depends on your Working Directory when running your program!
-io.Fonts->AddFontFromFileTTF("../MyImage01.jpg", ...); // Load from the parent folder of your Working Directory
-```
-##### [Return to Index](#index)
-
----------------------------------------
-
-## About UTF-8 Encoding
-
-**For non-ASCII characters display, a common user issue is not passing correctly UTF-8 encoded strings.**
-
-(1) We provide a function `ImGui::DebugTextEncoding(const char* text)` which you can call to verify the content of your UTF-8 strings.
-This is a convenient way to confirm that your encoding is correct.
-
-```cpp
-ImGui::SeparatorText("CORRECT");
-ImGui::DebugTextEncoding(u8"こんにちは");
-
-ImGui::SeparatorText("INCORRECT");
-ImGui::DebugTextEncoding("こんにちは");
-```
-![UTF-8 Encoding viewer](https://github.com/ocornut/imgui/assets/8225057/61c1696a-9a94-46c5-9627-cf91211111f0)
-
-You can also find this tool under `Metrics/Debuggers->Tools->UTF-8 Encoding viewer` if you want to paste from clipboard, but this won't validate the UTF-8 encoding done by your compiler.
-
-(2) To encode in UTF-8:
-
-There are also compiler-specific ways to enforce UTF-8 encoding by default:
-
-- Visual Studio compiler: `/utf-8` command-line flag.
-- Visual Studio compiler: `#pragma execution_character_set("utf-8")` inside your code.
-- Since May 2023 we have changed the Visual Studio projects of all our examples to use `/utf-8` ([see commit](https://github.com/ocornut/imgui/commit/513af1efc9080857bbd10000d98f98f2a0c96803)).
-
-Or, since C++11, you can use the `u8"my text"` syntax to encode literal strings as UTF-8. e.g.:
-```cpp
-ImGui::Text(u8"hello");
-ImGui::Text(u8"こんにちは"); // this will always be encoded as UTF-8
-ImGui::Text("こんにちは"); // the encoding of this is depending on compiler settings/flags and may be incorrect.
-```
-
-Since C++20, because the C++ committee hate its users, they decided to change the `u8""` syntax to not return `const char*` but a new type `const char8_t*` which doesn't cast to `const char*`.
-Because of type usage of `u8""` in C++20 is a little more tedious:
-```cpp
-ImGui::Text((const char*)u8"こんにちは");
-```
-However, you can disable this behavior completely using the compiler option [`/Zc:char8_t-`](https://learn.microsoft.com/en-us/cpp/build/reference/zc-char8-t?view=msvc-170) for MSVC and [`-fno-char8_t`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html) for Clang and GCC.
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Debug Tools
-
-#### Metrics/Debugger->Fonts
-You can use the `Metrics/Debugger` window (available in `Demo>Tools`) to browse your fonts and understand what's going on if you have an issue. You can also reach it in `Demo->Tools->Style Editor->Fonts`. The same information are also available in the Style Editor under Fonts.
-
-![Fonts debugging](https://user-images.githubusercontent.com/8225057/135429892-0e41ef8d-33c5-4991-bcf6-f997a0bcfd6b.png)
-
-#### UTF-8 Encoding Viewer**
-You can use the `UTF-8 Encoding viewer` in `Metrics/Debugger` to verify the content of your UTF-8 strings. From C/C++ code, you can call `ImGui::DebugTextEncoding("my string");` function to verify that your UTF-8 encoding is correct.
-
-![UTF-8 Encoding viewer](https://user-images.githubusercontent.com/8225057/166505963-8a0d7899-8ee8-4558-abb2-1ae523dc02f9.png)
-
-##### [Return to Index](#index)
-
----------------------------------------
-
-## Credits/Licenses For Fonts Included In Repository
-
-Some fonts files are available in the `misc/fonts/` folder:
-
-**Roboto-Medium.ttf**, by Christian Robetson
-<br>Apache License 2.0
-<br>https://fonts.google.com/specimen/Roboto
-
-**Cousine-Regular.ttf**, by Steve Matteson
-<br>Digitized data copyright (c) 2010 Google Corporation.
-<br>Licensed under the SIL Open Font License, Version 1.1
-<br>https://fonts.google.com/specimen/Cousine
-
-**DroidSans.ttf**, by Steve Matteson
-<br>Apache License 2.0
-<br>https://www.fontsquirrel.com/fonts/droid-sans
-
-**ProggyClean.ttf**, by Tristan Grimmer
-<br>MIT License
-<br>(recommended loading setting: Size = 13.0, GlyphOffset.y = +1)
-<br>http://www.proggyfonts.net/
-
-**ProggyTiny.ttf**, by Tristan Grimmer
-<br>MIT License
-<br>(recommended loading setting: Size = 10.0, GlyphOffset.y = +1)
-<br>http://www.proggyfonts.net/
-
-**Karla-Regular.ttf**, by Jonathan Pinhorn
-<br>SIL OPEN FONT LICENSE Version 1.1
-
-##### [Return to Index](#index)
-
-## Font Links
-
-#### ICON FONTS
-
-- C/C++ header for icon fonts (#define with code points to use in source code string literals) https://github.com/juliettef/IconFontCppHeaders
-- FontAwesome https://fortawesome.github.io/Font-Awesome
-- OpenFontIcons https://github.com/traverseda/OpenFontIcons
-- Google Icon Fonts https://design.google.com/icons/
-- Kenney Icon Font (Game Controller Icons) https://github.com/nicodinh/kenney-icon-font
-- IcoMoon - Custom Icon font builder https://icomoon.io/app
-
-#### REGULAR FONTS
-
-- Google Noto Fonts (worldwide languages) https://www.google.com/get/noto/
-- Open Sans Fonts https://fonts.google.com/specimen/Open+Sans
-- (Japanese) M+ fonts by Coji Morishita http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html
-
-#### MONOSPACE FONTS
-
-Pixel Perfect:
-- Proggy Fonts, by Tristan Grimmer http://www.proggyfonts.net or http://upperboundsinteractive.com/fonts.php
-- Sweet16, Sweet16 Mono, by Martin Sedlak (Latin + Supplemental + Extended A) https://github.com/kmar/Sweet16Font (also include an .inl file to use directly in dear imgui.)
-
-Regular:
-- Google Noto Mono Fonts https://www.google.com/get/noto/
-- Typefaces for source code beautification https://github.com/chrissimpkins/codeface
-- Programmation fonts http://s9w.github.io/font_compare/
-- Inconsolata http://www.levien.com/type/myfonts/inconsolata.html
-- Adobe Source Code Pro: Monospaced font family for ui & coding environments https://github.com/adobe-fonts/source-code-pro
-- Monospace/Fixed Width Programmer's Fonts http://www.lowing.org/fonts/
-
-Or use Arial Unicode or other Unicode fonts provided with Windows for full characters coverage (not sure of their licensing).
-
-##### [Return to Index](#index)
diff --git a/libs/imgui-1.92.1/docs/README.md b/libs/imgui-1.92.1/docs/README.md
deleted file mode 100644
index 7c62950..0000000
--- a/libs/imgui-1.92.1/docs/README.md
+++ /dev/null
@@ -1,222 +0,0 @@
-Dear ImGui
-=====
-
-<center><b><i>"Give someone state and they'll have a bug one day, but teach them how to represent state in two separate locations that have to be kept in sync and they'll have bugs for a lifetime."</i></b></center> <a href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>
-
-----
-
-[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=static-analysis) [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/tests/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=tests)
-
-<sub>(This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using Dear ImGui, please consider reaching out.)</sub>
-
-Businesses: support continued development and maintenance via invoiced sponsoring/support contracts:
-<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
-<br>Individuals: support continued development and maintenance [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Funding) page.
-
-| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) - [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting Started & Integration](#getting-started--integration) |
-:----------------------------------------------------------: |
-| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-faq) - [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
-| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions) - [Languages bindings & frameworks backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |
-
-### The Pitch
-
-Dear ImGui is a **bloat-free graphical user interface library for C++**. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline-enabled application. It is fast, portable, renderer agnostic, and self-contained (no external dependencies).
-
-Dear ImGui is designed to **enable fast iterations** and to **empower programmers** to create **content creation tools and visualization / debug tools** (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal and lacks certain features commonly found in more high-level libraries. Among other things, full internationalization (right-to-left text, bidirectional text, text shaping etc.) and accessibility features are not supported.
-
-Dear ImGui is particularly suited to integration in game engines (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on console platforms where operating system features are non-standard.
-
- - Minimize state synchronization.
- - Minimize UI-related state storage on user side.
- - Minimize setup and maintenance.
- - Easy to use to create dynamic UI which are the reflection of a dynamic data set.
- - Easy to use to create code-driven and data-driven tools.
- - Easy to use to create ad hoc short-lived tools and long-lived, more elaborate tools.
- - Easy to hack and improve.
- - Portable, minimize dependencies, run on target (consoles, phones, etc.).
- - Efficient runtime and memory consumption.
- - Battle-tested, used by [many major actors in the game industry](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui).
-
-### Usage
-
-**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h). **No specific build process is required**. You can add the .cpp files into your existing project.
-
-**Backends for a variety of graphics API and rendering platforms** are provided in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder, along with example applications in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder. You may also create your own backend. Anywhere where you can render textured triangles, you can render Dear ImGui.
-
-See the [Getting Started & Integration](#getting-started--integration) section of this document for more details.
-
-After Dear ImGui is set up in your application, you can use it from \_anywhere\_ in your program loop:
-```cpp
-ImGui::Text("Hello, world %d", 123);
-if (ImGui::Button("Save"))
- MySaveFunction();
-ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
-ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
-```
-![sample code output (dark, segoeui font, freetype)](https://user-images.githubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
-![sample code output (light, segoeui font, freetype)](https://user-images.githubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)
-
-```cpp
-// Create a window called "My First Tool", with a menu bar.
-ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
-if (ImGui::BeginMenuBar())
-{
- if (ImGui::BeginMenu("File"))
- {
- if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
- if (ImGui::MenuItem("Save", "Ctrl+S")) { /* Do stuff */ }
- if (ImGui::MenuItem("Close", "Ctrl+W")) { my_tool_active = false; }
- ImGui::EndMenu();
- }
- ImGui::EndMenuBar();
-}
-
-// Edit a color stored as 4 floats
-ImGui::ColorEdit4("Color", my_color);
-
-// Generate samples and plot them
-float samples[100];
-for (int n = 0; n < 100; n++)
- samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
-ImGui::PlotLines("Samples", samples, 100);
-
-// Display contents in a scrolling region
-ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
-ImGui::BeginChild("Scrolling");
-for (int n = 0; n < 50; n++)
- ImGui::Text("%04d: Some text", n);
-ImGui::EndChild();
-ImGui::End();
-```
-![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/191055698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)
-
-Dear ImGui allows you to **create elaborate tools** as well as very short-lived ones. On the extreme side of short-livedness: using the Edit&Continue (hot code reload) feature of modern compilers you can add a few widgets to tweak variables while your application is running, and remove the code a minute later! Dear ImGui is not just for tweaking values. You can use it to trace a running algorithm by just emitting text commands. You can use it along with your own reflection data to browse your dataset live. You can use it to expose the internals of a subsystem in your engine, to create a logger, an inspection tool, a profiler, a debugger, an entire game-making editor/framework, etc.
-
-### How it works
-
-The IMGUI paradigm through its API tries to minimize superfluous state duplication, state synchronization, and state retention from the user's point of view. It is less error-prone (less code and fewer bugs) than traditional retained-mode interfaces, and lends itself to creating dynamic user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.
-
-Dear ImGui outputs vertex buffers and command lists that you can easily render in your application. The number of draw calls and state changes required to render them is fairly small. Because Dear ImGui doesn't know or touch graphics state directly, you can call its functions anywhere in your code (e.g. in the middle of a running algorithm, or in the middle of your own rendering process). Refer to the sample applications in the examples/ folder for instructions on how to integrate Dear ImGui with your existing codebase.
-
-_A common misunderstanding is to mistake immediate mode GUI for immediate mode rendering, which usually implies hammering your driver/GPU with a bunch of inefficient draw calls and state changes as the GUI functions are called. This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a small list of draw calls batches. It never touches your GPU directly. The draw call batches are decently optimal and you can render them later, in your app or even remotely._
-
-### Releases & Changelogs
-
-See [Releases](https://github.com/ocornut/imgui/releases) page for decorated Changelogs.
-Reading the changelogs is a good way to keep up to date with the things Dear ImGui has to offer, and maybe will give you ideas of some features that you've been ignoring until now!
-
-### Demo
-
-Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing a variety of features and examples. The code is always available for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).
-
-You should be able to build the examples from sources. If you don't, let us know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
-- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or [older binaries](https://www.dearimgui.com/binaries).
-
-The demo applications are not DPI aware so expect some blurriness on a 4K screen. For DPI awareness in your application, you can load/reload your font at a different scale and scale your style with `style.ScaleAllSizes()` (see [FAQ](https://www.dearimgui.com/faq)).
-
-### Getting Started & Integration
-
-See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide for details.
-
-On most platforms and when using C++, **you should be able to use a combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/master/backends) backends without modification** (e.g. `imgui_impl_win32.cpp` + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms, consider using more imgui_impl_xxxx files instead of rewriting them: this will be less work for you, and you can get Dear ImGui running immediately. You can _later_ decide to rewrite a custom backend using your custom engine functions if you wish so.
-
-Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render engine 3) providing a render function that can bind textures and render textured triangles, which is essentially what Backends are doing. The [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is populated with applications doing just that: setting up a window and using backends. If you follow the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide it should in theory take you less than an hour to integrate Dear ImGui. **Make sure to spend time reading the [FAQ](https://www.dearimgui.com/faq), comments, and the examples applications!**
-
-Officially maintained backends/bindings (in repository):
-- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2, SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
-- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
-- Frameworks: Allegro5, Emscripten.
-
-[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Bindings) wiki page:
-- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell, Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin, Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
-- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder, Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio, GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum, Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop, px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5, UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
-- Many bindings are auto-generated (by good old [cimgui](https://github.com/cimgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearimgui/dear_bindings)), you can use their metadata output to generate bindings for other languages.
-
-[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page:
-- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. Notable and well supported extensions include [ImPlot](https://github.com/epezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
-
-Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
-
-### Gallery
-
-Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy) (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-Dear-ImGui).
-
-For more user-submitted screenshots of projects using Dear ImGui, check out the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agallery)!
-
-For a list of third-party widgets and extensions, check out the [Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page.
-
-| | |
-|--|--|
-| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubusercontent.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) | Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.com/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93b048a.png) |
-| Custom engine (untitled)<BR>[![editor white](https://user-images.githubusercontent.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) | Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v176/tracy_profiler.png) |
-
-### Support, Frequently Asked Questions (FAQ)
-
-See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md) where common questions are answered.
-
-See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) and [Wiki](https://github.com/ocornut/imgui/wiki) for many links, references, articles.
-
-See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI paradigm.
-
-See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Changes).
-
-See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_test_engine) for Automation & Testing.
-
-For the purposes of getting search engines to crawl the wiki, here's a link to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki) (not for humans, [here's why](https://github-wiki-see.page/)).
-
-Getting started? For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). For ANY other questions, bug reports, requests, feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/issues). Please read and fill the New Issue template carefully.
-
-Private support is available for paying business customers (E-mail: _contact @ dearimgui dot com_).
-
-**Which version should I get?**
-
-We occasionally tag [Releases](https://github.com/ocornut/imgui/releases) (with nice releases notes) but it is generally safe and recommended to sync to latest `master` or `docking` branch. The library is fairly stable and regressions tend to be fixed fast when reported. Advanced users may want to use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/imgui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki/Docking) features. This branch is kept in sync with master regularly.
-
-**Who uses Dear ImGui?**
-
-See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding & Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your game/software if you can! Also, see the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agallery)!
-
-How to help
------------
-
-**How can I help?**
-
-- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
-- You may help with development and submit pull requests! Please understand that by submitting a PR you are also submitting a request for the maintainer to review your code and then take over its maintenance forever. PR should be crafted both in the interest of the end-users and also to ease the maintainer into understanding and accepting it.
-- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
-- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)! Have your company financially support this project via invoiced sponsors/maintenance or by buying a license for [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) (please reach out: omar AT dearimgui DOT com).
-
-Sponsors
---------
-
-Ongoing Dear ImGui development is and has been financially supported by users and private sponsors.
-<BR>Please see the **[detailed list of current and past Dear ImGui funding supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)** for details.
-<BR>From November 2014 to December 2019, ongoing development has also been financially supported by its users on Patreon and through individual donations.
-
-**THANK YOU to all past and present supporters for helping to keep this project alive and thriving!**
-
-Dear ImGui is using software and services provided free of charge for open source projects:
-- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) for static analysis (supports C/C++/C#/Java).
-- [GitHub actions](https://github.com/features/actions) for continuous integration systems.
-- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for code coverage analysis.
-
-Credits
--------
-
-Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors) to the GitHub. The early version of this library was developed with the support of [Media Molecule](https://www.mediamolecule.com) and first used internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS Vita).
-
-Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rokups) (2020-2022): a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
-
-Maintenance/support contracts, sponsoring invoices and other B2B transactions are hosted and handled by [Disco Hello](https://www.discohello.com).
-
-Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games.com) where Atman Binstock had dropped his own simple implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating and improving it."
-
-Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer (MIT license).
-<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.com/nothings/stb/) by Sean Barrett (public domain).
-
-Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. Also thank you to everyone posting feedback, questions and patches on GitHub.
-
-License
--------
-
-Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://github.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.
diff --git a/libs/imgui-1.92.1/docs/TODO.txt b/libs/imgui-1.92.1/docs/TODO.txt
deleted file mode 100644
index 90d2b35..0000000
--- a/libs/imgui-1.92.1/docs/TODO.txt
+++ /dev/null
@@ -1,329 +0,0 @@
-dear imgui
-ISSUES & TODO LIST
-
-Issue numbers (#) refer to GitHub issues listed at https://github.com/ocornut/imgui/issues/XXXX
-THIS LIST IS NOT WELL MAINTAINED. MOST OF THE WORK HAPPENS ON GITHUB NOWADAYS.
-The list below consist mostly of ideas noted down before they are requested/discussed by users (at which point they usually exist on the github issue tracker).
-It's mostly a bunch of personal notes, probably incomplete. Feel free to query if you have any questions.
-
- - doc: add a proper documentation system (maybe relying on automation? #435)
- - doc: checklist app to verify backends/integration of imgui (test inputs, rendering, callback, etc.).
- - doc/tips: tips of the day: website? applet in imgui_club?
-
- - window: preserve/restore relative focus ordering (persistent or not), and e.g. of multiple reappearing windows (#2304) -> also see docking reference to same #.
- - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). (#690)
- - window: add a way for very transient windows (non-saved, temporary overlay over hundreds of objects) to "clean" up from the global window list. perhaps a lightweight explicit cleanup pass.
- - window: auto-fit feedback loop when user relies on any dynamic layout (window width multiplier, column) appears weird to end-user. clarify.
- - window: begin with *p_open == false could return false.
- - window: get size/pos helpers given names (see discussion in #249)
- - window: when window is very small, prioritize resize button over close button.
- - window: double-clicking on title bar to minimize isn't consistent interaction, perhaps move to single-click on left-most collapse icon?
- - window: expose contents size. (#1045)
- - window: using SetWindowPos() inside Begin() and moving the window with the mouse reacts a very ugly glitch. We should just defer the SetWindowPos() call.
- - window: GetWindowSize() returns (0,0) when not calculated? (#1045)
- - window: investigate better auto-positioning for new windows.
- - window: top most window flag? more z-order control? (#2574)
- - window/size: manually triggered auto-fit (double-click on grip) shouldn't resize window down to viewport size?
- - window/size: how to allow to e.g. auto-size vertically to fit contents, but be horizontally resizable? Assuming SetNextWindowSize() is modified to treat -1.0f on each axis as "keep as-is" (would be good but might break erroneous code): Problem is UpdateWindowManualResize() and lots of code treat (window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) together.
- - window/opt: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate. -> this may require enforcing that it is illegal to submit contents if Begin returns false.
- - window/clipping: some form of clipping when DisplaySize (or corresponding viewport) is zero.
- - window/tabbing: add a way to signify that a window or docked window requires attention (e.g. blinking title bar, trying to click behind a modal).
- - window/id_stack: add e.g. window->GetIDFromPath() with support for leading / and ../ (#1390, #331) -> model from test engine.
- ! scrolling: exposing horizontal scrolling with Shift+Wheel even when scrollbar is disabled expose lots of issues (#2424, #1463)
- - scrolling: while holding down a scrollbar, try to keep the same contents visible (at least while not moving mouse)
- - scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
- - scrolling: forward mouse wheel scrolling to parent window when at the edge of scrolling limits? (useful for listbox,tables?)
- - scrolling/style: shadows on scrollable areas to denote that there is more contents (see e.g. DaVinci Resolve ui)
-
- - drawdata: make it easy to deep-copy (or swap?) a full ImDrawData so user can easily save that data if they use threaded rendering. (#1860 see ImDrawDataSnapshot)
- ! drawlist: add CalcTextSize() func to facilitate consistent code from user pov (currently need to use ImGui or ImFont alternatives!)
- - drawlist: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command). (WIP branch)
- - drawlist: make it easier to toggle AA per primitive, so we can use e.g. non-AA fill + AA borders more naturally
- - drawlist: non-AA strokes have gaps between points (#593, #288), glitch especially on RenderCheckmark() and ColorPicker4().
- - drawlist: callback: add an extra void* in ImDrawCallback to expose render state instead of pulling from Renderer_RenderState (would break API).
- - drawlist: AddRect vs AddLine position confusing (#2441)
- - drawlist/opt: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding. (#1962)
- - drawlist/opt: AddRect() axis aligned pixel aligned (no-aa) could use 8 triangles instead of 16 and no normal calculation.
- - drawlist/opt: thick AA line could be doable in same number of triangles as 1.0 AA line by storing gradient+full color in atlas.
-
- - items: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
-
- - widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
- - widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
- - widgets: add always-allow-overlap mode. This should perhaps be the default? one problem is that highlight after mouse-wheel scrolling gets deferred, makes scrolling more flickery.
- - widgets: start exposing PushItemFlag() and ImGuiItemFlags
- - widgets: alignment options in style (e.g. center Selectable, Right-Align within Button, etc.) #1260
- - widgets: activate by identifier (trigger button, focus given id)
- - widgets: custom glyph/shapes replacements for stock shapes. (also #6090 #2431 #2235 #6517)
- - widgets: coloredit: keep reporting as active when picker is on?
- - widgets: group/scalarn functions: expose more per-component information. e.g. store NextItemData.ComponentIdx set by scalarn function, groups can expose them back somehow.
- - selectable: using (size.x == 0.0f) and (SelectableTextAlign.x > 0.0f) followed by SameLine() is currently not supported.
- - selectable: generic BeginSelectable()/EndSelectable() mechanism. (work out alongside range-select branch)
- - selectable: a way to visualize partial/mixed selection (e.g. parent tree node has children with mixed selection)
-
- - input text: preserve scrolling when unfocused?
- - input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
- - input text: expose CursorPos in char filter event (#816)
- - input text: try usage idiom of using InputText with data only exposed through get/set accessors, without extraneous copy/alloc. (#3009)
- - input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return nullptr if not active (available in internals)
- - input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
- - input text: hover tooltip could show unclamped text
- - input text: support for INSERT key to toggle overwrite mode. currently disabled because stb_textedit behavior is unsatisfactory on multi-line. (#2863)
- - input text: option to Tab after an Enter validation.
- - input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
- - input text: easier ways to update buffer (from source char*) while owned. preserve some sort of cursor position for multi-line text.
- - input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725)
- - input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependent). actually a very old bug but no one appears to have noticed it.
- - input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
- - input text: decorrelate display layout from inputs with custom template - e.g. what's the easiest way to implement a nice IP/Mac address input editor?
- - input text: global callback system so user can plug in an expression evaluator easily. (#1691)
- - input text: force scroll to end or scroll to a given line/contents (so user can implement a log or a search feature)
- - input text: a way to preview completion (e.g. disabled text completing from the cursor)
- - input text: a side bar that could e.g. preview where errors are. probably left to the user to draw but we'd need to give them the info there.
- - input text: a way for the user to provide syntax coloring.
- - input text: Shift+TAB with ImGuiInputTextFlags_AllowTabInput could eat preceding blanks, up to tab_count.
- - input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
- - input text multi-line: support for copy/cut without selection (copy/cut current line?)
- - input text multi-line: line numbers? status bar? (follow up on #200)
- - input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725)
- - input text multi-line: better horizontal scrolling support (#383, #1224)
- - input text multi-line: single call to AddText() should be coarse clipped on InputTextEx() end.
- - input number: optional range min/max for Input*() functions
- - input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
- - input number: use mouse wheel to step up/down
-
- - layout: helper or a way to express ImGui::SameLine(ImGui::GetCursorStartPos().x + ImGui::CalcItemWidth() + ImGui::GetStyle().ItemInnerSpacing.x); in a simpler manner.
- - layout, font: horizontal tab support, A) text mode: forward only tabs (e.g. every 4 characters/N pixels from pos x1), B) manual mode: explicit tab stops acting as mini columns, no clipping (for menu items, many kind of uses, also vaguely relate to #267, #395)
- - layout: horizontal layout helper (#97)
- - layout: horizontal flow until no space left (#404)
- - layout: more generic alignment state (left/right/centered) for single items?
- - layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
- - layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
- - layout: null layout mode were items are not rendered but user can query GetItemRectMin()/Max/Size.
- - layout: (R&D) local multi-pass layout mode.
- - layout: (R&D) bind authored layout data (created by an off-line tool), items fetch their pos/size at submission, self-optimize data structures to stable linear access.
-
- - tables: see https://github.com/ocornut/imgui/issues/2957#issuecomment-569726095
-
- - group: BeginGroup() needs a border option. (~#1496)
- - group: IsItemHovered() after EndGroup() covers whole AABB rather than the intersection of individual items. Is that desirable?
- - group: merge deactivation/activation within same group (fwd WasEdited flag). (#2550)
-
-!- color: the color conversion helpers/types are a mess and needs sorting out.
- - color: (api breaking) ImGui::ColorConvertXXX functions should be loose ImColorConvertXX to match imgui_internals.h
-
- - plot: full featured plot/graph api w/ scrolling, zooming etc. --> promote using ImPlot
- - (plot: deleted all other todo lines on 2023-06-28)
-
- - clipper: ability to disable the clipping through a simple flag/bool.
- - clipper: ability to run without knowing full count in advance.
- - clipper: horizontal clipping support. (#2580)
-
- - separator: expose flags (#759)
- - separator: take indent into consideration (optional)
- - separator: width, thickness, centering (#1643, #2657)
- - splitter: formalize the splitter idiom into an official api (we want to handle n-way split) (#319)
-
- - docking: merge docking branch (#2109)
-
- - tabs: "there is currently a problem because TabItem() will try to submit their own tooltip after 0.50 second, and this will have the effect of making your tooltip flicker once." -> tooltip priority work (WIP branch)
- - tabs: make EndTabBar fail if users doesn't respect BeginTabBar return value, for consistency/future-proofing.
- - tabs: persistent order/focus in BeginTabBar() api (#261, #351)
- - tabs: explicit api (even if internal) to cleanly manipulate tab order.
-
- - image/image button: misalignment on padded/bordered button?
- - image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
- - slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt()
- - slider: add dragging-based widgets to edit values with mouse (on 2 axes), saving screen real-estate.
- - slider: tint background based on value (e.g. v_min -> v_max, or use 0.0f either side of the sign)
- - slider: relative dragging? + precision dragging
- - slider: step option (#1183)
- - slider: style: fill % of the bar instead of positioning a drag.
- - knob: rotating knob widget (#942)
- - drag float: support for reversed drags (min > max) (removed is_locked, also see fdc526e)
- - drag float: up/down axis
- - drag float: power != 0.0f with current value being outside the range keeps the value stuck.
- - drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
-
- - combo: a way/helper to customize the combo preview (#1658) -> experimental BeginComboPreview()
- - combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203)
- - listbox: multiple selection (WIP range-select branch)
- - listbox: unselect option (#1208)
- - listbox: make it easier/more natural to implement range-select (need some sort of info/ref about the last clicked/focused item that user can translate to an index?) (WIP range-select branch)
- - listbox: user may want to initial scroll to focus on the one selected value?
- - listbox: disable capturing mouse wheel if the listbox has no scrolling. (#1681)
- - listbox: scrolling should track modified selection.
- - listbox: future api should allow to enable horizontal scrolling (#2510)
-
-!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
- - modals: make modal title bar blink when trying to click outside the modal
- - modals: technically speaking, we could make Begin() with ImGuiWindowFlags_Modal work without involving popup. May help untangle a few things, as modals are more like regular windows than popups.
- - popups: if the popup functions took explicit ImGuiID it would allow the user to manage the scope of those ID. (#331)
- - popups: clicking outside (to close popup) and holding shouldn't drag window below.
- - popups: add variant using global identifier similar to Begin/End (#402)
- - popups: border options. richer api like BeginChild() perhaps? (#197)
- - popups/modals: although it is sometimes convenient that popups/modals lifetime is owned by imgui, we could also a bool-owned-by-user api as long as Begin() return value testing is enforced.
-
- - tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
- - tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
- - tooltip: drag tooltip hovering over source widget with IsItemHovered/SetTooltip flickers (WIP branch)
- - tooltip: tooltip priorities to override a stock tooltip (e.g. shortcut tooltip)
-
- - status-bar: add a per-window status bar helper similar to what menu-bar does. generalize concept of layer0 rect in window (can make _MenuBar window flag obsolete too).
- - shortcuts: store multiple keychords in ImGuiKeyChord
- - shortcuts: Hovered route (lower than Focused, higher than Global)
- - shortcuts: local-style shortcut api, e.g. parse "&Save"
- - shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
- - menus: hovering from menu to menu on a menu-bar has 1 frame without any menu, which is a little annoying. ideally zero.
- - menus: would be nice if the Selectable() supported horizontal alignment (must be given the equivalent of WorkRect.Max.x matching the position of the shortcut column)
-
- - tree node: add treenode/treepush int variants? not there because (void*) cast from int warns on some platforms/settings?
- - tree node: try to apply scrolling at time of TreePop() if node was just opened and end of node is past scrolling limits?
- - tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
- - tree node: tweak color scheme to distinguish headers from selected tree node (#581)
- - tree node: leaf/non-leaf highlight mismatch.
- - tree node/opt: could avoid formatting when clipped (flag assuming we don't care about width/height, assume single line height? format only %s/%c to be able to count height?)
-
- - settings: write more decent code to allow saving/loading new fields: columns, selected tree nodes?
- - settings: facilitate extension lazily calling AddSettingsHandler() while running and still getting their data call the ReadXXX handlers immediately.
- - settings: api for per-tool simple persistent data (bool,int,float,columns sizes,etc.) in .ini file (#437)
- - settings/persistence: helpers to make TreeNodeBehavior persist (even during dev!) - may need to store some semantic and/or data type in ImGuiStoragePair
-
- - style: better default styles. (#707)
- - style: add a highlighted text color (for headers, etc.)
- - style: border types: out-screen, in-screen, etc. (#447)
- - style: add window shadow (fading away from the window. Paint-style calculation of vertices alpha after drawlist would be easier)
- - style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc.
- - style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation).
- - style: global scale setting.
- - style: FramePadding could be different for up vs down (#584)
- - style: WindowPadding needs to be EVEN as the 0.5 multiplier used on this value probably have a subtle effect on clip rectangle
- - style: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438, #707, #1223)
- - style: gradients fill (#1223) ~ 2 bg colors for each fill? tricky with rounded shapes and using textures for corners.
- - style editor: color child window height expressed in multiple of line height.
-
- - log: improve logging of ArrowButton, ListBox, TabItem
- - log: carry on indent / tree depth when opening a child window
- - log: enabling log ends up pushing and growing vertices buffers because we don't distinguish layout vs render clipping
- - log: have more control over the log scope (e.g. stop logging when leaving current tree node scope)
- - log: be able to log anything (e.g. right-click on a window/tree-node, shows context menu? log into tty/file/clipboard)
- - log: let user copy any window content to clipboard easily (CTRL+C on windows? while moving it? context menu?). code is commented because it fails with multiple Begin/End pairs.
- - log: obsolete LogButtons().... (was: LogButtons() options for specifying depth and/or hiding depth slider)
-
- - filters: set a current filter that certain items (e.g. tree node) can automatically query to hide themselves
- - filters: handle wild-cards (with implicit leading/trailing *), reg-exprs
- - filters: fuzzy matches (may use code at blog.forrestthewoods.com/4cffeed33fdb)
-
- - drag and drop: focus drag target window on hold (even without open)
- - drag and drop: releasing a drop shows the "..." tooltip for one frame - since e13e598 (#1725)
- - drag and drop: drag source on a group object (would need e.g. an invisible button covering group in EndGroup) https://twitter.com/paniq/status/1121446364909535233
- - drag and drop: have some way to know when a drag begin from BeginDragDropSource() pov. (see 2018/01/11 post in #143)
- - drag and drop: allow preview tooltip to be submitted from a different place than the drag source. (#1725)
- - drag and drop: make it easier and provide a demo to have tooltip both are source and target site, with a more detailed one on target site (tooltip ordering problem)
- - drag and drop: demo with reordering nodes (in a list, or a tree node). (#143)
- - drag and drop: test integrating with os drag and drop (make it easy to do a naive WM_DROPFILE integration)
- - drag and drop: allow for multiple payload types. (#143)
- - drag and drop: make payload optional? payload promise? (see 2018/01/11 post in #143)
- - drag and drop: (#143) "both an in-process pointer and a promise to generate a serialized version, for whether the drag ends inside or outside the same process"
- - drag and drop: feedback when hovering a region blocked by modal (mouse cursor "NO"?)
-
- - markup: simple markup language for color change? (#902, #3130)
-
- - text: selectable text (for copy) as a generic feature (ItemFlags?)
- - text: proper alignment options in imgui_internal.h
- - text: provided a framed text helper, e.g. https://pastebin.com/1Laxy8bT
- - text: refactor TextUnformatted (or underlying function) to more explicitly request if we need width measurement or not
- - text/layout/tabs: \t pulling position from base pos + step, or offset array (e.g. could be used in text edit, menus for simple icon+text alignment, etc.)
- - text link/url button: underlined. should api expose an ID or use text contents as ID? which colors enum to use?
- - text/wrapped: should be a more first-class citizen, e.g. wrapped text within a Selectable with known width.
- - text/wrapped: custom separator for text wrapping. (#3002)
- - text/wrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (#249)
-
- - font: arbitrary line spacing. (#2945)
- - font: MergeMode: flags to select overwriting or not (this is now very easy with refactored ImFontAtlasBuildWithStbTruetype)
- - font: better CalcTextSizeA() API, at least for simple use cases. current one is horrible (perhaps have simple vs extended versions).
- - font: for the purpose of RenderTextEllipsis(), it might be useful that CalcTextSizeA() can ignore the trailing padding?
- - font: a CalcTextHeight() helper could run faster than CalcTextSize().y
- - font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
- - font: make it easier to submit own bitmap font (same texture, another texture?). (#2127, #2575)
- - font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
- - font: storing MinAdvanceX per font would allow us to skip calculating line width (under a threshold of character count) in loops looking for block width
- - font/demo: demonstrate use of ImFontGlyphRangesBuilder.
- - font/draw: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
- - font/draw: need to be able to specify wrap start position.
- - font/draw: better reserve policy for large horizontal block of text (shouldn't reserve for all clipped lines). also see #3349.
- - font/draw: fix for drawing 16k+ visible characters in same call.
- - font/draw: underline, squiggle line rendering helpers.
- - font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct), would save on cache line.
- - font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
- - font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
- - font: (api breaking) remove "TTF" from symbol names. also because it now supports OTF.
- - font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
- - font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16-bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
-
- - nav: some features such as PageUp/Down/Home/End should probably work without ImGuiConfigFlags_NavEnableKeyboard? (where do we draw the line? how about CTRL+Tab)
- - nav: Home/End behavior when navigable item is not fully visible at the edge of scrolling? should be backtrack to keep item into view?
- - nav: NavScrollToBringItemIntoView() with item bigger than view should focus top-right? Repro: using Nav in "About Window"
- - nav: expose wrap around flags/logic to allow e.g. grid based layout (pressing NavRight on the right-most element would go to the next row, etc.). see internal's NavMoveRequestTryWrapping().
- - nav: patterns to make it possible for arrows key to update selection (see JustMovedTo in range_select branch)
- - nav: restore/find nearest NavId when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
- - nav: SetItemDefaultFocus() level of priority, so widgets like Selectable when inside a popup could claim a low-priority default focus on the first selected item
- - nav: holding space to repeat a button doesn't show button activated during hold.
- - nav: NavFlattened: init requests don't work properly on flattened siblings.
- - nav: NavFlattened: pageup/pagedown/home/end don't work properly on flattened siblings.
- - nav: NavFlattened: ESC on a flattened child should select something.
- - nav: NavFlattened: broken: in typical usage scenario, the items of a fully clipped child are currently not considered to enter into a NavFlattened child.
- - nav: NavFlattened: cannot access menu-bar of a flattened child window with Alt/menu key (not a very common use case..).
- - nav: simulate right-click or context activation? (SHIFT+F10, keyboard Menu key?)
- - nav/popup: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys, default validation button, etc.
- - nav/treenode: left within a tree node block as a fallback (ImGuiTreeNodeFlags_NavLeftJumpsBackHere by default?)
- - nav/menus: pressing left-right on a vertically clipped menu bar tends to jump to the collapse/close buttons.
- - nav/menus: allow pressing Menu to leave a sub-menu.
- - nav/menus: a way to access the main menu bar with Alt? (currently needs CTRL+TAB) or last focused window menu bar?
- - nav/menus: when using the main menu bar, even though we restore focus after, the underlying window loses its title bar highlight during menu manipulation. could we prevent it?
- - nav/menus: main menu bar currently cannot restore a nullptr focus. Could save NavWindow at the time of being focused, similarly to what popup do?
- - nav/menus: Alt,Up could open the first menu (e.g. "File") currently it tends to nav into the window/collapse menu. Do do that we would need custom transition?
- - nav/windowing: when CTRL+Tab/windowing is active, the HoveredWindow detection doesn't take account of the window display re-ordering.
- - nav/windowing: Resizing window will currently fail with certain types of resizing constraints/callback applied
- - focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
-
- - inputs: support track pad style scrolling & slider edit.
- - inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
- - inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
- - inputs/scrolling: support for smooth scrolling (#2462, #2569)
-
- - misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for backend to be able stop refreshing easily.
- - misc: idle: if cursor blink if the _only_ visible animation, core imgui could rewrite vertex alpha to avoid CPU pass on ImGui:: calls.
- - misc: idle: if cursor blink if the _only_ visible animation, could even expose a dirty rectangle that optionally can be leverage by some app to render in a smaller viewport, getting rid of much pixel shading cost.
- - misc: no way to run a root-most GetID() with ImGui:: api since there's always a Debug window in the stack. (mentioned in #2960)
- - misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags (Why?)
- - misc: PushItemFlag(): add a flag to disable keyboard capture when used with mouse? (#1682)
- - misc: use more size_t in public api?
- - misc: support for string view/range instead of char* would e.g. facilitate usage with Rust (#683, #3038, WIP string_view branch)
-
- - demo: demonstrate using PushStyleVar() in more details.
- - demo: add vertical separator demo
- - demo: add virtual scrolling example?
- - demo: demonstrate Plot offset
- - demo: window size constraint: square demo is broken when resizing from edges (#1975), would need to rework the callback system to solve this
-
- - examples: window minimize, maximize (#583)
- - examples: provide a zero frame-rate/idle example.
- - examples: dx11/dx12: try to use new swapchain blit models (#2970)
- - backends: report it better when not able to create texture?
- - backends: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
- - backends: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)
- - backends: opengl: could use a single vertex buffer and glBufferSubData for uploads?
- - backends: opengl: explicitly disable GL_STENCIL_TEST in bindings.
- - backends: vulkan: viewport: support for synchronized swapping of multiple swap chains.
- - backends: bgfx: https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backends: emscripten: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
-
- - bindings: ways to use clang ast dump to generate bindings or helpers for bindings? (e.g. clang++ -Xclang -ast-dump=json imgui.h) (--> use https://github.com/dearimgui/dear_bindings)
-
- - optimization: replace vsnprintf with stb_printf? using IMGUI_USE_STB_SPRINTF. (#1038 + needed for string_view)
- - optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
- - optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
- - optimization: fully covered window (covered by another with non-translucent bg + WindowRounding worth of padding) may want to clip rendering.
- - optimization: use another hash function than crc32, e.g. FNV1a
- - optimization: turn some the various stack vectors into statically-sized arrays
diff --git a/libs/imgui-1.92.1/examples/README.txt b/libs/imgui-1.92.1/examples/README.txt
deleted file mode 100644
index 6db2f3c..0000000
--- a/libs/imgui-1.92.1/examples/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-See BACKENDS and EXAMPLES files in the docs/ folder, or on the web at: https://github.com/ocornut/imgui/tree/master/docs
-
-Backends = Helper code to facilitate integration with platforms/graphics api (used by Examples + should be used by your app).
-Examples = Standalone applications showcasing integration with platforms/graphics api.
-
-Some Examples have extra README files in their respective directory, please check them too!
-
-Once Dear ImGui is running (in either examples or your own application/game/engine),
-run and refer to ImGui::ShowDemoWindow() in imgui_demo.cpp for the end-user API.
diff --git a/libs/imgui-1.92.1/examples/example_allegro5/README.md b/libs/imgui-1.92.1/examples/example_allegro5/README.md
deleted file mode 100644
index 940b47f..0000000
--- a/libs/imgui-1.92.1/examples/example_allegro5/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-
-# Configuration
-
-Dear ImGui outputs 16-bit vertex indices by default.
-Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices.
-You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename.
-We are providing `imconfig_allegro5.h` that enables 32-bit indices.
-Note that the backend supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion.
-
-# How to Build
-
-### On Ubuntu 14.04+ and macOS
-
-```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example
-```
-
-On macOS, install Allegro with homebrew: `brew install allegro`.
-
-### On Windows with Visual Studio's CLI
-
-You may install Allegro using vcpkg:
-```
-git clone https://github.com/Microsoft/vcpkg
-cd vcpkg
-bootstrap-vcpkg.bat
-vcpkg install allegro5 --triplet=x86-windows ; for win32
-vcpkg install allegro5 --triplet=x64-windows ; for win64
-vcpkg integrate install ; register include / libs in Visual Studio
-```
-
-Build:
-```
-set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /utf-8 /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. /I ..\..\backends main.cpp ..\..\backends\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
-```
diff --git a/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj b/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj
deleted file mode 100644
index 02f6a47..0000000
--- a/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{73F235B5-7D31-4FC6-8682-DDC5A097B9C1}</ProjectGuid>
- <RootNamespace>example_allegro5</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_allegro5.cpp" />
- <ClCompile Include="imconfig_allegro5.h" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_allegro5.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj.filters b/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj.filters
deleted file mode 100644
index 84881d3..0000000
--- a/libs/imgui-1.92.1/examples/example_allegro5/example_allegro5.vcxproj.filters
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_allegro5.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="imconfig_allegro5.h">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_allegro5.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_allegro5/imconfig_allegro5.h b/libs/imgui-1.92.1/examples/example_allegro5/imconfig_allegro5.h
deleted file mode 100644
index 35afa67..0000000
--- a/libs/imgui-1.92.1/examples/example_allegro5/imconfig_allegro5.h
+++ /dev/null
@@ -1,11 +0,0 @@
-//-----------------------------------------------------------------------------
-// COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE
-// See imconfig.h for the full template
-// Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices
-//-----------------------------------------------------------------------------
-
-#pragma once
-
-// Use 32-bit vertex indices because Allegro doesn't support 16-bit ones
-// This allows us to avoid converting vertices format at runtime
-#define ImDrawIdx int
diff --git a/libs/imgui-1.92.1/examples/example_allegro5/main.cpp b/libs/imgui-1.92.1/examples/example_allegro5/main.cpp
deleted file mode 100644
index 02db84a..0000000
--- a/libs/imgui-1.92.1/examples/example_allegro5/main.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// Dear ImGui: standalone example application for Allegro 5
-
-// 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
-
-// On Windows, you can install Allegro5 using vcpkg:
-// git clone https://github.com/Microsoft/vcpkg
-// cd vcpkg
-// bootstrap - vcpkg.bat
-// vcpkg install allegro5 --triplet=x86-windows ; for win32
-// vcpkg install allegro5 --triplet=x64-windows ; for win64
-// vcpkg integrate install ; register include and libs in Visual Studio
-
-#include <stdint.h>
-#include <allegro5/allegro.h>
-#include <allegro5/allegro_primitives.h>
-#include "imgui.h"
-#include "imgui_impl_allegro5.h"
-
-int main(int, char**)
-{
- // Setup Allegro
- al_init();
- al_install_keyboard();
- al_install_mouse();
- al_init_primitives_addon();
- al_set_new_display_flags(ALLEGRO_RESIZABLE);
- ALLEGRO_DISPLAY* display = al_create_display(1280, 720);
- al_set_window_title(display, "Dear ImGui Allegro 5 example");
- ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue();
- al_register_event_source(queue, al_get_display_event_source(display));
- al_register_event_source(queue, al_get_keyboard_event_source());
- al_register_event_source(queue, al_get_mouse_event_source());
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplAllegro5_Init(display);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool running = true;
- while (running)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- ALLEGRO_EVENT ev;
- while (al_get_next_event(queue, &ev))
- {
- ImGui_ImplAllegro5_ProcessEvent(&ev);
- if (ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE)
- running = false;
- if (ev.type == ALLEGRO_EVENT_DISPLAY_RESIZE)
- {
- ImGui_ImplAllegro5_InvalidateDeviceObjects();
- al_acknowledge_resize(display);
- ImGui_ImplAllegro5_CreateDeviceObjects();
- }
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplAllegro5_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- al_clear_to_color(al_map_rgba_f(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w));
- ImGui_ImplAllegro5_RenderDrawData(ImGui::GetDrawData());
- al_flip_display();
- }
-
- // Cleanup
- ImGui_ImplAllegro5_Shutdown();
- ImGui::DestroyContext();
- al_destroy_event_queue(queue);
- al_destroy_display(display);
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/CMakeLists.txt b/libs/imgui-1.92.1/examples/example_android_opengl3/CMakeLists.txt
deleted file mode 100644
index 63531f4..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-cmake_minimum_required(VERSION 3.6)
-
-project(ImGuiExample)
-
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)
-
-add_library(${CMAKE_PROJECT_NAME} SHARED
- ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_demo.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_draw.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_tables.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_widgets.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_android.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_opengl3.cpp
- ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c
-)
-
-set(CMAKE_SHARED_LINKER_FLAGS
- "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate"
-)
-
-target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
- IMGUI_IMPL_OPENGL_ES3
-)
-
-target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}/../..
- ${CMAKE_CURRENT_SOURCE_DIR}/../../backends
- ${ANDROID_NDK}/sources/android/native_app_glue
-)
-
-target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
- android
- EGL
- GLESv3
- log
-)
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore b/libs/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore
deleted file mode 100644
index 3c7a619..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.cxx
-.externalNativeBuild
-build/
-*.iml
-
-.idea
-.gradle
-local.properties
-
-# Android Studio puts a Gradle wrapper here, that we don't want:
-gradle/
-gradlew*
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle b/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle
deleted file mode 100644
index 3a68c83..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-
-android {
- compileSdkVersion 33
- buildToolsVersion "33.0.2"
- ndkVersion "25.2.9519653"
-
- defaultConfig {
- applicationId "imgui.example.android"
- namespace "imgui.example.android"
- minSdkVersion 24
- targetSdkVersion 33
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_11
- targetCompatibility JavaVersion.VERSION_11
- }
-
- kotlinOptions {
- jvmTarget="11"
- }
-
- externalNativeBuild {
- cmake {
- path "../../CMakeLists.txt"
- version '3.22.1'
- }
- }
-}
-repositories {
- mavenCentral()
-}
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
-}
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml b/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 5a1e2d9..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android">
-
- <application
- android:label="ImGuiExample"
- android:allowBackup="false"
- android:fullBackupContent="false"
- android:hasCode="true">
-
- <activity
- android:name="imgui.example.android.MainActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:configChanges="orientation|keyboardHidden|screenSize"
- android:exported="true">
- <meta-data android:name="android.app.lib_name"
- android:value="ImGuiExample" />
-
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt b/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt
deleted file mode 100644
index 896a88c..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-package imgui.example.android
-
-import android.app.NativeActivity
-import android.os.Bundle
-import android.content.Context
-import android.view.inputmethod.InputMethodManager
-import android.view.KeyEvent
-import java.util.concurrent.LinkedBlockingQueue
-
-class MainActivity : NativeActivity() {
- public override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- }
-
- fun showSoftInput() {
- val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
- inputMethodManager.showSoftInput(this.window.decorView, 0)
- }
-
- fun hideSoftInput() {
- val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
- inputMethodManager.hideSoftInputFromWindow(this.window.decorView.windowToken, 0)
- }
-
- // Queue for the Unicode characters to be polled from native code (via pollUnicodeChar())
- private var unicodeCharacterQueue: LinkedBlockingQueue<Int> = LinkedBlockingQueue()
-
- // We assume dispatchKeyEvent() of the NativeActivity is actually called for every
- // KeyEvent and not consumed by any View before it reaches here
- override fun dispatchKeyEvent(event: KeyEvent): Boolean {
- if (event.action == KeyEvent.ACTION_DOWN) {
- unicodeCharacterQueue.offer(event.getUnicodeChar(event.metaState))
- }
- return super.dispatchKeyEvent(event)
- }
-
- fun pollUnicodeChar(): Int {
- return unicodeCharacterQueue.poll() ?: 0
- }
-}
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle b/libs/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle
deleted file mode 100644
index ccd2185..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle
+++ /dev/null
@@ -1,24 +0,0 @@
-buildscript {
- ext.kotlin_version = '1.8.0'
- repositories {
- google()
- mavenCentral()
-
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:7.4.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle b/libs/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle
deleted file mode 100644
index e7b4def..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':app'
diff --git a/libs/imgui-1.92.1/examples/example_android_opengl3/main.cpp b/libs/imgui-1.92.1/examples/example_android_opengl3/main.cpp
deleted file mode 100644
index 452cb77..0000000
--- a/libs/imgui-1.92.1/examples/example_android_opengl3/main.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-// dear imgui: standalone example application for Android + OpenGL ES 3
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_android.h"
-#include "imgui_impl_opengl3.h"
-#include <android/log.h>
-#include <android_native_app_glue.h>
-#include <android/asset_manager.h>
-#include <EGL/egl.h>
-#include <GLES3/gl3.h>
-#include <string>
-
-// Data
-static EGLDisplay g_EglDisplay = EGL_NO_DISPLAY;
-static EGLSurface g_EglSurface = EGL_NO_SURFACE;
-static EGLContext g_EglContext = EGL_NO_CONTEXT;
-static struct android_app* g_App = nullptr;
-static bool g_Initialized = false;
-static char g_LogTag[] = "ImGuiExample";
-static std::string g_IniFilename = "";
-
-// Forward declarations of helper functions
-static void Init(struct android_app* app);
-static void Shutdown();
-static void MainLoopStep();
-static int ShowSoftKeyboardInput();
-static int PollUnicodeChars();
-static int GetAssetData(const char* filename, void** out_data);
-
-// Main code
-static void handleAppCmd(struct android_app* app, int32_t appCmd)
-{
- switch (appCmd)
- {
- case APP_CMD_SAVE_STATE:
- break;
- case APP_CMD_INIT_WINDOW:
- Init(app);
- break;
- case APP_CMD_TERM_WINDOW:
- Shutdown();
- break;
- case APP_CMD_GAINED_FOCUS:
- case APP_CMD_LOST_FOCUS:
- break;
- }
-}
-
-static int32_t handleInputEvent(struct android_app* app, AInputEvent* inputEvent)
-{
- return ImGui_ImplAndroid_HandleInputEvent(inputEvent);
-}
-
-void android_main(struct android_app* app)
-{
- app->onAppCmd = handleAppCmd;
- app->onInputEvent = handleInputEvent;
-
- while (true)
- {
- int out_events;
- struct android_poll_source* out_data;
-
- // Poll all events. If the app is not visible, this loop blocks until g_Initialized == true.
- while (ALooper_pollOnce(g_Initialized ? 0 : -1, nullptr, &out_events, (void**)&out_data) >= 0)
- {
- // Process one event
- if (out_data != nullptr)
- out_data->process(app, out_data);
-
- // Exit the app by returning from within the infinite loop
- if (app->destroyRequested != 0)
- {
- // shutdown() should have been called already while processing the
- // app command APP_CMD_TERM_WINDOW. But we play save here
- if (!g_Initialized)
- Shutdown();
-
- return;
- }
- }
-
- // Initiate a new frame
- MainLoopStep();
- }
-}
-
-void Init(struct android_app* app)
-{
- if (g_Initialized)
- return;
-
- g_App = app;
- ANativeWindow_acquire(g_App->window);
-
- // Initialize EGL
- // This is mostly boilerplate code for EGL...
- {
- g_EglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- if (g_EglDisplay == EGL_NO_DISPLAY)
- __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglGetDisplay(EGL_DEFAULT_DISPLAY) returned EGL_NO_DISPLAY");
-
- if (eglInitialize(g_EglDisplay, 0, 0) != EGL_TRUE)
- __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglInitialize() returned with an error");
-
- const EGLint egl_attributes[] = { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE };
- EGLint num_configs = 0;
- if (eglChooseConfig(g_EglDisplay, egl_attributes, nullptr, 0, &num_configs) != EGL_TRUE)
- __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglChooseConfig() returned with an error");
- if (num_configs == 0)
- __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglChooseConfig() returned 0 matching config");
-
- // Get the first matching config
- EGLConfig egl_config;
- eglChooseConfig(g_EglDisplay, egl_attributes, &egl_config, 1, &num_configs);
- EGLint egl_format;
- eglGetConfigAttrib(g_EglDisplay, egl_config, EGL_NATIVE_VISUAL_ID, &egl_format);
- ANativeWindow_setBuffersGeometry(g_App->window, 0, 0, egl_format);
-
- const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE };
- g_EglContext = eglCreateContext(g_EglDisplay, egl_config, EGL_NO_CONTEXT, egl_context_attributes);
-
- if (g_EglContext == EGL_NO_CONTEXT)
- __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", "eglCreateContext() returned EGL_NO_CONTEXT");
-
- g_EglSurface = eglCreateWindowSurface(g_EglDisplay, egl_config, g_App->window, nullptr);
- eglMakeCurrent(g_EglDisplay, g_EglSurface, g_EglSurface, g_EglContext);
- }
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO();
-
- // Redirect loading/saving of .ini file to our location.
- // Make sure 'g_IniFilename' persists while we use Dear ImGui.
- g_IniFilename = std::string(app->activity->internalDataPath) + "/imgui.ini";
- io.IniFilename = g_IniFilename.c_str();;
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplAndroid_Init(g_App->window);
- ImGui_ImplOpenGL3_Init("#version 300 es");
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Android: The TTF files have to be placed into the assets/ directory (android/app/src/main/assets), we use our GetAssetData() helper to retrieve them.
-
- // We load the default font with increased size to improve readability on many devices with "high" DPI.
- // FIXME: Put some effort into DPI awareness.
- // Important: when calling AddFontFromMemoryTTF(), ownership of font_data is transferred by Dear ImGui by default (deleted is handled by Dear ImGui), unless we set FontDataOwnedByAtlas=false in ImFontConfig
- ImFontConfig font_cfg;
- font_cfg.SizePixels = 22.0f;
- io.Fonts->AddFontDefault(&font_cfg);
- //void* font_data;
- //int font_data_size;
- //ImFont* font;
- //font_data_size = GetAssetData("segoeui.ttf", &font_data);
- //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f);
- //IM_ASSERT(font != nullptr);
- //font_data_size = GetAssetData("DroidSans.ttf", &font_data);
- //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f);
- //IM_ASSERT(font != nullptr);
- //font_data_size = GetAssetData("Roboto-Medium.ttf", &font_data);
- //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 16.0f);
- //IM_ASSERT(font != nullptr);
- //font_data_size = GetAssetData("Cousine-Regular.ttf", &font_data);
- //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 15.0f);
- //IM_ASSERT(font != nullptr);
- //font_data_size = GetAssetData("ArialUni.ttf", &font_data);
- //font = io.Fonts->AddFontFromMemoryTTF(font_data, font_data_size, 18.0f);
- //IM_ASSERT(font != nullptr);
-
- // Arbitrary scale-up
- // FIXME: Put some effort into DPI awareness
- ImGui::GetStyle().ScaleAllSizes(3.0f);
-
- g_Initialized = true;
-}
-
-void MainLoopStep()
-{
- ImGuiIO& io = ImGui::GetIO();
- if (g_EglDisplay == EGL_NO_DISPLAY)
- return;
-
- // Our state
- // (we use static, which essentially makes the variable globals, as a convenience to keep the example code easy to follow)
- static bool show_demo_window = true;
- static bool show_another_window = false;
- static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Poll Unicode characters via JNI
- // FIXME: do not call this every frame because of JNI overhead
- PollUnicodeChars();
-
- // Open on-screen (soft) input if requested by Dear ImGui
- static bool WantTextInputLast = false;
- if (io.WantTextInput && !WantTextInputLast)
- ShowSoftKeyboardInput();
- WantTextInputLast = io.WantTextInput;
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL3_NewFrame();
- ImGui_ImplAndroid_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
- eglSwapBuffers(g_EglDisplay, g_EglSurface);
-}
-
-void Shutdown()
-{
- if (!g_Initialized)
- return;
-
- // Cleanup
- ImGui_ImplOpenGL3_Shutdown();
- ImGui_ImplAndroid_Shutdown();
- ImGui::DestroyContext();
-
- if (g_EglDisplay != EGL_NO_DISPLAY)
- {
- eglMakeCurrent(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
- if (g_EglContext != EGL_NO_CONTEXT)
- eglDestroyContext(g_EglDisplay, g_EglContext);
-
- if (g_EglSurface != EGL_NO_SURFACE)
- eglDestroySurface(g_EglDisplay, g_EglSurface);
-
- eglTerminate(g_EglDisplay);
- }
-
- g_EglDisplay = EGL_NO_DISPLAY;
- g_EglContext = EGL_NO_CONTEXT;
- g_EglSurface = EGL_NO_SURFACE;
- ANativeWindow_release(g_App->window);
-
- g_Initialized = false;
-}
-
-// Helper functions
-
-// Unfortunately, there is no way to show the on-screen input from native code.
-// Therefore, we call ShowSoftKeyboardInput() of the main activity implemented in MainActivity.kt via JNI.
-static int ShowSoftKeyboardInput()
-{
- JavaVM* java_vm = g_App->activity->vm;
- JNIEnv* java_env = nullptr;
-
- jint jni_return = java_vm->GetEnv((void**)&java_env, JNI_VERSION_1_6);
- if (jni_return == JNI_ERR)
- return -1;
-
- jni_return = java_vm->AttachCurrentThread(&java_env, nullptr);
- if (jni_return != JNI_OK)
- return -2;
-
- jclass native_activity_clazz = java_env->GetObjectClass(g_App->activity->clazz);
- if (native_activity_clazz == nullptr)
- return -3;
-
- jmethodID method_id = java_env->GetMethodID(native_activity_clazz, "showSoftInput", "()V");
- if (method_id == nullptr)
- return -4;
-
- java_env->CallVoidMethod(g_App->activity->clazz, method_id);
-
- jni_return = java_vm->DetachCurrentThread();
- if (jni_return != JNI_OK)
- return -5;
-
- return 0;
-}
-
-// Unfortunately, the native KeyEvent implementation has no getUnicodeChar() function.
-// Therefore, we implement the processing of KeyEvents in MainActivity.kt and poll
-// the resulting Unicode characters here via JNI and send them to Dear ImGui.
-static int PollUnicodeChars()
-{
- JavaVM* java_vm = g_App->activity->vm;
- JNIEnv* java_env = nullptr;
-
- jint jni_return = java_vm->GetEnv((void**)&java_env, JNI_VERSION_1_6);
- if (jni_return == JNI_ERR)
- return -1;
-
- jni_return = java_vm->AttachCurrentThread(&java_env, nullptr);
- if (jni_return != JNI_OK)
- return -2;
-
- jclass native_activity_clazz = java_env->GetObjectClass(g_App->activity->clazz);
- if (native_activity_clazz == nullptr)
- return -3;
-
- jmethodID method_id = java_env->GetMethodID(native_activity_clazz, "pollUnicodeChar", "()I");
- if (method_id == nullptr)
- return -4;
-
- // Send the actual characters to Dear ImGui
- ImGuiIO& io = ImGui::GetIO();
- jint unicode_character;
- while ((unicode_character = java_env->CallIntMethod(g_App->activity->clazz, method_id)) != 0)
- io.AddInputCharacter(unicode_character);
-
- jni_return = java_vm->DetachCurrentThread();
- if (jni_return != JNI_OK)
- return -5;
-
- return 0;
-}
-
-// Helper to retrieve data placed into the assets/ directory (android/app/src/main/assets)
-static int GetAssetData(const char* filename, void** outData)
-{
- int num_bytes = 0;
- AAsset* asset_descriptor = AAssetManager_open(g_App->activity->assetManager, filename, AASSET_MODE_BUFFER);
- if (asset_descriptor)
- {
- num_bytes = AAsset_getLength(asset_descriptor);
- *outData = IM_ALLOC(num_bytes);
- int64_t num_bytes_read = AAsset_read(asset_descriptor, *outData, num_bytes);
- AAsset_close(asset_descriptor);
- IM_ASSERT(num_bytes_read == num_bytes);
- }
- return num_bytes;
-}
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/Makefile b/libs/imgui-1.92.1/examples/example_apple_metal/Makefile
deleted file mode 100644
index 9412c9b..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for example_apple_metal, for macOS only (**not iOS**)
-CXX = clang++
-EXE = example_apple_metal
-IMGUI_DIR = ../../
-SOURCES = main.mm
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_osx.mm $(IMGUI_DIR)/backends/imgui_impl_metal.mm
-
-CXXFLAGS = -std=c++11 -ObjC++ -fobjc-arc -Wall -Wextra -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-FRAMEWORKS = -framework AppKit -framework Metal -framework MetalKit -framework QuartzCore -framework GameController
-
-all: $(EXE)
-
-$(EXE): $(SOURCES)
- $(CXX) $(CXXFLAGS) $^ $(FRAMEWORKS) -o $@
-
-run: all
- ./$(EXE)
-
-clean:
- rm -f $(EXE) *.o
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/README.md b/libs/imgui-1.92.1/examples/example_apple_metal/README.md
deleted file mode 100644
index 48a2b57..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# iOS / OSX Metal example
-
-## Introduction
-
-This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9.
-
-Consider basing your work off the example_glfw_metal/ or example_sdl2_metal/ examples. They are better supported and will be portable unlike this one.
-
-
-
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj b/libs/imgui-1.92.1/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
deleted file mode 100644
index bf3c80d..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,522 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 54;
- objects = {
-
-/* Begin PBXBuildFile section */
- 05318E0F274C397200A8DE2E /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05318E0E274C397200A8DE2E /* GameController.framework */; };
- 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; };
- 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; };
- 5079822E257677DB0038A28D /* imgui_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5079822D257677DB0038A28D /* imgui_tables.cpp */; };
- 8309BD8F253CCAAA0045E2A1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */; };
- 8309BDA5253CCC070045E2A1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDA0253CCBC10045E2A1 /* main.mm */; };
- 8309BDA8253CCC080045E2A1 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDA0253CCBC10045E2A1 /* main.mm */; };
- 8309BDBB253CCCAD0045E2A1 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */; };
- 8309BDBE253CCCB60045E2A1 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */; };
- 8309BDBF253CCCB60045E2A1 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */; };
- 8309BDC6253CCCFE0045E2A1 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */; };
- 8309BDFC253CDAB30045E2A1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */; };
- 8309BE04253CDAB60045E2A1 /* MainMenu.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */; };
- 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E420EB46B900295997 /* Metal.framework */; };
- 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E620EB46BD00295997 /* MetalKit.framework */; };
- 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EA20EB471700295997 /* MetalKit.framework */; };
- 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EB20EB471700295997 /* Metal.framework */; };
- 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; };
- 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; };
- 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; };
- 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; };
- 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; };
- 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 05318E0E274C397200A8DE2E /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
- 07A82ED62139413C0078D120 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = "<group>"; };
- 07A82ED72139413C0078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = "<group>"; };
- 5079822D257677DB0038A28D /* imgui_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_tables.cpp; path = ../../imgui_tables.cpp; sourceTree = "<group>"; };
- 8307E7C420E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 8307E7DA20E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
- 8309BDA0253CCBC10045E2A1 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
- 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_metal.mm; path = ../../backends/imgui_impl_metal.mm; sourceTree = "<group>"; };
- 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../../backends/imgui_impl_osx.mm; sourceTree = "<group>"; };
- 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
- 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
- 8309BDF8253CDAAE0045E2A1 /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; };
- 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MainMenu.storyboard; sourceTree = "<group>"; };
- 8309BDFB253CDAAE0045E2A1 /* Info-macOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-macOS.plist"; sourceTree = "<group>"; };
- 83BBE9E420EB46B900295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
- 83BBE9E620EB46BD00295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/MetalKit.framework; sourceTree = DEVELOPER_DIR; };
- 83BBE9E820EB46C100295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/ModelIO.framework; sourceTree = DEVELOPER_DIR; };
- 83BBE9EA20EB471700295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
- 83BBE9EB20EB471700295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
- 83BBE9EE20EB471C00295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = System/Library/Frameworks/ModelIO.framework; sourceTree = SDKROOT; };
- 83BBEA0020EB54E700295997 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = "<group>"; };
- 83BBEA0120EB54E700295997 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = "<group>"; };
- 83BBEA0220EB54E700295997 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = "<group>"; };
- 83BBEA0320EB54E700295997 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = "<group>"; };
- 83BBEA0420EB54E700295997 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8307E7C120E9F9C900473790 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BD8F253CCAAA0045E2A1 /* UIKit.framework in Frameworks */,
- 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */,
- 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8307E7D720E9F9C900473790 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BDC6253CCCFE0045E2A1 /* AppKit.framework in Frameworks */,
- 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */,
- 05318E0F274C397200A8DE2E /* GameController.framework in Frameworks */,
- 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 8307E7B520E9F9C700473790 = {
- isa = PBXGroup;
- children = (
- 83BBE9F020EB544400295997 /* imgui */,
- 8309BD9E253CCBA70045E2A1 /* example */,
- 8307E7C520E9F9C900473790 /* Products */,
- 83BBE9E320EB46B800295997 /* Frameworks */,
- );
- sourceTree = "<group>";
- };
- 8307E7C520E9F9C900473790 /* Products */ = {
- isa = PBXGroup;
- children = (
- 8307E7C420E9F9C900473790 /* example_apple_metal.app */,
- 8307E7DA20E9F9C900473790 /* example_apple_metal.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 8309BD9E253CCBA70045E2A1 /* example */ = {
- isa = PBXGroup;
- children = (
- 8309BDF6253CDAAE0045E2A1 /* iOS */,
- 8309BDF9253CDAAE0045E2A1 /* macOS */,
- 8309BDA0253CCBC10045E2A1 /* main.mm */,
- );
- name = example;
- sourceTree = "<group>";
- };
- 8309BDF6253CDAAE0045E2A1 /* iOS */ = {
- isa = PBXGroup;
- children = (
- 8309BDF7253CDAAE0045E2A1 /* LaunchScreen.storyboard */,
- 8309BDF8253CDAAE0045E2A1 /* Info-iOS.plist */,
- );
- path = iOS;
- sourceTree = "<group>";
- };
- 8309BDF9253CDAAE0045E2A1 /* macOS */ = {
- isa = PBXGroup;
- children = (
- 8309BDFA253CDAAE0045E2A1 /* MainMenu.storyboard */,
- 8309BDFB253CDAAE0045E2A1 /* Info-macOS.plist */,
- );
- path = macOS;
- sourceTree = "<group>";
- };
- 83BBE9E320EB46B800295997 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 05318E0E274C397200A8DE2E /* GameController.framework */,
- 8309BDC5253CCCFE0045E2A1 /* AppKit.framework */,
- 8309BD8E253CCAAA0045E2A1 /* UIKit.framework */,
- 83BBE9EE20EB471C00295997 /* ModelIO.framework */,
- 83BBE9EB20EB471700295997 /* Metal.framework */,
- 83BBE9EA20EB471700295997 /* MetalKit.framework */,
- 83BBE9E820EB46C100295997 /* ModelIO.framework */,
- 83BBE9E620EB46BD00295997 /* MetalKit.framework */,
- 83BBE9E420EB46B900295997 /* Metal.framework */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
- 83BBE9F020EB544400295997 /* imgui */ = {
- isa = PBXGroup;
- children = (
- 5079822D257677DB0038A28D /* imgui_tables.cpp */,
- 8309BDB5253CCC9D0045E2A1 /* imgui_impl_metal.mm */,
- 8309BDB6253CCC9D0045E2A1 /* imgui_impl_osx.mm */,
- 83BBEA0420EB54E700295997 /* imconfig.h */,
- 83BBEA0320EB54E700295997 /* imgui.cpp */,
- 83BBEA0020EB54E700295997 /* imgui.h */,
- 83BBEA0220EB54E700295997 /* imgui_demo.cpp */,
- 83BBEA0120EB54E700295997 /* imgui_draw.cpp */,
- 07A82ED62139413C0078D120 /* imgui_internal.h */,
- 07A82ED72139413C0078D120 /* imgui_widgets.cpp */,
- );
- name = imgui;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 8307E7C320E9F9C900473790 /* example_apple_metal_ios */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */;
- buildPhases = (
- 8307E7C020E9F9C900473790 /* Sources */,
- 8307E7C120E9F9C900473790 /* Frameworks */,
- 8307E7C220E9F9C900473790 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = example_apple_metal_ios;
- productName = "imguiex iOS";
- productReference = 8307E7C420E9F9C900473790 /* example_apple_metal.app */;
- productType = "com.apple.product-type.application";
- };
- 8307E7D920E9F9C900473790 /* example_apple_metal_macos */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */;
- buildPhases = (
- 8307E7D620E9F9C900473790 /* Sources */,
- 8307E7D720E9F9C900473790 /* Frameworks */,
- 8307E7D820E9F9C900473790 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = example_apple_metal_macos;
- productName = "imguiex macOS";
- productReference = 8307E7DA20E9F9C900473790 /* example_apple_metal.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 8307E7B620E9F9C700473790 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1530;
- ORGANIZATIONNAME = "Warren Moore";
- TargetAttributes = {
- 8307E7C320E9F9C900473790 = {
- CreatedOnToolsVersion = 9.4.1;
- ProvisioningStyle = Automatic;
- };
- 8307E7D920E9F9C900473790 = {
- CreatedOnToolsVersion = 9.4.1;
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */;
- compatibilityVersion = "Xcode 8.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 8307E7B520E9F9C700473790;
- productRefGroup = 8307E7C520E9F9C900473790 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8307E7C320E9F9C900473790 /* example_apple_metal_ios */,
- 8307E7D920E9F9C900473790 /* example_apple_metal_macos */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8307E7C220E9F9C900473790 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BDFC253CDAB30045E2A1 /* LaunchScreen.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8307E7D820E9F9C900473790 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BE04253CDAB60045E2A1 /* MainMenu.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8307E7C020E9F9C900473790 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BDBB253CCCAD0045E2A1 /* imgui_impl_metal.mm in Sources */,
- 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */,
- 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */,
- 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */,
- 5079822E257677DB0038A28D /* imgui_tables.cpp in Sources */,
- 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */,
- 8309BDA5253CCC070045E2A1 /* main.mm in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8307E7D620E9F9C900473790 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8309BDBE253CCCB60045E2A1 /* imgui_impl_metal.mm in Sources */,
- 8309BDBF253CCCB60045E2A1 /* imgui_impl_osx.mm in Sources */,
- 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */,
- 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */,
- 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */,
- 5079822E257677DB0038A28D /* imgui_tables.cpp in Sources */,
- 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */,
- 8309BDA8253CCC080045E2A1 /* main.mm in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 8307E7EE20E9F9C900473790 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEAD_CODE_STRIPPING = YES;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- };
- name = Debug;
- };
- 8307E7EF20E9F9C900473790 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEAD_CODE_STRIPPING = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MTL_ENABLE_DEBUG_INFO = NO;
- };
- name = Release;
- };
- 8307E7F120E9F9C900473790 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios";
- PRODUCT_NAME = example_apple_metal;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**";
- };
- name = Debug;
- };
- 8307E7F220E9F9C900473790 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios";
- PRODUCT_NAME = example_apple_metal;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 8307E7F420E9F9C900473790 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_IDENTITY = "-";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- DEAD_CODE_STRIPPING = YES;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos";
- PRODUCT_NAME = example_apple_metal;
- SDKROOT = macosx;
- USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**";
- };
- name = Debug;
- };
- 8307E7F520E9F9C900473790 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_IDENTITY = "-";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- DEAD_CODE_STRIPPING = YES;
- DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
- PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos";
- PRODUCT_NAME = example_apple_metal;
- SDKROOT = macosx;
- USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../**";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 8307E7EE20E9F9C900473790 /* Debug */,
- 8307E7EF20E9F9C900473790 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 8307E7F120E9F9C900473790 /* Debug */,
- 8307E7F220E9F9C900473790 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 8307E7F420E9F9C900473790 /* Debug */,
- 8307E7F520E9F9C900473790 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 8307E7B620E9F9C700473790 /* Project object */;
-}
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/iOS/Info-iOS.plist b/libs/imgui-1.92.1/examples/example_apple_metal/iOS/Info-iOS.plist
deleted file mode 100644
index 93ef078..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/iOS/Info-iOS.plist
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>imgui</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
- <key>UIRequiredDeviceCapabilities</key>
- <array>
- <string>armv7</string>
- <string>metal</string>
- </array>
- <key>UIRequiresFullScreen</key>
- <true/>
- <key>UIStatusBarHidden</key>
- <true/>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
-</dict>
-</plist>
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/iOS/LaunchScreen.storyboard b/libs/imgui-1.92.1/examples/example_apple_metal/iOS/LaunchScreen.storyboard
deleted file mode 100644
index 12c52cf..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/iOS/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
- <device id="retina6_1" orientation="portrait" appearance="light"/>
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <scenes>
- <!--View Controller-->
- <scene sceneID="EHf-IW-A2E">
- <objects>
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
- <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
- <color key="backgroundColor" red="0.27843137254901962" green="0.36078431372549019" blue="0.50196078431372548" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="53" y="375"/>
- </scene>
- </scenes>
-</document>
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/macOS/Info-macOS.plist b/libs/imgui-1.92.1/examples/example_apple_metal/macOS/Info-macOS.plist
deleted file mode 100644
index 6f4a2b2..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/macOS/Info-macOS.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>imgui</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
- <key>NSMainStoryboardFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/macOS/MainMenu.storyboard b/libs/imgui-1.92.1/examples/example_apple_metal/macOS/MainMenu.storyboard
deleted file mode 100644
index 38ad432..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/macOS/MainMenu.storyboard
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
- <dependencies>
- <deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17156"/>
- </dependencies>
- <scenes>
- <!--Application-->
- <scene sceneID="JPo-4y-FX3">
- <objects>
- <application id="hnw-xV-0zn" sceneMemberID="viewController">
- <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
- <items>
- <menuItem title="ImGui" id="1Xt-HY-uBw">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="ImGui" systemMenu="apple" id="uQy-DD-JDr">
- <items>
- <menuItem title="Services" id="NMo-om-nkz">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
- <menuItem title="Hide" keyEquivalent="h" id="Olw-nP-bQN">
- <connections>
- <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
- </connections>
- </menuItem>
- <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
- </connections>
- </menuItem>
- <menuItem title="Show All" id="Kd2-mp-pUS">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
- <menuItem title="Quit" keyEquivalent="q" id="4sb-4s-VLi">
- <connections>
- <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="View" id="H8h-7b-M4v">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="View" id="HyV-fh-RgO">
- <items>
- <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
- <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
- <connections>
- <action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Window" id="aUF-d1-5bR">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
- <items>
- <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
- <connections>
- <action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
- </connections>
- </menuItem>
- <menuItem title="Zoom" id="R4o-n2-Eq4">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- </items>
- </menu>
- <connections>
- <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
- </connections>
- </application>
- <customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
- <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
- <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="-362" y="-38"/>
- </scene>
- </scenes>
-</document>
diff --git a/libs/imgui-1.92.1/examples/example_apple_metal/main.mm b/libs/imgui-1.92.1/examples/example_apple_metal/main.mm
deleted file mode 100644
index 301a2b4..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_metal/main.mm
+++ /dev/null
@@ -1,348 +0,0 @@
-// Dear ImGui: standalone example application for OSX + Metal.
-
-// 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
-
-#import <Foundation/Foundation.h>
-
-#if TARGET_OS_OSX
-#import <Cocoa/Cocoa.h>
-#else
-#import <UIKit/UIKit.h>
-#endif
-
-#import <Metal/Metal.h>
-#import <MetalKit/MetalKit.h>
-
-#include "imgui.h"
-#include "imgui_impl_metal.h"
-#if TARGET_OS_OSX
-#include "imgui_impl_osx.h"
-@interface AppViewController : NSViewController<NSWindowDelegate>
-@end
-#else
-@interface AppViewController : UIViewController
-@end
-#endif
-
-@interface AppViewController () <MTKViewDelegate>
-@property (nonatomic, readonly) MTKView *mtkView;
-@property (nonatomic, strong) id <MTLDevice> device;
-@property (nonatomic, strong) id <MTLCommandQueue> commandQueue;
-@end
-
-//-----------------------------------------------------------------------------------
-// AppViewController
-//-----------------------------------------------------------------------------------
-
-@implementation AppViewController
-
--(instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
-
- _device = MTLCreateSystemDefaultDevice();
- _commandQueue = [_device newCommandQueue];
-
- if (!self.device)
- {
- NSLog(@"Metal is not supported");
- abort();
- }
-
- // Setup Dear ImGui context
- // FIXME: This example doesn't have proper cleanup...
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Renderer backend
- ImGui_ImplMetal_Init(_device);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- return self;
-}
-
--(MTKView *)mtkView
-{
- return (MTKView *)self.view;
-}
-
--(void)loadView
-{
- self.view = [[MTKView alloc] initWithFrame:CGRectMake(0, 0, 1200, 720)];
-}
-
--(void)viewDidLoad
-{
- [super viewDidLoad];
-
- self.mtkView.device = self.device;
- self.mtkView.delegate = self;
-
-#if TARGET_OS_OSX
- ImGui_ImplOSX_Init(self.view);
- [NSApp activateIgnoringOtherApps:YES];
-#endif
-}
-
--(void)drawInMTKView:(MTKView*)view
-{
- ImGuiIO& io = ImGui::GetIO();
- io.DisplaySize.x = view.bounds.size.width;
- io.DisplaySize.y = view.bounds.size.height;
-
-#if TARGET_OS_OSX
- CGFloat framebufferScale = view.window.screen.backingScaleFactor ?: NSScreen.mainScreen.backingScaleFactor;
-#else
- CGFloat framebufferScale = view.window.screen.scale ?: UIScreen.mainScreen.scale;
-#endif
- io.DisplayFramebufferScale = ImVec2(framebufferScale, framebufferScale);
-
- id<MTLCommandBuffer> commandBuffer = [self.commandQueue commandBuffer];
-
- MTLRenderPassDescriptor* renderPassDescriptor = view.currentRenderPassDescriptor;
- if (renderPassDescriptor == nil)
- {
- [commandBuffer commit];
- return;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplMetal_NewFrame(renderPassDescriptor);
-#if TARGET_OS_OSX
- ImGui_ImplOSX_NewFrame(view);
-#endif
- ImGui::NewFrame();
-
- // Our state (make them static = more or less global) as a convenience to keep the example terse.
- static bool show_demo_window = true;
- static bool show_another_window = false;
- static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
-
- renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- id <MTLRenderCommandEncoder> renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
- [renderEncoder pushDebugGroup:@"Dear ImGui rendering"];
- ImGui_ImplMetal_RenderDrawData(draw_data, commandBuffer, renderEncoder);
- [renderEncoder popDebugGroup];
- [renderEncoder endEncoding];
-
- // Present
- [commandBuffer presentDrawable:view.currentDrawable];
- [commandBuffer commit];
-}
-
--(void)mtkView:(MTKView*)view drawableSizeWillChange:(CGSize)size
-{
-}
-
-//-----------------------------------------------------------------------------------
-// Input processing
-//-----------------------------------------------------------------------------------
-
-#if TARGET_OS_OSX
-
-- (void)viewWillAppear
-{
- [super viewWillAppear];
- self.view.window.delegate = self;
-}
-
-- (void)windowWillClose:(NSNotification *)notification
-{
- ImGui_ImplMetal_Shutdown();
- ImGui_ImplOSX_Shutdown();
- ImGui::DestroyContext();
-}
-
-#else
-
-// This touch mapping is super cheesy/hacky. We treat any touch on the screen
-// as if it were a depressed left mouse button, and we don't bother handling
-// multitouch correctly at all. This causes the "cursor" to behave very erratically
-// when there are multiple active touches. But for demo purposes, single-touch
-// interaction actually works surprisingly well.
--(void)updateIOWithTouchEvent:(UIEvent *)event
-{
- UITouch *anyTouch = event.allTouches.anyObject;
- CGPoint touchLocation = [anyTouch locationInView:self.view];
- ImGuiIO &io = ImGui::GetIO();
- io.AddMouseSourceEvent(ImGuiMouseSource_TouchScreen);
- io.AddMousePosEvent(touchLocation.x, touchLocation.y);
-
- BOOL hasActiveTouch = NO;
- for (UITouch *touch in event.allTouches)
- {
- if (touch.phase != UITouchPhaseEnded && touch.phase != UITouchPhaseCancelled)
- {
- hasActiveTouch = YES;
- break;
- }
- }
- io.AddMouseButtonEvent(0, hasActiveTouch);
-}
-
--(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; }
--(void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; }
--(void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; }
--(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self updateIOWithTouchEvent:event]; }
-
-#endif
-
-@end
-
-//-----------------------------------------------------------------------------------
-// AppDelegate
-//-----------------------------------------------------------------------------------
-
-#if TARGET_OS_OSX
-
-@interface AppDelegate : NSObject <NSApplicationDelegate>
-@property (nonatomic, strong) NSWindow *window;
-@end
-
-@implementation AppDelegate
-
--(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
-{
- return YES;
-}
-
--(instancetype)init
-{
- if (self = [super init])
- {
- NSViewController *rootViewController = [[AppViewController alloc] initWithNibName:nil bundle:nil];
- self.window = [[NSWindow alloc] initWithContentRect:NSZeroRect
- styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable
- backing:NSBackingStoreBuffered
- defer:NO];
- self.window.contentViewController = rootViewController;
- [self.window center];
- [self.window makeKeyAndOrderFront:self];
- }
- return self;
-}
-
-@end
-
-#else
-
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
-@property (strong, nonatomic) UIWindow *window;
-@end
-
-@implementation AppDelegate
-
--(BOOL)application:(UIApplication *)application
- didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions
-{
- UIViewController *rootViewController = [[AppViewController alloc] init];
- self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
- self.window.rootViewController = rootViewController;
- [self.window makeKeyAndVisible];
- return YES;
-}
-
-@end
-
-#endif
-
-//-----------------------------------------------------------------------------------
-// Application main() function
-//-----------------------------------------------------------------------------------
-
-#if TARGET_OS_OSX
-
-int main(int, const char**)
-{
- @autoreleasepool
- {
- [NSApplication sharedApplication];
- [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
-
- AppDelegate *appDelegate = [[AppDelegate alloc] init]; // creates window
- [NSApp setDelegate:appDelegate];
-
- [NSApp activateIgnoringOtherApps:YES];
- [NSApp run];
- }
- return 0;
-}
-
-#else
-
-int main(int argc, char * argv[])
-{
- @autoreleasepool
- {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}
-
-#endif
diff --git a/libs/imgui-1.92.1/examples/example_apple_opengl2/Makefile b/libs/imgui-1.92.1/examples/example_apple_opengl2/Makefile
deleted file mode 100644
index 4ad5fa6..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_opengl2/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for example_apple_metal, for macOS only (**not iOS**)
-CXX = clang++
-EXE = example_apple_opengl2
-IMGUI_DIR = ../../
-SOURCES = main.mm
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_osx.mm $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp
-
-CXXFLAGS = -std=c++11 -ObjC++ -fobjc-arc -Wall -Wextra -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-FRAMEWORKS = -framework Cocoa -framework OpenGL -framework GameController
-
-all: $(EXE)
-
-$(EXE): $(SOURCES)
- $(CXX) $(CXXFLAGS) $(SOURCES) -o $(EXE) $(FRAMEWORKS)
-
-run: all
- ./$(EXE)
-
-clean:
- rm -f $(EXE) *.o
diff --git a/libs/imgui-1.92.1/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj b/libs/imgui-1.92.1/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj
deleted file mode 100644
index 9770e43..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,332 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 48;
- objects = {
-
-/* Begin PBXBuildFile section */
- 05E31B59274EF0700083FCB6 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05E31B57274EF0360083FCB6 /* GameController.framework */; };
- 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82EDA213941D00078D120 /* imgui_widgets.cpp */; };
- 4080A99820B02D340036BA46 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A98A20B02CD90036BA46 /* main.mm */; };
- 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */; };
- 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */; };
- 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A720B0343C0036BA46 /* imgui.cpp */; };
- 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */; };
- 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */; };
- 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B220B034E40036BA46 /* Cocoa.framework */; };
- 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B420B034EA0036BA46 /* OpenGL.framework */; };
- 50798230257677FD0038A28D /* imgui_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5079822F257677FC0038A28D /* imgui_tables.cpp */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 4080A96920B029B00036BA46 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 05E31B57274EF0360083FCB6 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
- 07A82EDA213941D00078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = "<group>"; };
- 4080A96B20B029B00036BA46 /* example_osx_opengl2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = example_osx_opengl2; sourceTree = BUILT_PRODUCTS_DIR; };
- 4080A98A20B02CD90036BA46 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = SOURCE_ROOT; };
- 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../backends/imgui_impl_opengl2.cpp; sourceTree = "<group>"; };
- 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../../backends/imgui_impl_osx.mm; sourceTree = "<group>"; };
- 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../backends/imgui_impl_opengl2.h; sourceTree = "<group>"; };
- 4080A9A120B034280036BA46 /* imgui_impl_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_osx.h; path = ../../backends/imgui_impl_osx.h; sourceTree = "<group>"; };
- 4080A9A520B0343C0036BA46 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = "<group>"; };
- 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = "<group>"; };
- 4080A9A720B0343C0036BA46 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = "<group>"; };
- 4080A9A820B0343C0036BA46 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = "<group>"; };
- 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = "<group>"; };
- 4080A9AC20B0343C0036BA46 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = "<group>"; };
- 4080A9B220B034E40036BA46 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
- 4080A9B420B034EA0036BA46 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
- 5079822F257677FC0038A28D /* imgui_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_tables.cpp; path = ../../imgui_tables.cpp; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 4080A96820B029B00036BA46 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */,
- 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */,
- 05E31B59274EF0700083FCB6 /* GameController.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 4080A96220B029B00036BA46 = {
- isa = PBXGroup;
- children = (
- 5079822F257677FC0038A28D /* imgui_tables.cpp */,
- 4080A9AC20B0343C0036BA46 /* imconfig.h */,
- 4080A9A720B0343C0036BA46 /* imgui.cpp */,
- 4080A9A820B0343C0036BA46 /* imgui.h */,
- 07A82EDA213941D00078D120 /* imgui_widgets.cpp */,
- 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */,
- 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */,
- 4080A9A520B0343C0036BA46 /* imgui_internal.h */,
- 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */,
- 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */,
- 4080A9A120B034280036BA46 /* imgui_impl_osx.h */,
- 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */,
- 4080A98A20B02CD90036BA46 /* main.mm */,
- 4080A96C20B029B00036BA46 /* Products */,
- 4080A9B120B034E40036BA46 /* Frameworks */,
- );
- sourceTree = "<group>";
- };
- 4080A96C20B029B00036BA46 /* Products */ = {
- isa = PBXGroup;
- children = (
- 4080A96B20B029B00036BA46 /* example_osx_opengl2 */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 4080A9B120B034E40036BA46 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 05E31B57274EF0360083FCB6 /* GameController.framework */,
- 4080A9B420B034EA0036BA46 /* OpenGL.framework */,
- 4080A9B220B034E40036BA46 /* Cocoa.framework */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 4080A96A20B029B00036BA46 /* example_osx_opengl2 */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */;
- buildPhases = (
- 4080A96720B029B00036BA46 /* Sources */,
- 4080A96820B029B00036BA46 /* Frameworks */,
- 4080A96920B029B00036BA46 /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = example_osx_opengl2;
- productName = example_osx_opengl2;
- productReference = 4080A96B20B029B00036BA46 /* example_osx_opengl2 */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 4080A96320B029B00036BA46 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0930;
- ORGANIZATIONNAME = ImGui;
- TargetAttributes = {
- 4080A96A20B029B00036BA46 = {
- CreatedOnToolsVersion = 9.3.1;
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */;
- compatibilityVersion = "Xcode 8.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 4080A96220B029B00036BA46;
- productRefGroup = 4080A96C20B029B00036BA46 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 4080A96A20B029B00036BA46 /* example_osx_opengl2 */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 4080A96720B029B00036BA46 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4080A99820B02D340036BA46 /* main.mm in Sources */,
- 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */,
- 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */,
- 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */,
- 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */,
- 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */,
- 50798230257677FD0038A28D /* imgui_tables.cpp in Sources */,
- 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 4080A97020B029B00036BA46 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 4080A97120B029B00036BA46 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 4080A97320B029B00036BA46 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- PRODUCT_NAME = "$(TARGET_NAME)";
- USER_HEADER_SEARCH_PATHS = ../..;
- };
- name = Debug;
- };
- 4080A97420B029B00036BA46 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- PRODUCT_NAME = "$(TARGET_NAME)";
- USER_HEADER_SEARCH_PATHS = ../..;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4080A97020B029B00036BA46 /* Debug */,
- 4080A97120B029B00036BA46 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4080A97320B029B00036BA46 /* Debug */,
- 4080A97420B029B00036BA46 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 4080A96320B029B00036BA46 /* Project object */;
-}
diff --git a/libs/imgui-1.92.1/examples/example_apple_opengl2/main.mm b/libs/imgui-1.92.1/examples/example_apple_opengl2/main.mm
deleted file mode 100644
index c3f0c31..0000000
--- a/libs/imgui-1.92.1/examples/example_apple_opengl2/main.mm
+++ /dev/null
@@ -1,256 +0,0 @@
-// Dear ImGui: standalone example application for OSX + OpenGL2, using legacy fixed pipeline
-
-// 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
-
-#import <Cocoa/Cocoa.h>
-#import <OpenGL/gl.h>
-#import <OpenGL/glu.h>
-
-#include "imgui.h"
-#include "imgui_impl_opengl2.h"
-#include "imgui_impl_osx.h"
-
-//-----------------------------------------------------------------------------------
-// AppView
-//-----------------------------------------------------------------------------------
-
-@interface AppView : NSOpenGLView
-{
- NSTimer* animationTimer;
-}
-@end
-
-@implementation AppView
-
--(void)prepareOpenGL
-{
- [super prepareOpenGL];
-
-#ifndef DEBUG
- GLint swapInterval = 1;
- [[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
- if (swapInterval == 0)
- NSLog(@"Error: Cannot set swap interval.");
-#endif
-}
-
--(void)initialize
-{
- // Setup Dear ImGui context
- // FIXME: This example doesn't have proper cleanup...
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplOSX_Init(self);
- ImGui_ImplOpenGL2_Init();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-}
-
--(void)updateAndDrawDemoView
-{
- // Start the Dear ImGui frame
- ImGuiIO& io = ImGui::GetIO();
- ImGui_ImplOpenGL2_NewFrame();
- ImGui_ImplOSX_NewFrame(self);
- ImGui::NewFrame();
-
- // Our state (make them static = more or less global) as a convenience to keep the example terse.
- static bool show_demo_window = true;
- static bool show_another_window = false;
- static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
-
- [[self openGLContext] makeCurrentContext];
- GLsizei width = (GLsizei)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
- GLsizei height = (GLsizei)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y);
- glViewport(0, 0, width, height);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
-
- ImGui_ImplOpenGL2_RenderDrawData(draw_data);
-
- // Present
- [[self openGLContext] flushBuffer];
-
- if (!animationTimer)
- animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.017 target:self selector:@selector(animationTimerFired:) userInfo:nil repeats:YES];
-}
-
--(void)reshape { [super reshape]; [[self openGLContext] update]; [self updateAndDrawDemoView]; }
--(void)drawRect:(NSRect)bounds { [self updateAndDrawDemoView]; }
--(void)animationTimerFired:(NSTimer*)timer { [self setNeedsDisplay:YES]; }
--(void)dealloc { animationTimer = nil; }
-
-@end
-
-//-----------------------------------------------------------------------------------
-// AppDelegate
-//-----------------------------------------------------------------------------------
-
-@interface AppDelegate : NSObject <NSApplicationDelegate>
-@property (nonatomic, readonly) NSWindow* window;
-@end
-
-@implementation AppDelegate
-@synthesize window = _window;
-
--(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
-{
- return YES;
-}
-
--(NSWindow*)window
-{
- if (_window != nil)
- return (_window);
-
- NSRect viewRect = NSMakeRect(100.0, 100.0, 100.0 + 1280.0, 100 + 720.0);
-
- _window = [[NSWindow alloc] initWithContentRect:viewRect styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable|NSWindowStyleMaskClosable backing:NSBackingStoreBuffered defer:YES];
- [_window setTitle:@"Dear ImGui OSX+OpenGL2 Example"];
- [_window setAcceptsMouseMovedEvents:YES];
- [_window setOpaque:YES];
- [_window makeKeyAndOrderFront:NSApp];
-
- return (_window);
-}
-
--(void)setupMenu
-{
- NSMenu* mainMenuBar = [[NSMenu alloc] init];
- NSMenu* appMenu;
- NSMenuItem* menuItem;
-
- appMenu = [[NSMenu alloc] initWithTitle:@"Dear ImGui OSX+OpenGL2 Example"];
- menuItem = [appMenu addItemWithTitle:@"Quit Dear ImGui OSX+OpenGL2 Example" action:@selector(terminate:) keyEquivalent:@"q"];
- [menuItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
-
- menuItem = [[NSMenuItem alloc] init];
- [menuItem setSubmenu:appMenu];
-
- [mainMenuBar addItem:menuItem];
-
- appMenu = nil;
- [NSApp setMainMenu:mainMenuBar];
-}
-
--(void)dealloc
-{
- _window = nil;
-}
-
--(void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
- // Make the application a foreground application (else it won't receive keyboard events)
- ProcessSerialNumber psn = {0, kCurrentProcess};
- TransformProcessType(&psn, kProcessTransformToForegroundApplication);
-
- // Menu
- [self setupMenu];
-
- NSOpenGLPixelFormatAttribute attrs[] =
- {
- NSOpenGLPFADoubleBuffer,
- NSOpenGLPFADepthSize, 32,
- 0
- };
-
- NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
- AppView* view = [[AppView alloc] initWithFrame:self.window.frame pixelFormat:format];
- format = nil;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
- [view setWantsBestResolutionOpenGLSurface:YES];
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
- [self.window setContentView:view];
-
- if ([view openGLContext] == nil)
- NSLog(@"No OpenGL Context!");
-
- [view initialize];
-}
-
-@end
-
-//-----------------------------------------------------------------------------------
-// Application main() function
-//-----------------------------------------------------------------------------------
-
-int main(int argc, const char* argv[])
-{
- @autoreleasepool
- {
- NSApp = [NSApplication sharedApplication];
- AppDelegate* delegate = [[AppDelegate alloc] init];
- [[NSApplication sharedApplication] setDelegate:delegate];
- [NSApp run];
- }
- return NSApplicationMain(argc, argv);
-}
diff --git a/libs/imgui-1.92.1/examples/example_glfw_metal/Makefile b/libs/imgui-1.92.1/examples/example_glfw_metal/Makefile
deleted file mode 100644
index 32a7aec..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_metal/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# You will need GLFW (http://www.glfw.org):
-# brew install glfw
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_glfw_metal
-IMGUI_DIR = ../..
-SOURCES = main.mm
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-
-LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore
-LIBS += -L/usr/local/lib -L/opt/homebrew/lib -L/opt/local/lib
-LIBS += -lglfw
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include -I/opt/local/include
-CXXFLAGS += -Wall -Wformat
-CFLAGS = $(CXXFLAGS)
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:%.mm
- $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.mm
- $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_glfw_metal/main.mm b/libs/imgui-1.92.1/examples/example_glfw_metal/main.mm
deleted file mode 100644
index ef31470..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_metal/main.mm
+++ /dev/null
@@ -1,177 +0,0 @@
-// Dear ImGui: standalone example application for GLFW + Metal, using programmable pipeline
-// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_glfw.h"
-#include "imgui_impl_metal.h"
-#include <stdio.h>
-
-#define GLFW_INCLUDE_NONE
-#define GLFW_EXPOSE_NATIVE_COCOA
-#include <GLFW/glfw3.h>
-#include <GLFW/glfw3native.h>
-
-#import <Metal/Metal.h>
-#import <QuartzCore/QuartzCore.h>
-
-static void glfw_error_callback(int error, const char* description)
-{
- fprintf(stderr, "Glfw Error %d: %s\n", error, description);
-}
-
-int main(int, char**)
-{
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Setup window
- glfwSetErrorCallback(glfw_error_callback);
- if (!glfwInit())
- return 1;
-
- // Create window with graphics context
- glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
- GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Metal example", nullptr, nullptr);
- if (window == nullptr)
- return 1;
-
- id <MTLDevice> device = MTLCreateSystemDefaultDevice();
- id <MTLCommandQueue> commandQueue = [device newCommandQueue];
-
- // Setup Platform/Renderer backends
- ImGui_ImplGlfw_InitForOpenGL(window, true);
- ImGui_ImplMetal_Init(device);
-
- NSWindow *nswin = glfwGetCocoaWindow(window);
- CAMetalLayer *layer = [CAMetalLayer layer];
- layer.device = device;
- layer.pixelFormat = MTLPixelFormatBGRA8Unorm;
- nswin.contentView.layer = layer;
- nswin.contentView.wantsLayer = YES;
-
- MTLRenderPassDescriptor *renderPassDescriptor = [MTLRenderPassDescriptor new];
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- float clear_color[4] = {0.45f, 0.55f, 0.60f, 1.00f};
-
- // Main loop
- while (!glfwWindowShouldClose(window))
- {
- @autoreleasepool
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- glfwPollEvents();
-
- int width, height;
- glfwGetFramebufferSize(window, &width, &height);
- layer.drawableSize = CGSizeMake(width, height);
- id<CAMetalDrawable> drawable = [layer nextDrawable];
-
- id<MTLCommandBuffer> commandBuffer = [commandQueue commandBuffer];
- renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color[0] * clear_color[3], clear_color[1] * clear_color[3], clear_color[2] * clear_color[3], clear_color[3]);
- renderPassDescriptor.colorAttachments[0].texture = drawable.texture;
- renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionClear;
- renderPassDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore;
- id <MTLRenderCommandEncoder> renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
- [renderEncoder pushDebugGroup:@"ImGui demo"];
-
- // Start the Dear ImGui frame
- ImGui_ImplMetal_NewFrame(renderPassDescriptor);
- ImGui_ImplGlfw_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImGui_ImplMetal_RenderDrawData(ImGui::GetDrawData(), commandBuffer, renderEncoder);
-
- [renderEncoder popDebugGroup];
- [renderEncoder endEncoding];
-
- [commandBuffer presentDrawable:drawable];
- [commandBuffer commit];
- }
- }
-
- // Cleanup
- ImGui_ImplMetal_Shutdown();
- ImGui_ImplGlfw_Shutdown();
- ImGui::DestroyContext();
-
- glfwDestroyWindow(window);
- glfwTerminate();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl2/Makefile b/libs/imgui-1.92.1/examples/example_glfw_opengl2/Makefile
deleted file mode 100644
index 1f15c15..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl2/Makefile
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need GLFW (http://www.glfw.org):
-# Linux:
-# apt-get install libglfw-dev
-# Mac OS X:
-# brew install glfw
-# MSYS2:
-# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_glfw_opengl2
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -lGL `pkg-config --static --libs glfw3`
-
- CXXFLAGS += `pkg-config --cflags glfw3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib
- #LIBS += -lglfw3
- LIBS += -lglfw
-
- CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
-
- CXXFLAGS += `pkg-config --cflags glfw3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
-
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl2/build_win32.bat b/libs/imgui-1.92.1/examples/example_glfw_opengl2/build_win32.bat
deleted file mode 100644
index 24c0e08..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl2/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_glfw_opengl2
-@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj b/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
deleted file mode 100644
index 2aa2550..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{9CDA7840-B7A5-496D-A527-E95571496D18}</ProjectGuid>
- <RootNamespace>example_glfw_opengl2</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters b/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters
deleted file mode 100644
index 049b0b1..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl2/main.cpp b/libs/imgui-1.92.1/examples/example_glfw_opengl2/main.cpp
deleted file mode 100644
index 83fcab6..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl2/main.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// Dear ImGui: standalone example application for GLFW + OpenGL2, using legacy fixed pipeline
-// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
-// **Prefer using the code in the example_glfw_opengl2/ folder**
-// See imgui_impl_glfw.cpp for details.
-
-#include "imgui.h"
-#include "imgui_impl_glfw.h"
-#include "imgui_impl_opengl2.h"
-#include <stdio.h>
-#ifdef __APPLE__
-#define GL_SILENCE_DEPRECATION
-#endif
-#include <GLFW/glfw3.h>
-
-// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers.
-// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma.
-// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio.
-#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
-#pragma comment(lib, "legacy_stdio_definitions")
-#endif
-
-static void glfw_error_callback(int error, const char* description)
-{
- fprintf(stderr, "GLFW Error %d: %s\n", error, description);
-}
-
-// Main code
-int main(int, char**)
-{
- glfwSetErrorCallback(glfw_error_callback);
- if (!glfwInit())
- return 1;
-
- // Create window with graphics context
- GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL2 example", nullptr, nullptr);
- if (window == nullptr)
- return 1;
- glfwMakeContextCurrent(window);
- glfwSwapInterval(1); // Enable vsync
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplGlfw_InitForOpenGL(window, true);
- ImGui_ImplOpenGL2_Init();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- while (!glfwWindowShouldClose(window))
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- glfwPollEvents();
- if (glfwGetWindowAttrib(window, GLFW_ICONIFIED) != 0)
- {
- ImGui_ImplGlfw_Sleep(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL2_NewFrame();
- ImGui_ImplGlfw_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- int display_w, display_h;
- glfwGetFramebufferSize(window, &display_w, &display_h);
- glViewport(0, 0, display_w, display_h);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
-
- // If you are using this code with non-legacy OpenGL header/contexts (which you should not, prefer using imgui_impl_opengl3.cpp!!),
- // you may need to backup/reset/restore other state, e.g. for current shader using the commented lines below.
- //GLint last_program;
- //glGetIntegerv(GL_CURRENT_PROGRAM, &last_program);
- //glUseProgram(0);
- ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
- //glUseProgram(last_program);
-
- glfwMakeContextCurrent(window);
- glfwSwapBuffers(window);
- }
-
- // Cleanup
- ImGui_ImplOpenGL2_Shutdown();
- ImGui_ImplGlfw_Shutdown();
- ImGui::DestroyContext();
-
- glfwDestroyWindow(window);
- glfwTerminate();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile b/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile
deleted file mode 100644
index 252ce57..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need GLFW (http://www.glfw.org):
-# Linux:
-# apt-get install libglfw-dev
-# Mac OS X:
-# brew install glfw
-# MSYS2:
-# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_glfw_opengl3
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-LINUX_GL_LIBS = -lGL
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## OPENGL ES
-##---------------------------------------------------------------------
-
-## This assumes a GL ES library available in the system, e.g. libGLESv2.so
-# CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2
-# LINUX_GL_LIBS = -lGLESv2
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += $(LINUX_GL_LIBS) `pkg-config --static --libs glfw3`
-
- CXXFLAGS += `pkg-config --cflags glfw3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib
- #LIBS += -lglfw3
- LIBS += -lglfw
-
- CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
-
- CXXFLAGS += `pkg-config --cflags glfw3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile.emscripten b/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile.emscripten
deleted file mode 100644
index 8d2f6e7..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/Makefile.emscripten
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# Makefile to use with GLFW+emscripten
-# See https://emscripten.org/docs/getting_started/downloads.html
-# for installation instructions.
-#
-# This Makefile assumes you have loaded emscripten's environment.
-# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead)
-#
-# Running `make -f Makefile.emscripten` will produce three files:
-# - web/index.html
-# - web/index.js
-# - web/index.wasm
-#
-# All three are needed to run the demo.
-
-CC = emcc
-CXX = em++
-WEB_DIR = web
-EXE = $(WEB_DIR)/index.html
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-CPPFLAGS =
-LDFLAGS =
-EMS =
-
-##---------------------------------------------------------------------
-## EMSCRIPTEN OPTIONS
-##---------------------------------------------------------------------
-
-# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only)
-# Note: For glfw, we use emscripten-glfw port (contrib.glfw3) instead of ('-s USE_GLFW=3' in LDFLAGS) to get a better support for High DPI displays.
-EMS += -s DISABLE_EXCEPTION_CATCHING=1 --use-port=contrib.glfw3
-LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
-
-# Build as single file (binary text encoded in .html file)
-#LDFLAGS += -sSINGLE_FILE
-
-# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877)
-#EMS += -s BINARYEN_TRAP_MODE=clamp
-#EMS += -s SAFE_HEAP=1 ## Adds overhead
-
-# Emscripten allows preloading a file or folder to be accessible at runtime.
-# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts"
-# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html
-# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.)
-USE_FILE_SYSTEM ?= 0
-ifeq ($(USE_FILE_SYSTEM), 0)
-LDFLAGS += -s NO_FILESYSTEM=1
-CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS
-endif
-ifeq ($(USE_FILE_SYSTEM), 1)
-LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts
-endif
-
-##---------------------------------------------------------------------
-## FINAL BUILD FLAGS
-##---------------------------------------------------------------------
-
-CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-#CPPFLAGS += -g
-CPPFLAGS += -Wall -Wformat -Os $(EMS)
-LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html
-LDFLAGS += $(EMS)
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(EXE)
-
-$(WEB_DIR):
- mkdir $@
-
-serve: all
- python3 -m http.server -d $(WEB_DIR)
-
-$(EXE): $(OBJS) $(WEB_DIR)
- $(CXX) -o $@ $(OBJS) $(LDFLAGS)
-
-clean:
- rm -rf $(OBJS) $(WEB_DIR)
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/build_win32.bat b/libs/imgui-1.92.1/examples/example_glfw_opengl3/build_win32.bat
deleted file mode 100644
index b5979ad..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_glfw_opengl3
-@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj b/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
deleted file mode 100644
index 4bd503a..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{4a1fb5ea-22f5-42a8-ab92-1d2df5d47fb9}</ProjectGuid>
- <RootNamespace>example_glfw_opengl3</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters
deleted file mode 100644
index bc79bb1..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_opengl3/main.cpp b/libs/imgui-1.92.1/examples/example_glfw_opengl3/main.cpp
deleted file mode 100644
index 4bd7bc5..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_opengl3/main.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// Dear ImGui: standalone example application for GLFW + OpenGL 3, using programmable pipeline
-// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_glfw.h"
-#include "imgui_impl_opengl3.h"
-#include <stdio.h>
-#define GL_SILENCE_DEPRECATION
-#if defined(IMGUI_IMPL_OPENGL_ES2)
-#include <GLES2/gl2.h>
-#endif
-#include <GLFW/glfw3.h> // Will drag system OpenGL headers
-
-// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers.
-// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma.
-// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio.
-#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
-#pragma comment(lib, "legacy_stdio_definitions")
-#endif
-
-// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details.
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-static void glfw_error_callback(int error, const char* description)
-{
- fprintf(stderr, "GLFW Error %d: %s\n", error, description);
-}
-
-// Main code
-int main(int, char**)
-{
- glfwSetErrorCallback(glfw_error_callback);
- if (!glfwInit())
- return 1;
-
- // Decide GL+GLSL versions
-#if defined(IMGUI_IMPL_OPENGL_ES2)
- // GL ES 2.0 + GLSL 100 (WebGL 1.0)
- const char* glsl_version = "#version 100";
- glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
- glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
- glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
-#elif defined(IMGUI_IMPL_OPENGL_ES3)
- // GL ES 3.0 + GLSL 300 es (WebGL 2.0)
- const char* glsl_version = "#version 300 es";
- glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
- glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
- glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
-#elif defined(__APPLE__)
- // GL 3.2 + GLSL 150
- const char* glsl_version = "#version 150";
- glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
- glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
- glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
- glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac
-#else
- // GL 3.0 + GLSL 130
- const char* glsl_version = "#version 130";
- glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
- glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
- //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
- //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only
-#endif
-
- // Create window with graphics context
- float main_scale = ImGui_ImplGlfw_GetContentScaleForMonitor(glfwGetPrimaryMonitor()); // Valid on GLFW 3.3+ only
- GLFWwindow* window = glfwCreateWindow((int)(1280 * main_scale), (int)(800 * main_scale), "Dear ImGui GLFW+OpenGL3 example", nullptr, nullptr);
- if (window == nullptr)
- return 1;
- glfwMakeContextCurrent(window);
- glfwSwapInterval(1); // Enable vsync
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplGlfw_InitForOpenGL(window, true);
-#ifdef __EMSCRIPTEN__
- ImGui_ImplGlfw_InstallEmscriptenCallbacks(window, "#canvas");
-#endif
- ImGui_ImplOpenGL3_Init(glsl_version);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details.
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
-#ifdef __EMSCRIPTEN__
- // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
- // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
- io.IniFilename = nullptr;
- EMSCRIPTEN_MAINLOOP_BEGIN
-#else
- while (!glfwWindowShouldClose(window))
-#endif
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- glfwPollEvents();
- if (glfwGetWindowAttrib(window, GLFW_ICONIFIED) != 0)
- {
- ImGui_ImplGlfw_Sleep(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL3_NewFrame();
- ImGui_ImplGlfw_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- int display_w, display_h;
- glfwGetFramebufferSize(window, &display_w, &display_h);
- glViewport(0, 0, display_w, display_h);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
-
- glfwSwapBuffers(window);
- }
-#ifdef __EMSCRIPTEN__
- EMSCRIPTEN_MAINLOOP_END;
-#endif
-
- // Cleanup
- ImGui_ImplOpenGL3_Shutdown();
- ImGui_ImplGlfw_Shutdown();
- ImGui::DestroyContext();
-
- glfwDestroyWindow(window);
- glfwTerminate();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/CMakeLists.txt b/libs/imgui-1.92.1/examples/example_glfw_vulkan/CMakeLists.txt
deleted file mode 100644
index 75475db..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-# Example usage:
-# mkdir build
-# cd build
-# cmake -g "Visual Studio 14 2015" ..
-
-cmake_minimum_required(VERSION 2.8)
-project(imgui_example_glfw_vulkan C CXX)
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
-endif()
-
-set(CMAKE_CXX_STANDARD 11)
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES")
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES")
-
-# GLFW
-if(NOT GLFW_DIR)
- set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo
-endif()
-option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
-option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
-option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
-option(GLFW_INSTALL "Generate installation target" OFF)
-option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
-add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL)
-include_directories(${GLFW_DIR}/include)
-
-# Dear ImGui
-set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends ..)
-
-# Libraries
-find_package(Vulkan REQUIRED)
-#find_library(VULKAN_LIBRARY
- #NAMES vulkan vulkan-1)
-#set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
-set(LIBRARIES "glfw;Vulkan::Vulkan")
-
-# Use vulkan headers from glfw:
-include_directories(${GLFW_DIR}/deps)
-
-file(GLOB sources *.cpp)
-
-add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp)
-target_link_libraries(example_glfw_vulkan ${LIBRARIES})
-
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/Makefile b/libs/imgui-1.92.1/examples/example_glfw_vulkan/Makefile
deleted file mode 100644
index 1a84082..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/Makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need GLFW (http://www.glfw.org):
-# Linux:
-# apt-get install libglfw-dev
-# Mac OS X:
-# brew install glfw
-# MSYS2:
-# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_glfw_vulkan
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_vulkan.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-LINUX_GL_LIBS = -lGL
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += $(LINUX_GL_LIBS) `pkg-config --static --libs glfw3 vulkan`
-
- CXXFLAGS += `pkg-config --cflags glfw3 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += `pkg-config --libs glfw3 vulkan`
- LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib
- #LIBS += -lglfw3
-
- LIBS += `pkg-config --cflags glfw3 vulkan`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -limm32
- LIBS += `pkg-config --libs glfw3 vulkan`
-
- CXXFLAGS += `pkg-config --cflags glfw3 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win32.bat b/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win32.bat
deleted file mode 100644
index bb54a42..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win32.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_glfw_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
-
-@set OUT_DIR=Release
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win64.bat b/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win64.bat
deleted file mode 100644
index ca9b788..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/build_win64.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup 64-bit command-line compiler.
-
-@set OUT_EXE=example_glfw_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
-
-@set OUT_DIR=Release
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj b/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
deleted file mode 100644
index a81d328..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{57E2DF5A-6FC8-45BB-99DD-91A18C646E80}</ProjectGuid>
- <RootNamespace>example_glfw_vulkan</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;..\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;..\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h" />
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters b/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters
deleted file mode 100644
index 510fc85..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_glfw.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_glfw.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glfw_vulkan/main.cpp b/libs/imgui-1.92.1/examples/example_glfw_vulkan/main.cpp
deleted file mode 100644
index 19766b9..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_vulkan/main.cpp
+++ /dev/null
@@ -1,534 +0,0 @@
-// Dear ImGui: standalone example application for Glfw + Vulkan
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-#include "imgui.h"
-#include "imgui_impl_glfw.h"
-#include "imgui_impl_vulkan.h"
-#include <stdio.h> // printf, fprintf
-#include <stdlib.h> // abort
-#define GLFW_INCLUDE_NONE
-#define GLFW_INCLUDE_VULKAN
-#include <GLFW/glfw3.h>
-
-// Volk headers
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
-#define VOLK_IMPLEMENTATION
-#include <volk.h>
-#endif
-
-// [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers.
-// To link with VS2010-era libraries, VS2015+ requires linking with legacy_stdio_definitions.lib, which we do using this pragma.
-// Your own project should not be affected, as you are likely to link with a newer binary of GLFW that is adequate for your version of Visual Studio.
-#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
-#pragma comment(lib, "legacy_stdio_definitions")
-#endif
-
-//#define APP_USE_UNLIMITED_FRAME_RATE
-#ifdef _DEBUG
-#define APP_USE_VULKAN_DEBUG_REPORT
-static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
-#endif
-
-// Data
-static VkAllocationCallbacks* g_Allocator = nullptr;
-static VkInstance g_Instance = VK_NULL_HANDLE;
-static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
-static VkDevice g_Device = VK_NULL_HANDLE;
-static uint32_t g_QueueFamily = (uint32_t)-1;
-static VkQueue g_Queue = VK_NULL_HANDLE;
-static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
-static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
-
-static ImGui_ImplVulkanH_Window g_MainWindowData;
-static uint32_t g_MinImageCount = 2;
-static bool g_SwapChainRebuild = false;
-
-static void glfw_error_callback(int error, const char* description)
-{
- fprintf(stderr, "GLFW Error %d: %s\n", error, description);
-}
-static void check_vk_result(VkResult err)
-{
- if (err == VK_SUCCESS)
- return;
- fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err);
- if (err < 0)
- abort();
-}
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
-static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
-{
- (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
- fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
- return VK_FALSE;
-}
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
-static bool IsExtensionAvailable(const ImVector<VkExtensionProperties>& properties, const char* extension)
-{
- for (const VkExtensionProperties& p : properties)
- if (strcmp(p.extensionName, extension) == 0)
- return true;
- return false;
-}
-
-static void SetupVulkan(ImVector<const char*> instance_extensions)
-{
- VkResult err;
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkInitialize();
-#endif
-
- // Create Vulkan Instance
- {
- VkInstanceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-
- // Enumerate available extensions
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data);
- check_vk_result(err);
-
- // Enable required extensions
- if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
- instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
-#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
- {
- instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
- create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
- }
-#endif
-
- // Enabling validation layers
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
- create_info.enabledLayerCount = 1;
- create_info.ppEnabledLayerNames = layers;
- instance_extensions.push_back("VK_EXT_debug_report");
-#endif
-
- // Create Vulkan Instance
- create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size;
- create_info.ppEnabledExtensionNames = instance_extensions.Data;
- err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
- check_vk_result(err);
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkLoadInstance(g_Instance);
-#endif
-
- // Setup the debug report callback
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
- IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr);
- VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
- debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
- debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
- debug_report_ci.pfnCallback = debug_report;
- debug_report_ci.pUserData = nullptr;
- err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
- check_vk_result(err);
-#endif
- }
-
- // Select Physical Device (GPU)
- g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance);
- IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE);
-
- // Select graphics queue family
- g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice);
- IM_ASSERT(g_QueueFamily != (uint32_t)-1);
-
- // Create Logical Device (with 1 queue)
- {
- ImVector<const char*> device_extensions;
- device_extensions.push_back("VK_KHR_swapchain");
-
- // Enumerate physical device extension
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data);
-#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))
- device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
-#endif
-
- const float queue_priority[] = { 1.0f };
- VkDeviceQueueCreateInfo queue_info[1] = {};
- queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queue_info[0].queueFamilyIndex = g_QueueFamily;
- queue_info[0].queueCount = 1;
- queue_info[0].pQueuePriorities = queue_priority;
- VkDeviceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
- create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
- create_info.pQueueCreateInfos = queue_info;
- create_info.enabledExtensionCount = (uint32_t)device_extensions.Size;
- create_info.ppEnabledExtensionNames = device_extensions.Data;
- err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
- check_vk_result(err);
- vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
- }
-
- // Create Descriptor Pool
- // If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets.
- {
- VkDescriptorPoolSize pool_sizes[] =
- {
- { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE },
- };
- VkDescriptorPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
- pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
- pool_info.maxSets = 0;
- for (VkDescriptorPoolSize& pool_size : pool_sizes)
- pool_info.maxSets += pool_size.descriptorCount;
- pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
- pool_info.pPoolSizes = pool_sizes;
- err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
- check_vk_result(err);
- }
-}
-
-// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo.
-// Your real engine/app may not use them.
-static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height)
-{
- wd->Surface = surface;
-
- // Check for WSI support
- VkBool32 res;
- vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
- if (res != VK_TRUE)
- {
- fprintf(stderr, "Error no WSI support on physical device 0\n");
- exit(-1);
- }
-
- // Select Surface Format
- const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
- const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
- wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
-
- // Select Present Mode
-#ifdef APP_USE_UNLIMITED_FRAME_RATE
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
-#else
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
-#endif
- wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
- //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
-
- // Create SwapChain, RenderPass, Framebuffer, etc.
- IM_ASSERT(g_MinImageCount >= 2);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
-}
-
-static void CleanupVulkan()
-{
- vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- // Remove the debug report callback
- auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
- f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
- vkDestroyDevice(g_Device, g_Allocator);
- vkDestroyInstance(g_Instance, g_Allocator);
-}
-
-static void CleanupVulkanWindow()
-{
- ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator);
-}
-
-static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
-{
- VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
-
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex];
- {
- err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
- check_vk_result(err);
-
- err = vkResetFences(g_Device, 1, &fd->Fence);
- check_vk_result(err);
- }
- {
- err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
- check_vk_result(err);
- VkCommandBufferBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
- check_vk_result(err);
- }
- {
- VkRenderPassBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- info.renderPass = wd->RenderPass;
- info.framebuffer = fd->Framebuffer;
- info.renderArea.extent.width = wd->Width;
- info.renderArea.extent.height = wd->Height;
- info.clearValueCount = 1;
- info.pClearValues = &wd->ClearValue;
- vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
- }
-
- // Record dear imgui primitives into command buffer
- ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer);
-
- // Submit command buffer
- vkCmdEndRenderPass(fd->CommandBuffer);
- {
- VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- VkSubmitInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &image_acquired_semaphore;
- info.pWaitDstStageMask = &wait_stage;
- info.commandBufferCount = 1;
- info.pCommandBuffers = &fd->CommandBuffer;
- info.signalSemaphoreCount = 1;
- info.pSignalSemaphores = &render_complete_semaphore;
-
- err = vkEndCommandBuffer(fd->CommandBuffer);
- check_vk_result(err);
- err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
- check_vk_result(err);
- }
-}
-
-static void FramePresent(ImGui_ImplVulkanH_Window* wd)
-{
- if (g_SwapChainRebuild)
- return;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkPresentInfoKHR info = {};
- info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &render_complete_semaphore;
- info.swapchainCount = 1;
- info.pSwapchains = &wd->Swapchain;
- info.pImageIndices = &wd->FrameIndex;
- VkResult err = vkQueuePresentKHR(g_Queue, &info);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
- wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
-}
-
-// Main code
-int main(int, char**)
-{
- glfwSetErrorCallback(glfw_error_callback);
- if (!glfwInit())
- return 1;
-
- // Create window with Vulkan context
- glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
- GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Vulkan example", nullptr, nullptr);
- if (!glfwVulkanSupported())
- {
- printf("GLFW: Vulkan Not Supported\n");
- return 1;
- }
-
- ImVector<const char*> extensions;
- uint32_t extensions_count = 0;
- const char** glfw_extensions = glfwGetRequiredInstanceExtensions(&extensions_count);
- for (uint32_t i = 0; i < extensions_count; i++)
- extensions.push_back(glfw_extensions[i]);
- SetupVulkan(extensions);
-
- // Create Window Surface
- VkSurfaceKHR surface;
- VkResult err = glfwCreateWindowSurface(g_Instance, window, g_Allocator, &surface);
- check_vk_result(err);
-
- // Create Framebuffers
- int w, h;
- glfwGetFramebufferSize(window, &w, &h);
- ImGui_ImplVulkanH_Window* wd = &g_MainWindowData;
- SetupVulkanWindow(wd, surface, w, h);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplGlfw_InitForVulkan(window, true);
- ImGui_ImplVulkan_InitInfo init_info = {};
- //init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
- init_info.Instance = g_Instance;
- init_info.PhysicalDevice = g_PhysicalDevice;
- init_info.Device = g_Device;
- init_info.QueueFamily = g_QueueFamily;
- init_info.Queue = g_Queue;
- init_info.PipelineCache = g_PipelineCache;
- init_info.DescriptorPool = g_DescriptorPool;
- init_info.RenderPass = wd->RenderPass;
- init_info.Subpass = 0;
- init_info.MinImageCount = g_MinImageCount;
- init_info.ImageCount = wd->ImageCount;
- init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
- init_info.Allocator = g_Allocator;
- init_info.CheckVkResultFn = check_vk_result;
- ImGui_ImplVulkan_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- while (!glfwWindowShouldClose(window))
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- glfwPollEvents();
-
- // Resize swap chain?
- int fb_width, fb_height;
- glfwGetFramebufferSize(window, &fb_width, &fb_height);
- if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height))
- {
- ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount);
- g_MainWindowData.FrameIndex = 0;
- g_SwapChainRebuild = false;
- }
- if (glfwGetWindowAttrib(window, GLFW_ICONIFIED) != 0)
- {
- ImGui_ImplGlfw_Sleep(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplVulkan_NewFrame();
- ImGui_ImplGlfw_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
- const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
- if (!is_minimized)
- {
- wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w;
- wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w;
- wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w;
- wd->ClearValue.color.float32[3] = clear_color.w;
- FrameRender(wd, draw_data);
- FramePresent(wd);
- }
- }
-
- // Cleanup
- err = vkDeviceWaitIdle(g_Device);
- check_vk_result(err);
- ImGui_ImplVulkan_Shutdown();
- ImGui_ImplGlfw_Shutdown();
- ImGui::DestroyContext();
-
- CleanupVulkanWindow();
- CleanupVulkan();
-
- glfwDestroyWindow(window);
- glfwTerminate();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_glfw_wgpu/CMakeLists.txt b/libs/imgui-1.92.1/examples/example_glfw_wgpu/CMakeLists.txt
deleted file mode 100644
index 8e164e4..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_wgpu/CMakeLists.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-# Building for desktop (WebGPU-native) with Dawn:
-# 1. git clone https://github.com/google/dawn dawn
-# 2. cmake -B build -DIMGUI_DAWN_DIR=dawn
-# 3. cmake --build build
-# The resulting binary will be found at one of the following locations:
-# * build/Debug/example_glfw_wgpu[.exe]
-# * build/example_glfw_wgpu[.exe]
-
-# Building for Emscripten:
-# 1. Install Emscripten SDK following the instructions: https://emscripten.org/docs/getting_started/downloads.html
-# 2. Install Ninja build system
-# 3. emcmake cmake -G Ninja -B build
-# 3. cmake --build build
-# 4. emrun build/index.html
-
-cmake_minimum_required(VERSION 3.10.2)
-project(imgui_example_glfw_wgpu C CXX)
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
-endif()
-
-set(CMAKE_CXX_STANDARD 17) # Dawn requires C++17
-
-# Dear ImGui
-set(IMGUI_DIR ../../)
-
-# Libraries
-if(EMSCRIPTEN)
- if(EMSCRIPTEN_VERSION VERSION_GREATER_EQUAL "3.1.57")
- set(IMGUI_EMSCRIPTEN_GLFW3 "--use-port=contrib.glfw3" CACHE STRING "Choose between --use-port=contrib.glfw3 and -sUSE_GLFW=3 for GLFW implementation (default to --use-port=contrib.glfw3)")
- else()
- # cannot use contrib.glfw3 prior to 3.1.57
- set(IMGUI_EMSCRIPTEN_GLFW3 "-sUSE_GLFW=3" CACHE STRING "Use -sUSE_GLFW=3 for GLFW implementation" FORCE)
- endif()
- set(LIBRARIES glfw)
- add_compile_options(-sDISABLE_EXCEPTION_CATCHING=1 -DIMGUI_DISABLE_FILE_FUNCTIONS=1)
-else()
- # Dawn wgpu desktop
- set(DAWN_FETCH_DEPENDENCIES ON)
- set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository")
- if (NOT IMGUI_DAWN_DIR)
- message(FATAL_ERROR "Please specify the Dawn repository by setting IMGUI_DAWN_DIR")
- endif()
-
- option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
-
- # Dawn builds many things by default - disable things we don't need
- option(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" OFF)
- option(TINT_BUILD_CMD_TOOLS "Build the Tint command line tools" OFF)
- option(TINT_BUILD_DOCS "Build documentation" OFF)
- option(TINT_BUILD_TESTS "Build tests" OFF)
- if (NOT APPLE)
- option(TINT_BUILD_MSL_WRITER "Build the MSL output writer" OFF)
- endif()
- if(WIN32)
- option(TINT_BUILD_SPV_READER "Build the SPIR-V input reader" OFF)
- option(TINT_BUILD_WGSL_READER "Build the WGSL input reader" ON)
- option(TINT_BUILD_GLSL_WRITER "Build the GLSL output writer" OFF)
- option(TINT_BUILD_GLSL_VALIDATOR "Build the GLSL output validator" OFF)
- option(TINT_BUILD_SPV_WRITER "Build the SPIR-V output writer" OFF)
- option(TINT_BUILD_WGSL_WRITER "Build the WGSL output writer" ON)
- endif()
-
- add_subdirectory("${IMGUI_DAWN_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/dawn" EXCLUDE_FROM_ALL)
-
- set(LIBRARIES webgpu_dawn webgpu_cpp webgpu_glfw glfw)
-endif()
-
-add_executable(example_glfw_wgpu
- main.cpp
- # backend files
- ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp
- ${IMGUI_DIR}/backends/imgui_impl_wgpu.cpp
- # Dear ImGui files
- ${IMGUI_DIR}/imgui.cpp
- ${IMGUI_DIR}/imgui_draw.cpp
- ${IMGUI_DIR}/imgui_demo.cpp
- ${IMGUI_DIR}/imgui_tables.cpp
- ${IMGUI_DIR}/imgui_widgets.cpp
-)
-IF(NOT EMSCRIPTEN)
- target_compile_definitions(example_glfw_wgpu PUBLIC
- "IMGUI_IMPL_WEBGPU_BACKEND_DAWN"
- )
-endif()
-target_include_directories(example_glfw_wgpu PUBLIC
- ${IMGUI_DIR}
- ${IMGUI_DIR}/backends
-)
-
-target_link_libraries(example_glfw_wgpu PUBLIC ${LIBRARIES})
-
-# Emscripten settings
-if(EMSCRIPTEN)
- if("${IMGUI_EMSCRIPTEN_GLFW3}" STREQUAL "--use-port=contrib.glfw3")
- target_compile_options(example_glfw_wgpu PUBLIC
- "${IMGUI_EMSCRIPTEN_GLFW3}"
- )
- endif()
- message(STATUS "Using ${IMGUI_EMSCRIPTEN_GLFW3} GLFW implementation")
- target_link_options(example_glfw_wgpu PRIVATE
- "-sUSE_WEBGPU=1"
- "${IMGUI_EMSCRIPTEN_GLFW3}"
- "-sWASM=1"
- "-sALLOW_MEMORY_GROWTH=1"
- "-sNO_EXIT_RUNTIME=0"
- "-sASSERTIONS=1"
- "-sDISABLE_EXCEPTION_CATCHING=1"
- "-sNO_FILESYSTEM=1"
- )
- set_target_properties(example_glfw_wgpu PROPERTIES OUTPUT_NAME "index")
- # copy our custom index.html to build directory
- add_custom_command(TARGET example_glfw_wgpu POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_LIST_DIR}/web/index.html" $<TARGET_FILE_DIR:example_glfw_wgpu>
- )
-endif()
diff --git a/libs/imgui-1.92.1/examples/example_glfw_wgpu/Makefile.emscripten b/libs/imgui-1.92.1/examples/example_glfw_wgpu/Makefile.emscripten
deleted file mode 100644
index 8ee398b..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_wgpu/Makefile.emscripten
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# Makefile to use with emscripten
-# See https://emscripten.org/docs/getting_started/downloads.html
-# for installation instructions.
-#
-# This Makefile assumes you have loaded emscripten's environment.
-# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead)
-#
-# Running `make` will produce three files:
-# - web/index.html (current stored in the repository)
-# - web/index.js
-# - web/index.wasm
-#
-# All three are needed to run the demo.
-
-CC = emcc
-CXX = em++
-WEB_DIR = web
-EXE = $(WEB_DIR)/index.js
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_wgpu.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-CPPFLAGS =
-LDFLAGS =
-EMS =
-
-##---------------------------------------------------------------------
-## EMSCRIPTEN OPTIONS
-##---------------------------------------------------------------------
-
-# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only)
-# Note: For glfw, we use emscripten-glfw port (contrib.glfw3) instead of (-s USE_GLFW=3) to get a better support for High DPI displays.
-EMS += -s DISABLE_EXCEPTION_CATCHING=1 --use-port=contrib.glfw3
-LDFLAGS += -s USE_WEBGPU=1
-LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
-
-# Build as single file (binary text encoded in .html file)
-#LDFLAGS += -sSINGLE_FILE
-
-# Emscripten allows preloading a file or folder to be accessible at runtime.
-# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts"
-# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html
-# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.)
-USE_FILE_SYSTEM ?= 0
-ifeq ($(USE_FILE_SYSTEM), 0)
-LDFLAGS += -s NO_FILESYSTEM=1
-CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS
-endif
-ifeq ($(USE_FILE_SYSTEM), 1)
-LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts
-endif
-
-##---------------------------------------------------------------------
-## FINAL BUILD FLAGS
-##---------------------------------------------------------------------
-
-CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-#CPPFLAGS += -g
-CPPFLAGS += -Wall -Wformat -Os $(EMS)
-#LDFLAGS += --shell-file shell_minimal.html
-LDFLAGS += $(EMS)
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(EXE)
-
-$(WEB_DIR):
- mkdir $@
-
-serve: all
- python3 -m http.server -d $(WEB_DIR)
-
-$(EXE): $(OBJS) $(WEB_DIR)
- $(CXX) -o $@ $(OBJS) $(LDFLAGS)
-
-clean:
- rm -f $(EXE) $(OBJS) $(WEB_DIR)/*.js $(WEB_DIR)/*.wasm $(WEB_DIR)/*.wasm.pre
diff --git a/libs/imgui-1.92.1/examples/example_glfw_wgpu/README.md b/libs/imgui-1.92.1/examples/example_glfw_wgpu/README.md
deleted file mode 100644
index 399d431..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_wgpu/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## How to Build
-
-- You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions
-
-- Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools.
-
-- You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup.
-
-- Then build using `make -f Makefile.emscripten` while in the `example_glfw_wgpu/` directory.
-
-- Requires recent Emscripten as WGPU is still a work-in-progress API.
-
-## How to Run
-
-To run on a local machine:
-- Make sure your browse supports WGPU and it is enabled. WGPU is still WIP not enabled by default in most browser.
-- `make serve` will use Python3 to spawn a local webserver, you can then browse http://localhost:8000 to access your build.
-- Otherwise, generally you will need a local webserver:
- - Quoting [https://emscripten.org/docs/getting_started](https://emscripten.org/docs/getting_started/Tutorial.html#generating-html):<br>
-_"Unfortunately several browsers (including Chrome, Safari, and Internet Explorer) do not support file:// [XHR](https://emscripten.org/docs/site/glossary.html#term-xhr) requests, and can’t load extra files needed by the HTML (like a .wasm file, or packaged file data as mentioned lower down). For these browsers you’ll need to serve the files using a [local webserver](https://emscripten.org/docs/getting_started/FAQ.html#faq-local-webserver) and then open http://localhost:8000/hello.html."_
- - Emscripten SDK has a handy `emrun` command: `emrun web/example_glfw_wgpu.html --browser firefox` which will spawn a temporary local webserver (in Firefox). See https://emscripten.org/docs/compiling/Running-html-files-with-emrun.html for details.
- - You may use Python 3 builtin webserver: `python -m http.server -d web` (this is what `make serve` uses).
- - You may use Python 2 builtin webserver: `cd web && python -m SimpleHTTPServer`.
- - If you are accessing the files over a network, certain browsers, such as Firefox, will restrict Gamepad API access to secure contexts only (e.g. https only).
diff --git a/libs/imgui-1.92.1/examples/example_glfw_wgpu/main.cpp b/libs/imgui-1.92.1/examples/example_glfw_wgpu/main.cpp
deleted file mode 100644
index c150b59..0000000
--- a/libs/imgui-1.92.1/examples/example_glfw_wgpu/main.cpp
+++ /dev/null
@@ -1,350 +0,0 @@
-// Dear ImGui: standalone example application for using GLFW + WebGPU
-// - Emscripten is supported for publishing on web. See https://emscripten.org.
-// - Dawn is used as a WebGPU implementation on desktop.
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_glfw.h"
-#include "imgui_impl_wgpu.h"
-#include <stdio.h>
-
-#ifdef __EMSCRIPTEN__
-#include <emscripten.h>
-#include <emscripten/html5.h>
-#include <emscripten/html5_webgpu.h>
-#else
-#include <webgpu/webgpu_glfw.h>
-#endif
-
-#include <GLFW/glfw3.h>
-#include <webgpu/webgpu.h>
-#include <webgpu/webgpu_cpp.h>
-
-// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details.
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Global WebGPU required states
-static WGPUInstance wgpu_instance = nullptr;
-static WGPUDevice wgpu_device = nullptr;
-static WGPUSurface wgpu_surface = nullptr;
-static WGPUTextureFormat wgpu_preferred_fmt = WGPUTextureFormat_RGBA8Unorm;
-static WGPUSwapChain wgpu_swap_chain = nullptr;
-static int wgpu_swap_chain_width = 1280;
-static int wgpu_swap_chain_height = 720;
-
-// Forward declarations
-static bool InitWGPU(GLFWwindow* window);
-static void CreateSwapChain(int width, int height);
-
-static void glfw_error_callback(int error, const char* description)
-{
- printf("GLFW Error %d: %s\n", error, description);
-}
-
-static void wgpu_error_callback(WGPUErrorType error_type, const char* message, void*)
-{
- const char* error_type_lbl = "";
- switch (error_type)
- {
- case WGPUErrorType_Validation: error_type_lbl = "Validation"; break;
- case WGPUErrorType_OutOfMemory: error_type_lbl = "Out of memory"; break;
- case WGPUErrorType_Unknown: error_type_lbl = "Unknown"; break;
- case WGPUErrorType_DeviceLost: error_type_lbl = "Device lost"; break;
- default: error_type_lbl = "Unknown";
- }
- printf("%s error: %s\n", error_type_lbl, message);
-}
-
-// Main code
-int main(int, char**)
-{
- glfwSetErrorCallback(glfw_error_callback);
- if (!glfwInit())
- return 1;
-
- // Make sure GLFW does not initialize any graphics context.
- // This needs to be done explicitly later.
- glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
- GLFWwindow* window = glfwCreateWindow(wgpu_swap_chain_width, wgpu_swap_chain_height, "Dear ImGui GLFW+WebGPU example", nullptr, nullptr);
- if (window == nullptr)
- return 1;
-
- // Initialize the WebGPU environment
- if (!InitWGPU(window))
- {
- if (window)
- glfwDestroyWindow(window);
- glfwTerminate();
- return 1;
- }
- CreateSwapChain(wgpu_swap_chain_width, wgpu_swap_chain_height);
- glfwShowWindow(window);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplGlfw_InitForOther(window, true);
-#ifdef __EMSCRIPTEN__
- ImGui_ImplGlfw_InstallEmscriptenCallbacks(window, "#canvas");
-#endif
- ImGui_ImplWGPU_InitInfo init_info;
- init_info.Device = wgpu_device;
- init_info.NumFramesInFlight = 3;
- init_info.RenderTargetFormat = wgpu_preferred_fmt;
- init_info.DepthStencilFormat = WGPUTextureFormat_Undefined;
- ImGui_ImplWGPU_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Emscripten allows preloading a file or folder to be accessible at runtime. See Makefile for details.
- //io.Fonts->AddFontDefault();
- //style.FontSizeBase = 20.0f;
-#ifndef IMGUI_DISABLE_FILE_FUNCTIONS
- //io.Fonts->AddFontFromFileTTF("fonts/segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("fonts/Cousine-Regular.ttf");
- //io.Fonts->AddFontFromFileTTF("fonts/ProggyTiny.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("fonts/ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-#endif
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
-#ifdef __EMSCRIPTEN__
- // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
- // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
- io.IniFilename = nullptr;
- EMSCRIPTEN_MAINLOOP_BEGIN
-#else
- while (!glfwWindowShouldClose(window))
-#endif
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- glfwPollEvents();
- if (glfwGetWindowAttrib(window, GLFW_ICONIFIED) != 0)
- {
- ImGui_ImplGlfw_Sleep(10);
- continue;
- }
-
- // React to changes in screen size
- int width, height;
- glfwGetFramebufferSize((GLFWwindow*)window, &width, &height);
- if (width != wgpu_swap_chain_width || height != wgpu_swap_chain_height)
- {
- ImGui_ImplWGPU_InvalidateDeviceObjects();
- CreateSwapChain(width, height);
- ImGui_ImplWGPU_CreateDeviceObjects();
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplWGPU_NewFrame();
- ImGui_ImplGlfw_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
-
-#ifndef __EMSCRIPTEN__
- // Tick needs to be called in Dawn to display validation errors
- wgpuDeviceTick(wgpu_device);
-#endif
-
- WGPURenderPassColorAttachment color_attachments = {};
- color_attachments.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
- color_attachments.loadOp = WGPULoadOp_Clear;
- color_attachments.storeOp = WGPUStoreOp_Store;
- color_attachments.clearValue = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
- color_attachments.view = wgpuSwapChainGetCurrentTextureView(wgpu_swap_chain);
-
- WGPURenderPassDescriptor render_pass_desc = {};
- render_pass_desc.colorAttachmentCount = 1;
- render_pass_desc.colorAttachments = &color_attachments;
- render_pass_desc.depthStencilAttachment = nullptr;
-
- WGPUCommandEncoderDescriptor enc_desc = {};
- WGPUCommandEncoder encoder = wgpuDeviceCreateCommandEncoder(wgpu_device, &enc_desc);
-
- WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &render_pass_desc);
- ImGui_ImplWGPU_RenderDrawData(ImGui::GetDrawData(), pass);
- wgpuRenderPassEncoderEnd(pass);
-
- WGPUCommandBufferDescriptor cmd_buffer_desc = {};
- WGPUCommandBuffer cmd_buffer = wgpuCommandEncoderFinish(encoder, &cmd_buffer_desc);
- WGPUQueue queue = wgpuDeviceGetQueue(wgpu_device);
- wgpuQueueSubmit(queue, 1, &cmd_buffer);
-
-#ifndef __EMSCRIPTEN__
- wgpuSwapChainPresent(wgpu_swap_chain);
-#endif
-
- wgpuTextureViewRelease(color_attachments.view);
- wgpuRenderPassEncoderRelease(pass);
- wgpuCommandEncoderRelease(encoder);
- wgpuCommandBufferRelease(cmd_buffer);
- }
-#ifdef __EMSCRIPTEN__
- EMSCRIPTEN_MAINLOOP_END;
-#endif
-
- // Cleanup
- ImGui_ImplWGPU_Shutdown();
- ImGui_ImplGlfw_Shutdown();
- ImGui::DestroyContext();
-
- glfwDestroyWindow(window);
- glfwTerminate();
-
- return 0;
-}
-
-#ifndef __EMSCRIPTEN__
-static WGPUAdapter RequestAdapter(WGPUInstance instance)
-{
- auto onAdapterRequestEnded = [](WGPURequestAdapterStatus status, WGPUAdapter adapter, const char* message, void* pUserData)
- {
- if (status == WGPURequestAdapterStatus_Success)
- *(WGPUAdapter*)(pUserData) = adapter;
- else
- printf("Could not get WebGPU adapter: %s\n", message);
-};
- WGPUAdapter adapter;
- wgpuInstanceRequestAdapter(instance, nullptr, onAdapterRequestEnded, (void*)&adapter);
- return adapter;
-}
-
-static WGPUDevice RequestDevice(WGPUAdapter& adapter)
-{
- auto onDeviceRequestEnded = [](WGPURequestDeviceStatus status, WGPUDevice device, const char* message, void* pUserData)
- {
- if (status == WGPURequestDeviceStatus_Success)
- *(WGPUDevice*)(pUserData) = device;
- else
- printf("Could not get WebGPU device: %s\n", message);
- };
- WGPUDevice device;
- wgpuAdapterRequestDevice(adapter, nullptr, onDeviceRequestEnded, (void*)&device);
- return device;
-}
-#endif
-
-static bool InitWGPU(GLFWwindow* window)
-{
- wgpu::Instance instance = wgpuCreateInstance(nullptr);
-
-#ifdef __EMSCRIPTEN__
- wgpu_device = emscripten_webgpu_get_device();
- if (!wgpu_device)
- return false;
-#else
- WGPUAdapter adapter = RequestAdapter(instance.Get());
- if (!adapter)
- return false;
- wgpu_device = RequestDevice(adapter);
-#endif
-
-#ifdef __EMSCRIPTEN__
- wgpu::SurfaceDescriptorFromCanvasHTMLSelector html_surface_desc = {};
- html_surface_desc.selector = "#canvas";
- wgpu::SurfaceDescriptor surface_desc = {};
- surface_desc.nextInChain = &html_surface_desc;
- wgpu::Surface surface = instance.CreateSurface(&surface_desc);
-
- wgpu::Adapter adapter = {};
- wgpu_preferred_fmt = (WGPUTextureFormat)surface.GetPreferredFormat(adapter);
-#else
- wgpu::Surface surface = wgpu::glfw::CreateSurfaceForWindow(instance, window);
- if (!surface)
- return false;
- wgpu_preferred_fmt = WGPUTextureFormat_BGRA8Unorm;
-#endif
-
- wgpu_instance = instance.MoveToCHandle();
- wgpu_surface = surface.MoveToCHandle();
-
- wgpuDeviceSetUncapturedErrorCallback(wgpu_device, wgpu_error_callback, nullptr);
-
- return true;
-}
-
-static void CreateSwapChain(int width, int height)
-{
- if (wgpu_swap_chain)
- wgpuSwapChainRelease(wgpu_swap_chain);
- wgpu_swap_chain_width = width;
- wgpu_swap_chain_height = height;
- WGPUSwapChainDescriptor swap_chain_desc = {};
- swap_chain_desc.usage = WGPUTextureUsage_RenderAttachment;
- swap_chain_desc.format = wgpu_preferred_fmt;
- swap_chain_desc.width = width;
- swap_chain_desc.height = height;
- swap_chain_desc.presentMode = WGPUPresentMode_Fifo;
- wgpu_swap_chain = wgpuDeviceCreateSwapChain(wgpu_device, wgpu_surface, &swap_chain_desc);
-}
diff --git a/libs/imgui-1.92.1/examples/example_glut_opengl2/Makefile b/libs/imgui-1.92.1/examples/example_glut_opengl2/Makefile
deleted file mode 100644
index 7af289d..0000000
--- a/libs/imgui-1.92.1/examples/example_glut_opengl2/Makefile
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# Linux:
-# apt-get install freeglut3-dev
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_glut_opengl2
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glut.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -lGL -lglut
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework GLUT
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32
-ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes)
- CXXFLAGS += $(shell pkg-config freeglut --cflags)
- LIBS += $(shell pkg-config freeglut --libs)
-else
- LIBS += -lglut
-endif
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj b/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj
deleted file mode 100644
index c56452b..0000000
--- a/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F90D0333-5FB1-440D-918D-DD39A1B5187E}</ProjectGuid>
- <RootNamespace>example_glut_opengl2</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>$(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;freeglut.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>$(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;freeglut.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;freeglut.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;freeglut.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_glut.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_glut.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters b/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters
deleted file mode 100644
index 0ac4a0b..0000000
--- a/libs/imgui-1.92.1/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_glut.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_glut.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_glut_opengl2/main.cpp b/libs/imgui-1.92.1/examples/example_glut_opengl2/main.cpp
deleted file mode 100644
index 69f85a2..0000000
--- a/libs/imgui-1.92.1/examples/example_glut_opengl2/main.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// Dear ImGui: standalone example application for GLUT/FreeGLUT + OpenGL2, using legacy fixed pipeline
-
-// 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
-
-// !!! GLUT/FreeGLUT IS OBSOLETE PREHISTORIC SOFTWARE. Using GLUT is not recommended unless you really miss the 90's. !!!
-// !!! If someone or something is teaching you GLUT today, you are being abused. Please show some resistance. !!!
-// !!! Nowadays, prefer using GLFW or SDL instead!
-
-// On Windows, you can install Freeglut using vcpkg:
-// git clone https://github.com/Microsoft/vcpkg
-// cd vcpkg
-// bootstrap - vcpkg.bat
-// vcpkg install freeglut --triplet=x86-windows ; for win32
-// vcpkg install freeglut --triplet=x64-windows ; for win64
-// vcpkg integrate install ; register include and libs in Visual Studio
-
-#include "imgui.h"
-#include "imgui_impl_glut.h"
-#include "imgui_impl_opengl2.h"
-#define GL_SILENCE_DEPRECATION
-#ifdef __APPLE__
-#include <GLUT/glut.h>
-#else
-#include <GL/freeglut.h>
-#endif
-
-#ifdef _MSC_VER
-#pragma warning (disable: 4505) // unreferenced local function has been removed
-#endif
-
-// Forward declarations of helper functions
-void MainLoopStep();
-
-// Our state
-static bool show_demo_window = true;
-static bool show_another_window = false;
-static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
-int main(int argc, char** argv)
-{
- // Create GLUT window
- glutInit(&argc, argv);
-#ifdef __FREEGLUT_EXT_H__
- glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
-#endif
- glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
- glutInitWindowSize(1280, 720);
- glutCreateWindow("Dear ImGui GLUT+OpenGL2 Example");
-
- // Setup GLUT display function
- // We will also call ImGui_ImplGLUT_InstallFuncs() to get all the other functions installed for us,
- // otherwise it is possible to install our own functions and call the imgui_impl_glut.h functions ourselves.
- glutDisplayFunc(MainLoopStep);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- // FIXME: Consider reworking this example to install our own GLUT funcs + forward calls ImGui_ImplGLUT_XXX ones, instead of using ImGui_ImplGLUT_InstallFuncs().
- ImGui_ImplGLUT_Init();
- ImGui_ImplOpenGL2_Init();
-
- // Install GLUT handlers (glutReshapeFunc(), glutMotionFunc(), glutPassiveMotionFunc(), glutMouseFunc(), glutKeyboardFunc() etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- ImGui_ImplGLUT_InstallFuncs();
-
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Main loop
- glutMainLoop();
-
- // Cleanup
- ImGui_ImplOpenGL2_Shutdown();
- ImGui_ImplGLUT_Shutdown();
- ImGui::DestroyContext();
-
- return 0;
-}
-
-void MainLoopStep()
-{
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL2_NewFrame();
- ImGui_ImplGLUT_NewFrame();
- ImGui::NewFrame();
- ImGuiIO& io = ImGui::GetIO();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
- ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
-
- glutSwapBuffers();
- glutPostRedisplay();
-}
diff --git a/libs/imgui-1.92.1/examples/example_null/Makefile b/libs/imgui-1.92.1/examples/example_null/Makefile
deleted file mode 100644
index 4a67cec..0000000
--- a/libs/imgui-1.92.1/examples/example_null/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1+ and Mac OS X
-#
-# Important: This is a "null backend" application, with no visible output or interaction!
-# This is used for testing purpose and continuous integration, and has little use for end-user.
-#
-
-# Options
-WITH_EXTRA_WARNINGS ?= 0
-WITH_FREETYPE ?= 0
-
-EXE = example_null
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS += -std=c++11 -I$(IMGUI_DIR)
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-# We use the WITH_EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
-ifeq ($(WITH_EXTRA_WARNINGS), 1)
- CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
-endif
-
-# We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp
-# (only supported on Linux, and note that the imgui_freetype code currently won't be executed)
-ifeq ($(WITH_FREETYPE), 1)
- SOURCES += $(IMGUI_DIR)/misc/freetype/imgui_freetype.cpp
- CXXFLAGS += $(shell pkg-config --cflags freetype2)
- LIBS += $(shell pkg-config --libs freetype2)
-endif
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- ifeq ($(WITH_EXTRA_WARNINGS), 1)
- CXXFLAGS += -Wextra -Wpedantic
- ifeq ($(shell $(CXX) -v 2>&1 | grep -c "clang version"), 1)
- CXXFLAGS += -Wshadow -Wsign-conversion
- endif
- endif
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- ifeq ($(WITH_EXTRA_WARNINGS), 1)
- CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-poison-system-directories
- endif
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- ifeq ($(WITH_EXTRA_WARNINGS), 1)
- CXXFLAGS += -Wextra -Wpedantic
- endif
- LIBS += -limm32
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/misc/freetype/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_null/build_win32.bat b/libs/imgui-1.92.1/examples/example_null/build_win32.bat
deleted file mode 100644
index be81d80..0000000
--- a/libs/imgui-1.92.1/examples/example_null/build_win32.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-mkdir Debug
-cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib
diff --git a/libs/imgui-1.92.1/examples/example_null/main.cpp b/libs/imgui-1.92.1/examples/example_null/main.cpp
deleted file mode 100644
index 460f33c..0000000
--- a/libs/imgui-1.92.1/examples/example_null/main.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// dear imgui: "null" example application
-// (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT)
-// This is useful to test building, but you cannot interact with anything here!
-#include "imgui.h"
-#include <stdio.h>
-
-int main(int, char**)
-{
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO();
-
- // Build atlas
- //unsigned char* tex_pixels = nullptr;
- //int tex_w, tex_h;
- //io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h);
- io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures;
-
- for (int n = 0; n < 20; n++)
- {
- printf("NewFrame() %d\n", n);
- io.DisplaySize = ImVec2(1920, 1080);
- io.DeltaTime = 1.0f / 60.0f;
- ImGui::NewFrame();
-
- static float f = 0.0f;
- ImGui::Text("Hello, world!");
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowDemoWindow(nullptr);
-
- ImGui::Render();
- }
-
- printf("DestroyContext()\n");
- ImGui::DestroyContext();
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_directx11/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl2_directx11/build_win32.bat
deleted file mode 100644
index f0b485c..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_directx11/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_sdl2_directx11
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include"
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj b/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
deleted file mode 100644
index c23800c..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{9E1987E3-1F19-45CA-B9C9-D31E791836D8}</ProjectGuid>
- <RootNamespace>example_sdl2_directx11</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- <ProjectName>example_sdl2_directx11</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_dx11.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h" />
- <ClInclude Include="..\..\backends\imgui_impl_dx11.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters
deleted file mode 100644
index 92d11f8..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{08e36723-ce4f-4cff-9662-c40801cf1acf}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_dx11.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_dx11.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_directx11/main.cpp b/libs/imgui-1.92.1/examples/example_sdl2_directx11/main.cpp
deleted file mode 100644
index 194dd0e..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_directx11/main.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + DirectX 11
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_dx11.h"
-#include <d3d11.h>
-#include <stdio.h>
-#include <SDL.h>
-#include <SDL_syswm.h>
-
-// Data
-static ID3D11Device* g_pd3dDevice = nullptr;
-static ID3D11DeviceContext* g_pd3dDeviceContext = nullptr;
-static IDXGISwapChain* g_pSwapChain = nullptr;
-static ID3D11RenderTargetView* g_mainRenderTargetView = nullptr;
-
-// Forward declarations of helper functions
-bool CreateDeviceD3D(HWND hWnd);
-void CleanupDeviceD3D();
-void CreateRenderTarget();
-void CleanupRenderTarget();
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
- // (Some versions of SDL before <2.0.10 appears to have performance/stalling issues on a minority of Windows systems,
- // depending on whether SDL_INIT_GAMECONTROLLER is enabled or disabled.. updating to the latest version of SDL is recommended!)
-#ifdef _WIN32
- ::SetProcessDPIAware();
-#endif
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // From 2.0.18: Enable native IME.
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // Setup window
- float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
- SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+DirectX11 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
-
- SDL_SysWMinfo wmInfo;
- SDL_VERSION(&wmInfo.version);
- SDL_GetWindowWMInfo(window, &wmInfo);
- HWND hwnd = (HWND)wmInfo.info.win.window;
-
- // Initialize Direct3D
- if (!CreateDeviceD3D(hwnd))
- {
- CleanupDeviceD3D();
- return 1;
- }
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL2_InitForD3D(window);
- ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED && event.window.windowID == SDL_GetWindowID(window))
- {
- // Release all outstanding references to the swap chain's buffers before resizing.
- CleanupRenderTarget();
- g_pSwapChain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
- CreateRenderTarget();
- }
- }
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplDX11_NewFrame();
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
- g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr);
- g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha);
- ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
-
- g_pSwapChain->Present(1, 0); // Present with vsync
- //g_pSwapChain->Present(0, 0); // Present without vsync
- }
-
- // Cleanup
- ImGui_ImplDX11_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceD3D();
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
-
-// Helper functions to use DirectX11
-bool CreateDeviceD3D(HWND hWnd)
-{
- // Setup swap chain
- DXGI_SWAP_CHAIN_DESC sd;
- ZeroMemory(&sd, sizeof(sd));
- sd.BufferCount = 2;
- sd.BufferDesc.Width = 0;
- sd.BufferDesc.Height = 0;
- sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- sd.BufferDesc.RefreshRate.Numerator = 60;
- sd.BufferDesc.RefreshRate.Denominator = 1;
- sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
- sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
- sd.OutputWindow = hWnd;
- sd.SampleDesc.Count = 1;
- sd.SampleDesc.Quality = 0;
- sd.Windowed = TRUE;
- sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
-
- UINT createDeviceFlags = 0;
- //createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
- D3D_FEATURE_LEVEL featureLevel;
- const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, };
- if (D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK)
- return false;
-
- CreateRenderTarget();
- return true;
-}
-
-void CleanupDeviceD3D()
-{
- CleanupRenderTarget();
- if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; }
- if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = nullptr; }
- if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
-}
-
-void CreateRenderTarget()
-{
- ID3D11Texture2D* pBackBuffer;
- g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
- g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView);
- pBackBuffer->Release();
-}
-
-void CleanupRenderTarget()
-{
- if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; }
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_metal/Makefile b/libs/imgui-1.92.1/examples/example_sdl2_metal/Makefile
deleted file mode 100644
index 53c5f75..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_metal/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# You will need SDL2 (http://www.libsdl.org):
-# brew install sdl2
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl2_metal
-IMGUI_DIR = ../..
-SOURCES = main.mm
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-
-LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore
-LIBS += `sdl2-config --libs`
-LIBS += -L/usr/local/lib
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include
-CXXFLAGS += `sdl2-config --cflags`
-CXXFLAGS += -Wall -Wformat
-CFLAGS = $(CXXFLAGS)
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:%.mm
- $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.mm
- $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_metal/main.mm b/libs/imgui-1.92.1/examples/example_sdl2_metal/main.mm
deleted file mode 100644
index c1750b1..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_metal/main.mm
+++ /dev/null
@@ -1,189 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + Metal
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_metal.h"
-#include <stdio.h>
-#include <SDL.h>
-
-#import <Metal/Metal.h>
-#import <QuartzCore/QuartzCore.h>
-
-int main(int, char**)
-{
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Setup SDL
- // (Some versions of SDL before <2.0.10 appears to have performance/stalling issues on a minority of Windows systems,
- // depending on whether SDL_INIT_GAMECONTROLLER is enabled or disabled.. updating to latest version of SDL is recommended!)
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // Inform SDL that we will be using metal for rendering. Without this hint initialization of metal renderer may fail.
- SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");
-
- // Enable native IME.
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL+Metal example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- if (window == nullptr)
- {
- printf("Error creating window: %s\n", SDL_GetError());
- return -2;
- }
-
- SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
- if (renderer == nullptr)
- {
- printf("Error creating renderer: %s\n", SDL_GetError());
- return -3;
- }
-
- // Setup Platform/Renderer backends
- CAMetalLayer* layer = (__bridge CAMetalLayer*)SDL_RenderGetMetalLayer(renderer);
- layer.pixelFormat = MTLPixelFormatBGRA8Unorm;
- ImGui_ImplMetal_Init(layer.device);
- ImGui_ImplSDL2_InitForMetal(window);
-
- id<MTLCommandQueue> commandQueue = [layer.device newCommandQueue];
- MTLRenderPassDescriptor* renderPassDescriptor = [MTLRenderPassDescriptor new];
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- float clear_color[4] = {0.45f, 0.55f, 0.60f, 1.00f};
-
- // Main loop
- bool done = false;
- while (!done)
- {
- @autoreleasepool
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
-
- int width, height;
- SDL_GetRendererOutputSize(renderer, &width, &height);
- layer.drawableSize = CGSizeMake(width, height);
- id<CAMetalDrawable> drawable = [layer nextDrawable];
-
- id<MTLCommandBuffer> commandBuffer = [commandQueue commandBuffer];
- renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color[0] * clear_color[3], clear_color[1] * clear_color[3], clear_color[2] * clear_color[3], clear_color[3]);
- renderPassDescriptor.colorAttachments[0].texture = drawable.texture;
- renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionClear;
- renderPassDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore;
- id <MTLRenderCommandEncoder> renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
- [renderEncoder pushDebugGroup:@"ImGui demo"];
-
- // Start the Dear ImGui frame
- ImGui_ImplMetal_NewFrame(renderPassDescriptor);
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImGui_ImplMetal_RenderDrawData(ImGui::GetDrawData(), commandBuffer, renderEncoder);
-
- [renderEncoder popDebugGroup];
- [renderEncoder endEncoding];
-
- [commandBuffer presentDrawable:drawable];
- [commandBuffer commit];
- }
- }
-
- // Cleanup
- ImGui_ImplMetal_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- SDL_DestroyRenderer(renderer);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/Makefile b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/Makefile
deleted file mode 100644
index a85ced0..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL2 (http://www.libsdl.org):
-# Linux:
-# apt-get install libsdl2-dev
-# Mac OS X:
-# brew install sdl2
-# MSYS2:
-# pacman -S mingw-w64-i686-SDL2
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl2_opengl2
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -lGL -ldl `sdl2-config --libs`
-
- CXXFLAGS += `sdl2-config --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `sdl2-config --cflags`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
-
- CXXFLAGS += `pkg-config --cflags sdl2`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/README.md b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/README.md
deleted file mode 100644
index 40a49e6..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# How to Build
-
-- On Windows with Visual Studio's IDE
-
-Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
-
-- On Windows with Visual Studio's CLI
-
-```
-set SDL2_DIR=path_to_your_sdl2_folder
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
-# or for 64-bit:
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
-```
-
-- On Linux and similar Unixes
-
-```
-c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL
-```
-
-- On Mac OS X
-
-```
-brew install sdl2
-c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl
-```
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/build_win32.bat
deleted file mode 100644
index 7543eda..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_sdl2_opengl2
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
deleted file mode 100644
index 036463f..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}</ProjectGuid>
- <RootNamespace>example_sdl2_opengl2</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters
deleted file mode 100644
index 752a196..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/main.cpp b/libs/imgui-1.92.1/examples/example_sdl2_opengl2/main.cpp
deleted file mode 100644
index c8363fe..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl2/main.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + OpenGL
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
-// **Prefer using the code in the example_sdl2_opengl3/ folder**
-// See imgui_impl_sdl2.cpp for details.
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_opengl2.h"
-#include <stdio.h>
-#include <SDL.h>
-#include <SDL_opengl.h>
-#ifdef _WIN32
-#include <windows.h> // SetProcessDPIAware()
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
-#ifdef _WIN32
- ::SetProcessDPIAware();
-#endif
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // From 2.0.18: Enable native IME.
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // Setup window
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
- float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
- SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
-
- SDL_GLContext gl_context = SDL_GL_CreateContext(window);
- SDL_GL_MakeCurrent(window, gl_context);
- SDL_GL_SetSwapInterval(1); // Enable vsync
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
- ImGui_ImplOpenGL2_Init();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL2_NewFrame();
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound
- ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
- SDL_GL_SwapWindow(window);
- }
-
- // Cleanup
- ImGui_ImplOpenGL2_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- SDL_GL_DeleteContext(gl_context);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile
deleted file mode 100644
index 5b4f941..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL2 (http://www.libsdl.org):
-# Linux:
-# apt-get install libsdl2-dev
-# Mac OS X:
-# brew install sdl2
-# MSYS2:
-# pacman -S mingw-w64-i686-SDL2
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl2_opengl3
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-LINUX_GL_LIBS = -lGL
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## OPENGL ES
-##---------------------------------------------------------------------
-
-## This assumes a GL ES library available in the system, e.g. libGLESv2.so
-# CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2
-# LINUX_GL_LIBS = -lGLESv2
-## If you're on a Raspberry Pi and want to use the legacy drivers,
-## use the following instead:
-# LINUX_GL_LIBS = -L/opt/vc/lib -lbrcmGLESv2
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += $(LINUX_GL_LIBS) -ldl `sdl2-config --libs`
-
- CXXFLAGS += `sdl2-config --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `sdl2-config --cflags`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
-
- CXXFLAGS += `pkg-config --cflags sdl2`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile.emscripten b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile.emscripten
deleted file mode 100644
index bc06ade..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/Makefile.emscripten
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# Makefile to use with SDL+emscripten
-# See https://emscripten.org/docs/getting_started/downloads.html
-# for installation instructions.
-#
-# This Makefile assumes you have loaded emscripten's environment.
-# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead)
-#
-# Running `make -f Makefile.emscripten` will produce three files:
-# - web/index.html
-# - web/index.js
-# - web/index.wasm
-#
-# All three are needed to run the demo.
-
-CC = emcc
-CXX = em++
-WEB_DIR = web
-EXE = $(WEB_DIR)/index.html
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-CPPFLAGS =
-LDFLAGS =
-EMS =
-
-##---------------------------------------------------------------------
-## EMSCRIPTEN OPTIONS
-##---------------------------------------------------------------------
-
-# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only)
-EMS += -s USE_SDL=2
-EMS += -s DISABLE_EXCEPTION_CATCHING=1
-LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
-
-# Build as single file (binary text encoded in .html file)
-#LDFLAGS += -sSINGLE_FILE
-
-# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877)
-#EMS += -s BINARYEN_TRAP_MODE=clamp
-#EMS += -s SAFE_HEAP=1 ## Adds overhead
-
-# Emscripten allows preloading a file or folder to be accessible at runtime.
-# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts"
-# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html
-# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.)
-USE_FILE_SYSTEM ?= 0
-ifeq ($(USE_FILE_SYSTEM), 0)
-LDFLAGS += -s NO_FILESYSTEM=1
-CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS
-endif
-ifeq ($(USE_FILE_SYSTEM), 1)
-LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts
-endif
-
-##---------------------------------------------------------------------
-## FINAL BUILD FLAGS
-##---------------------------------------------------------------------
-
-CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-#CPPFLAGS += -g
-CPPFLAGS += -Wall -Wformat -Os $(EMS)
-LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html
-LDFLAGS += $(EMS)
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(EXE)
-
-$(WEB_DIR):
- mkdir $@
-
-serve: all
- python3 -m http.server -d $(WEB_DIR)
-
-$(EXE): $(OBJS) $(WEB_DIR)
- $(CXX) -o $@ $(OBJS) $(LDFLAGS)
-
-clean:
- rm -rf $(OBJS) $(WEB_DIR)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/README.md b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/README.md
deleted file mode 100644
index 81fd9fe..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-
-# How to Build
-
-## Windows with Visual Studio's IDE
-
-Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
-
-## Windows with Visual Studio's CLI
-
-Use build_win32.bat or directly:
-```
-set SDL2_DIR=path_to_your_sdl2_folder
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
-# or for 64-bit:
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
-```
-
-## Linux and similar Unixes
-
-Use our Makefile or directly:
-```
-c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends
- main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
- `sdl2-config --libs` -lGL -ldl
-```
-
-## macOS
-
-Use our Makefile or directly:
-```
-brew install sdl2
-c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends
- main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
- `sdl2-config --libs` -framework OpenGl -framework CoreFoundation
-```
-
-## Emscripten
-
-**Building**
-
-You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions
-
-- Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools.
-- You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup.
-- Then build using `make -f Makefile.emscripten` while in the current directory.
-
-**Running an Emscripten project**
-
-To run on a local machine:
-- `make -f Makefile.emscripten serve` will use Python3 to spawn a local webserver, you can then browse http://localhost:8000 to access your build.
-- Otherwise, generally you will need a local webserver. Quoting [https://emscripten.org/docs/getting_started](https://emscripten.org/docs/getting_started/Tutorial.html#generating-html):<br>
-_"Unfortunately several browsers (including Chrome, Safari, and Internet Explorer) do not support file:// [XHR](https://emscripten.org/docs/site/glossary.html#term-xhr) requests, and can’t load extra files needed by the HTML (like a .wasm file, or packaged file data as mentioned lower down). For these browsers you’ll need to serve the files using a [local webserver](https://emscripten.org/docs/getting_started/FAQ.html#faq-local-webserver) and then open http://localhost:8000/hello.html."_
-- Emscripten SDK has a handy `emrun` command: `emrun web/index.html --browser firefox` which will spawn a temporary local webserver (in Firefox). See https://emscripten.org/docs/compiling/Running-html-files-with-emrun.html for details.
-- You may use Python 3 builtin webserver: `python -m http.server -d web` (this is what `make serve` uses).
-- You may use Python 2 builtin webserver: `cd web && python -m SimpleHTTPServer`.
-- If you are accessing the files over a network, certain browsers, such as Firefox, will restrict Gamepad API access to secure contexts only (e.g. https only).
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/build_win32.bat
deleted file mode 100644
index 7b2fac9..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_sdl2_opengl3
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
deleted file mode 100644
index 6a81c67..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{BBAEB705-1669-40F3-8567-04CF6A991F4C}</ProjectGuid>
- <RootNamespace>example_sdl2_opengl3</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters
deleted file mode 100644
index 846d557..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/main.cpp b/libs/imgui-1.92.1/examples/example_sdl2_opengl3/main.cpp
deleted file mode 100644
index 16a73de..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_opengl3/main.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + OpenGL
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_opengl3.h"
-#include <stdio.h>
-#include <SDL.h>
-#if defined(IMGUI_IMPL_OPENGL_ES2)
-#include <SDL_opengles2.h>
-#else
-#include <SDL_opengl.h>
-#endif
-#ifdef _WIN32
-#include <windows.h> // SetProcessDPIAware()
-#endif
-
-// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details.
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
-#ifdef _WIN32
- ::SetProcessDPIAware();
-#endif
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // Decide GL+GLSL versions
-#if defined(IMGUI_IMPL_OPENGL_ES2)
- // GL ES 2.0 + GLSL 100 (WebGL 1.0)
- const char* glsl_version = "#version 100";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#elif defined(IMGUI_IMPL_OPENGL_ES3)
- // GL ES 3.0 + GLSL 300 es (WebGL 2.0)
- const char* glsl_version = "#version 300 es";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#elif defined(__APPLE__)
- // GL 3.2 Core + GLSL 150
- const char* glsl_version = "#version 150";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
-#else
- // GL 3.0 + GLSL 130
- const char* glsl_version = "#version 130";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#endif
-
- // From 2.0.18: Enable native IME.
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // Create window with graphics context
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
- float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
- SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
-
- SDL_GLContext gl_context = SDL_GL_CreateContext(window);
- if (gl_context == nullptr)
- {
- printf("Error: SDL_GL_CreateContext(): %s\n", SDL_GetError());
- return -1;
- }
-
- SDL_GL_MakeCurrent(window, gl_context);
- SDL_GL_SetSwapInterval(1); // Enable vsync
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
- ImGui_ImplOpenGL3_Init(glsl_version);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details.
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
-#ifdef __EMSCRIPTEN__
- // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
- // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
- io.IniFilename = nullptr;
- EMSCRIPTEN_MAINLOOP_BEGIN
-#else
- while (!done)
-#endif
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL3_NewFrame();
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
- SDL_GL_SwapWindow(window);
- }
-#ifdef __EMSCRIPTEN__
- EMSCRIPTEN_MAINLOOP_END;
-#endif
-
- // Cleanup
- ImGui_ImplOpenGL3_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- SDL_GL_DeleteContext(gl_context);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/Makefile b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/Makefile
deleted file mode 100644
index 5820d9b..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL2 (http://www.libsdl.org):
-# Linux:
-# apt-get install libsdl2-dev
-# Mac OS X:
-# brew install sdl2
-# MSYS2:
-# pacman -S mingw-w64-i686-SDL2
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl2_sdlrenderer2
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlrenderer2.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -lGL -ldl `sdl2-config --libs`
-
- CXXFLAGS += `sdl2-config --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `sdl2-config --cflags`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
-
- CXXFLAGS += `pkg-config --cflags sdl2`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/README.md b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/README.md
deleted file mode 100644
index ef6fe85..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-
-# How to Build
-
-- On Windows with Visual Studio's CLI
-
-```
-set SDL2_DIR=path_to_your_sdl2_folder
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
-# or for 64-bit:
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console
-```
-
-- On Linux and similar Unixes
-
-```
-c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL
-```
-
-- On Mac OS X
-
-```
-brew install sdl2
-c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl
-```
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/build_win32.bat
deleted file mode 100644
index e311bfc..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_sdl2_sdlrenderer_
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj
deleted file mode 100644
index cf2c890..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0C0B2BEA-311F-473C-9652-87923EF639E3}</ProjectGuid>
- <RootNamespace>example_sdl2_sdlrenderer2</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- <ProjectName>example_sdl2_sdlrenderer2</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdlrenderer2.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer2.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters
deleted file mode 100644
index 5c6da42..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdlrenderer2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer2.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project>
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/main.cpp b/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/main.cpp
deleted file mode 100644
index e456b2e..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_sdlrenderer2/main.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + SDL_Renderer
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-// Important to understand: SDL_Renderer is an _optional_ component of SDL2.
-// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_sdlrenderer2.h"
-#include <stdio.h>
-#include <SDL.h>
-#ifdef _WIN32
-#include <windows.h> // SetProcessDPIAware()
-#endif
-
-#if !SDL_VERSION_ATLEAST(2,0,17)
-#error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
-#ifdef _WIN32
- ::SetProcessDPIAware();
-#endif
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // From 2.0.18: Enable native IME.
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // Create window with SDL_Renderer graphics context
- float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
- SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+SDL_Renderer example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
- if (renderer == nullptr)
- {
- SDL_Log("Error creating SDL_Renderer!");
- return -1;
- }
- //SDL_RendererInfo info;
- //SDL_GetRendererInfo(renderer, &info);
- //SDL_Log("Current SDL_Renderer: %s", info.name);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL2_InitForSDLRenderer(window, renderer);
- ImGui_ImplSDLRenderer2_Init(renderer);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplSDLRenderer2_NewFrame();
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- SDL_RenderSetScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y);
- SDL_SetRenderDrawColor(renderer, (Uint8)(clear_color.x * 255), (Uint8)(clear_color.y * 255), (Uint8)(clear_color.z * 255), (Uint8)(clear_color.w * 255));
- SDL_RenderClear(renderer);
- ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData(), renderer);
- SDL_RenderPresent(renderer);
- }
-
- // Cleanup
- ImGui_ImplSDLRenderer2_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- SDL_DestroyRenderer(renderer);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/Makefile b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/Makefile
deleted file mode 100644
index e722ab0..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/Makefile
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL2 (http://www.libsdl.org):
-# Linux:
-# apt-get install libsdl2-dev
-# Mac OS X:
-# brew install sdl2
-# MSYS2:
-# pacman -S mingw-w64-i686-SDL2
-#
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl2_vulkan
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_vulkan.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -lGL -ldl
- LIBS += `pkg-config --libs sdl2 vulkan`
- CXXFLAGS += `pkg-config --cflags sdl2 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += `pkg-config --libs sdl2 vulkan`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `pkg-config --cflags sdl2 vulkan`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2 vulkan`
-
- CXXFLAGS += `pkg-config --cflags sdl2 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win32.bat
deleted file mode 100644
index f634aba..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win32.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl2_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win64.bat b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win64.bat
deleted file mode 100644
index 5d315cc..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/build_win64.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl2_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
deleted file mode 100644
index bcf99a4..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}</ProjectGuid>
- <RootNamespace>example_sdl2_vulkan</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h" />
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters
deleted file mode 100644
index ab42485..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl2.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl2.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/main.cpp b/libs/imgui-1.92.1/examples/example_sdl2_vulkan/main.cpp
deleted file mode 100644
index 300543f..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl2_vulkan/main.cpp
+++ /dev/null
@@ -1,555 +0,0 @@
-// Dear ImGui: standalone example application for SDL2 + Vulkan
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-#include "imgui.h"
-#include "imgui_impl_sdl2.h"
-#include "imgui_impl_vulkan.h"
-#include <stdio.h> // printf, fprintf
-#include <stdlib.h> // abort
-#include <SDL.h>
-#include <SDL_vulkan.h>
-#ifdef _WIN32
-#include <windows.h> // SetProcessDPIAware()
-#endif
-
-// Volk headers
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
-#define VOLK_IMPLEMENTATION
-#include <volk.h>
-#endif
-
-//#define APP_USE_UNLIMITED_FRAME_RATE
-#ifdef _DEBUG
-#define APP_USE_VULKAN_DEBUG_REPORT
-static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
-#endif
-
-// Data
-static VkAllocationCallbacks* g_Allocator = nullptr;
-static VkInstance g_Instance = VK_NULL_HANDLE;
-static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
-static VkDevice g_Device = VK_NULL_HANDLE;
-static uint32_t g_QueueFamily = (uint32_t)-1;
-static VkQueue g_Queue = VK_NULL_HANDLE;
-static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
-static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
-
-static ImGui_ImplVulkanH_Window g_MainWindowData;
-static uint32_t g_MinImageCount = 2;
-static bool g_SwapChainRebuild = false;
-
-static void check_vk_result(VkResult err)
-{
- if (err == VK_SUCCESS)
- return;
- fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err);
- if (err < 0)
- abort();
-}
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
-static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
-{
- (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
- fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
- return VK_FALSE;
-}
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
-static bool IsExtensionAvailable(const ImVector<VkExtensionProperties>& properties, const char* extension)
-{
- for (const VkExtensionProperties& p : properties)
- if (strcmp(p.extensionName, extension) == 0)
- return true;
- return false;
-}
-
-static void SetupVulkan(ImVector<const char*> instance_extensions)
-{
- VkResult err;
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkInitialize();
-#endif
-
- // Create Vulkan Instance
- {
- VkInstanceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-
- // Enumerate available extensions
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data);
- check_vk_result(err);
-
- // Enable required extensions
- if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
- instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
-#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
- {
- instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
- create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
- }
-#endif
-
- // Enabling validation layers
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
- create_info.enabledLayerCount = 1;
- create_info.ppEnabledLayerNames = layers;
- instance_extensions.push_back("VK_EXT_debug_report");
-#endif
-
- // Create Vulkan Instance
- create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size;
- create_info.ppEnabledExtensionNames = instance_extensions.Data;
- err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
- check_vk_result(err);
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkLoadInstance(g_Instance);
-#endif
-
- // Setup the debug report callback
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
- IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr);
- VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
- debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
- debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
- debug_report_ci.pfnCallback = debug_report;
- debug_report_ci.pUserData = nullptr;
- err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
- check_vk_result(err);
-#endif
- }
-
- // Select Physical Device (GPU)
- g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance);
- IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE);
-
- // Select graphics queue family
- g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice);
- IM_ASSERT(g_QueueFamily != (uint32_t)-1);
-
- // Create Logical Device (with 1 queue)
- {
- ImVector<const char*> device_extensions;
- device_extensions.push_back("VK_KHR_swapchain");
-
- // Enumerate physical device extension
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data);
-#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))
- device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
-#endif
-
- const float queue_priority[] = { 1.0f };
- VkDeviceQueueCreateInfo queue_info[1] = {};
- queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queue_info[0].queueFamilyIndex = g_QueueFamily;
- queue_info[0].queueCount = 1;
- queue_info[0].pQueuePriorities = queue_priority;
- VkDeviceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
- create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
- create_info.pQueueCreateInfos = queue_info;
- create_info.enabledExtensionCount = (uint32_t)device_extensions.Size;
- create_info.ppEnabledExtensionNames = device_extensions.Data;
- err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
- check_vk_result(err);
- vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
- }
-
- // Create Descriptor Pool
- // If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets.
- {
- VkDescriptorPoolSize pool_sizes[] =
- {
- { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE },
- };
- VkDescriptorPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
- pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
- pool_info.maxSets = 0;
- for (VkDescriptorPoolSize& pool_size : pool_sizes)
- pool_info.maxSets += pool_size.descriptorCount;
- pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
- pool_info.pPoolSizes = pool_sizes;
- err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
- check_vk_result(err);
- }
-}
-
-// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo.
-// Your real engine/app may not use them.
-static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height)
-{
- wd->Surface = surface;
-
- // Check for WSI support
- VkBool32 res;
- vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
- if (res != VK_TRUE)
- {
- fprintf(stderr, "Error no WSI support on physical device 0\n");
- exit(-1);
- }
-
- // Select Surface Format
- const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
- const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
- wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
-
- // Select Present Mode
-#ifdef APP_USE_UNLIMITED_FRAME_RATE
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
-#else
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
-#endif
- wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
- //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
-
- // Create SwapChain, RenderPass, Framebuffer, etc.
- IM_ASSERT(g_MinImageCount >= 2);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
-}
-
-static void CleanupVulkan()
-{
- vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- // Remove the debug report callback
- auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
- f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
- vkDestroyDevice(g_Device, g_Allocator);
- vkDestroyInstance(g_Instance, g_Allocator);
-}
-
-static void CleanupVulkanWindow()
-{
- ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator);
-}
-
-static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
-{
- VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
-
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex];
- {
- err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
- check_vk_result(err);
-
- err = vkResetFences(g_Device, 1, &fd->Fence);
- check_vk_result(err);
- }
- {
- err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
- check_vk_result(err);
- VkCommandBufferBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
- check_vk_result(err);
- }
- {
- VkRenderPassBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- info.renderPass = wd->RenderPass;
- info.framebuffer = fd->Framebuffer;
- info.renderArea.extent.width = wd->Width;
- info.renderArea.extent.height = wd->Height;
- info.clearValueCount = 1;
- info.pClearValues = &wd->ClearValue;
- vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
- }
-
- // Record dear imgui primitives into command buffer
- ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer);
-
- // Submit command buffer
- vkCmdEndRenderPass(fd->CommandBuffer);
- {
- VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- VkSubmitInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &image_acquired_semaphore;
- info.pWaitDstStageMask = &wait_stage;
- info.commandBufferCount = 1;
- info.pCommandBuffers = &fd->CommandBuffer;
- info.signalSemaphoreCount = 1;
- info.pSignalSemaphores = &render_complete_semaphore;
-
- err = vkEndCommandBuffer(fd->CommandBuffer);
- check_vk_result(err);
- err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
- check_vk_result(err);
- }
-}
-
-static void FramePresent(ImGui_ImplVulkanH_Window* wd)
-{
- if (g_SwapChainRebuild)
- return;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkPresentInfoKHR info = {};
- info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &render_complete_semaphore;
- info.swapchainCount = 1;
- info.pSwapchains = &wd->Swapchain;
- info.pImageIndices = &wd->FrameIndex;
- VkResult err = vkQueuePresentKHR(g_Queue, &info);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
- wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
-}
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
-#ifdef _WIN32
- ::SetProcessDPIAware();
-#endif
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
- {
- printf("Error: %s\n", SDL_GetError());
- return -1;
- }
-
- // From 2.0.18: Enable native IME.
-#ifdef SDL_HINT_IME_SHOW_UI
- SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
-#endif
-
- // Create window with Vulkan graphics context
- float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
- SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
-
- ImVector<const char*> extensions;
- uint32_t extensions_count = 0;
- SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, nullptr);
- extensions.resize(extensions_count);
- SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, extensions.Data);
- SetupVulkan(extensions);
-
- // Create Window Surface
- VkSurfaceKHR surface;
- VkResult err;
- if (SDL_Vulkan_CreateSurface(window, g_Instance, &surface) == 0)
- {
- printf("Failed to create Vulkan surface.\n");
- return 1;
- }
-
- // Create Framebuffers
- int w, h;
- SDL_GetWindowSize(window, &w, &h);
- ImGui_ImplVulkanH_Window* wd = &g_MainWindowData;
- SetupVulkanWindow(wd, surface, w, h);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL2_InitForVulkan(window);
- ImGui_ImplVulkan_InitInfo init_info = {};
- //init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
- init_info.Instance = g_Instance;
- init_info.PhysicalDevice = g_PhysicalDevice;
- init_info.Device = g_Device;
- init_info.QueueFamily = g_QueueFamily;
- init_info.Queue = g_Queue;
- init_info.PipelineCache = g_PipelineCache;
- init_info.DescriptorPool = g_DescriptorPool;
- init_info.RenderPass = wd->RenderPass;
- init_info.Subpass = 0;
- init_info.MinImageCount = g_MinImageCount;
- init_info.ImageCount = wd->ImageCount;
- init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
- init_info.Allocator = g_Allocator;
- init_info.CheckVkResultFn = check_vk_result;
- ImGui_ImplVulkan_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL2_ProcessEvent(&event);
- if (event.type == SDL_QUIT)
- done = true;
- if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Resize swap chain?
- int fb_width, fb_height;
- SDL_GetWindowSize(window, &fb_width, &fb_height);
- if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height))
- {
- ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount);
- g_MainWindowData.FrameIndex = 0;
- g_SwapChainRebuild = false;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplVulkan_NewFrame();
- ImGui_ImplSDL2_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
- const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
- if (!is_minimized)
- {
- wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w;
- wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w;
- wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w;
- wd->ClearValue.color.float32[3] = clear_color.w;
- FrameRender(wd, draw_data);
- FramePresent(wd);
- }
- }
-
- // Cleanup
- err = vkDeviceWaitIdle(g_Device);
- check_vk_result(err);
- ImGui_ImplVulkan_Shutdown();
- ImGui_ImplSDL2_Shutdown();
- ImGui::DestroyContext();
-
- CleanupVulkanWindow();
- CleanupVulkan();
-
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile
deleted file mode 100644
index d9c6eac..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged.
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl3_opengl3
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-LINUX_GL_LIBS = -lGL
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## OPENGL ES
-##---------------------------------------------------------------------
-
-## This assumes a GL ES library available in the system, e.g. libGLESv2.so
-# CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2
-# LINUX_GL_LIBS = -lGLESv2
-## If you're on a Raspberry Pi and want to use the legacy drivers,
-## use the following instead:
-# LINUX_GL_LIBS = -L/opt/vc/lib -lbrcmGLESv2
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += $(LINUX_GL_LIBS) -ldl `pkg-config sdl3 --libs`
-
- CXXFLAGS += `pkg-config sdl3 --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += `pkg-config --libs sdl3`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `pkg-config --cflags sdl3`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl3`
-
- CXXFLAGS += `pkg-config --cflags sdl3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile.emscripten b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile.emscripten
deleted file mode 100644
index 57247ff..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/Makefile.emscripten
+++ /dev/null
@@ -1,99 +0,0 @@
-
-# IMPORTANT: SDL3 IS IN DEVELOPMENT, AS OF 2023-05-30, EMSCRIPTEN DOESN'T SUPPORT SDL3 YET.
-# WE ARE LEAVING THIS MAKEFILE AROUND FOR THE DAY IT WILL SUPPORT IT.
-
-#
-# Makefile to use with SDL+emscripten
-# See https://emscripten.org/docs/getting_started/downloads.html
-# for installation instructions.
-#
-# This Makefile assumes you have loaded emscripten's environment.
-# (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead)
-#
-# Running `make -f Makefile.emscripten` will produce three files:
-# - web/index.html
-# - web/index.js
-# - web/index.wasm
-#
-# All three are needed to run the demo.
-
-CC = emcc
-CXX = em++
-WEB_DIR = web
-EXE = $(WEB_DIR)/index.html
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-CPPFLAGS =
-LDFLAGS =
-EMS =
-
-##---------------------------------------------------------------------
-## EMSCRIPTEN OPTIONS
-##---------------------------------------------------------------------
-
-# ("EMS" options gets added to both CPPFLAGS and LDFLAGS, whereas some options are for linker only)
-EMS += -s USE_SDL=2
-EMS += -s DISABLE_EXCEPTION_CATCHING=1
-LDFLAGS += -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1
-
-# Build as single file (binary text encoded in .html file)
-#LDFLAGS += -sSINGLE_FILE
-
-# Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877)
-#EMS += -s BINARYEN_TRAP_MODE=clamp
-#EMS += -s SAFE_HEAP=1 ## Adds overhead
-
-# Emscripten allows preloading a file or folder to be accessible at runtime.
-# The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts"
-# See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html
-# (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.)
-USE_FILE_SYSTEM ?= 0
-ifeq ($(USE_FILE_SYSTEM), 0)
-LDFLAGS += -s NO_FILESYSTEM=1
-CPPFLAGS += -DIMGUI_DISABLE_FILE_FUNCTIONS
-endif
-ifeq ($(USE_FILE_SYSTEM), 1)
-LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts
-endif
-
-##---------------------------------------------------------------------
-## FINAL BUILD FLAGS
-##---------------------------------------------------------------------
-
-CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-#CPPFLAGS += -g
-CPPFLAGS += -Wall -Wformat -Os $(EMS)
-LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html
-LDFLAGS += $(EMS)
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(EXE)
-
-$(WEB_DIR):
- mkdir $@
-
-serve: all
- python3 -m http.server -d $(WEB_DIR)
-
-$(EXE): $(OBJS) $(WEB_DIR)
- $(CXX) -o $@ $(OBJS) $(LDFLAGS)
-
-clean:
- rm -rf $(OBJS) $(WEB_DIR)
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/README.md b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/README.md
deleted file mode 100644
index a032f87..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# How to Build
-
-## Windows with Visual Studio's IDE
-
-Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
-
-## Windows with Visual Studio's CLI
-
-Use build_win32.bat or directly:
-```
-set SDL3_DIR=path_to_your_sdl3_folder
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
-# or for 64-bit:
-cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console
-```
-
-## Linux and similar Unixes
-
-Use our Makefile or directly:
-```
-c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
- main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
- `sdl3-config --libs` -lGL -ldl
-```
-
-## macOS
-
-Use our Makefile or directly:
-```
-brew install sdl3
-c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
- main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
- `sdl3-config --libs` -framework OpenGl -framework CoreFoundation
-```
-
-## Emscripten
-
-As of 2023-05-30 Emscripten doesn't support SDL3 yet.
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win32.bat
deleted file mode 100644
index 5bed40a..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win32.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl3_opengl3
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib shell32.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win64.bat b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win64.bat
deleted file mode 100644
index 87c6bb8..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/build_win64.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl3_opengl3
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 SDL3.lib opengl32.lib shell32.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
deleted file mode 100644
index 051f87d..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{84AAA301-84FE-428B-9E3E-817BC8123C0C}</ProjectGuid>
- <RootNamespace>example_sdl3_opengl3</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters
deleted file mode 100644
index f365473..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/main.cpp b/libs/imgui-1.92.1/examples/example_sdl3_opengl3/main.cpp
deleted file mode 100644
index cfd6f6a..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_opengl3/main.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// Dear ImGui: standalone example application for SDL3 + OpenGL
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_sdl3.h"
-#include "imgui_impl_opengl3.h"
-#include <stdio.h>
-#include <SDL3/SDL.h>
-#if defined(IMGUI_IMPL_OPENGL_ES2)
-#include <SDL3/SDL_opengles2.h>
-#else
-#include <SDL3/SDL_opengl.h>
-#endif
-
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
- // [If using SDL_MAIN_USE_CALLBACKS: all code below until the main loop starts would likely be your SDL_AppInit() function]
- if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
- {
- printf("Error: SDL_Init(): %s\n", SDL_GetError());
- return -1;
- }
-
- // Decide GL+GLSL versions
-#if defined(IMGUI_IMPL_OPENGL_ES2)
- // GL ES 2.0 + GLSL 100 (WebGL 1.0)
- const char* glsl_version = "#version 100";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#elif defined(IMGUI_IMPL_OPENGL_ES3)
- // GL ES 3.0 + GLSL 300 es (WebGL 2.0)
- const char* glsl_version = "#version 300 es";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#elif defined(__APPLE__)
- // GL 3.2 Core + GLSL 150
- const char* glsl_version = "#version 150";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
-#else
- // GL 3.0 + GLSL 130
- const char* glsl_version = "#version 130";
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
-#endif
-
- // Create window with graphics context
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
- float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay());
- SDL_WindowFlags window_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY;
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_GLContext gl_context = SDL_GL_CreateContext(window);
- if (gl_context == nullptr)
- {
- printf("Error: SDL_GL_CreateContext(): %s\n", SDL_GetError());
- return -1;
- }
-
- SDL_GL_MakeCurrent(window, gl_context);
- SDL_GL_SetSwapInterval(1); // Enable vsync
- SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
- SDL_ShowWindow(window);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL3_InitForOpenGL(window, gl_context);
- ImGui_ImplOpenGL3_Init(glsl_version);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details.
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
-#ifdef __EMSCRIPTEN__
- // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
- // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
- io.IniFilename = nullptr;
- EMSCRIPTEN_MAINLOOP_BEGIN
-#else
- while (!done)
-#endif
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- // [If using SDL_MAIN_USE_CALLBACKS: call ImGui_ImplSDL3_ProcessEvent() from your SDL_AppEvent() function]
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL3_ProcessEvent(&event);
- if (event.type == SDL_EVENT_QUIT)
- done = true;
- if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
-
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL3_NewFrame();
- ImGui_ImplSDL3_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
- glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
- SDL_GL_SwapWindow(window);
- }
-#ifdef __EMSCRIPTEN__
- EMSCRIPTEN_MAINLOOP_END;
-#endif
-
- // Cleanup
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function]
- ImGui_ImplOpenGL3_Shutdown();
- ImGui_ImplSDL3_Shutdown();
- ImGui::DestroyContext();
-
- SDL_GL_DestroyContext(gl_context);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/Makefile b/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/Makefile
deleted file mode 100644
index c3159d8..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged.
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl3_sdlgpu3
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlgpu3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -ldl `pkg-config sdl3 --libs`
-
- CXXFLAGS += `pkg-config sdl3 --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework Cocoa -framework IOKit -framework CoreVideo `pkg-config --libs sdl3`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `pkg-config sdl3 --cflags`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -limm32 `pkg-config --static --libs sdl3`
-
- CXXFLAGS += `pkg-config --cflags sdl3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/build_win64.bat b/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/build_win64.bat
deleted file mode 100644
index ad7a2d6..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/build_win64.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl3_sdlgpu3
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlgpu3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 SDL3.lib shell32.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj b/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj
deleted file mode 100644
index 3d034f5..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{c22cb6f8-39a5-4dda-90ed-4aca4e81e1e5}</ProjectGuid>
- <RootNamespace>example_sdl3_sdlgpu3</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\backends\imgui_impl_sdlgpu3.cpp" />
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\backends\imgui_impl_sdlgpu3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdlgpu3_shaders.h" />
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj.filters
deleted file mode 100644
index 4710b55..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj.filters
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdlgpu3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\backends\imgui_impl_sdlgpu3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdlgpu3_shaders.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- </ItemGroup>
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{9044ef92-2afa-42f2-92df-ac473c7c32b3}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{ef84458b-039a-4902-8455-4e33df5a8578}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/main.cpp b/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/main.cpp
deleted file mode 100644
index 581b11c..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlgpu3/main.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// Dear ImGui: standalone example application for SDL3 + SDL_GPU
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
-// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
-// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
-
-#include "imgui.h"
-#include "imgui_impl_sdl3.h"
-#include "imgui_impl_sdlgpu3.h"
-#include <stdio.h> // printf, fprintf
-#include <stdlib.h> // abort
-#include <SDL3/SDL.h>
-
-// This example doesn't compile with Emscripten yet! Awaiting SDL3 support.
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
- // [If using SDL_MAIN_USE_CALLBACKS: all code below until the main loop starts would likely be your SDL_AppInit() function]
- if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
- {
- printf("Error: SDL_Init(): %s\n", SDL_GetError());
- return -1;
- }
-
- // Create SDL window graphics context
- float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay());
- SDL_WindowFlags window_flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY;
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+SDL_GPU example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
- SDL_ShowWindow(window);
-
- // Create GPU Device
- SDL_GPUDevice* gpu_device = SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_METALLIB,true,nullptr);
- if (gpu_device == nullptr)
- {
- printf("Error: SDL_CreateGPUDevice(): %s\n", SDL_GetError());
- return -1;
- }
-
- // Claim window for GPU Device
- if (!SDL_ClaimWindowForGPUDevice(gpu_device, window))
- {
- printf("Error: SDL_ClaimWindowForGPUDevice(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_SetGPUSwapchainParameters(gpu_device, window, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_MAILBOX);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL3_InitForSDLGPU(window);
- ImGui_ImplSDLGPU3_InitInfo init_info = {};
- init_info.Device = gpu_device;
- init_info.ColorTargetFormat = SDL_GetGPUSwapchainTextureFormat(gpu_device, window);
- init_info.MSAASamples = SDL_GPU_SAMPLECOUNT_1;
- ImGui_ImplSDLGPU3_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- // [If using SDL_MAIN_USE_CALLBACKS: call ImGui_ImplSDL3_ProcessEvent() from your SDL_AppEvent() function]
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL3_ProcessEvent(&event);
- if (event.type == SDL_EVENT_QUIT)
- done = true;
- if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
-
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplSDLGPU3_NewFrame();
- ImGui_ImplSDL3_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit4("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
- const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
-
- SDL_GPUCommandBuffer* command_buffer = SDL_AcquireGPUCommandBuffer(gpu_device); // Acquire a GPU command buffer
-
- SDL_GPUTexture* swapchain_texture;
- SDL_AcquireGPUSwapchainTexture(command_buffer, window, &swapchain_texture, nullptr, nullptr); // Acquire a swapchain texture
-
- if (swapchain_texture != nullptr && !is_minimized)
- {
- // This is mandatory: call ImGui_ImplSDLGPU3_PrepareDrawData() to upload the vertex/index buffer!
- ImGui_ImplSDLGPU3_PrepareDrawData(draw_data, command_buffer);
-
- // Setup and start a render pass
- SDL_GPUColorTargetInfo target_info = {};
- target_info.texture = swapchain_texture;
- target_info.clear_color = SDL_FColor { clear_color.x, clear_color.y, clear_color.z, clear_color.w };
- target_info.load_op = SDL_GPU_LOADOP_CLEAR;
- target_info.store_op = SDL_GPU_STOREOP_STORE;
- target_info.mip_level = 0;
- target_info.layer_or_depth_plane = 0;
- target_info.cycle = false;
- SDL_GPURenderPass* render_pass = SDL_BeginGPURenderPass(command_buffer, &target_info, 1, nullptr);
-
- // Render ImGui
- ImGui_ImplSDLGPU3_RenderDrawData(draw_data, command_buffer, render_pass);
-
- SDL_EndGPURenderPass(render_pass);
- }
-
- // Submit the command buffer
- SDL_SubmitGPUCommandBuffer(command_buffer);
- }
-
- // Cleanup
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function]
- SDL_WaitForGPUIdle(gpu_device);
- ImGui_ImplSDL3_Shutdown();
- ImGui_ImplSDLGPU3_Shutdown();
- ImGui::DestroyContext();
-
- SDL_ReleaseWindowFromGPUDevice(gpu_device, window);
- SDL_DestroyGPUDevice(gpu_device);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/Makefile b/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/Makefile
deleted file mode 100644
index c278f78..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged.
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl3_sdlrenderer3
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlrenderer3.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-LINUX_GL_LIBS = -lGL
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -ldl `pkg-config sdl3 --libs`
-
- CXXFLAGS += `pkg-config sdl3 --cflags`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += `pkg-config --libs sdl3`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `pkg-config --cflags sdl3`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -limm32 `pkg-config --static --libs sdl3`
-
- CXXFLAGS += `pkg-config --cflags sdl3`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/build_win32.bat
deleted file mode 100644
index 7bc131a..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_sdl3_sdlrenderer3
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlrenderer3.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj b/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj
deleted file mode 100644
index 8b71324..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}</ProjectGuid>
- <RootNamespace>example_sdl3_opengl3</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\backends\imgui_impl_sdlrenderer3.cpp" />
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer3.h" />
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters
deleted file mode 100644
index c41210d..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdlrenderer3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer3.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/main.cpp b/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/main.cpp
deleted file mode 100644
index 6e39429..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_sdlrenderer3/main.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-// Dear ImGui: standalone example application for SDL3 + SDL_Renderer
-// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.)
-
-// 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
-
-// Important to understand: SDL_Renderer is an _optional_ component of SDL3.
-// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
-
-#include "imgui.h"
-#include "imgui_impl_sdl3.h"
-#include "imgui_impl_sdlrenderer3.h"
-#include <stdio.h>
-#include <SDL3/SDL.h>
-
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
- // [If using SDL_MAIN_USE_CALLBACKS: all code below until the main loop starts would likely be your SDL_AppInit() function]
- if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
- {
- printf("Error: SDL_Init(): %s\n", SDL_GetError());
- return -1;
- }
-
- // Create window with SDL_Renderer graphics context
- float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay());
- SDL_WindowFlags window_flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY;
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+SDL_Renderer example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_Renderer* renderer = SDL_CreateRenderer(window, nullptr);
- SDL_SetRenderVSync(renderer, 1);
- if (renderer == nullptr)
- {
- SDL_Log("Error: SDL_CreateRenderer(): %s\n", SDL_GetError());
- return -1;
- }
- SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
- SDL_ShowWindow(window);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL3_InitForSDLRenderer(window, renderer);
- ImGui_ImplSDLRenderer3_Init(renderer);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- // - Our Emscripten build process allows embedding fonts to be accessible at runtime from the "fonts/" folder. See Makefile.emscripten for details.
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
-#ifdef __EMSCRIPTEN__
- // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
- // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
- io.IniFilename = nullptr;
- EMSCRIPTEN_MAINLOOP_BEGIN
-#else
- while (!done)
-#endif
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- // [If using SDL_MAIN_USE_CALLBACKS: call ImGui_ImplSDL3_ProcessEvent() from your SDL_AppEvent() function]
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL3_ProcessEvent(&event);
- if (event.type == SDL_EVENT_QUIT)
- done = true;
- if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
-
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplSDLRenderer3_NewFrame();
- ImGui_ImplSDL3_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- SDL_SetRenderScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y);
- SDL_SetRenderDrawColorFloat(renderer, clear_color.x, clear_color.y, clear_color.z, clear_color.w);
- SDL_RenderClear(renderer);
- ImGui_ImplSDLRenderer3_RenderDrawData(ImGui::GetDrawData(), renderer);
- SDL_RenderPresent(renderer);
- }
-#ifdef __EMSCRIPTEN__
- EMSCRIPTEN_MAINLOOP_END;
-#endif
-
- // Cleanup
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function]
- ImGui_ImplSDLRenderer3_Shutdown();
- ImGui_ImplSDL3_Shutdown();
- ImGui::DestroyContext();
-
- SDL_DestroyRenderer(renderer);
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/Makefile b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/Makefile
deleted file mode 100644
index e1956ff..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/Makefile
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Cross Platform Makefile
-# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
-#
-# You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged.
-# Mac OS X:
-# brew install sdl3
-
-#CXX = g++
-#CXX = clang++
-
-EXE = example_sdl3_vulkan
-IMGUI_DIR = ../..
-SOURCES = main.cpp
-SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
-SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_vulkan.cpp
-OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
-UNAME_S := $(shell uname -s)
-
-CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
-CXXFLAGS += -g -Wall -Wformat
-LIBS =
-
-
-##---------------------------------------------------------------------
-## BUILD FLAGS PER PLATFORM
-##---------------------------------------------------------------------
-
-ifeq ($(UNAME_S), Linux) #LINUX
- ECHO_MESSAGE = "Linux"
- LIBS += -ldl
- LIBS += `pkg-config --libs sdl3 vulkan`
-
- CXXFLAGS += `pkg-config --cflags sdl3 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(UNAME_S), Darwin) #APPLE
- ECHO_MESSAGE = "Mac OS X"
- LIBS += -framework Cocoa -framework IOKit -framework CoreVideo
- LIBS += `pkg-config --libs sdl3 vulkan`
- LIBS += -L/usr/local/lib -L/opt/local/lib
-
- CXXFLAGS += `pkg-config --cflags sdl3 vulkan`
- CXXFLAGS += -I/usr/local/include -I/opt/local/include
- CFLAGS = $(CXXFLAGS)
-endif
-
-ifeq ($(OS), Windows_NT)
- ECHO_MESSAGE = "MinGW"
- LIBS += -lgdi32 -limm32 `pkg-config --static --libs sdl3 vulkan`
-
- CXXFLAGS += `pkg-config --cflags sdl3 vulkan`
- CFLAGS = $(CXXFLAGS)
-endif
-
-##---------------------------------------------------------------------
-## BUILD RULES
-##---------------------------------------------------------------------
-
-%.o:%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-%.o:$(IMGUI_DIR)/backends/%.cpp
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-all: $(EXE)
- @echo Build complete for $(ECHO_MESSAGE)
-
-$(EXE): $(OBJS)
- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
-
-clean:
- rm -f $(EXE) $(OBJS)
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win32.bat b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win32.bat
deleted file mode 100644
index 3e26d30..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win32.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl3_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL3.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win64.bat b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win64.bat
deleted file mode 100644
index 5d038d1..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/build_win64.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler.
-
-@set OUT_EXE=example_sdl3_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL3.lib shell32.lib vulkan-1.lib
-
-@set OUT_DIR=Debug
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
-
-@set OUT_DIR=Release
-@REM mkdir %OUT_DIR%
-@REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj
deleted file mode 100644
index d48e4af..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{663A7E89-1E42-4222-921C-177F5B5910DF}</ProjectGuid>
- <RootNamespace>example_sdl3_vulkan</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%SDL3_DIR%\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%SDL3_DIR%\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>vulkan-1.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <IgnoreSpecificDefaultLibraries>
- </IgnoreSpecificDefaultLibraries>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters
deleted file mode 100644
index 46ebb58..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{20b90ce4-7fcb-4731-b9a0-075f875de82d}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{f18ab499-84e1-499f-8eff-9754361e0e52}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_sdl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_sdl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/main.cpp b/libs/imgui-1.92.1/examples/example_sdl3_vulkan/main.cpp
deleted file mode 100644
index df7f5ef..0000000
--- a/libs/imgui-1.92.1/examples/example_sdl3_vulkan/main.cpp
+++ /dev/null
@@ -1,558 +0,0 @@
-// Dear ImGui: standalone example application for SDL3 + Vulkan
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-#include "imgui.h"
-#include "imgui_impl_sdl3.h"
-#include "imgui_impl_vulkan.h"
-#include <stdio.h> // printf, fprintf
-#include <stdlib.h> // abort
-#include <SDL3/SDL.h>
-#include <SDL3/SDL_vulkan.h>
-
-// This example doesn't compile with Emscripten yet! Awaiting SDL3 support.
-#ifdef __EMSCRIPTEN__
-#include "../libs/emscripten/emscripten_mainloop_stub.h"
-#endif
-
-// Volk headers
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
-#define VOLK_IMPLEMENTATION
-#include <volk.h>
-#endif
-
-//#define APP_USE_UNLIMITED_FRAME_RATE
-#ifdef _DEBUG
-#define APP_USE_VULKAN_DEBUG_REPORT
-static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
-#endif
-
-// Data
-static VkAllocationCallbacks* g_Allocator = nullptr;
-static VkInstance g_Instance = VK_NULL_HANDLE;
-static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
-static VkDevice g_Device = VK_NULL_HANDLE;
-static uint32_t g_QueueFamily = (uint32_t)-1;
-static VkQueue g_Queue = VK_NULL_HANDLE;
-static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
-static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
-
-static ImGui_ImplVulkanH_Window g_MainWindowData;
-static uint32_t g_MinImageCount = 2;
-static bool g_SwapChainRebuild = false;
-
-static void check_vk_result(VkResult err)
-{
- if (err == VK_SUCCESS)
- return;
- fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err);
- if (err < 0)
- abort();
-}
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
-static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
-{
- (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
- fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
- return VK_FALSE;
-}
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
-static bool IsExtensionAvailable(const ImVector<VkExtensionProperties>& properties, const char* extension)
-{
- for (const VkExtensionProperties& p : properties)
- if (strcmp(p.extensionName, extension) == 0)
- return true;
- return false;
-}
-
-static void SetupVulkan(ImVector<const char*> instance_extensions)
-{
- VkResult err;
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkInitialize();
-#endif
-
- // Create Vulkan Instance
- {
- VkInstanceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-
- // Enumerate available extensions
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data);
- check_vk_result(err);
-
- // Enable required extensions
- if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
- instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
-#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
- {
- instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
- create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
- }
-#endif
-
- // Enabling validation layers
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
- create_info.enabledLayerCount = 1;
- create_info.ppEnabledLayerNames = layers;
- instance_extensions.push_back("VK_EXT_debug_report");
-#endif
-
- // Create Vulkan Instance
- create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size;
- create_info.ppEnabledExtensionNames = instance_extensions.Data;
- err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
- check_vk_result(err);
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkLoadInstance(g_Instance);
-#endif
-
- // Setup the debug report callback
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
- IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr);
- VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
- debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
- debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
- debug_report_ci.pfnCallback = debug_report;
- debug_report_ci.pUserData = nullptr;
- err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
- check_vk_result(err);
-#endif
- }
-
- // Select Physical Device (GPU)
- g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance);
- IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE);
-
- // Select graphics queue family
- g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice);
- IM_ASSERT(g_QueueFamily != (uint32_t)-1);
-
- // Create Logical Device (with 1 queue)
- {
- ImVector<const char*> device_extensions;
- device_extensions.push_back("VK_KHR_swapchain");
-
- // Enumerate physical device extension
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data);
-#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))
- device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
-#endif
-
- const float queue_priority[] = { 1.0f };
- VkDeviceQueueCreateInfo queue_info[1] = {};
- queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queue_info[0].queueFamilyIndex = g_QueueFamily;
- queue_info[0].queueCount = 1;
- queue_info[0].pQueuePriorities = queue_priority;
- VkDeviceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
- create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
- create_info.pQueueCreateInfos = queue_info;
- create_info.enabledExtensionCount = (uint32_t)device_extensions.Size;
- create_info.ppEnabledExtensionNames = device_extensions.Data;
- err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
- check_vk_result(err);
- vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
- }
-
- // Create Descriptor Pool
- // If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets.
- {
- VkDescriptorPoolSize pool_sizes[] =
- {
- { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE },
- };
- VkDescriptorPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
- pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
- pool_info.maxSets = 0;
- for (VkDescriptorPoolSize& pool_size : pool_sizes)
- pool_info.maxSets += pool_size.descriptorCount;
- pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
- pool_info.pPoolSizes = pool_sizes;
- err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
- check_vk_result(err);
- }
-}
-
-// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo.
-// Your real engine/app may not use them.
-static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height)
-{
- wd->Surface = surface;
-
- // Check for WSI support
- VkBool32 res;
- vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
- if (res != VK_TRUE)
- {
- fprintf(stderr, "Error no WSI support on physical device 0\n");
- exit(-1);
- }
-
- // Select Surface Format
- const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
- const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
- wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
-
- // Select Present Mode
-#ifdef APP_USE_UNLIMITED_FRAME_RATE
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
-#else
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
-#endif
- wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
- //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
-
- // Create SwapChain, RenderPass, Framebuffer, etc.
- IM_ASSERT(g_MinImageCount >= 2);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
-}
-
-static void CleanupVulkan()
-{
- vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- // Remove the debug report callback
- auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
- f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
- vkDestroyDevice(g_Device, g_Allocator);
- vkDestroyInstance(g_Instance, g_Allocator);
-}
-
-static void CleanupVulkanWindow()
-{
- ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator);
-}
-
-static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
-{
- VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
-
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex];
- {
- err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
- check_vk_result(err);
-
- err = vkResetFences(g_Device, 1, &fd->Fence);
- check_vk_result(err);
- }
- {
- err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
- check_vk_result(err);
- VkCommandBufferBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
- check_vk_result(err);
- }
- {
- VkRenderPassBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- info.renderPass = wd->RenderPass;
- info.framebuffer = fd->Framebuffer;
- info.renderArea.extent.width = wd->Width;
- info.renderArea.extent.height = wd->Height;
- info.clearValueCount = 1;
- info.pClearValues = &wd->ClearValue;
- vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
- }
-
- // Record dear imgui primitives into command buffer
- ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer);
-
- // Submit command buffer
- vkCmdEndRenderPass(fd->CommandBuffer);
- {
- VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- VkSubmitInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &image_acquired_semaphore;
- info.pWaitDstStageMask = &wait_stage;
- info.commandBufferCount = 1;
- info.pCommandBuffers = &fd->CommandBuffer;
- info.signalSemaphoreCount = 1;
- info.pSignalSemaphores = &render_complete_semaphore;
-
- err = vkEndCommandBuffer(fd->CommandBuffer);
- check_vk_result(err);
- err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
- check_vk_result(err);
- }
-}
-
-static void FramePresent(ImGui_ImplVulkanH_Window* wd)
-{
- if (g_SwapChainRebuild)
- return;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkPresentInfoKHR info = {};
- info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &render_complete_semaphore;
- info.swapchainCount = 1;
- info.pSwapchains = &wd->Swapchain;
- info.pImageIndices = &wd->FrameIndex;
- VkResult err = vkQueuePresentKHR(g_Queue, &info);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
- wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
-}
-
-// Main code
-int main(int, char**)
-{
- // Setup SDL
- // [If using SDL_MAIN_USE_CALLBACKS: all code below until the main loop starts would likely be your SDL_AppInit() function]
- if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
- {
- printf("Error: SDL_Init(): %s\n", SDL_GetError());
- return -1;
- }
-
- // Create window with Vulkan graphics context
- float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay());
- SDL_WindowFlags window_flags = SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY;
- SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+Vulkan example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags);
- if (window == nullptr)
- {
- printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
- return -1;
- }
-
- ImVector<const char*> extensions;
- {
- uint32_t sdl_extensions_count = 0;
- const char* const* sdl_extensions = SDL_Vulkan_GetInstanceExtensions(&sdl_extensions_count);
- for (uint32_t n = 0; n < sdl_extensions_count; n++)
- extensions.push_back(sdl_extensions[n]);
- }
- SetupVulkan(extensions);
-
- // Create Window Surface
- VkSurfaceKHR surface;
- VkResult err;
- if (SDL_Vulkan_CreateSurface(window, g_Instance, g_Allocator, &surface) == 0)
- {
- printf("Failed to create Vulkan surface.\n");
- return 1;
- }
-
- // Create Framebuffers
- int w, h;
- SDL_GetWindowSize(window, &w, &h);
- ImGui_ImplVulkanH_Window* wd = &g_MainWindowData;
- SetupVulkanWindow(wd, surface, w, h);
- SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
- SDL_ShowWindow(window);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplSDL3_InitForVulkan(window);
- ImGui_ImplVulkan_InitInfo init_info = {};
- //init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
- init_info.Instance = g_Instance;
- init_info.PhysicalDevice = g_PhysicalDevice;
- init_info.Device = g_Device;
- init_info.QueueFamily = g_QueueFamily;
- init_info.Queue = g_Queue;
- init_info.PipelineCache = g_PipelineCache;
- init_info.DescriptorPool = g_DescriptorPool;
- init_info.RenderPass = wd->RenderPass;
- init_info.Subpass = 0;
- init_info.MinImageCount = g_MinImageCount;
- init_info.ImageCount = wd->ImageCount;
- init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
- init_info.Allocator = g_Allocator;
- init_info.CheckVkResultFn = check_vk_result;
- ImGui_ImplVulkan_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle events (inputs, window resize, etc.)
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
- // [If using SDL_MAIN_USE_CALLBACKS: call ImGui_ImplSDL3_ProcessEvent() from your SDL_AppEvent() function]
- SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- ImGui_ImplSDL3_ProcessEvent(&event);
- if (event.type == SDL_EVENT_QUIT)
- done = true;
- if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window))
- done = true;
- }
-
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
- if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
- {
- SDL_Delay(10);
- continue;
- }
-
- // Resize swap chain?
- int fb_width, fb_height;
- SDL_GetWindowSize(window, &fb_width, &fb_height);
- if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height))
- {
- ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount);
- g_MainWindowData.FrameIndex = 0;
- g_SwapChainRebuild = false;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplVulkan_NewFrame();
- ImGui_ImplSDL3_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
- const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
- if (!is_minimized)
- {
- wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w;
- wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w;
- wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w;
- wd->ClearValue.color.float32[3] = clear_color.w;
- FrameRender(wd, draw_data);
- FramePresent(wd);
- }
- }
-
- // Cleanup
- // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function]
- err = vkDeviceWaitIdle(g_Device);
- check_vk_result(err);
- ImGui_ImplVulkan_Shutdown();
- ImGui_ImplSDL3_Shutdown();
- ImGui::DestroyContext();
-
- CleanupVulkanWindow();
- CleanupVulkan();
-
- SDL_DestroyWindow(window);
- SDL_Quit();
-
- return 0;
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx10/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_directx10/build_win32.bat
deleted file mode 100644
index 78a6e37..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx10/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_directx10
-@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include"
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\backends\imgui_impl_dx10.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj b/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj
deleted file mode 100644
index d11aed8..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{345A953E-A004-4648-B442-DC5F9F11068C}</ProjectGuid>
- <RootNamespace>example_win32_directx10</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_dx10.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_dx10.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters
deleted file mode 100644
index 33ab99b..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{08e36723-ce4f-4cff-9662-c40801cf1acf}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_dx10.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_dx10.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx10/main.cpp b/libs/imgui-1.92.1/examples/example_win32_directx10/main.cpp
deleted file mode 100644
index 23033d6..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx10/main.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-// Dear ImGui: standalone example application for DirectX 10
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_win32.h"
-#include "imgui_impl_dx10.h"
-#include <d3d10_1.h>
-#include <d3d10.h>
-#include <tchar.h>
-
-// Data
-static ID3D10Device* g_pd3dDevice = nullptr;
-static IDXGISwapChain* g_pSwapChain = nullptr;
-static bool g_SwapChainOccluded = false;
-static UINT g_ResizeWidth = 0, g_ResizeHeight = 0;
-static ID3D10RenderTargetView* g_mainRenderTargetView = nullptr;
-
-// Forward declarations of helper functions
-bool CreateDeviceD3D(HWND hWnd);
-void CleanupDeviceD3D();
-void CreateRenderTarget();
-void CleanupRenderTarget();
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Make process DPI aware and obtain main monitor scale
- ImGui_ImplWin32_EnableDpiAwareness();
- float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
-
- // Create application window
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX10 Example", WS_OVERLAPPEDWINDOW, 100, 100, (int)(1280 * main_scale), (int)(800 * main_scale), nullptr, nullptr, wc.hInstance, nullptr);
-
- // Initialize Direct3D
- if (!CreateDeviceD3D(hwnd))
- {
- CleanupDeviceD3D();
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
- return 1;
- }
-
- // Show the window
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_Init(hwnd);
- ImGui_ImplDX10_Init(g_pd3dDevice);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
-
- // Handle window being minimized or screen locked
- if (g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED)
- {
- ::Sleep(10);
- continue;
- }
- g_SwapChainOccluded = false;
-
- // Handle window resize (we don't resize directly in the WM_SIZE handler)
- if (g_ResizeWidth != 0 && g_ResizeHeight != 0)
- {
- CleanupRenderTarget();
- g_pSwapChain->ResizeBuffers(0, g_ResizeWidth, g_ResizeHeight, DXGI_FORMAT_UNKNOWN, 0);
- g_ResizeWidth = g_ResizeHeight = 0;
- CreateRenderTarget();
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplDX10_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
- g_pd3dDevice->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr);
- g_pd3dDevice->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha);
- ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData());
-
- // Present
- HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync
- //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync
- g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED);
- }
-
- // Cleanup
- ImGui_ImplDX10_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceD3D();
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-
-bool CreateDeviceD3D(HWND hWnd)
-{
- // Setup swap chain
- DXGI_SWAP_CHAIN_DESC sd;
- ZeroMemory(&sd, sizeof(sd));
- sd.BufferCount = 2;
- sd.BufferDesc.Width = 0;
- sd.BufferDesc.Height = 0;
- sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- sd.BufferDesc.RefreshRate.Numerator = 60;
- sd.BufferDesc.RefreshRate.Denominator = 1;
- sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
- sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
- sd.OutputWindow = hWnd;
- sd.SampleDesc.Count = 1;
- sd.SampleDesc.Quality = 0;
- sd.Windowed = TRUE;
- sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
-
- UINT createDeviceFlags = 0;
- //createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
- HRESULT res = D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice);
- if (res == DXGI_ERROR_UNSUPPORTED) // Try high-performance WARP software driver if hardware is not available.
- res = D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_WARP, nullptr, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice);
- if (res != S_OK)
- return false;
-
- CreateRenderTarget();
- return true;
-}
-
-void CleanupDeviceD3D()
-{
- CleanupRenderTarget();
- if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; }
- if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
-}
-
-void CreateRenderTarget()
-{
- ID3D10Texture2D* pBackBuffer;
- g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
- g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView);
- pBackBuffer->Release();
-}
-
-void CleanupRenderTarget()
-{
- if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; }
-}
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (wParam == SIZE_MINIMIZED)
- return 0;
- g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize
- g_ResizeHeight = (UINT)HIWORD(lParam);
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx11/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_directx11/build_win32.bat
deleted file mode 100644
index c9a717c..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx11/build_win32.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_directx11
-@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include"
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
-
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj b/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj
deleted file mode 100644
index bace6a2..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{9F316E83-5AE5-4939-A723-305A94F48005}</ProjectGuid>
- <RootNamespace>example_win32_directx11</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_dx11.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_dx11.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
deleted file mode 100644
index 63032a6..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{08e36723-ce4f-4cff-9662-c40801cf1acf}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_dx11.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_dx11.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx11/main.cpp b/libs/imgui-1.92.1/examples/example_win32_directx11/main.cpp
deleted file mode 100644
index c80114c..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx11/main.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-// Dear ImGui: standalone example application for DirectX 11
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_win32.h"
-#include "imgui_impl_dx11.h"
-#include <d3d11.h>
-#include <tchar.h>
-
-// Data
-static ID3D11Device* g_pd3dDevice = nullptr;
-static ID3D11DeviceContext* g_pd3dDeviceContext = nullptr;
-static IDXGISwapChain* g_pSwapChain = nullptr;
-static bool g_SwapChainOccluded = false;
-static UINT g_ResizeWidth = 0, g_ResizeHeight = 0;
-static ID3D11RenderTargetView* g_mainRenderTargetView = nullptr;
-
-// Forward declarations of helper functions
-bool CreateDeviceD3D(HWND hWnd);
-void CleanupDeviceD3D();
-void CreateRenderTarget();
-void CleanupRenderTarget();
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Make process DPI aware and obtain main monitor scale
- ImGui_ImplWin32_EnableDpiAwareness();
- float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
-
- // Create application window
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, (int)(1280 * main_scale), (int)(800 * main_scale), nullptr, nullptr, wc.hInstance, nullptr);
-
- // Initialize Direct3D
- if (!CreateDeviceD3D(hwnd))
- {
- CleanupDeviceD3D();
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
- return 1;
- }
-
- // Show the window
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_Init(hwnd);
- ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
-
- // Handle window being minimized or screen locked
- if (g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED)
- {
- ::Sleep(10);
- continue;
- }
- g_SwapChainOccluded = false;
-
- // Handle window resize (we don't resize directly in the WM_SIZE handler)
- if (g_ResizeWidth != 0 && g_ResizeHeight != 0)
- {
- CleanupRenderTarget();
- g_pSwapChain->ResizeBuffers(0, g_ResizeWidth, g_ResizeHeight, DXGI_FORMAT_UNKNOWN, 0);
- g_ResizeWidth = g_ResizeHeight = 0;
- CreateRenderTarget();
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplDX11_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
- g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, nullptr);
- g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, clear_color_with_alpha);
- ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
-
- // Present
- HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync
- //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync
- g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED);
- }
-
- // Cleanup
- ImGui_ImplDX11_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceD3D();
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-
-bool CreateDeviceD3D(HWND hWnd)
-{
- // Setup swap chain
- DXGI_SWAP_CHAIN_DESC sd;
- ZeroMemory(&sd, sizeof(sd));
- sd.BufferCount = 2;
- sd.BufferDesc.Width = 0;
- sd.BufferDesc.Height = 0;
- sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- sd.BufferDesc.RefreshRate.Numerator = 60;
- sd.BufferDesc.RefreshRate.Denominator = 1;
- sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
- sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
- sd.OutputWindow = hWnd;
- sd.SampleDesc.Count = 1;
- sd.SampleDesc.Quality = 0;
- sd.Windowed = TRUE;
- sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
-
- UINT createDeviceFlags = 0;
- //createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
- D3D_FEATURE_LEVEL featureLevel;
- const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, };
- HRESULT res = D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext);
- if (res == DXGI_ERROR_UNSUPPORTED) // Try high-performance WARP software driver if hardware is not available.
- res = D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_WARP, nullptr, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext);
- if (res != S_OK)
- return false;
-
- CreateRenderTarget();
- return true;
-}
-
-void CleanupDeviceD3D()
-{
- CleanupRenderTarget();
- if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; }
- if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = nullptr; }
- if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
-}
-
-void CreateRenderTarget()
-{
- ID3D11Texture2D* pBackBuffer;
- g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
- g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView);
- pBackBuffer->Release();
-}
-
-void CleanupRenderTarget()
-{
- if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = nullptr; }
-}
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (wParam == SIZE_MINIMIZED)
- return 0;
- g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize
- g_ResizeHeight = (UINT)HIWORD(lParam);
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx12/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_directx12/build_win32.bat
deleted file mode 100644
index cb5e8e2..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx12/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_directx12
-@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared"
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx12.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=d3d12.lib d3dcompiler.lib dxgi.lib
-mkdir Debug
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj b/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj
deleted file mode 100644
index bb98c41..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{b4cf9797-519d-4afe-a8f4-5141a6b521d3}</ProjectGuid>
- <RootNamespace>example_win32_directx12</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_dx12.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_dx12.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <ItemGroup>
- <Natvis Include="..\..\misc\debuggers\imgui.natvis" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters
deleted file mode 100644
index 23a9952..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{fb3d294f-51ec-478e-a627-25831c80fefd}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{4f33ddea-9910-456d-b868-4267eb3c2b19}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_dx12.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_dx12.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <Natvis Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </Natvis>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx12/main.cpp b/libs/imgui-1.92.1/examples/example_win32_directx12/main.cpp
deleted file mode 100644
index 3a9ba4f..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx12/main.cpp
+++ /dev/null
@@ -1,547 +0,0 @@
-// Dear ImGui: standalone example application for DirectX 12
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_win32.h"
-#include "imgui_impl_dx12.h"
-#include <d3d12.h>
-#include <dxgi1_4.h>
-#include <tchar.h>
-
-#ifdef _DEBUG
-#define DX12_ENABLE_DEBUG_LAYER
-#endif
-
-#ifdef DX12_ENABLE_DEBUG_LAYER
-#include <dxgidebug.h>
-#pragma comment(lib, "dxguid.lib")
-#endif
-
-// Config for example app
-static const int APP_NUM_FRAMES_IN_FLIGHT = 2;
-static const int APP_NUM_BACK_BUFFERS = 2;
-static const int APP_SRV_HEAP_SIZE = 64;
-
-struct FrameContext
-{
- ID3D12CommandAllocator* CommandAllocator;
- UINT64 FenceValue;
-};
-
-// Simple free list based allocator
-struct ExampleDescriptorHeapAllocator
-{
- ID3D12DescriptorHeap* Heap = nullptr;
- D3D12_DESCRIPTOR_HEAP_TYPE HeapType = D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES;
- D3D12_CPU_DESCRIPTOR_HANDLE HeapStartCpu;
- D3D12_GPU_DESCRIPTOR_HANDLE HeapStartGpu;
- UINT HeapHandleIncrement;
- ImVector<int> FreeIndices;
-
- void Create(ID3D12Device* device, ID3D12DescriptorHeap* heap)
- {
- IM_ASSERT(Heap == nullptr && FreeIndices.empty());
- Heap = heap;
- D3D12_DESCRIPTOR_HEAP_DESC desc = heap->GetDesc();
- HeapType = desc.Type;
- HeapStartCpu = Heap->GetCPUDescriptorHandleForHeapStart();
- HeapStartGpu = Heap->GetGPUDescriptorHandleForHeapStart();
- HeapHandleIncrement = device->GetDescriptorHandleIncrementSize(HeapType);
- FreeIndices.reserve((int)desc.NumDescriptors);
- for (int n = desc.NumDescriptors; n > 0; n--)
- FreeIndices.push_back(n - 1);
- }
- void Destroy()
- {
- Heap = nullptr;
- FreeIndices.clear();
- }
- void Alloc(D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_desc_handle)
- {
- IM_ASSERT(FreeIndices.Size > 0);
- int idx = FreeIndices.back();
- FreeIndices.pop_back();
- out_cpu_desc_handle->ptr = HeapStartCpu.ptr + (idx * HeapHandleIncrement);
- out_gpu_desc_handle->ptr = HeapStartGpu.ptr + (idx * HeapHandleIncrement);
- }
- void Free(D3D12_CPU_DESCRIPTOR_HANDLE out_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE out_gpu_desc_handle)
- {
- int cpu_idx = (int)((out_cpu_desc_handle.ptr - HeapStartCpu.ptr) / HeapHandleIncrement);
- int gpu_idx = (int)((out_gpu_desc_handle.ptr - HeapStartGpu.ptr) / HeapHandleIncrement);
- IM_ASSERT(cpu_idx == gpu_idx);
- FreeIndices.push_back(cpu_idx);
- }
-};
-
-// Data
-static FrameContext g_frameContext[APP_NUM_FRAMES_IN_FLIGHT] = {};
-static UINT g_frameIndex = 0;
-
-static ID3D12Device* g_pd3dDevice = nullptr;
-static ID3D12DescriptorHeap* g_pd3dRtvDescHeap = nullptr;
-static ID3D12DescriptorHeap* g_pd3dSrvDescHeap = nullptr;
-static ExampleDescriptorHeapAllocator g_pd3dSrvDescHeapAlloc;
-static ID3D12CommandQueue* g_pd3dCommandQueue = nullptr;
-static ID3D12GraphicsCommandList* g_pd3dCommandList = nullptr;
-static ID3D12Fence* g_fence = nullptr;
-static HANDLE g_fenceEvent = nullptr;
-static UINT64 g_fenceLastSignaledValue = 0;
-static IDXGISwapChain3* g_pSwapChain = nullptr;
-static bool g_SwapChainOccluded = false;
-static HANDLE g_hSwapChainWaitableObject = nullptr;
-static ID3D12Resource* g_mainRenderTargetResource[APP_NUM_BACK_BUFFERS] = {};
-static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[APP_NUM_BACK_BUFFERS] = {};
-
-// Forward declarations of helper functions
-bool CreateDeviceD3D(HWND hWnd);
-void CleanupDeviceD3D();
-void CreateRenderTarget();
-void CleanupRenderTarget();
-void WaitForLastSubmittedFrame();
-FrameContext* WaitForNextFrameResources();
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Make process DPI aware and obtain main monitor scale
- ImGui_ImplWin32_EnableDpiAwareness();
- float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
-
- // Create application window
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX12 Example", WS_OVERLAPPEDWINDOW, 100, 100, (int)(1280 * main_scale), (int)(800 * main_scale), nullptr, nullptr, wc.hInstance, nullptr);
-
- // Initialize Direct3D
- if (!CreateDeviceD3D(hwnd))
- {
- CleanupDeviceD3D();
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
- return 1;
- }
-
- // Show the window
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_Init(hwnd);
-
- ImGui_ImplDX12_InitInfo init_info = {};
- init_info.Device = g_pd3dDevice;
- init_info.CommandQueue = g_pd3dCommandQueue;
- init_info.NumFramesInFlight = APP_NUM_FRAMES_IN_FLIGHT;
- init_info.RTVFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
- init_info.DSVFormat = DXGI_FORMAT_UNKNOWN;
- // Allocating SRV descriptors (for textures) is up to the application, so we provide callbacks.
- // (current version of the backend will only allocate one descriptor, future versions will need to allocate more)
- init_info.SrvDescriptorHeap = g_pd3dSrvDescHeap;
- init_info.SrvDescriptorAllocFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_handle, D3D12_GPU_DESCRIPTOR_HANDLE* out_gpu_handle) { return g_pd3dSrvDescHeapAlloc.Alloc(out_cpu_handle, out_gpu_handle); };
- init_info.SrvDescriptorFreeFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle) { return g_pd3dSrvDescHeapAlloc.Free(cpu_handle, gpu_handle); };
- ImGui_ImplDX12_Init(&init_info);
-
- // Before 1.91.6: our signature was using a single descriptor. From 1.92, specifying SrvDescriptorAllocFn/SrvDescriptorFreeFn will be required to benefit from new features.
- //ImGui_ImplDX12_Init(g_pd3dDevice, APP_NUM_FRAMES_IN_FLIGHT, DXGI_FORMAT_R8G8B8A8_UNORM, g_pd3dSrvDescHeap, g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(), g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
-
- // Handle window screen locked
- if ((g_SwapChainOccluded && g_pSwapChain->Present(0, DXGI_PRESENT_TEST) == DXGI_STATUS_OCCLUDED) || ::IsIconic(hwnd))
- {
- ::Sleep(10);
- continue;
- }
- g_SwapChainOccluded = false;
-
- // Start the Dear ImGui frame
- ImGui_ImplDX12_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
-
- FrameContext* frameCtx = WaitForNextFrameResources();
- UINT backBufferIdx = g_pSwapChain->GetCurrentBackBufferIndex();
- frameCtx->CommandAllocator->Reset();
-
- D3D12_RESOURCE_BARRIER barrier = {};
- barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
- barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
- barrier.Transition.pResource = g_mainRenderTargetResource[backBufferIdx];
- barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
- barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT;
- barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET;
- g_pd3dCommandList->Reset(frameCtx->CommandAllocator, nullptr);
- g_pd3dCommandList->ResourceBarrier(1, &barrier);
-
- // Render Dear ImGui graphics
- const float clear_color_with_alpha[4] = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
- g_pd3dCommandList->ClearRenderTargetView(g_mainRenderTargetDescriptor[backBufferIdx], clear_color_with_alpha, 0, nullptr);
- g_pd3dCommandList->OMSetRenderTargets(1, &g_mainRenderTargetDescriptor[backBufferIdx], FALSE, nullptr);
- g_pd3dCommandList->SetDescriptorHeaps(1, &g_pd3dSrvDescHeap);
- ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), g_pd3dCommandList);
- barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET;
- barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;
- g_pd3dCommandList->ResourceBarrier(1, &barrier);
- g_pd3dCommandList->Close();
-
- g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList);
-
- // Present
- HRESULT hr = g_pSwapChain->Present(1, 0); // Present with vsync
- //HRESULT hr = g_pSwapChain->Present(0, 0); // Present without vsync
- g_SwapChainOccluded = (hr == DXGI_STATUS_OCCLUDED);
-
- UINT64 fenceValue = g_fenceLastSignaledValue + 1;
- g_pd3dCommandQueue->Signal(g_fence, fenceValue);
- g_fenceLastSignaledValue = fenceValue;
- frameCtx->FenceValue = fenceValue;
- }
-
- WaitForLastSubmittedFrame();
-
- // Cleanup
- ImGui_ImplDX12_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceD3D();
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-
-bool CreateDeviceD3D(HWND hWnd)
-{
- // Setup swap chain
- DXGI_SWAP_CHAIN_DESC1 sd;
- {
- ZeroMemory(&sd, sizeof(sd));
- sd.BufferCount = APP_NUM_BACK_BUFFERS;
- sd.Width = 0;
- sd.Height = 0;
- sd.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
- sd.Flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT;
- sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
- sd.SampleDesc.Count = 1;
- sd.SampleDesc.Quality = 0;
- sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
- sd.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
- sd.Scaling = DXGI_SCALING_STRETCH;
- sd.Stereo = FALSE;
- }
-
- // [DEBUG] Enable debug interface
-#ifdef DX12_ENABLE_DEBUG_LAYER
- ID3D12Debug* pdx12Debug = nullptr;
- if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&pdx12Debug))))
- pdx12Debug->EnableDebugLayer();
-#endif
-
- // Create device
- D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0;
- if (D3D12CreateDevice(nullptr, featureLevel, IID_PPV_ARGS(&g_pd3dDevice)) != S_OK)
- return false;
-
- // [DEBUG] Setup debug interface to break on any warnings/errors
-#ifdef DX12_ENABLE_DEBUG_LAYER
- if (pdx12Debug != nullptr)
- {
- ID3D12InfoQueue* pInfoQueue = nullptr;
- g_pd3dDevice->QueryInterface(IID_PPV_ARGS(&pInfoQueue));
- pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, true);
- pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_CORRUPTION, true);
- pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING, true);
- pInfoQueue->Release();
- pdx12Debug->Release();
- }
-#endif
-
- {
- D3D12_DESCRIPTOR_HEAP_DESC desc = {};
- desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
- desc.NumDescriptors = APP_NUM_BACK_BUFFERS;
- desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
- desc.NodeMask = 1;
- if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dRtvDescHeap)) != S_OK)
- return false;
-
- SIZE_T rtvDescriptorSize = g_pd3dDevice->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
- D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = g_pd3dRtvDescHeap->GetCPUDescriptorHandleForHeapStart();
- for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
- {
- g_mainRenderTargetDescriptor[i] = rtvHandle;
- rtvHandle.ptr += rtvDescriptorSize;
- }
- }
-
- {
- D3D12_DESCRIPTOR_HEAP_DESC desc = {};
- desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
- desc.NumDescriptors = APP_SRV_HEAP_SIZE;
- desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
- if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dSrvDescHeap)) != S_OK)
- return false;
- g_pd3dSrvDescHeapAlloc.Create(g_pd3dDevice, g_pd3dSrvDescHeap);
- }
-
- {
- D3D12_COMMAND_QUEUE_DESC desc = {};
- desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
- desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
- desc.NodeMask = 1;
- if (g_pd3dDevice->CreateCommandQueue(&desc, IID_PPV_ARGS(&g_pd3dCommandQueue)) != S_OK)
- return false;
- }
-
- for (UINT i = 0; i < APP_NUM_FRAMES_IN_FLIGHT; i++)
- if (g_pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&g_frameContext[i].CommandAllocator)) != S_OK)
- return false;
-
- if (g_pd3dDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, g_frameContext[0].CommandAllocator, nullptr, IID_PPV_ARGS(&g_pd3dCommandList)) != S_OK ||
- g_pd3dCommandList->Close() != S_OK)
- return false;
-
- if (g_pd3dDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&g_fence)) != S_OK)
- return false;
-
- g_fenceEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
- if (g_fenceEvent == nullptr)
- return false;
-
- {
- IDXGIFactory4* dxgiFactory = nullptr;
- IDXGISwapChain1* swapChain1 = nullptr;
- if (CreateDXGIFactory1(IID_PPV_ARGS(&dxgiFactory)) != S_OK)
- return false;
- if (dxgiFactory->CreateSwapChainForHwnd(g_pd3dCommandQueue, hWnd, &sd, nullptr, nullptr, &swapChain1) != S_OK)
- return false;
- if (swapChain1->QueryInterface(IID_PPV_ARGS(&g_pSwapChain)) != S_OK)
- return false;
- swapChain1->Release();
- dxgiFactory->Release();
- g_pSwapChain->SetMaximumFrameLatency(APP_NUM_BACK_BUFFERS);
- g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
- }
-
- CreateRenderTarget();
- return true;
-}
-
-void CleanupDeviceD3D()
-{
- CleanupRenderTarget();
- if (g_pSwapChain) { g_pSwapChain->SetFullscreenState(false, nullptr); g_pSwapChain->Release(); g_pSwapChain = nullptr; }
- if (g_hSwapChainWaitableObject != nullptr) { CloseHandle(g_hSwapChainWaitableObject); }
- for (UINT i = 0; i < APP_NUM_FRAMES_IN_FLIGHT; i++)
- if (g_frameContext[i].CommandAllocator) { g_frameContext[i].CommandAllocator->Release(); g_frameContext[i].CommandAllocator = nullptr; }
- if (g_pd3dCommandQueue) { g_pd3dCommandQueue->Release(); g_pd3dCommandQueue = nullptr; }
- if (g_pd3dCommandList) { g_pd3dCommandList->Release(); g_pd3dCommandList = nullptr; }
- if (g_pd3dRtvDescHeap) { g_pd3dRtvDescHeap->Release(); g_pd3dRtvDescHeap = nullptr; }
- if (g_pd3dSrvDescHeap) { g_pd3dSrvDescHeap->Release(); g_pd3dSrvDescHeap = nullptr; }
- if (g_fence) { g_fence->Release(); g_fence = nullptr; }
- if (g_fenceEvent) { CloseHandle(g_fenceEvent); g_fenceEvent = nullptr; }
- if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
-
-#ifdef DX12_ENABLE_DEBUG_LAYER
- IDXGIDebug1* pDebug = nullptr;
- if (SUCCEEDED(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&pDebug))))
- {
- pDebug->ReportLiveObjects(DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_SUMMARY);
- pDebug->Release();
- }
-#endif
-}
-
-void CreateRenderTarget()
-{
- for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
- {
- ID3D12Resource* pBackBuffer = nullptr;
- g_pSwapChain->GetBuffer(i, IID_PPV_ARGS(&pBackBuffer));
- g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, g_mainRenderTargetDescriptor[i]);
- g_mainRenderTargetResource[i] = pBackBuffer;
- }
-}
-
-void CleanupRenderTarget()
-{
- WaitForLastSubmittedFrame();
-
- for (UINT i = 0; i < APP_NUM_BACK_BUFFERS; i++)
- if (g_mainRenderTargetResource[i]) { g_mainRenderTargetResource[i]->Release(); g_mainRenderTargetResource[i] = nullptr; }
-}
-
-void WaitForLastSubmittedFrame()
-{
- FrameContext* frameCtx = &g_frameContext[g_frameIndex % APP_NUM_FRAMES_IN_FLIGHT];
-
- UINT64 fenceValue = frameCtx->FenceValue;
- if (fenceValue == 0)
- return; // No fence was signaled
-
- frameCtx->FenceValue = 0;
- if (g_fence->GetCompletedValue() >= fenceValue)
- return;
-
- g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent);
- WaitForSingleObject(g_fenceEvent, INFINITE);
-}
-
-FrameContext* WaitForNextFrameResources()
-{
- UINT nextFrameIndex = g_frameIndex + 1;
- g_frameIndex = nextFrameIndex;
-
- HANDLE waitableObjects[] = { g_hSwapChainWaitableObject, nullptr };
- DWORD numWaitableObjects = 1;
-
- FrameContext* frameCtx = &g_frameContext[nextFrameIndex % APP_NUM_FRAMES_IN_FLIGHT];
- UINT64 fenceValue = frameCtx->FenceValue;
- if (fenceValue != 0) // means no fence was signaled
- {
- frameCtx->FenceValue = 0;
- g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent);
- waitableObjects[1] = g_fenceEvent;
- numWaitableObjects = 2;
- }
-
- WaitForMultipleObjects(numWaitableObjects, waitableObjects, TRUE, INFINITE);
-
- return frameCtx;
-}
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (g_pd3dDevice != nullptr && wParam != SIZE_MINIMIZED)
- {
- WaitForLastSubmittedFrame();
- CleanupRenderTarget();
- HRESULT result = g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT);
- assert(SUCCEEDED(result) && "Failed to resize swapchain.");
- CreateRenderTarget();
- }
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx9/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_directx9/build_win32.bat
deleted file mode 100644
index ece5ea1..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx9/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_directx9
-@set INCLUDES=/I..\.. /I..\..\backends /I "%DXSDK_DIR%/Include"
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx9.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj b/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj
deleted file mode 100644
index 8c3f995..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{4165A294-21F2-44CA-9B38-E3F935ABADF5}</ProjectGuid>
- <RootNamespace>example_win32_directx9</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_dx9.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_dx9.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters
deleted file mode 100644
index 5ed89d6..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="sources">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="imgui">
- <UniqueIdentifier>{a82cba23-9de0-45c2-b1e3-2eb1666702de}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_dx9.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_dx9.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_directx9/main.cpp b/libs/imgui-1.92.1/examples/example_win32_directx9/main.cpp
deleted file mode 100644
index 430a2b4..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_directx9/main.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-// Dear ImGui: standalone example application for DirectX 9
-
-// 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
-
-#include "imgui.h"
-#include "imgui_impl_dx9.h"
-#include "imgui_impl_win32.h"
-#include <d3d9.h>
-#include <tchar.h>
-
-// Data
-static LPDIRECT3D9 g_pD3D = nullptr;
-static LPDIRECT3DDEVICE9 g_pd3dDevice = nullptr;
-static bool g_DeviceLost = false;
-static UINT g_ResizeWidth = 0, g_ResizeHeight = 0;
-static D3DPRESENT_PARAMETERS g_d3dpp = {};
-
-// Forward declarations of helper functions
-bool CreateDeviceD3D(HWND hWnd);
-void CleanupDeviceD3D();
-void ResetDevice();
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Make process DPI aware and obtain main monitor scale
- ImGui_ImplWin32_EnableDpiAwareness();
- float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
-
- // Create application window
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX9 Example", WS_OVERLAPPEDWINDOW, 100, 100, (int)(1280 * main_scale), (int)(800 * main_scale), nullptr, nullptr, wc.hInstance, nullptr);
-
- // Initialize Direct3D
- if (!CreateDeviceD3D(hwnd))
- {
- CleanupDeviceD3D();
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
- return 1;
- }
-
- // Show the window
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup scaling
- ImGuiStyle& style = ImGui::GetStyle();
- style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
- style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_Init(hwnd);
- ImGui_ImplDX9_Init(g_pd3dDevice);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
-
- // Handle lost D3D9 device
- if (g_DeviceLost)
- {
- HRESULT hr = g_pd3dDevice->TestCooperativeLevel();
- if (hr == D3DERR_DEVICELOST)
- {
- ::Sleep(10);
- continue;
- }
- if (hr == D3DERR_DEVICENOTRESET)
- ResetDevice();
- g_DeviceLost = false;
- }
-
- // Handle window resize (we don't resize directly in the WM_SIZE handler)
- if (g_ResizeWidth != 0 && g_ResizeHeight != 0)
- {
- g_d3dpp.BackBufferWidth = g_ResizeWidth;
- g_d3dpp.BackBufferHeight = g_ResizeHeight;
- g_ResizeWidth = g_ResizeHeight = 0;
- ResetDevice();
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplDX9_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::EndFrame();
- g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
- g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
- g_pd3dDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE);
- D3DCOLOR clear_col_dx = D3DCOLOR_RGBA((int)(clear_color.x*clear_color.w*255.0f), (int)(clear_color.y*clear_color.w*255.0f), (int)(clear_color.z*clear_color.w*255.0f), (int)(clear_color.w*255.0f));
- g_pd3dDevice->Clear(0, nullptr, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, clear_col_dx, 1.0f, 0);
- if (g_pd3dDevice->BeginScene() >= 0)
- {
- ImGui::Render();
- ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());
- g_pd3dDevice->EndScene();
- }
- HRESULT result = g_pd3dDevice->Present(nullptr, nullptr, nullptr, nullptr);
- if (result == D3DERR_DEVICELOST)
- g_DeviceLost = true;
- }
-
- // Cleanup
- ImGui_ImplDX9_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceD3D();
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-
-bool CreateDeviceD3D(HWND hWnd)
-{
- if ((g_pD3D = Direct3DCreate9(D3D_SDK_VERSION)) == nullptr)
- return false;
-
- // Create the D3DDevice
- ZeroMemory(&g_d3dpp, sizeof(g_d3dpp));
- g_d3dpp.Windowed = TRUE;
- g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
- g_d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; // Need to use an explicit format with alpha if needing per-pixel alpha composition.
- g_d3dpp.EnableAutoDepthStencil = TRUE;
- g_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
- g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE; // Present with vsync
- //g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; // Present without vsync, maximum unthrottled framerate
- if (g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &g_d3dpp, &g_pd3dDevice) < 0)
- return false;
-
- return true;
-}
-
-void CleanupDeviceD3D()
-{
- if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
- if (g_pD3D) { g_pD3D->Release(); g_pD3D = nullptr; }
-}
-
-void ResetDevice()
-{
- ImGui_ImplDX9_InvalidateDeviceObjects();
- HRESULT hr = g_pd3dDevice->Reset(&g_d3dpp);
- if (hr == D3DERR_INVALIDCALL)
- IM_ASSERT(0);
- ImGui_ImplDX9_CreateDeviceObjects();
-}
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (wParam == SIZE_MINIMIZED)
- return 0;
- g_ResizeWidth = (UINT)LOWORD(lParam); // Queue resize
- g_ResizeHeight = (UINT)HIWORD(lParam);
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_opengl3/build_mingw.bat b/libs/imgui-1.92.1/examples/example_win32_opengl3/build_mingw.bat
deleted file mode 100644
index e9f804f..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_opengl3/build_mingw.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for MINGW64 or 32 from MSYS2.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_opengl3
-@set INCLUDES=-I../.. -I../../backends
-@set SOURCES=main.cpp ../../backends/imgui_impl_opengl3.cpp ../../backends/imgui_impl_win32.cpp ../../imgui*.cpp
-@set LIBS=-lopengl32 -lgdi32 -ldwmapi
-mkdir %OUT_DIR%
-g++ -DUNICODE %INCLUDES% %SOURCES% -o %OUT_DIR%/%OUT_EXE%.exe --static -mwindows %LIBS% %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_opengl3/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_opengl3/build_win32.bat
deleted file mode 100644
index 48df080..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_opengl3/build_win32.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_opengl3
-@set INCLUDES=/I..\.. /I..\..\backends
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=opengl32.lib
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj b/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj
deleted file mode 100644
index 98fc38f..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C624E5FF-D4FE-4D35-9164-B8A91864F98E}</ProjectGuid>
- <RootNamespace>example_win32_opengl2</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;</AdditionalIncludeDirectories>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;</AdditionalIncludeDirectories>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h" />
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\natvis\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters
deleted file mode 100644
index 47ed299..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="sources">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="imgui">
- <UniqueIdentifier>{a82cba23-9de0-45c2-b1e3-2eb1666702de}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_opengl3.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\natvis\imgui.natvis">
- <Filter>sources</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_opengl3/main.cpp b/libs/imgui-1.92.1/examples/example_win32_opengl3/main.cpp
deleted file mode 100644
index 820248c..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_opengl3/main.cpp
+++ /dev/null
@@ -1,243 +0,0 @@
-// Dear ImGui: standalone example application for Win32 + OpenGL 3
-
-// 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
-
-// This is provided for completeness, however it is strongly recommended you use OpenGL with SDL or GLFW.
-
-#include "imgui.h"
-#include "imgui_impl_opengl3.h"
-#include "imgui_impl_win32.h"
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <GL/GL.h>
-#include <tchar.h>
-
-// Data stored per platform window
-struct WGL_WindowData { HDC hDC; };
-
-// Data
-static HGLRC g_hRC;
-static WGL_WindowData g_MainWindow;
-static int g_Width;
-static int g_Height;
-
-// Forward declarations of helper functions
-bool CreateDeviceWGL(HWND hWnd, WGL_WindowData* data);
-void CleanupDeviceWGL(HWND hWnd, WGL_WindowData* data);
-void ResetDeviceWGL();
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Create application window
- //ImGui_ImplWin32_EnableDpiAwareness();
- WNDCLASSEXW wc = { sizeof(wc), CS_OWNDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui Win32+OpenGL3 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr);
-
- // Initialize OpenGL
- if (!CreateDeviceWGL(hwnd, &g_MainWindow))
- {
- CleanupDeviceWGL(hwnd, &g_MainWindow);
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
- return 1;
- }
- wglMakeCurrent(g_MainWindow.hDC, g_hRC);
-
- // Show the window
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsClassic();
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_InitForOpenGL(hwnd);
- ImGui_ImplOpenGL3_Init();
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
- if (::IsIconic(hwnd))
- {
- ::Sleep(10);
- continue;
- }
-
- // Start the Dear ImGui frame
- ImGui_ImplOpenGL3_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- glViewport(0, 0, g_Width, g_Height);
- glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
-
- // Present
- ::SwapBuffers(g_MainWindow.hDC);
- }
-
- ImGui_ImplOpenGL3_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupDeviceWGL(hwnd, &g_MainWindow);
- wglDeleteContext(g_hRC);
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-bool CreateDeviceWGL(HWND hWnd, WGL_WindowData* data)
-{
- HDC hDc = ::GetDC(hWnd);
- PIXELFORMATDESCRIPTOR pfd = { 0 };
- pfd.nSize = sizeof(pfd);
- pfd.nVersion = 1;
- pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
- pfd.iPixelType = PFD_TYPE_RGBA;
- pfd.cColorBits = 32;
-
- const int pf = ::ChoosePixelFormat(hDc, &pfd);
- if (pf == 0)
- return false;
- if (::SetPixelFormat(hDc, pf, &pfd) == FALSE)
- return false;
- ::ReleaseDC(hWnd, hDc);
-
- data->hDC = ::GetDC(hWnd);
- if (!g_hRC)
- g_hRC = wglCreateContext(data->hDC);
- return true;
-}
-
-void CleanupDeviceWGL(HWND hWnd, WGL_WindowData* data)
-{
- wglMakeCurrent(nullptr, nullptr);
- ::ReleaseDC(hWnd, data->hDC);
-}
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (wParam != SIZE_MINIMIZED)
- {
- g_Width = LOWORD(lParam);
- g_Height = HIWORD(lParam);
- }
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win32.bat b/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win32.bat
deleted file mode 100644
index 4bfb7ca..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win32.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=/libpath:%VULKAN_SDK%\lib32 vulkan-1.lib
-
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win64.bat b/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win64.bat
deleted file mode 100644
index f8c66f7..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_vulkan/build_win64.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
-@set OUT_DIR=Debug
-@set OUT_EXE=example_win32_vulkan
-@set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I %VULKAN_SDK%\include
-@set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
-@set LIBS=/libpath:%VULKAN_SDK%\lib vulkan-1.lib
-
-mkdir %OUT_DIR%
-cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj b/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj
deleted file mode 100644
index dab8afd..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}</ProjectGuid>
- <RootNamespace>example_win32_directx11</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(ProjectDir)$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>vulkan-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>vulkan-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>vulkan-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\..;..\..\backends;%VULKAN_SDK%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>vulkan-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>%VULKAN_SDK%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h" />
- <ClInclude Include="..\..\imgui.h" />
- <ClInclude Include="..\..\imgui_internal.h" />
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
- <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp" />
- <ClCompile Include="..\..\imgui_demo.cpp" />
- <ClCompile Include="..\..\imgui_draw.cpp" />
- <ClCompile Include="..\..\imgui_tables.cpp" />
- <ClCompile Include="..\..\imgui_widgets.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp" />
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
- <None Include="..\..\misc\debuggers\imgui.natvis" />
- <None Include="..\README.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj.filters b/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj.filters
deleted file mode 100644
index c91a958..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_vulkan/example_win32_vulkan.vcxproj.filters
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="imgui">
- <UniqueIdentifier>{0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}</UniqueIdentifier>
- </Filter>
- <Filter Include="sources">
- <UniqueIdentifier>{08e36723-ce4f-4cff-9662-c40801cf1acf}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\imconfig.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\imgui_internal.h">
- <Filter>imgui</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_win32.h">
- <Filter>sources</Filter>
- </ClInclude>
- <ClInclude Include="..\..\backends\imgui_impl_vulkan.h">
- <Filter>sources</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\imgui.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_demo.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_draw.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_widgets.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_win32.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\backends\imgui_impl_vulkan.cpp">
- <Filter>sources</Filter>
- </ClCompile>
- <ClCompile Include="..\..\imgui_tables.cpp">
- <Filter>imgui</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\README.txt" />
- <None Include="..\..\misc\debuggers\imgui.natvis">
- <Filter>imgui</Filter>
- </None>
- <None Include="..\..\misc\debuggers\imgui.natstepfilter">
- <Filter>imgui</Filter>
- </None>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/libs/imgui-1.92.1/examples/example_win32_vulkan/main.cpp b/libs/imgui-1.92.1/examples/example_win32_vulkan/main.cpp
deleted file mode 100644
index a98f16f..0000000
--- a/libs/imgui-1.92.1/examples/example_win32_vulkan/main.cpp
+++ /dev/null
@@ -1,559 +0,0 @@
-// Dear ImGui: standalone example application for Win32 + Vulkan
-
-// 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
-
-// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.
-// - Common ImGui_ImplVulkan_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.
-// You will use those if you want to use this rendering backend in your engine/app.
-// - Helper ImGui_ImplVulkanH_XXX functions and structures are only used by this example (main.cpp) and by
-// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.
-// Read comments in imgui_impl_vulkan.h.
-
-#include "imgui.h"
-#include "imgui_impl_win32.h"
-#define VK_USE_PLATFORM_WIN32_KHR
-#include "imgui_impl_vulkan.h"
-#include <windows.h>
-#include <stdio.h> // printf, fprintf
-#include <stdlib.h> // abort
-#include <tchar.h>
-
-// Volk headers
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
-#define VOLK_IMPLEMENTATION
-#include <volk.h>
-#endif
-
-//#define APP_USE_UNLIMITED_FRAME_RATE
-#ifdef _DEBUG
-#define APP_USE_VULKAN_DEBUG_REPORT
-#endif
-
-// Data
-static VkAllocationCallbacks* g_Allocator = nullptr;
-static VkInstance g_Instance = VK_NULL_HANDLE;
-static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
-static VkDevice g_Device = VK_NULL_HANDLE;
-static uint32_t g_QueueFamily = (uint32_t)-1;
-static VkQueue g_Queue = VK_NULL_HANDLE;
-static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
-static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
-static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
-
-static ImGui_ImplVulkanH_Window g_MainWindowData;
-static uint32_t g_MinImageCount = 2;
-static bool g_SwapChainRebuild = false;
-
-static void check_vk_result(VkResult err)
-{
- if (err == VK_SUCCESS)
- return;
- fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err);
- if (err < 0)
- abort();
-}
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
-static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
-{
- (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
- fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
- return VK_FALSE;
-}
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
-static bool IsExtensionAvailable(const ImVector<VkExtensionProperties>& properties, const char* extension)
-{
- for (const VkExtensionProperties& p : properties)
- if (strcmp(p.extensionName, extension) == 0)
- return true;
- return false;
-}
-
-static void SetupVulkan(ImVector<const char*> instance_extensions)
-{
- VkResult err;
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkInitialize();
-#endif
-
- // Create Vulkan Instance
- {
- VkInstanceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-
- // Enumerate available extensions
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.Data);
- check_vk_result(err);
-
- // Enable required extensions
- if (IsExtensionAvailable(properties, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
- instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
-#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
- {
- instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
- create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
- }
-#endif
-
- // Enabling validation layers
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
- create_info.enabledLayerCount = 1;
- create_info.ppEnabledLayerNames = layers;
- instance_extensions.push_back("VK_EXT_debug_report");
-#endif
-
- // Create Vulkan Instance
- create_info.enabledExtensionCount = (uint32_t)instance_extensions.Size;
- create_info.ppEnabledExtensionNames = instance_extensions.Data;
- err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
- check_vk_result(err);
-#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
- volkLoadInstance(g_Instance);
-#endif
-
- // Setup the debug report callback
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- auto f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
- IM_ASSERT(f_vkCreateDebugReportCallbackEXT != nullptr);
- VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
- debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
- debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
- debug_report_ci.pfnCallback = debug_report;
- debug_report_ci.pUserData = nullptr;
- err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
- check_vk_result(err);
-#endif
- }
-
- // Select Physical Device (GPU)
- g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance);
- IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE);
-
- // Select graphics queue family
- g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice);
- IM_ASSERT(g_QueueFamily != (uint32_t)-1);
-
- // Create Logical Device (with 1 queue)
- {
- ImVector<const char*> device_extensions;
- device_extensions.push_back("VK_KHR_swapchain");
-
- // Enumerate physical device extension
- uint32_t properties_count;
- ImVector<VkExtensionProperties> properties;
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, nullptr);
- properties.resize(properties_count);
- vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, nullptr, &properties_count, properties.Data);
-#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
- if (IsExtensionAvailable(properties, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))
- device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
-#endif
-
- const float queue_priority[] = { 1.0f };
- VkDeviceQueueCreateInfo queue_info[1] = {};
- queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queue_info[0].queueFamilyIndex = g_QueueFamily;
- queue_info[0].queueCount = 1;
- queue_info[0].pQueuePriorities = queue_priority;
- VkDeviceCreateInfo create_info = {};
- create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
- create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
- create_info.pQueueCreateInfos = queue_info;
- create_info.enabledExtensionCount = (uint32_t)device_extensions.Size;
- create_info.ppEnabledExtensionNames = device_extensions.Data;
- err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
- check_vk_result(err);
- vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
- }
-
- // Create Descriptor Pool
- // If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets.
- {
- VkDescriptorPoolSize pool_sizes[] =
- {
- { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE },
- };
- VkDescriptorPoolCreateInfo pool_info = {};
- pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
- pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
- pool_info.maxSets = 0;
- for (VkDescriptorPoolSize& pool_size : pool_sizes)
- pool_info.maxSets += pool_size.descriptorCount;
- pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
- pool_info.pPoolSizes = pool_sizes;
- err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
- check_vk_result(err);
- }
-}
-
-// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo.
-// Your real engine/app may not use them.
-static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height)
-{
- wd->Surface = surface;
-
- // Check for WSI support
- VkBool32 res;
- vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
- if (res != VK_TRUE)
- {
- fprintf(stderr, "Error no WSI support on physical device 0\n");
- exit(-1);
- }
-
- // Select Surface Format
- const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
- const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
- wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
-
- // Select Present Mode
-#ifdef APP_USE_UNLIMITED_FRAME_RATE
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
-#else
- VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
-#endif
- wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
- //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
-
- // Create SwapChain, RenderPass, Framebuffer, etc.
- IM_ASSERT(g_MinImageCount >= 2);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
-}
-
-static void CleanupVulkan()
-{
- vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
-
-#ifdef APP_USE_VULKAN_DEBUG_REPORT
- // Remove the debug report callback
- auto f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
- f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
-#endif // APP_USE_VULKAN_DEBUG_REPORT
-
- vkDestroyDevice(g_Device, g_Allocator);
- vkDestroyInstance(g_Instance, g_Allocator);
-}
-
-static void CleanupVulkanWindow()
-{
- ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator);
-}
-
-static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
-{
- VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
-
- ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex];
- {
- err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
- check_vk_result(err);
-
- err = vkResetFences(g_Device, 1, &fd->Fence);
- check_vk_result(err);
- }
- {
- err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
- check_vk_result(err);
- VkCommandBufferBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
- check_vk_result(err);
- }
- {
- VkRenderPassBeginInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- info.renderPass = wd->RenderPass;
- info.framebuffer = fd->Framebuffer;
- info.renderArea.extent.width = wd->Width;
- info.renderArea.extent.height = wd->Height;
- info.clearValueCount = 1;
- info.pClearValues = &wd->ClearValue;
- vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
- }
-
- // Record dear imgui primitives into command buffer
- ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer);
-
- // Submit command buffer
- vkCmdEndRenderPass(fd->CommandBuffer);
- {
- VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
- VkSubmitInfo info = {};
- info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &image_acquired_semaphore;
- info.pWaitDstStageMask = &wait_stage;
- info.commandBufferCount = 1;
- info.pCommandBuffers = &fd->CommandBuffer;
- info.signalSemaphoreCount = 1;
- info.pSignalSemaphores = &render_complete_semaphore;
-
- err = vkEndCommandBuffer(fd->CommandBuffer);
- check_vk_result(err);
- err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
- check_vk_result(err);
- }
-}
-
-static void FramePresent(ImGui_ImplVulkanH_Window* wd)
-{
- if (g_SwapChainRebuild)
- return;
- VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
- VkPresentInfoKHR info = {};
- info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
- info.waitSemaphoreCount = 1;
- info.pWaitSemaphores = &render_complete_semaphore;
- info.swapchainCount = 1;
- info.pSwapchains = &wd->Swapchain;
- info.pImageIndices = &wd->FrameIndex;
- VkResult err = vkQueuePresentKHR(g_Queue, &info);
- if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
- g_SwapChainRebuild = true;
- if (err == VK_ERROR_OUT_OF_DATE_KHR)
- return;
- if (err != VK_SUBOPTIMAL_KHR)
- check_vk_result(err);
- wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
-}
-
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Main code
-int main(int, char**)
-{
- // Create application window
- //ImGui_ImplWin32_EnableDpiAwareness();
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
- ::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui Win32+Vulkan Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr);
-
- ImVector<const char*> extensions;
- extensions.push_back("VK_KHR_surface");
- extensions.push_back("VK_KHR_win32_surface");
- SetupVulkan(extensions);
-
- // Create Window Surface
- VkSurfaceKHR surface;
- VkResult err;
- VkWin32SurfaceCreateInfoKHR createInfo = {};
- createInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
- createInfo.hwnd = hwnd;
- createInfo.hinstance = ::GetModuleHandle(nullptr);
- if (vkCreateWin32SurfaceKHR(g_Instance, &createInfo, nullptr, &surface) != VK_SUCCESS)
- {
- printf("Failed to create Vulkan surface.\n");
- return 1;
- }
-
- // Show the window
- // FIXME: Retrieve client size from window itself.
- ImGui_ImplVulkanH_Window* wd = &g_MainWindowData;
- SetupVulkanWindow(wd, surface, 1280, 800);
- ::ShowWindow(hwnd, SW_SHOWDEFAULT);
- ::UpdateWindow(hwnd);
-
- // Setup Dear ImGui context
- IMGUI_CHECKVERSION();
- ImGui::CreateContext();
- ImGuiIO& io = ImGui::GetIO(); (void)io;
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
- io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
-
- // Setup Dear ImGui style
- ImGui::StyleColorsDark();
- //ImGui::StyleColorsLight();
-
- // Setup Platform/Renderer backends
- ImGui_ImplWin32_Init(hwnd);
- ImGui_ImplVulkan_InitInfo init_info = {};
- //init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
- init_info.Instance = g_Instance;
- init_info.PhysicalDevice = g_PhysicalDevice;
- init_info.Device = g_Device;
- init_info.QueueFamily = g_QueueFamily;
- init_info.Queue = g_Queue;
- init_info.PipelineCache = g_PipelineCache;
- init_info.DescriptorPool = g_DescriptorPool;
- init_info.RenderPass = wd->RenderPass;
- init_info.Subpass = 0;
- init_info.MinImageCount = g_MinImageCount;
- init_info.ImageCount = wd->ImageCount;
- init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
- init_info.Allocator = g_Allocator;
- init_info.CheckVkResultFn = check_vk_result;
- ImGui_ImplVulkan_Init(&init_info);
-
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
- // - Read 'docs/FONTS.md' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //style.FontSizeBase = 20.0f;
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf");
- //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf");
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf");
- //IM_ASSERT(font != nullptr);
-
- // Our state
- bool show_demo_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
-
- // Main loop
- bool done = false;
- while (!done)
- {
- // Poll and handle messages (inputs, window resize, etc.)
- // See the WndProc() function below for our to dispatch events to the Win32 backend.
- MSG msg;
- while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE))
- {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- if (msg.message == WM_QUIT)
- done = true;
- }
- if (done)
- break;
-
- // Start the Dear ImGui frame
- ImGui_ImplVulkan_NewFrame();
- ImGui_ImplWin32_NewFrame();
- ImGui::NewFrame();
-
- // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
- if (show_demo_window)
- ImGui::ShowDemoWindow(&show_demo_window);
-
- // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
- {
- static float f = 0.0f;
- static int counter = 0;
-
- ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
-
- ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
- ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
- ImGui::Checkbox("Another Window", &show_another_window);
-
- ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
- ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
-
- if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
- counter++;
- ImGui::SameLine();
- ImGui::Text("counter = %d", counter);
-
- ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::End();
- }
-
- // 3. Show another simple window.
- if (show_another_window)
- {
- ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
- ImGui::Text("Hello from another window!");
- if (ImGui::Button("Close Me"))
- show_another_window = false;
- ImGui::End();
- }
-
- // Rendering
- ImGui::Render();
- ImDrawData* draw_data = ImGui::GetDrawData();
- const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
- if (!is_minimized)
- {
- wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w;
- wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w;
- wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w;
- wd->ClearValue.color.float32[3] = clear_color.w;
- FrameRender(wd, draw_data);
- FramePresent(wd);
- }
- }
-
- // Cleanup
- err = vkDeviceWaitIdle(g_Device);
- check_vk_result(err);
- ImGui_ImplVulkan_Shutdown();
- ImGui_ImplWin32_Shutdown();
- ImGui::DestroyContext();
-
- CleanupVulkanWindow();
- CleanupVulkan();
-
- ::DestroyWindow(hwnd);
- ::UnregisterClassW(wc.lpszClassName, wc.hInstance);
-
- return 0;
-}
-
-// Helper functions
-
-// Forward declare message handler from imgui_impl_win32.cpp
-extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-// Win32 message handler
-// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
-// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
-// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
-// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
-LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
- return true;
-
- switch (msg)
- {
- case WM_SIZE:
- if (g_Device != VK_NULL_HANDLE && wParam != SIZE_MINIMIZED)
- {
- // Resize swap chain
- int fb_width = (UINT)LOWORD(lParam);
- int fb_height = (UINT)HIWORD(lParam);
- if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height))
- {
- ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
- ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount);
- g_MainWindowData.FrameIndex = 0;
- g_SwapChainRebuild = false;
- }
- }
- return 0;
- case WM_SYSCOMMAND:
- if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
- return 0;
- break;
- case WM_DESTROY:
- ::PostQuitMessage(0);
- return 0;
- }
- return ::DefWindowProcW(hWnd, msg, wParam, lParam);
-}
diff --git a/libs/imgui-1.92.1/examples/imgui_examples.sln b/libs/imgui-1.92.1/examples/imgui_examples.sln
deleted file mode 100644
index cf1c5ad..0000000
--- a/libs/imgui-1.92.1/examples/imgui_examples.sln
+++ /dev/null
@@ -1,201 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32616.157
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx9", "example_win32_directx9\example_win32_directx9.vcxproj", "{4165A294-21F2-44CA-9B38-E3F935ABADF5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx10", "example_win32_directx10\example_win32_directx10.vcxproj", "{345A953E-A004-4648-B442-DC5F9F11068C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx11", "example_win32_directx11\example_win32_directx11.vcxproj", "{9F316E83-5AE5-4939-A723-305A94F48005}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx12", "example_win32_directx12\example_win32_directx12.vcxproj", "{B4CF9797-519D-4AFE-A8F4-5141A6B521D3}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl2", "example_glfw_opengl2\example_glfw_opengl2.vcxproj", "{9CDA7840-B7A5-496D-A527-E95571496D18}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl3", "example_glfw_opengl3\example_glfw_opengl3.vcxproj", "{4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_vulkan", "example_glfw_vulkan\example_glfw_vulkan.vcxproj", "{57E2DF5A-6FC8-45BB-99DD-91A18C646E80}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_directx11", "example_sdl2_directx11\example_sdl2_directx11.vcxproj", "{9E1987E3-1F19-45CA-B9C9-D31E791836D8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_opengl2", "example_sdl2_opengl2\example_sdl2_opengl2.vcxproj", "{2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_opengl3", "example_sdl2_opengl3\example_sdl2_opengl3.vcxproj", "{BBAEB705-1669-40F3-8567-04CF6A991F4C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_vulkan", "example_sdl2_vulkan\example_sdl2_vulkan.vcxproj", "{BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_opengl3", "example_win32_opengl3\example_win32_opengl3.vcxproj", "{C624E5FF-D4FE-4D35-9164-B8A91864F98E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl2_sdlrenderer2", "example_sdl2_sdlrenderer2\example_sdl2_sdlrenderer2.vcxproj", "{0C0B2BEA-311F-473C-9652-87923EF639E3}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_opengl3", "example_sdl3_opengl3\example_sdl3_opengl3.vcxproj", "{84AAA301-84FE-428B-9E3E-817BC8123C0C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_sdlrenderer3", "example_sdl3_sdlrenderer3\example_sdl3_sdlrenderer3.vcxproj", "{C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_vulkan", "example_sdl3_vulkan\example_sdl3_vulkan.vcxproj", "{663A7E89-1E42-4222-921C-177F5B5910DF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_vulkan", "example_win32_vulkan\example_win32_vulkan.vcxproj", "{0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_sdl3_sdlgpu3", "example_sdl3_sdlgpu3\example_sdl3_sdlgpu3.vcxproj", "{C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.ActiveCfg = Debug|Win32
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.Build.0 = Debug|Win32
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.ActiveCfg = Debug|x64
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.Build.0 = Debug|x64
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.ActiveCfg = Release|Win32
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.Build.0 = Release|Win32
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.ActiveCfg = Release|x64
- {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.Build.0 = Release|x64
- {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.ActiveCfg = Debug|Win32
- {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.Build.0 = Debug|Win32
- {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.ActiveCfg = Debug|x64
- {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.Build.0 = Debug|x64
- {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.ActiveCfg = Release|Win32
- {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.Build.0 = Release|Win32
- {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.ActiveCfg = Release|x64
- {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.Build.0 = Release|x64
- {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.ActiveCfg = Debug|Win32
- {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.Build.0 = Debug|Win32
- {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.ActiveCfg = Debug|x64
- {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.Build.0 = Debug|x64
- {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.ActiveCfg = Release|Win32
- {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.Build.0 = Release|Win32
- {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.ActiveCfg = Release|x64
- {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.Build.0 = Release|x64
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|Win32.ActiveCfg = Debug|Win32
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|Win32.Build.0 = Debug|Win32
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|x64.ActiveCfg = Debug|x64
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Debug|x64.Build.0 = Debug|x64
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|Win32.ActiveCfg = Release|Win32
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|Win32.Build.0 = Release|Win32
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|x64.ActiveCfg = Release|x64
- {B4CF9797-519D-4AFE-A8F4-5141A6B521D3}.Release|x64.Build.0 = Release|x64
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.ActiveCfg = Debug|Win32
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.Build.0 = Debug|Win32
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.ActiveCfg = Debug|x64
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.Build.0 = Debug|x64
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.ActiveCfg = Release|Win32
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.Build.0 = Release|Win32
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.ActiveCfg = Release|x64
- {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.Build.0 = Release|x64
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.ActiveCfg = Debug|Win32
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.Build.0 = Debug|Win32
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.ActiveCfg = Debug|x64
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.Build.0 = Debug|x64
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.ActiveCfg = Release|Win32
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.Build.0 = Release|Win32
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.ActiveCfg = Release|x64
- {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.Build.0 = Release|x64
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|Win32.ActiveCfg = Debug|Win32
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|Win32.Build.0 = Debug|Win32
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|x64.ActiveCfg = Debug|x64
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Debug|x64.Build.0 = Debug|x64
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|Win32.ActiveCfg = Release|Win32
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|Win32.Build.0 = Release|Win32
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|x64.ActiveCfg = Release|x64
- {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}.Release|x64.Build.0 = Release|x64
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|Win32.ActiveCfg = Debug|Win32
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|Win32.Build.0 = Debug|Win32
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|x64.ActiveCfg = Debug|x64
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Debug|x64.Build.0 = Debug|x64
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|Win32.ActiveCfg = Release|Win32
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|Win32.Build.0 = Release|Win32
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|x64.ActiveCfg = Release|x64
- {9E1987E3-1F19-45CA-B9C9-D31E791836D8}.Release|x64.Build.0 = Release|x64
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|Win32.ActiveCfg = Debug|Win32
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|Win32.Build.0 = Debug|Win32
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|x64.ActiveCfg = Debug|x64
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Debug|x64.Build.0 = Debug|x64
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|Win32.ActiveCfg = Release|Win32
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|Win32.Build.0 = Release|Win32
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|x64.ActiveCfg = Release|x64
- {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}.Release|x64.Build.0 = Release|x64
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|Win32.ActiveCfg = Debug|Win32
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|Win32.Build.0 = Debug|Win32
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|x64.ActiveCfg = Debug|x64
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Debug|x64.Build.0 = Debug|x64
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|Win32.ActiveCfg = Release|Win32
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|Win32.Build.0 = Release|Win32
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|x64.ActiveCfg = Release|x64
- {BBAEB705-1669-40F3-8567-04CF6A991F4C}.Release|x64.Build.0 = Release|x64
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|Win32.ActiveCfg = Debug|Win32
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|Win32.Build.0 = Debug|Win32
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|x64.ActiveCfg = Debug|x64
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Debug|x64.Build.0 = Debug|x64
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|Win32.ActiveCfg = Release|Win32
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|Win32.Build.0 = Release|Win32
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|x64.ActiveCfg = Release|x64
- {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}.Release|x64.Build.0 = Release|x64
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|Win32.ActiveCfg = Debug|Win32
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|Win32.Build.0 = Debug|Win32
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|x64.ActiveCfg = Debug|x64
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Debug|x64.Build.0 = Debug|x64
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|Win32.ActiveCfg = Release|Win32
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|Win32.Build.0 = Release|Win32
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|x64.ActiveCfg = Release|x64
- {C624E5FF-D4FE-4D35-9164-B8A91864F98E}.Release|x64.Build.0 = Release|x64
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|Win32.ActiveCfg = Debug|Win32
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|Win32.Build.0 = Debug|Win32
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|x64.ActiveCfg = Debug|x64
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|x64.Build.0 = Debug|x64
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|Win32.ActiveCfg = Release|Win32
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|Win32.Build.0 = Release|Win32
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|x64.ActiveCfg = Release|x64
- {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release|x64.Build.0 = Release|x64
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|Win32.ActiveCfg = Debug|Win32
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|Win32.Build.0 = Debug|Win32
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|x64.ActiveCfg = Debug|x64
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Debug|x64.Build.0 = Debug|x64
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|Win32.ActiveCfg = Release|Win32
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|Win32.Build.0 = Release|Win32
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|x64.ActiveCfg = Release|x64
- {84AAA301-84FE-428B-9E3E-817BC8123C0C}.Release|x64.Build.0 = Release|x64
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|Win32.ActiveCfg = Debug|Win32
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|Win32.Build.0 = Debug|Win32
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|x64.ActiveCfg = Debug|x64
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Debug|x64.Build.0 = Debug|x64
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|Win32.ActiveCfg = Release|Win32
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|Win32.Build.0 = Release|Win32
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|x64.ActiveCfg = Release|x64
- {C0290D21-3AD2-4A35-ABBC-A2F5F48326DA}.Release|x64.Build.0 = Release|x64
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Debug|Win32.ActiveCfg = Debug|Win32
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Debug|Win32.Build.0 = Debug|Win32
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Debug|x64.ActiveCfg = Debug|x64
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Debug|x64.Build.0 = Debug|x64
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Release|Win32.ActiveCfg = Release|Win32
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Release|Win32.Build.0 = Release|Win32
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Release|x64.ActiveCfg = Release|x64
- {663A7E89-1E42-4222-921C-177F5B5910DF}.Release|x64.Build.0 = Release|x64
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Debug|Win32.ActiveCfg = Debug|Win32
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Debug|Win32.Build.0 = Debug|Win32
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Debug|x64.ActiveCfg = Debug|x64
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Debug|x64.Build.0 = Debug|x64
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Release|Win32.ActiveCfg = Release|Win32
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Release|Win32.Build.0 = Release|Win32
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Release|x64.ActiveCfg = Release|x64
- {0A1E32DF-E0F4-4CCE-B3DC-9644C503BD88}.Release|x64.Build.0 = Release|x64
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Debug|Win32.ActiveCfg = Debug|Win32
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Debug|Win32.Build.0 = Debug|Win32
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Debug|x64.ActiveCfg = Debug|x64
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Debug|x64.Build.0 = Debug|x64
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Release|Win32.ActiveCfg = Release|Win32
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Release|Win32.Build.0 = Release|Win32
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Release|x64.ActiveCfg = Release|x64
- {C22CB6F8-39A5-4DDA-90ED-4ACA4E81E1E5}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {B1ACFD20-A0A9-4A4C-ADBA-E7608F0E2BEE}
- EndGlobalSection
-EndGlobal
diff --git a/libs/imgui-1.92.1/examples/libs/emscripten/emscripten_mainloop_stub.h b/libs/imgui-1.92.1/examples/libs/emscripten/emscripten_mainloop_stub.h
deleted file mode 100644
index 8c4c48e..0000000
--- a/libs/imgui-1.92.1/examples/libs/emscripten/emscripten_mainloop_stub.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// What does this file solves?
-// - Since Dear ImGui 1.00 we took pride that most of our examples applications had their entire
-// main-loop inside the main() function. That's because:
-// - It makes the examples easier to read, keeping the code sequential.
-// - It permit the use of local variables, making it easier to try things and perform quick
-// changes when someone needs to quickly test something (vs having to structure the example
-// in order to pass data around). This is very important because people use those examples
-// to craft easy-to-past repro when they want to discuss features or report issues.
-// - It conveys at a glance that this is a no-BS framework, it won't take your main loop away from you.
-// - It is generally nice and elegant.
-// - However, comes Emscripten... it is a wonderful and magical tech but it requires a "main loop" function.
-// - Only some of our examples would run on Emscripten. Typically the ones rendering with GL or WGPU ones.
-// - I tried to refactor those examples but felt it was problematic that other examples didn't follow the
-// same layout. Why would the SDL+GL example be structured one way and the SGL+DX11 be structured differently?
-// Especially as we are trying hard to convey that using a Dear ImGui backend in an *existing application*
-// should requires only a few dozens lines of code, and this should be consistent and symmetrical for all backends.
-// - So the next logical step was to refactor all examples to follow that layout of using a "main loop" function.
-// This worked, but it made us lose all the nice things we had...
-
-// Since only about 4 examples really need to run with Emscripten, here's our solution:
-// - Use some weird macros and capturing lambda to turn a loop in main() into a function.
-// - Hide all that crap in this file so it doesn't make our examples unusually ugly.
-// As a stance and principle of Dear ImGui development we don't use C++ headers and we don't
-// want to suggest to the newcomer that we would ever use C++ headers as this would affect
-// the initial judgment of many of our target audience.
-// - Technique is based on this idea: https://github.com/ocornut/imgui/pull/2492/
-// - The do { } while (0) is to allow our code calling continue in the main loop.
-#ifdef __EMSCRIPTEN__
-#include <emscripten.h>
-#include <functional>
-static std::function<void()> MainLoopForEmscriptenP;
-static void MainLoopForEmscripten() { MainLoopForEmscriptenP(); }
-#define EMSCRIPTEN_MAINLOOP_BEGIN MainLoopForEmscriptenP = [&]() { do
-#define EMSCRIPTEN_MAINLOOP_END while (0); }; emscripten_set_main_loop(MainLoopForEmscripten, 0, true)
-#else
-#define EMSCRIPTEN_MAINLOOP_BEGIN
-#define EMSCRIPTEN_MAINLOOP_END
-#endif
diff --git a/libs/imgui-1.92.1/examples/libs/emscripten/shell_minimal.html b/libs/imgui-1.92.1/examples/libs/emscripten/shell_minimal.html
deleted file mode 100644
index bcf6262..0000000
--- a/libs/imgui-1.92.1/examples/libs/emscripten/shell_minimal.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!doctype html>
-<html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
- <title>Dear ImGui Emscripten example</title>
- <style>
- body { margin: 0; background-color: black }
- /* FIXME: with our GLFW example this block seems to break resizing and io.DisplaySize gets stuck */
- .emscripten {
- position: absolute;
- top: 0px;
- left: 0px;
- margin: 0px;
- border: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- display: block;
- image-rendering: optimizeSpeed;
- image-rendering: -moz-crisp-edges;
- image-rendering: -o-crisp-edges;
- image-rendering: -webkit-optimize-contrast;
- image-rendering: optimize-contrast;
- image-rendering: crisp-edges;
- image-rendering: pixelated;
- -ms-interpolation-mode: nearest-neighbor;
- }
- </style>
- </head>
- <body>
- <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
- <script type='text/javascript'>
- var Module = {
- preRun: [],
- postRun: [],
- print: (function() {
- return function(text) {
- text = Array.prototype.slice.call(arguments).join(' ');
- console.log(text);
- };
- })(),
- printErr: function(text) {
- text = Array.prototype.slice.call(arguments).join(' ');
- console.error(text);
- },
- canvas: (function() {
- var canvas = document.getElementById('canvas');
- //canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false);
- return canvas;
- })(),
- setStatus: function(text) {
- console.log("status: " + text);
- },
- monitorRunDependencies: function(left) {
- // no run dependencies to log
- }
- };
- window.onerror = function() {
- console.log("onerror: " + event);
- };
- </script>
- {{{ SCRIPT }}}
- </body>
-</html>
diff --git a/libs/imgui-1.92.1/examples/libs/glfw/COPYING.txt b/libs/imgui-1.92.1/examples/libs/glfw/COPYING.txt
deleted file mode 100644
index b30c701..0000000
--- a/libs/imgui-1.92.1/examples/libs/glfw/COPYING.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2002-2006 Marcus Geelnard
-Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would
- be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
- distribution.
-
diff --git a/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3.h b/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3.h
deleted file mode 100644
index c2e4ab1..0000000
--- a/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3.h
+++ /dev/null
@@ -1,4227 +0,0 @@
-/*************************************************************************
- * GLFW 3.2 - www.glfw.org
- * A library for OpenGL, window and input
- *------------------------------------------------------------------------
- * Copyright (c) 2002-2006 Marcus Geelnard
- * Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would
- * be appreciated but is not required.
- *
- * 2. Altered source versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * 3. This notice may not be removed or altered from any source
- * distribution.
- *
- *************************************************************************/
-
-#ifndef _glfw3_h_
-#define _glfw3_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*************************************************************************
- * Doxygen documentation
- *************************************************************************/
-
-/*! @file glfw3.h
- * @brief The header of the GLFW 3 API.
- *
- * This is the header file of the GLFW 3 API. It defines all its types and
- * declares all its functions.
- *
- * For more information about how to use this file, see @ref build_include.
- */
-/*! @defgroup context Context reference
- *
- * This is the reference documentation for OpenGL and OpenGL ES context related
- * functions. For more task-oriented information, see the @ref context_guide.
- */
-/*! @defgroup vulkan Vulkan reference
- *
- * This is the reference documentation for Vulkan related functions and types.
- * For more task-oriented information, see the @ref vulkan_guide.
- */
-/*! @defgroup init Initialization, version and error reference
- *
- * This is the reference documentation for initialization and termination of
- * the library, version management and error handling. For more task-oriented
- * information, see the @ref intro_guide.
- */
-/*! @defgroup input Input reference
- *
- * This is the reference documentation for input related functions and types.
- * For more task-oriented information, see the @ref input_guide.
- */
-/*! @defgroup monitor Monitor reference
- *
- * This is the reference documentation for monitor related functions and types.
- * For more task-oriented information, see the @ref monitor_guide.
- */
-/*! @defgroup window Window reference
- *
- * This is the reference documentation for window related functions and types,
- * including creation, deletion and event polling. For more task-oriented
- * information, see the @ref window_guide.
- */
-
-
-/*************************************************************************
- * Compiler- and platform-specific preprocessor work
- *************************************************************************/
-
-/* If we are we on Windows, we want a single define for it.
- */
-#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
- #define _WIN32
-#endif /* _WIN32 */
-
-/* It is customary to use APIENTRY for OpenGL function pointer declarations on
- * all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
- */
-#ifndef APIENTRY
- #ifdef _WIN32
- #define APIENTRY __stdcall
- #else
- #define APIENTRY
- #endif
-#endif /* APIENTRY */
-
-/* Some Windows OpenGL headers need this.
- */
-#if !defined(WINGDIAPI) && defined(_WIN32)
- #define WINGDIAPI __declspec(dllimport)
- #define GLFW_WINGDIAPI_DEFINED
-#endif /* WINGDIAPI */
-
-/* Some Windows GLU headers need this.
- */
-#if !defined(CALLBACK) && defined(_WIN32)
- #define CALLBACK __stdcall
- #define GLFW_CALLBACK_DEFINED
-#endif /* CALLBACK */
-
-/* Most Windows GLU headers need wchar_t.
- * The OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
- * Include it unconditionally to avoid surprising side-effects.
- */
-#include <stddef.h>
-#include <stdint.h>
-
-/* Include the chosen client API headers.
- */
-#if defined(__APPLE__)
- #if defined(GLFW_INCLUDE_GLCOREARB)
- #include <OpenGL/gl3.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <OpenGL/gl3ext.h>
- #endif
- #elif !defined(GLFW_INCLUDE_NONE)
- #if !defined(GLFW_INCLUDE_GLEXT)
- #define GL_GLEXT_LEGACY
- #endif
- #include <OpenGL/gl.h>
- #endif
- #if defined(GLFW_INCLUDE_GLU)
- #include <OpenGL/glu.h>
- #endif
-#else
- #if defined(GLFW_INCLUDE_GLCOREARB)
- #include <GL/glcorearb.h>
- #elif defined(GLFW_INCLUDE_ES1)
- #include <GLES/gl.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <GLES/glext.h>
- #endif
- #elif defined(GLFW_INCLUDE_ES2)
- #include <GLES2/gl2.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <GLES2/gl2ext.h>
- #endif
- #elif defined(GLFW_INCLUDE_ES3)
- #include <GLES3/gl3.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <GLES2/gl2ext.h>
- #endif
- #elif defined(GLFW_INCLUDE_ES31)
- #include <GLES3/gl31.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <GLES2/gl2ext.h>
- #endif
- #elif defined(GLFW_INCLUDE_VULKAN)
- #include <vulkan/vulkan.h>
- #elif !defined(GLFW_INCLUDE_NONE)
- #include <GL/gl.h>
- #if defined(GLFW_INCLUDE_GLEXT)
- #include <GL/glext.h>
- #endif
- #endif
- #if defined(GLFW_INCLUDE_GLU)
- #include <GL/glu.h>
- #endif
-#endif
-
-#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
- /* GLFW_DLL must be defined by applications that are linking against the DLL
- * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW
- * configuration header when compiling the DLL version of the library.
- */
- #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
-#endif
-
-/* GLFWAPI is used to declare public API functions for export
- * from the DLL / shared library / dynamic library.
- */
-#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
- /* We are building GLFW as a Win32 DLL */
- #define GLFWAPI __declspec(dllexport)
-#elif defined(_WIN32) && defined(GLFW_DLL)
- /* We are calling GLFW as a Win32 DLL */
- #define GLFWAPI __declspec(dllimport)
-#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
- /* We are building GLFW as a shared / dynamic library */
- #define GLFWAPI __attribute__((visibility("default")))
-#else
- /* We are building or calling GLFW as a static library */
- #define GLFWAPI
-#endif
-
-
-/*************************************************************************
- * GLFW API tokens
- *************************************************************************/
-
-/*! @name GLFW version macros
- * @{ */
-/*! @brief The major version number of the GLFW library.
- *
- * This is incremented when the API is changed in non-compatible ways.
- * @ingroup init
- */
-#define GLFW_VERSION_MAJOR 3
-/*! @brief The minor version number of the GLFW library.
- *
- * This is incremented when features are added to the API but it remains
- * backward-compatible.
- * @ingroup init
- */
-#define GLFW_VERSION_MINOR 2
-/*! @brief The revision number of the GLFW library.
- *
- * This is incremented when a bug fix release is made that does not contain any
- * API changes.
- * @ingroup init
- */
-#define GLFW_VERSION_REVISION 0
-/*! @} */
-
-/*! @name Boolean values
- * @{ */
-/*! @brief One.
- *
- * One. Seriously. You don't _need_ to use this symbol in your code. It's
- * just semantic sugar for the number 1. You can use `1` or `true` or `_True`
- * or `GL_TRUE` or whatever you want.
- */
-#define GLFW_TRUE 1
-/*! @brief Zero.
- *
- * Zero. Seriously. You don't _need_ to use this symbol in your code. It's
- * just just semantic sugar for the number 0. You can use `0` or `false` or
- * `_False` or `GL_FALSE` or whatever you want.
- */
-#define GLFW_FALSE 0
-/*! @} */
-
-/*! @name Key and button actions
- * @{ */
-/*! @brief The key or mouse button was released.
- *
- * The key or mouse button was released.
- *
- * @ingroup input
- */
-#define GLFW_RELEASE 0
-/*! @brief The key or mouse button was pressed.
- *
- * The key or mouse button was pressed.
- *
- * @ingroup input
- */
-#define GLFW_PRESS 1
-/*! @brief The key was held down until it repeated.
- *
- * The key was held down until it repeated.
- *
- * @ingroup input
- */
-#define GLFW_REPEAT 2
-/*! @} */
-
-/*! @defgroup keys Keyboard keys
- *
- * See [key input](@ref input_key) for how these are used.
- *
- * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60),
- * but re-arranged to map to 7-bit ASCII for printable keys (function keys are
- * put in the 256+ range).
- *
- * The naming of the key codes follow these rules:
- * - The US keyboard layout is used
- * - Names of printable alpha-numeric characters are used (e.g. "A", "R",
- * "3", etc.)
- * - For non-alphanumeric characters, Unicode:ish names are used (e.g.
- * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not
- * correspond to the Unicode standard (usually for brevity)
- * - Keys that lack a clear US mapping are named "WORLD_x"
- * - For non-printable keys, custom names are used (e.g. "F4",
- * "BACKSPACE", etc.)
- *
- * @ingroup input
- * @{
- */
-
-/* The unknown key */
-#define GLFW_KEY_UNKNOWN -1
-
-/* Printable keys */
-#define GLFW_KEY_SPACE 32
-#define GLFW_KEY_APOSTROPHE 39 /* ' */
-#define GLFW_KEY_COMMA 44 /* , */
-#define GLFW_KEY_MINUS 45 /* - */
-#define GLFW_KEY_PERIOD 46 /* . */
-#define GLFW_KEY_SLASH 47 /* / */
-#define GLFW_KEY_0 48
-#define GLFW_KEY_1 49
-#define GLFW_KEY_2 50
-#define GLFW_KEY_3 51
-#define GLFW_KEY_4 52
-#define GLFW_KEY_5 53
-#define GLFW_KEY_6 54
-#define GLFW_KEY_7 55
-#define GLFW_KEY_8 56
-#define GLFW_KEY_9 57
-#define GLFW_KEY_SEMICOLON 59 /* ; */
-#define GLFW_KEY_EQUAL 61 /* = */
-#define GLFW_KEY_A 65
-#define GLFW_KEY_B 66
-#define GLFW_KEY_C 67
-#define GLFW_KEY_D 68
-#define GLFW_KEY_E 69
-#define GLFW_KEY_F 70
-#define GLFW_KEY_G 71
-#define GLFW_KEY_H 72
-#define GLFW_KEY_I 73
-#define GLFW_KEY_J 74
-#define GLFW_KEY_K 75
-#define GLFW_KEY_L 76
-#define GLFW_KEY_M 77
-#define GLFW_KEY_N 78
-#define GLFW_KEY_O 79
-#define GLFW_KEY_P 80
-#define GLFW_KEY_Q 81
-#define GLFW_KEY_R 82
-#define GLFW_KEY_S 83
-#define GLFW_KEY_T 84
-#define GLFW_KEY_U 85
-#define GLFW_KEY_V 86
-#define GLFW_KEY_W 87
-#define GLFW_KEY_X 88
-#define GLFW_KEY_Y 89
-#define GLFW_KEY_Z 90
-#define GLFW_KEY_LEFT_BRACKET 91 /* [ */
-#define GLFW_KEY_BACKSLASH 92 /* \ */
-#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */
-#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */
-#define GLFW_KEY_WORLD_1 161 /* non-US #1 */
-#define GLFW_KEY_WORLD_2 162 /* non-US #2 */
-
-/* Function keys */
-#define GLFW_KEY_ESCAPE 256
-#define GLFW_KEY_ENTER 257
-#define GLFW_KEY_TAB 258
-#define GLFW_KEY_BACKSPACE 259
-#define GLFW_KEY_INSERT 260
-#define GLFW_KEY_DELETE 261
-#define GLFW_KEY_RIGHT 262
-#define GLFW_KEY_LEFT 263
-#define GLFW_KEY_DOWN 264
-#define GLFW_KEY_UP 265
-#define GLFW_KEY_PAGE_UP 266
-#define GLFW_KEY_PAGE_DOWN 267
-#define GLFW_KEY_HOME 268
-#define GLFW_KEY_END 269
-#define GLFW_KEY_CAPS_LOCK 280
-#define GLFW_KEY_SCROLL_LOCK 281
-#define GLFW_KEY_NUM_LOCK 282
-#define GLFW_KEY_PRINT_SCREEN 283
-#define GLFW_KEY_PAUSE 284
-#define GLFW_KEY_F1 290
-#define GLFW_KEY_F2 291
-#define GLFW_KEY_F3 292
-#define GLFW_KEY_F4 293
-#define GLFW_KEY_F5 294
-#define GLFW_KEY_F6 295
-#define GLFW_KEY_F7 296
-#define GLFW_KEY_F8 297
-#define GLFW_KEY_F9 298
-#define GLFW_KEY_F10 299
-#define GLFW_KEY_F11 300
-#define GLFW_KEY_F12 301
-#define GLFW_KEY_F13 302
-#define GLFW_KEY_F14 303
-#define GLFW_KEY_F15 304
-#define GLFW_KEY_F16 305
-#define GLFW_KEY_F17 306
-#define GLFW_KEY_F18 307
-#define GLFW_KEY_F19 308
-#define GLFW_KEY_F20 309
-#define GLFW_KEY_F21 310
-#define GLFW_KEY_F22 311
-#define GLFW_KEY_F23 312
-#define GLFW_KEY_F24 313
-#define GLFW_KEY_F25 314
-#define GLFW_KEY_KP_0 320
-#define GLFW_KEY_KP_1 321
-#define GLFW_KEY_KP_2 322
-#define GLFW_KEY_KP_3 323
-#define GLFW_KEY_KP_4 324
-#define GLFW_KEY_KP_5 325
-#define GLFW_KEY_KP_6 326
-#define GLFW_KEY_KP_7 327
-#define GLFW_KEY_KP_8 328
-#define GLFW_KEY_KP_9 329
-#define GLFW_KEY_KP_DECIMAL 330
-#define GLFW_KEY_KP_DIVIDE 331
-#define GLFW_KEY_KP_MULTIPLY 332
-#define GLFW_KEY_KP_SUBTRACT 333
-#define GLFW_KEY_KP_ADD 334
-#define GLFW_KEY_KP_ENTER 335
-#define GLFW_KEY_KP_EQUAL 336
-#define GLFW_KEY_LEFT_SHIFT 340
-#define GLFW_KEY_LEFT_CONTROL 341
-#define GLFW_KEY_LEFT_ALT 342
-#define GLFW_KEY_LEFT_SUPER 343
-#define GLFW_KEY_RIGHT_SHIFT 344
-#define GLFW_KEY_RIGHT_CONTROL 345
-#define GLFW_KEY_RIGHT_ALT 346
-#define GLFW_KEY_RIGHT_SUPER 347
-#define GLFW_KEY_MENU 348
-
-#define GLFW_KEY_LAST GLFW_KEY_MENU
-
-/*! @} */
-
-/*! @defgroup mods Modifier key flags
- *
- * See [key input](@ref input_key) for how these are used.
- *
- * @ingroup input
- * @{ */
-
-/*! @brief If this bit is set one or more Shift keys were held down.
- */
-#define GLFW_MOD_SHIFT 0x0001
-/*! @brief If this bit is set one or more Control keys were held down.
- */
-#define GLFW_MOD_CONTROL 0x0002
-/*! @brief If this bit is set one or more Alt keys were held down.
- */
-#define GLFW_MOD_ALT 0x0004
-/*! @brief If this bit is set one or more Super keys were held down.
- */
-#define GLFW_MOD_SUPER 0x0008
-
-/*! @} */
-
-/*! @defgroup buttons Mouse buttons
- *
- * See [mouse button input](@ref input_mouse_button) for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_MOUSE_BUTTON_1 0
-#define GLFW_MOUSE_BUTTON_2 1
-#define GLFW_MOUSE_BUTTON_3 2
-#define GLFW_MOUSE_BUTTON_4 3
-#define GLFW_MOUSE_BUTTON_5 4
-#define GLFW_MOUSE_BUTTON_6 5
-#define GLFW_MOUSE_BUTTON_7 6
-#define GLFW_MOUSE_BUTTON_8 7
-#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8
-#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1
-#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2
-#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3
-/*! @} */
-
-/*! @defgroup joysticks Joysticks
- *
- * See [joystick input](@ref joystick) for how these are used.
- *
- * @ingroup input
- * @{ */
-#define GLFW_JOYSTICK_1 0
-#define GLFW_JOYSTICK_2 1
-#define GLFW_JOYSTICK_3 2
-#define GLFW_JOYSTICK_4 3
-#define GLFW_JOYSTICK_5 4
-#define GLFW_JOYSTICK_6 5
-#define GLFW_JOYSTICK_7 6
-#define GLFW_JOYSTICK_8 7
-#define GLFW_JOYSTICK_9 8
-#define GLFW_JOYSTICK_10 9
-#define GLFW_JOYSTICK_11 10
-#define GLFW_JOYSTICK_12 11
-#define GLFW_JOYSTICK_13 12
-#define GLFW_JOYSTICK_14 13
-#define GLFW_JOYSTICK_15 14
-#define GLFW_JOYSTICK_16 15
-#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
-/*! @} */
-
-/*! @defgroup errors Error codes
- *
- * See [error handling](@ref error_handling) for how these are used.
- *
- * @ingroup init
- * @{ */
-/*! @brief GLFW has not been initialized.
- *
- * This occurs if a GLFW function was called that must not be called unless the
- * library is [initialized](@ref intro_init).
- *
- * @analysis Application programmer error. Initialize GLFW before calling any
- * function that requires initialization.
- */
-#define GLFW_NOT_INITIALIZED 0x00010001
-/*! @brief No context is current for this thread.
- *
- * This occurs if a GLFW function was called that needs and operates on the
- * current OpenGL or OpenGL ES context but no context is current on the calling
- * thread. One such function is @ref glfwSwapInterval.
- *
- * @analysis Application programmer error. Ensure a context is current before
- * calling functions that require a current context.
- */
-#define GLFW_NO_CURRENT_CONTEXT 0x00010002
-/*! @brief One of the arguments to the function was an invalid enum value.
- *
- * One of the arguments to the function was an invalid enum value, for example
- * requesting [GLFW_RED_BITS](@ref window_hints_fb) with @ref
- * glfwGetWindowAttrib.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_INVALID_ENUM 0x00010003
-/*! @brief One of the arguments to the function was an invalid value.
- *
- * One of the arguments to the function was an invalid value, for example
- * requesting a non-existent OpenGL or OpenGL ES version like 2.7.
- *
- * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead
- * result in a @ref GLFW_VERSION_UNAVAILABLE error.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_INVALID_VALUE 0x00010004
-/*! @brief A memory allocation failed.
- *
- * A memory allocation failed.
- *
- * @analysis A bug in GLFW or the underlying operating system. Report the bug
- * to our [issue tracker](https://github.com/glfw/glfw/issues).
- */
-#define GLFW_OUT_OF_MEMORY 0x00010005
-/*! @brief GLFW could not find support for the requested API on the system.
- *
- * GLFW could not find support for the requested API on the system.
- *
- * @analysis The installed graphics driver does not support the requested
- * API, or does not support it via the chosen context creation backend.
- * Below are a few examples.
- *
- * @par
- * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
- * supports OpenGL ES via EGL, while Nvidia and Intel only support it via
- * a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa
- * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
- * driver. Older graphics drivers do not support Vulkan.
- */
-#define GLFW_API_UNAVAILABLE 0x00010006
-/*! @brief The requested OpenGL or OpenGL ES version is not available.
- *
- * The requested OpenGL or OpenGL ES version (including any requested context
- * or framebuffer hints) is not available on this machine.
- *
- * @analysis The machine does not support your requirements. If your
- * application is sufficiently flexible, downgrade your requirements and try
- * again. Otherwise, inform the user that their machine does not match your
- * requirements.
- *
- * @par
- * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0
- * comes out before the 4.x series gets that far, also fail with this error and
- * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions
- * will exist.
- */
-#define GLFW_VERSION_UNAVAILABLE 0x00010007
-/*! @brief A platform-specific error occurred that does not match any of the
- * more specific categories.
- *
- * A platform-specific error occurred that does not match any of the more
- * specific categories.
- *
- * @analysis A bug or configuration error in GLFW, the underlying operating
- * system or its drivers, or a lack of required resources. Report the issue to
- * our [issue tracker](https://github.com/glfw/glfw/issues).
- */
-#define GLFW_PLATFORM_ERROR 0x00010008
-/*! @brief The requested format is not supported or available.
- *
- * If emitted during window creation, the requested pixel format is not
- * supported.
- *
- * If emitted when querying the clipboard, the contents of the clipboard could
- * not be converted to the requested format.
- *
- * @analysis If emitted during window creation, one or more
- * [hard constraints](@ref window_hints_hard) did not match any of the
- * available pixel formats. If your application is sufficiently flexible,
- * downgrade your requirements and try again. Otherwise, inform the user that
- * their machine does not match your requirements.
- *
- * @par
- * If emitted when querying the clipboard, ignore the error or report it to
- * the user, as appropriate.
- */
-#define GLFW_FORMAT_UNAVAILABLE 0x00010009
-/*! @brief The specified window does not have an OpenGL or OpenGL ES context.
- *
- * A window that does not have an OpenGL or OpenGL ES context was passed to
- * a function that requires it to have one.
- *
- * @analysis Application programmer error. Fix the offending call.
- */
-#define GLFW_NO_WINDOW_CONTEXT 0x0001000A
-/*! @} */
-
-#define GLFW_FOCUSED 0x00020001
-#define GLFW_ICONIFIED 0x00020002
-#define GLFW_RESIZABLE 0x00020003
-#define GLFW_VISIBLE 0x00020004
-#define GLFW_DECORATED 0x00020005
-#define GLFW_AUTO_ICONIFY 0x00020006
-#define GLFW_FLOATING 0x00020007
-#define GLFW_MAXIMIZED 0x00020008
-
-#define GLFW_RED_BITS 0x00021001
-#define GLFW_GREEN_BITS 0x00021002
-#define GLFW_BLUE_BITS 0x00021003
-#define GLFW_ALPHA_BITS 0x00021004
-#define GLFW_DEPTH_BITS 0x00021005
-#define GLFW_STENCIL_BITS 0x00021006
-#define GLFW_ACCUM_RED_BITS 0x00021007
-#define GLFW_ACCUM_GREEN_BITS 0x00021008
-#define GLFW_ACCUM_BLUE_BITS 0x00021009
-#define GLFW_ACCUM_ALPHA_BITS 0x0002100A
-#define GLFW_AUX_BUFFERS 0x0002100B
-#define GLFW_STEREO 0x0002100C
-#define GLFW_SAMPLES 0x0002100D
-#define GLFW_SRGB_CAPABLE 0x0002100E
-#define GLFW_REFRESH_RATE 0x0002100F
-#define GLFW_DOUBLEBUFFER 0x00021010
-
-#define GLFW_CLIENT_API 0x00022001
-#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002
-#define GLFW_CONTEXT_VERSION_MINOR 0x00022003
-#define GLFW_CONTEXT_REVISION 0x00022004
-#define GLFW_CONTEXT_ROBUSTNESS 0x00022005
-#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
-#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
-#define GLFW_OPENGL_PROFILE 0x00022008
-#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009
-#define GLFW_CONTEXT_NO_ERROR 0x0002200A
-
-#define GLFW_NO_API 0
-#define GLFW_OPENGL_API 0x00030001
-#define GLFW_OPENGL_ES_API 0x00030002
-
-#define GLFW_NO_ROBUSTNESS 0
-#define GLFW_NO_RESET_NOTIFICATION 0x00031001
-#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002
-
-#define GLFW_OPENGL_ANY_PROFILE 0
-#define GLFW_OPENGL_CORE_PROFILE 0x00032001
-#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002
-
-#define GLFW_CURSOR 0x00033001
-#define GLFW_STICKY_KEYS 0x00033002
-#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003
-
-#define GLFW_CURSOR_NORMAL 0x00034001
-#define GLFW_CURSOR_HIDDEN 0x00034002
-#define GLFW_CURSOR_DISABLED 0x00034003
-
-#define GLFW_ANY_RELEASE_BEHAVIOR 0
-#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001
-#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002
-
-/*! @defgroup shapes Standard cursor shapes
- *
- * See [standard cursor creation](@ref cursor_standard) for how these are used.
- *
- * @ingroup input
- * @{ */
-
-/*! @brief The regular arrow cursor shape.
- *
- * The regular arrow cursor.
- */
-#define GLFW_ARROW_CURSOR 0x00036001
-/*! @brief The text input I-beam cursor shape.
- *
- * The text input I-beam cursor shape.
- */
-#define GLFW_IBEAM_CURSOR 0x00036002
-/*! @brief The crosshair shape.
- *
- * The crosshair shape.
- */
-#define GLFW_CROSSHAIR_CURSOR 0x00036003
-/*! @brief The hand shape.
- *
- * The hand shape.
- */
-#define GLFW_HAND_CURSOR 0x00036004
-/*! @brief The horizontal resize arrow shape.
- *
- * The horizontal resize arrow shape.
- */
-#define GLFW_HRESIZE_CURSOR 0x00036005
-/*! @brief The vertical resize arrow shape.
- *
- * The vertical resize arrow shape.
- */
-#define GLFW_VRESIZE_CURSOR 0x00036006
-/*! @} */
-
-#define GLFW_CONNECTED 0x00040001
-#define GLFW_DISCONNECTED 0x00040002
-
-#define GLFW_DONT_CARE -1
-
-
-/*************************************************************************
- * GLFW API types
- *************************************************************************/
-
-/*! @brief Client API function pointer type.
- *
- * Generic function pointer used for returning client API function pointers
- * without forcing a cast from a regular pointer.
- *
- * @sa @ref context_glext
- * @sa glfwGetProcAddress
- *
- * @since Added in version 3.0.
-
- * @ingroup context
- */
-typedef void (*GLFWglproc)(void);
-
-/*! @brief Vulkan API function pointer type.
- *
- * Generic function pointer used for returning Vulkan API function pointers
- * without forcing a cast from a regular pointer.
- *
- * @sa @ref vulkan_proc
- * @sa glfwGetInstanceProcAddress
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-typedef void (*GLFWvkproc)(void);
-
-/*! @brief Opaque monitor object.
- *
- * Opaque monitor object.
- *
- * @see @ref monitor_object
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef struct GLFWmonitor GLFWmonitor;
-
-/*! @brief Opaque window object.
- *
- * Opaque window object.
- *
- * @see @ref window_object
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef struct GLFWwindow GLFWwindow;
-
-/*! @brief Opaque cursor object.
- *
- * Opaque cursor object.
- *
- * @see @ref cursor_object
- *
- * @since Added in version 3.1.
- *
- * @ingroup cursor
- */
-typedef struct GLFWcursor GLFWcursor;
-
-/*! @brief The function signature for error callbacks.
- *
- * This is the function signature for error callback functions.
- *
- * @param[in] error An [error code](@ref errors).
- * @param[in] description A UTF-8 encoded string describing the error.
- *
- * @sa @ref error_handling
- * @sa glfwSetErrorCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-typedef void (* GLFWerrorfun)(int,const char*);
-
-/*! @brief The function signature for window position callbacks.
- *
- * This is the function signature for window position callback functions.
- *
- * @param[in] window The window that was moved.
- * @param[in] xpos The new x-coordinate, in screen coordinates, of the
- * upper-left corner of the client area of the window.
- * @param[in] ypos The new y-coordinate, in screen coordinates, of the
- * upper-left corner of the client area of the window.
- *
- * @sa @ref window_pos
- * @sa glfwSetWindowPosCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int);
-
-/*! @brief The function signature for window resize callbacks.
- *
- * This is the function signature for window size callback functions.
- *
- * @param[in] window The window that was resized.
- * @param[in] width The new width, in screen coordinates, of the window.
- * @param[in] height The new height, in screen coordinates, of the window.
- *
- * @sa @ref window_size
- * @sa glfwSetWindowSizeCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int);
-
-/*! @brief The function signature for window close callbacks.
- *
- * This is the function signature for window close callback functions.
- *
- * @param[in] window The window that the user attempted to close.
- *
- * @sa @ref window_close
- * @sa glfwSetWindowCloseCallback
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowclosefun)(GLFWwindow*);
-
-/*! @brief The function signature for window content refresh callbacks.
- *
- * This is the function signature for window refresh callback functions.
- *
- * @param[in] window The window whose content needs to be refreshed.
- *
- * @sa @ref window_refresh
- * @sa glfwSetWindowRefreshCallback
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowrefreshfun)(GLFWwindow*);
-
-/*! @brief The function signature for window focus/defocus callbacks.
- *
- * This is the function signature for window focus callback functions.
- *
- * @param[in] window The window that gained or lost input focus.
- * @param[in] focused `GLFW_TRUE` if the window was given input focus, or
- * `GLFW_FALSE` if it lost it.
- *
- * @sa @ref window_focus
- * @sa glfwSetWindowFocusCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);
-
-/*! @brief The function signature for window iconify/restore callbacks.
- *
- * This is the function signature for window iconify/restore callback
- * functions.
- *
- * @param[in] window The window that was iconified or restored.
- * @param[in] iconified `GLFW_TRUE` if the window was iconified, or
- * `GLFW_FALSE` if it was restored.
- *
- * @sa @ref window_iconify
- * @sa glfwSetWindowIconifyCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);
-
-/*! @brief The function signature for framebuffer resize callbacks.
- *
- * This is the function signature for framebuffer resize callback
- * functions.
- *
- * @param[in] window The window whose framebuffer was resized.
- * @param[in] width The new width, in pixels, of the framebuffer.
- * @param[in] height The new height, in pixels, of the framebuffer.
- *
- * @sa @ref window_fbsize
- * @sa glfwSetFramebufferSizeCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int);
-
-/*! @brief The function signature for mouse button callbacks.
- *
- * This is the function signature for mouse button callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] button The [mouse button](@ref buttons) that was pressed or
- * released.
- * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_mouse_button
- * @sa glfwSetMouseButtonCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle and modifier mask parameters.
- *
- * @ingroup input
- */
-typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);
-
-/*! @brief The function signature for cursor position callbacks.
- *
- * This is the function signature for cursor position callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] xpos The new cursor x-coordinate, relative to the left edge of
- * the client area.
- * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the
- * client area.
- *
- * @sa @ref cursor_pos
- * @sa glfwSetCursorPosCallback
- *
- * @since Added in version 3.0. Replaces `GLFWmouseposfun`.
- *
- * @ingroup input
- */
-typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);
-
-/*! @brief The function signature for cursor enter/leave callbacks.
- *
- * This is the function signature for cursor enter/leave callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] entered `GLFW_TRUE` if the cursor entered the window's client
- * area, or `GLFW_FALSE` if it left it.
- *
- * @sa @ref cursor_enter
- * @sa glfwSetCursorEnterCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-typedef void (* GLFWcursorenterfun)(GLFWwindow*,int);
-
-/*! @brief The function signature for scroll callbacks.
- *
- * This is the function signature for scroll callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] xoffset The scroll offset along the x-axis.
- * @param[in] yoffset The scroll offset along the y-axis.
- *
- * @sa @ref scrolling
- * @sa glfwSetScrollCallback
- *
- * @since Added in version 3.0. Replaces `GLFWmousewheelfun`.
- *
- * @ingroup input
- */
-typedef void (* GLFWscrollfun)(GLFWwindow*,double,double);
-
-/*! @brief The function signature for keyboard key callbacks.
- *
- * This is the function signature for keyboard key callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] key The [keyboard key](@ref keys) that was pressed or released.
- * @param[in] scancode The system-specific scancode of the key.
- * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_key
- * @sa glfwSetKeyCallback
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle, scancode and modifier mask parameters.
- *
- * @ingroup input
- */
-typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int);
-
-/*! @brief The function signature for Unicode character callbacks.
- *
- * This is the function signature for Unicode character callback functions.
- *
- * @param[in] window The window that received the event.
- * @param[in] codepoint The Unicode code point of the character.
- *
- * @sa @ref input_char
- * @sa glfwSetCharCallback
- *
- * @since Added in version 2.4.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int);
-
-/*! @brief The function signature for Unicode character with modifiers
- * callbacks.
- *
- * This is the function signature for Unicode character with modifiers callback
- * functions. It is called for each input character, regardless of what
- * modifier keys are held down.
- *
- * @param[in] window The window that received the event.
- * @param[in] codepoint The Unicode code point of the character.
- * @param[in] mods Bit field describing which [modifier keys](@ref mods) were
- * held down.
- *
- * @sa @ref input_char
- * @sa glfwSetCharModsCallback
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int);
-
-/*! @brief The function signature for file drop callbacks.
- *
- * This is the function signature for file drop callbacks.
- *
- * @param[in] window The window that received the event.
- * @param[in] count The number of dropped files.
- * @param[in] paths The UTF-8 encoded file and/or directory path names.
- *
- * @sa @ref path_drop
- * @sa glfwSetDropCallback
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-typedef void (* GLFWdropfun)(GLFWwindow*,int,const char**);
-
-/*! @brief The function signature for monitor configuration callbacks.
- *
- * This is the function signature for monitor configuration callback functions.
- *
- * @param[in] monitor The monitor that was connected or disconnected.
- * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.
- *
- * @sa @ref monitor_event
- * @sa glfwSetMonitorCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef void (* GLFWmonitorfun)(GLFWmonitor*,int);
-
-/*! @brief The function signature for joystick configuration callbacks.
- *
- * This is the function signature for joystick configuration callback
- * functions.
- *
- * @param[in] joy The joystick that was connected or disconnected.
- * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.
- *
- * @sa @ref joystick_event
- * @sa glfwSetJoystickCallback
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-typedef void (* GLFWjoystickfun)(int,int);
-
-/*! @brief Video mode type.
- *
- * This describes a single video mode.
- *
- * @sa @ref monitor_modes
- * @sa glfwGetVideoMode glfwGetVideoModes
- *
- * @since Added in version 1.0.
- * @glfw3 Added refresh rate member.
- *
- * @ingroup monitor
- */
-typedef struct GLFWvidmode
-{
- /*! The width, in screen coordinates, of the video mode.
- */
- int width;
- /*! The height, in screen coordinates, of the video mode.
- */
- int height;
- /*! The bit depth of the red channel of the video mode.
- */
- int redBits;
- /*! The bit depth of the green channel of the video mode.
- */
- int greenBits;
- /*! The bit depth of the blue channel of the video mode.
- */
- int blueBits;
- /*! The refresh rate, in Hz, of the video mode.
- */
- int refreshRate;
-} GLFWvidmode;
-
-/*! @brief Gamma ramp.
- *
- * This describes the gamma ramp for a monitor.
- *
- * @sa @ref monitor_gamma
- * @sa glfwGetGammaRamp glfwSetGammaRamp
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-typedef struct GLFWgammaramp
-{
- /*! An array of value describing the response of the red channel.
- */
- unsigned short* red;
- /*! An array of value describing the response of the green channel.
- */
- unsigned short* green;
- /*! An array of value describing the response of the blue channel.
- */
- unsigned short* blue;
- /*! The number of elements in each array.
- */
- unsigned int size;
-} GLFWgammaramp;
-
-/*! @brief Image data.
- *
- * @sa @ref cursor_custom
- *
- * @since Added in version 2.1.
- * @glfw3 Removed format and bytes-per-pixel members.
- */
-typedef struct GLFWimage
-{
- /*! The width, in pixels, of this image.
- */
- int width;
- /*! The height, in pixels, of this image.
- */
- int height;
- /*! The pixel data of this image, arranged left-to-right, top-to-bottom.
- */
- unsigned char* pixels;
-} GLFWimage;
-
-
-/*************************************************************************
- * GLFW API functions
- *************************************************************************/
-
-/*! @brief Initializes the GLFW library.
- *
- * This function initializes the GLFW library. Before most GLFW functions can
- * be used, GLFW must be initialized, and before an application terminates GLFW
- * should be terminated in order to free any resources allocated during or
- * after initialization.
- *
- * If this function fails, it calls @ref glfwTerminate before returning. If it
- * succeeds, you should call @ref glfwTerminate before the application exits.
- *
- * Additional calls to this function after successful initialization but before
- * termination will return `GLFW_TRUE` immediately.
- *
- * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
- *
- * @remark @osx This function will change the current directory of the
- * application to the `Contents/Resources` subdirectory of the application's
- * bundle, if present. This can be disabled with a
- * [compile-time option](@ref compile_options_osx).
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref intro_init
- * @sa glfwTerminate
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI int glfwInit(void);
-
-/*! @brief Terminates the GLFW library.
- *
- * This function destroys all remaining windows and cursors, restores any
- * modified gamma ramps and frees any other allocated resources. Once this
- * function is called, you must again call @ref glfwInit successfully before
- * you will be able to use most GLFW functions.
- *
- * If GLFW has been successfully initialized, this function should be called
- * before the application exits. If initialization fails, there is no need to
- * call this function, as it is called by @ref glfwInit before it returns
- * failure.
- *
- * @errors Possible errors include @ref GLFW_PLATFORM_ERROR.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @warning The contexts of any remaining windows must not be current on any
- * other thread when this function is called.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref intro_init
- * @sa glfwInit
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI void glfwTerminate(void);
-
-/*! @brief Retrieves the version of the GLFW library.
- *
- * This function retrieves the major, minor and revision numbers of the GLFW
- * library. It is intended for when you are using GLFW as a shared library and
- * want to ensure that you are using the minimum required version.
- *
- * Any or all of the version arguments may be `NULL`.
- *
- * @param[out] major Where to store the major version number, or `NULL`.
- * @param[out] minor Where to store the minor version number, or `NULL`.
- * @param[out] rev Where to store the revision number, or `NULL`.
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref intro_version
- * @sa glfwGetVersionString
- *
- * @since Added in version 1.0.
- *
- * @ingroup init
- */
-GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
-
-/*! @brief Returns a string describing the compile-time configuration.
- *
- * This function returns the compile-time generated
- * [version string](@ref intro_version_string) of the GLFW library binary. It
- * describes the version, platform, compiler and any platform-specific
- * compile-time options. It should not be confused with the OpenGL or OpenGL
- * ES version string, queried with `glGetString`.
- *
- * __Do not use the version string__ to parse the GLFW library version. The
- * @ref glfwGetVersion function provides the version of the running library
- * binary in numerical format.
- *
- * @return The ASCII encoded GLFW version string.
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @pointer_lifetime The returned string is static and compile-time generated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref intro_version
- * @sa glfwGetVersion
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-GLFWAPI const char* glfwGetVersionString(void);
-
-/*! @brief Sets the error callback.
- *
- * This function sets the error callback, which is called with an error code
- * and a human-readable description each time a GLFW error occurs.
- *
- * The error callback is called on the thread where the error occurred. If you
- * are using GLFW from multiple threads, your error callback needs to be
- * written accordingly.
- *
- * Because the description string may have been generated specifically for that
- * error, it is not guaranteed to be valid after the callback has returned. If
- * you wish to use it after the callback returns, you need to make a copy.
- *
- * Once set, the error callback remains set even after the library has been
- * terminated.
- *
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set.
- *
- * @errors None.
- *
- * @remark This function may be called before @ref glfwInit.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref error_handling
- *
- * @since Added in version 3.0.
- *
- * @ingroup init
- */
-GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun);
-
-/*! @brief Returns the currently connected monitors.
- *
- * This function returns an array of handles for all currently connected
- * monitors. The primary monitor is always first in the returned array. If no
- * monitors were found, this function returns `NULL`.
- *
- * @param[out] count Where to store the number of monitors in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of monitor handles, or `NULL` if no monitors were found or
- * if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is guaranteed to be valid only until the
- * monitor configuration changes or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_monitors
- * @sa @ref monitor_event
- * @sa glfwGetPrimaryMonitor
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
-
-/*! @brief Returns the primary monitor.
- *
- * This function returns the primary monitor. This is usually the monitor
- * where elements like the task bar or global menu bar are located.
- *
- * @return The primary monitor, or `NULL` if no monitors were found or if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @remark The primary monitor is always first in the array returned by @ref
- * glfwGetMonitors.
- *
- * @sa @ref monitor_monitors
- * @sa glfwGetMonitors
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
-
-/*! @brief Returns the position of the monitor's viewport on the virtual screen.
- *
- * This function returns the position, in screen coordinates, of the upper-left
- * corner of the specified monitor.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
- * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
-
-/*! @brief Returns the physical size of the monitor.
- *
- * This function returns the size, in millimetres, of the display area of the
- * specified monitor.
- *
- * Some systems do not provide accurate monitor size information, either
- * because the monitor
- * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data)
- * data is incorrect or because the driver does not report it accurately.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] monitor The monitor to query.
- * @param[out] widthMM Where to store the width, in millimetres, of the
- * monitor's display area, or `NULL`.
- * @param[out] heightMM Where to store the height, in millimetres, of the
- * monitor's display area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @win32 calculates the returned physical size from the
- * current resolution and system DPI instead of querying the monitor EDID data.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);
-
-/*! @brief Returns the name of the specified monitor.
- *
- * This function returns a human-readable name, encoded as UTF-8, of the
- * specified monitor. The name typically reflects the make and model of the
- * monitor and is not guaranteed to be unique among the connected monitors.
- *
- * @param[in] monitor The monitor to query.
- * @return The UTF-8 encoded name of the monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_properties
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
-
-/*! @brief Sets the monitor configuration callback.
- *
- * This function sets the monitor configuration callback, or removes the
- * currently set callback. This is called when a monitor is connected to or
- * disconnected from the system.
- *
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_event
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun);
-
-/*! @brief Returns the available video modes for the specified monitor.
- *
- * This function returns an array of all video modes supported by the specified
- * monitor. The returned array is sorted in ascending order, first by color
- * bit depth (the sum of all channel depths) and then by resolution area (the
- * product of width and height).
- *
- * @param[in] monitor The monitor to query.
- * @param[out] count Where to store the number of video modes in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of video modes, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected, this function is called again for that monitor or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_modes
- * @sa glfwGetVideoMode
- *
- * @since Added in version 1.0.
- * @glfw3 Changed to return an array of modes for a specific monitor.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
-
-/*! @brief Returns the current mode of the specified monitor.
- *
- * This function returns the current video mode of the specified monitor. If
- * you have created a full screen window for that monitor, the return value
- * will depend on whether that window is iconified.
- *
- * @param[in] monitor The monitor to query.
- * @return The current mode of the monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified monitor is
- * disconnected or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_modes
- * @sa glfwGetVideoModes
- *
- * @since Added in version 3.0. Replaces `glfwGetDesktopMode`.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
-
-/*! @brief Generates a gamma ramp and sets it for the specified monitor.
- *
- * This function generates a 256-element gamma ramp from the specified exponent
- * and then calls @ref glfwSetGammaRamp with it. The value must be a finite
- * number greater than zero.
- *
- * @param[in] monitor The monitor whose gamma ramp to set.
- * @param[in] gamma The desired exponent.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
-
-/*! @brief Returns the current gamma ramp for the specified monitor.
- *
- * This function returns the current gamma ramp of the specified monitor.
- *
- * @param[in] monitor The monitor to query.
- * @return The current gamma ramp, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned structure and its arrays are allocated and
- * freed by GLFW. You should not free them yourself. They are valid until the
- * specified monitor is disconnected, this function is called again for that
- * monitor or the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
-
-/*! @brief Sets the current gamma ramp for the specified monitor.
- *
- * This function sets the current gamma ramp for the specified monitor. The
- * original gamma ramp for that monitor is saved by GLFW the first time this
- * function is called and is restored by @ref glfwTerminate.
- *
- * @param[in] monitor The monitor whose gamma ramp to set.
- * @param[in] ramp The gamma ramp to use.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark Gamma ramp sizes other than 256 are not supported by all platforms
- * or graphics hardware.
- *
- * @remark @win32 The gamma ramp size must be 256.
- *
- * @pointer_lifetime The specified gamma ramp is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref monitor_gamma
- *
- * @since Added in version 3.0.
- *
- * @ingroup monitor
- */
-GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
-
-/*! @brief Resets all window hints to their default values.
- *
- * This function resets all window hints to their
- * [default values](@ref window_hints_values).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hints
- * @sa glfwWindowHint
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwDefaultWindowHints(void);
-
-/*! @brief Sets the specified window hint to the desired value.
- *
- * This function sets hints for the next call to @ref glfwCreateWindow. The
- * hints, once set, retain their values until changed by a call to @ref
- * glfwWindowHint or @ref glfwDefaultWindowHints, or until the library is
- * terminated.
- *
- * This function does not check whether the specified hint values are valid.
- * If you set hints to invalid values this will instead be reported by the next
- * call to @ref glfwCreateWindow.
- *
- * @param[in] hint The [window hint](@ref window_hints) to set.
- * @param[in] value The new value of the window hint.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hints
- * @sa glfwDefaultWindowHints
- *
- * @since Added in version 3.0. Replaces `glfwOpenWindowHint`.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWindowHint(int hint, int value);
-
-/*! @brief Creates a window and its associated context.
- *
- * This function creates a window and its associated OpenGL or OpenGL ES
- * context. Most of the options controlling how the window and its context
- * should be created are specified with [window hints](@ref window_hints).
- *
- * Successful creation does not change which context is current. Before you
- * can use the newly created context, you need to
- * [make it current](@ref context_current). For information about the `share`
- * parameter, see @ref context_sharing.
- *
- * The created window, framebuffer and context may differ from what you
- * requested, as not all parameters and hints are
- * [hard constraints](@ref window_hints_hard). This includes the size of the
- * window, especially for full screen windows. To query the actual attributes
- * of the created window, framebuffer and context, see @ref
- * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.
- *
- * To create a full screen window, you need to specify the monitor the window
- * will cover. If no monitor is specified, the window will be windowed mode.
- * Unless you have a way for the user to choose a specific monitor, it is
- * recommended that you pick the primary monitor. For more information on how
- * to query connected monitors, see @ref monitor_monitors.
- *
- * For full screen windows, the specified size becomes the resolution of the
- * window's _desired video mode_. As long as a full screen window is not
- * iconified, the supported video mode most closely matching the desired video
- * mode is set for the specified monitor. For more information about full
- * screen windows, including the creation of so called _windowed full screen_
- * or _borderless full screen_ windows, see @ref window_windowed_full_screen.
- *
- * By default, newly created windows use the placement recommended by the
- * window system. To create the window at a specific position, make it
- * initially invisible using the [GLFW_VISIBLE](@ref window_hints_wnd) window
- * hint, set its [position](@ref window_pos) and then [show](@ref window_hide)
- * it.
- *
- * As long as at least one full screen window is not iconified, the screensaver
- * is prohibited from starting.
- *
- * Window systems put limits on window sizes. Very large or very small window
- * dimensions may be overridden by the window system on creation. Check the
- * actual [size](@ref window_size) after creation.
- *
- * The [swap interval](@ref buffer_swap) is not set during window creation and
- * the initial value may vary depending on driver settings and defaults.
- *
- * @param[in] width The desired width, in screen coordinates, of the window.
- * This must be greater than zero.
- * @param[in] height The desired height, in screen coordinates, of the window.
- * This must be greater than zero.
- * @param[in] title The initial, UTF-8 encoded window title.
- * @param[in] monitor The monitor to use for full screen mode, or `NULL` for
- * windowed mode.
- * @param[in] share The window whose context to share resources with, or `NULL`
- * to not share resources.
- * @return The handle of the created window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref
- * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @win32 Window creation will fail if the Microsoft GDI software
- * OpenGL implementation is the only one available.
- *
- * @remark @win32 If the executable has an icon resource named `GLFW_ICON,`
- * it will be set as the icon for the window. If no such icon is present, the
- * `IDI_WINLOGO` icon will be used instead.
- *
- * @remark @win32 The context to share resources with must not be current on
- * any other thread.
- *
- * @remark @osx The GLFW window has no icon, as it is not a document
- * window, but the dock icon will be the same as the application bundle's icon.
- * For more information on bundles, see the
- * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
- * in the Mac Developer Library.
- *
- * @remark @osx The first time a window is created the menu bar is populated
- * with common commands like Hide, Quit and About. The About entry opens
- * a minimal about dialog with information from the application's bundle. The
- * menu bar can be disabled with a
- * [compile-time option](@ref compile_options_osx).
- *
- * @remark @osx On OS X 10.10 and later the window frame will not be rendered
- * at full resolution on Retina displays unless the `NSHighResolutionCapable`
- * key is enabled in the application bundle's `Info.plist`. For more
- * information, see
- * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html)
- * in the Mac Developer Library. The GLFW test and example programs use
- * a custom `Info.plist` template for this, which can be found as
- * `CMake/MacOSXBundleInfo.plist.in` in the source tree.
- *
- * @remark @x11 There is no mechanism for setting the window icon yet.
- *
- * @remark @x11 Some window managers will not respect the placement of
- * initially hidden windows.
- *
- * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for
- * a window to reach its requested state. This means you may not be able to
- * query the final size, position or other attributes directly after window
- * creation.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_creation
- * @sa glfwDestroyWindow
- *
- * @since Added in version 3.0. Replaces `glfwOpenWindow`.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
-
-/*! @brief Destroys the specified window and its context.
- *
- * This function destroys the specified window and its context. On calling
- * this function, no further callbacks will be called for that window.
- *
- * If the context of the specified window is current on the main thread, it is
- * detached before being destroyed.
- *
- * @param[in] window The window to destroy.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @note The context of the specified window must not be current on any other
- * thread when this function is called.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_creation
- * @sa glfwCreateWindow
- *
- * @since Added in version 3.0. Replaces `glfwCloseWindow`.
- *
- * @ingroup window
- */
-GLFWAPI void glfwDestroyWindow(GLFWwindow* window);
-
-/*! @brief Checks the close flag of the specified window.
- *
- * This function returns the value of the close flag of the specified window.
- *
- * @param[in] window The window to query.
- * @return The value of the close flag.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_close
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
-
-/*! @brief Sets the close flag of the specified window.
- *
- * This function sets the value of the close flag of the specified window.
- * This can be used to override the user's attempt to close the window, or
- * to signal that it should be closed.
- *
- * @param[in] window The window whose flag to change.
- * @param[in] value The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_close
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
-
-/*! @brief Sets the title of the specified window.
- *
- * This function sets the window title, encoded as UTF-8, of the specified
- * window.
- *
- * @param[in] window The window whose title to change.
- * @param[in] title The UTF-8 encoded window title.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @osx The window title will not be updated until the next time you
- * process events.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_title
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
-
-/*! @brief Sets the icon for the specified window.
- *
- * This function sets the icon of the specified window. If passed an array of
- * candidate images, those of or closest to the sizes desired by the system are
- * selected. If no images are specified, the window reverts to its default
- * icon.
- *
- * The desired image sizes varies depending on platform and system settings.
- * The selected images will be rescaled as needed. Good sizes include 16x16,
- * 32x32 and 48x48.
- *
- * @param[in] window The window whose icon to set.
- * @param[in] count The number of images in the specified array, or zero to
- * revert to the default window icon.
- * @param[in] images The images to create the icon from. This is ignored if
- * count is zero.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified image data is copied before this function
- * returns.
- *
- * @remark @osx The GLFW window has no icon, as it is not a document
- * window, but the dock icon will be the same as the application bundle's icon.
- * For more information on bundles, see the
- * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)
- * in the Mac Developer Library.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_icon
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);
-
-/*! @brief Retrieves the position of the client area of the specified window.
- *
- * This function retrieves the position, in screen coordinates, of the
- * upper-left corner of the client area of the specified window.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] window The window to query.
- * @param[out] xpos Where to store the x-coordinate of the upper-left corner of
- * the client area, or `NULL`.
- * @param[out] ypos Where to store the y-coordinate of the upper-left corner of
- * the client area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- * @sa glfwSetWindowPos
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
-
-/*! @brief Sets the position of the client area of the specified window.
- *
- * This function sets the position, in screen coordinates, of the upper-left
- * corner of the client area of the specified windowed mode window. If the
- * window is a full screen window, this function does nothing.
- *
- * __Do not use this function__ to move an already visible window unless you
- * have very good reasons for doing so, as it will confuse and annoy the user.
- *
- * The window manager may put limits on what positions are allowed. GLFW
- * cannot and should not override these limits.
- *
- * @param[in] window The window to query.
- * @param[in] xpos The x-coordinate of the upper-left corner of the client area.
- * @param[in] ypos The y-coordinate of the upper-left corner of the client area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- * @sa glfwGetWindowPos
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
-
-/*! @brief Retrieves the size of the client area of the specified window.
- *
- * This function retrieves the size, in screen coordinates, of the client area
- * of the specified window. If you wish to retrieve the size of the
- * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose size to retrieve.
- * @param[out] width Where to store the width, in screen coordinates, of the
- * client area, or `NULL`.
- * @param[out] height Where to store the height, in screen coordinates, of the
- * client area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- * @sa glfwSetWindowSize
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
-
-/*! @brief Sets the size limits of the specified window.
- *
- * This function sets the size limits of the client area of the specified
- * window. If the window is full screen, the size limits only take effect if
- * once it is made windowed. If the window is not resizable, this function
- * does nothing.
- *
- * The size limits are applied immediately to a windowed mode window and may
- * cause it to be resized.
- *
- * @param[in] window The window to set limits for.
- * @param[in] minwidth The minimum width, in screen coordinates, of the client
- * area, or `GLFW_DONT_CARE`.
- * @param[in] minheight The minimum height, in screen coordinates, of the
- * client area, or `GLFW_DONT_CARE`.
- * @param[in] maxwidth The maximum width, in screen coordinates, of the client
- * area, or `GLFW_DONT_CARE`.
- * @param[in] maxheight The maximum height, in screen coordinates, of the
- * client area, or `GLFW_DONT_CARE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark If you set size limits and an aspect ratio that conflict, the
- * results are undefined.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_sizelimits
- * @sa glfwSetWindowAspectRatio
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
-
-/*! @brief Sets the aspect ratio of the specified window.
- *
- * This function sets the required aspect ratio of the client area of the
- * specified window. If the window is full screen, the aspect ratio only takes
- * effect once it is made windowed. If the window is not resizable, this
- * function does nothing.
- *
- * The aspect ratio is specified as a numerator and a denominator and both
- * values must be greater than zero. For example, the common 16:9 aspect ratio
- * is specified as 16 and 9, respectively.
- *
- * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect
- * ratio limit is disabled.
- *
- * The aspect ratio is applied immediately to a windowed mode window and may
- * cause it to be resized.
- *
- * @param[in] window The window to set limits for.
- * @param[in] numer The numerator of the desired aspect ratio, or
- * `GLFW_DONT_CARE`.
- * @param[in] denom The denominator of the desired aspect ratio, or
- * `GLFW_DONT_CARE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark If you set size limits and an aspect ratio that conflict, the
- * results are undefined.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_sizelimits
- * @sa glfwSetWindowSizeLimits
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
-
-/*! @brief Sets the size of the client area of the specified window.
- *
- * This function sets the size, in screen coordinates, of the client area of
- * the specified window.
- *
- * For full screen windows, this function updates the resolution of its desired
- * video mode and switches to the video mode closest to it, without affecting
- * the window's context. As the context is unaffected, the bit depths of the
- * framebuffer remain unchanged.
- *
- * If you wish to update the refresh rate of the desired video mode in addition
- * to its resolution, see @ref glfwSetWindowMonitor.
- *
- * The window manager may put limits on what sizes are allowed. GLFW cannot
- * and should not override these limits.
- *
- * @param[in] window The window to resize.
- * @param[in] width The desired width, in screen coordinates, of the window
- * client area.
- * @param[in] height The desired height, in screen coordinates, of the window
- * client area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- * @sa glfwGetWindowSize
- * @sa glfwSetWindowMonitor
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
-
-/*! @brief Retrieves the size of the framebuffer of the specified window.
- *
- * This function retrieves the size, in pixels, of the framebuffer of the
- * specified window. If you wish to retrieve the size of the window in screen
- * coordinates, see @ref glfwGetWindowSize.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose framebuffer to query.
- * @param[out] width Where to store the width, in pixels, of the framebuffer,
- * or `NULL`.
- * @param[out] height Where to store the height, in pixels, of the framebuffer,
- * or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_fbsize
- * @sa glfwSetFramebufferSizeCallback
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
-
-/*! @brief Retrieves the size of the frame of the window.
- *
- * This function retrieves the size, in screen coordinates, of each edge of the
- * frame of the specified window. This size includes the title bar, if the
- * window has one. The size of the frame may vary depending on the
- * [window-related hints](@ref window_hints_wnd) used to create it.
- *
- * Because this function retrieves the size of each window frame edge and not
- * the offset along a particular coordinate axis, the retrieved values will
- * always be zero or positive.
- *
- * Any or all of the size arguments may be `NULL`. If an error occurs, all
- * non-`NULL` size arguments will be set to zero.
- *
- * @param[in] window The window whose frame size to query.
- * @param[out] left Where to store the size, in screen coordinates, of the left
- * edge of the window frame, or `NULL`.
- * @param[out] top Where to store the size, in screen coordinates, of the top
- * edge of the window frame, or `NULL`.
- * @param[out] right Where to store the size, in screen coordinates, of the
- * right edge of the window frame, or `NULL`.
- * @param[out] bottom Where to store the size, in screen coordinates, of the
- * bottom edge of the window frame, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- *
- * @since Added in version 3.1.
- *
- * @ingroup window
- */
-GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
-
-/*! @brief Iconifies the specified window.
- *
- * This function iconifies (minimizes) the specified window if it was
- * previously restored. If the window is already iconified, this function does
- * nothing.
- *
- * If the specified window is a full screen window, the original monitor
- * resolution is restored until the window is restored.
- *
- * @param[in] window The window to iconify.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa glfwRestoreWindow
- * @sa glfwMaximizeWindow
- *
- * @since Added in version 2.1.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwIconifyWindow(GLFWwindow* window);
-
-/*! @brief Restores the specified window.
- *
- * This function restores the specified window if it was previously iconified
- * (minimized) or maximized. If the window is already restored, this function
- * does nothing.
- *
- * If the specified window is a full screen window, the resolution chosen for
- * the window is restored on the selected monitor.
- *
- * @param[in] window The window to restore.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa glfwIconifyWindow
- * @sa glfwMaximizeWindow
- *
- * @since Added in version 2.1.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwRestoreWindow(GLFWwindow* window);
-
-/*! @brief Maximizes the specified window.
- *
- * This function maximizes the specified window if it was previously not
- * maximized. If the window is already maximized, this function does nothing.
- *
- * If the specified window is a full screen window, this function does nothing.
- *
- * @param[in] window The window to maximize.
- *
- * @par Thread Safety
- * This function may only be called from the main thread.
- *
- * @sa @ref window_iconify
- * @sa glfwIconifyWindow
- * @sa glfwRestoreWindow
- *
- * @since Added in GLFW 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwMaximizeWindow(GLFWwindow* window);
-
-/*! @brief Makes the specified window visible.
- *
- * This function makes the specified window visible if it was previously
- * hidden. If the window is already visible or is in full screen mode, this
- * function does nothing.
- *
- * @param[in] window The window to make visible.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hide
- * @sa glfwHideWindow
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwShowWindow(GLFWwindow* window);
-
-/*! @brief Hides the specified window.
- *
- * This function hides the specified window if it was previously visible. If
- * the window is already hidden or is in full screen mode, this function does
- * nothing.
- *
- * @param[in] window The window to hide.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_hide
- * @sa glfwShowWindow
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwHideWindow(GLFWwindow* window);
-
-/*! @brief Brings the specified window to front and sets input focus.
- *
- * This function brings the specified window to front and sets input focus.
- * The window should already be visible and not iconified.
- *
- * By default, both windowed and full screen mode windows are focused when
- * initially created. Set the [GLFW_FOCUSED](@ref window_hints_wnd) to disable
- * this behavior.
- *
- * __Do not use this function__ to steal focus from other applications unless
- * you are certain that is what the user wants. Focus stealing can be
- * extremely disruptive.
- *
- * @param[in] window The window to give input focus.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_focus
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwFocusWindow(GLFWwindow* window);
-
-/*! @brief Returns the monitor that the window uses for full screen mode.
- *
- * This function returns the handle of the monitor that the specified window is
- * in full screen on.
- *
- * @param[in] window The window to query.
- * @return The monitor, or `NULL` if the window is in windowed mode or an error
- * occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_monitor
- * @sa glfwSetWindowMonitor
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
-
-/*! @brief Sets the mode, monitor, video mode and placement of a window.
- *
- * This function sets the monitor that the window uses for full screen mode or,
- * if the monitor is `NULL`, makes it windowed mode.
- *
- * When setting a monitor, this function updates the width, height and refresh
- * rate of the desired video mode and switches to the video mode closest to it.
- * The window position is ignored when setting a monitor.
- *
- * When the monitor is `NULL`, the position, width and height are used to
- * place the window client area. The refresh rate is ignored when no monitor
- * is specified.
- *
- * If you only wish to update the resolution of a full screen window or the
- * size of a windowed mode window, see @ref glfwSetWindowSize.
- *
- * When a window transitions from full screen to windowed mode, this function
- * restores any previous window settings such as whether it is decorated,
- * floating, resizable, has size or aspect ratio limits, etc..
- *
- * @param[in] window The window whose monitor, size or video mode to set.
- * @param[in] monitor The desired monitor, or `NULL` to set windowed mode.
- * @param[in] xpos The desired x-coordinate of the upper-left corner of the
- * client area.
- * @param[in] ypos The desired y-coordinate of the upper-left corner of the
- * client area.
- * @param[in] width The desired with, in screen coordinates, of the client area
- * or video mode.
- * @param[in] height The desired height, in screen coordinates, of the client
- * area or video mode.
- * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_monitor
- * @sa @ref window_full_screen
- * @sa glfwGetWindowMonitor
- * @sa glfwSetWindowSize
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
-
-/*! @brief Returns an attribute of the specified window.
- *
- * This function returns the value of an attribute of the specified window or
- * its OpenGL or OpenGL ES context.
- *
- * @param[in] window The window to query.
- * @param[in] attrib The [window attribute](@ref window_attribs) whose value to
- * return.
- * @return The value of the attribute, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark Framebuffer related hints are not window attributes. See @ref
- * window_attribs_fb for more information.
- *
- * @remark Zero is a valid value for many window and context related
- * attributes so you cannot use a return value of zero as an indication of
- * errors. However, this function should not fail as long as it is passed
- * valid arguments and the library has been [initialized](@ref intro_init).
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_attribs
- *
- * @since Added in version 3.0. Replaces `glfwGetWindowParam` and
- * `glfwGetGLVersion`.
- *
- * @ingroup window
- */
-GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
-
-/*! @brief Sets the user pointer of the specified window.
- *
- * This function sets the user-defined pointer of the specified window. The
- * current value is retained until the window is destroyed. The initial value
- * is `NULL`.
- *
- * @param[in] window The window whose pointer to set.
- * @param[in] pointer The new value.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_userptr
- * @sa glfwGetWindowUserPointer
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
-
-/*! @brief Returns the user pointer of the specified window.
- *
- * This function returns the current value of the user-defined pointer of the
- * specified window. The initial value is `NULL`.
- *
- * @param[in] window The window whose pointer to return.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @sa @ref window_userptr
- * @sa glfwSetWindowUserPointer
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
-
-/*! @brief Sets the position callback for the specified window.
- *
- * This function sets the position callback of the specified window, which is
- * called when the window is moved. The callback is provided with the screen
- * position of the upper-left corner of the client area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_pos
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun);
-
-/*! @brief Sets the size callback for the specified window.
- *
- * This function sets the size callback of the specified window, which is
- * called when the window is resized. The callback is provided with the size,
- * in screen coordinates, of the client area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_size
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun);
-
-/*! @brief Sets the close callback for the specified window.
- *
- * This function sets the close callback of the specified window, which is
- * called when the user attempts to close the window, for example by clicking
- * the close widget in the title bar.
- *
- * The close flag is set before this callback is called, but you can modify it
- * at any time with @ref glfwSetWindowShouldClose.
- *
- * The close callback is not triggered by @ref glfwDestroyWindow.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @remark @osx Selecting Quit from the application menu will trigger the close
- * callback for all windows.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_close
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun);
-
-/*! @brief Sets the refresh callback for the specified window.
- *
- * This function sets the refresh callback of the specified window, which is
- * called when the client area of the window needs to be redrawn, for example
- * if the window has been exposed after having been covered by another window.
- *
- * On compositing window systems such as Aero, Compiz or Aqua, where the window
- * contents are saved off-screen, this callback may be called only very
- * infrequently or never at all.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_refresh
- *
- * @since Added in version 2.5.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun);
-
-/*! @brief Sets the focus callback for the specified window.
- *
- * This function sets the focus callback of the specified window, which is
- * called when the window gains or loses input focus.
- *
- * After the focus callback is called for a window that lost input focus,
- * synthetic key and mouse button release events will be generated for all such
- * that had been pressed. For more information, see @ref glfwSetKeyCallback
- * and @ref glfwSetMouseButtonCallback.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_focus
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun);
-
-/*! @brief Sets the iconify callback for the specified window.
- *
- * This function sets the iconification callback of the specified window, which
- * is called when the window is iconified or restored.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_iconify
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun);
-
-/*! @brief Sets the framebuffer resize callback for the specified window.
- *
- * This function sets the framebuffer resize callback of the specified window,
- * which is called when the framebuffer of the specified window is resized.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref window_fbsize
- *
- * @since Added in version 3.0.
- *
- * @ingroup window
- */
-GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun);
-
-/*! @brief Processes all pending events.
- *
- * This function processes only those events that are already in the event
- * queue and then returns immediately. Processing events will cause the window
- * and input callbacks associated with those events to be called.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * On some platforms, certain events are sent directly to the application
- * without going through the event queue, causing callbacks to be called
- * outside of a call to one of the event processing functions.
- *
- * Event processing is not required for joystick input to work.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa glfwWaitEvents
- * @sa glfwWaitEventsTimeout
- *
- * @since Added in version 1.0.
- *
- * @ingroup window
- */
-GLFWAPI void glfwPollEvents(void);
-
-/*! @brief Waits until events are queued and processes them.
- *
- * This function puts the calling thread to sleep until at least one event is
- * available in the event queue. Once one or more events are available,
- * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue
- * are processed and the function then returns immediately. Processing events
- * will cause the window and input callbacks associated with those events to be
- * called.
- *
- * Since not all events are associated with callbacks, this function may return
- * without a callback having been called even if you are monitoring all
- * callbacks.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * On some platforms, certain callbacks may be called outside of a call to one
- * of the event processing functions.
- *
- * If no windows exist, this function returns immediately. For synchronization
- * of threads in applications that do not create windows, use your threading
- * library of choice.
- *
- * Event processing is not required for joystick input to work.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa glfwPollEvents
- * @sa glfwWaitEventsTimeout
- *
- * @since Added in version 2.5.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWaitEvents(void);
-
-/*! @brief Waits with timeout until events are queued and processes them.
- *
- * This function puts the calling thread to sleep until at least one event is
- * available in the event queue, or until the specified timeout is reached. If
- * one or more events are available, it behaves exactly like @ref
- * glfwPollEvents, i.e. the events in the queue are processed and the function
- * then returns immediately. Processing events will cause the window and input
- * callbacks associated with those events to be called.
- *
- * The timeout value must be a positive finite number.
- *
- * Since not all events are associated with callbacks, this function may return
- * without a callback having been called even if you are monitoring all
- * callbacks.
- *
- * On some platforms, a window move, resize or menu operation will cause event
- * processing to block. This is due to how event processing is designed on
- * those platforms. You can use the
- * [window refresh callback](@ref window_refresh) to redraw the contents of
- * your window when necessary during such operations.
- *
- * On some platforms, certain callbacks may be called outside of a call to one
- * of the event processing functions.
- *
- * If no windows exist, this function returns immediately. For synchronization
- * of threads in applications that do not create windows, use your threading
- * library of choice.
- *
- * Event processing is not required for joystick input to work.
- *
- * @param[in] timeout The maximum amount of time, in seconds, to wait.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref events
- * @sa glfwPollEvents
- * @sa glfwWaitEvents
- *
- * @since Added in version 3.2.
- *
- * @ingroup window
- */
-GLFWAPI void glfwWaitEventsTimeout(double timeout);
-
-/*! @brief Posts an empty event to the event queue.
- *
- * This function posts an empty event from the current thread to the event
- * queue, causing @ref glfwWaitEvents to return.
- *
- * If no windows exist, this function returns immediately. For synchronization
- * of threads in applications that do not create windows, use your threading
- * library of choice.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref events
- * @sa glfwWaitEvents
- *
- * @since Added in version 3.1.
- *
- * @ingroup window
- */
-GLFWAPI void glfwPostEmptyEvent(void);
-
-/*! @brief Returns the value of an input option for the specified window.
- *
- * This function returns the value of an input option for the specified window.
- * The mode must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
- * `GLFW_STICKY_MOUSE_BUTTONS`.
- *
- * @param[in] window The window to query.
- * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
- * `GLFW_STICKY_MOUSE_BUTTONS`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa glfwSetInputMode
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
-
-/*! @brief Sets an input option for the specified window.
- *
- * This function sets an input mode option for the specified window. The mode
- * must be one of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
- * `GLFW_STICKY_MOUSE_BUTTONS`.
- *
- * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
- * modes:
- * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.
- * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the client
- * area of the window but does not restrict the cursor from leaving.
- * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual
- * and unlimited cursor movement. This is useful for implementing for
- * example 3D camera controls.
- *
- * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to
- * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are
- * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`
- * the next time it is called even if the key had been released before the
- * call. This is useful when you are only interested in whether keys have been
- * pressed but not when or in which order.
- *
- * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either
- * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.
- * If sticky mouse buttons are enabled, a mouse button press will ensure that
- * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even
- * if the mouse button had been released before the call. This is useful when
- * you are only interested in whether mouse buttons have been pressed but not
- * when or in which order.
- *
- * @param[in] window The window whose input mode to set.
- * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS` or
- * `GLFW_STICKY_MOUSE_BUTTONS`.
- * @param[in] value The new value of the specified input mode.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa glfwGetInputMode
- *
- * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
-
-/*! @brief Returns the locale::getd name of the specified printable key.
- *
- * This function returns the locale::getd name of the specified printable key.
- * This is intended for displaying key bindings to the user.
- *
- * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used instead, otherwise
- * the scancode is ignored. If a non-printable key or (if the key is
- * `GLFW_KEY_UNKNOWN`) a scancode that maps to a non-printable key is
- * specified, this function returns `NULL`.
- *
- * This behavior allows you to pass in the arguments passed to the
- * [key callback](@ref input_key) without modification.
- *
- * The printable keys are:
- * - `GLFW_KEY_APOSTROPHE`
- * - `GLFW_KEY_COMMA`
- * - `GLFW_KEY_MINUS`
- * - `GLFW_KEY_PERIOD`
- * - `GLFW_KEY_SLASH`
- * - `GLFW_KEY_SEMICOLON`
- * - `GLFW_KEY_EQUAL`
- * - `GLFW_KEY_LEFT_BRACKET`
- * - `GLFW_KEY_RIGHT_BRACKET`
- * - `GLFW_KEY_BACKSLASH`
- * - `GLFW_KEY_WORLD_1`
- * - `GLFW_KEY_WORLD_2`
- * - `GLFW_KEY_0` to `GLFW_KEY_9`
- * - `GLFW_KEY_A` to `GLFW_KEY_Z`
- * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`
- * - `GLFW_KEY_KP_DECIMAL`
- * - `GLFW_KEY_KP_DIVIDE`
- * - `GLFW_KEY_KP_MULTIPLY`
- * - `GLFW_KEY_KP_SUBTRACT`
- * - `GLFW_KEY_KP_ADD`
- * - `GLFW_KEY_KP_EQUAL`
- *
- * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.
- * @param[in] scancode The scancode of the key to query.
- * @return The locale::getd name of the key, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the next call to @ref
- * glfwGetKeyName, or until the library is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key_name
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetKeyName(int key, int scancode);
-
-/*! @brief Returns the last reported state of a keyboard key for the specified
- * window.
- *
- * This function returns the last state reported for the specified key to the
- * specified window. The returned state is one of `GLFW_PRESS` or
- * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to
- * the key callback.
- *
- * If the `GLFW_STICKY_KEYS` input mode is enabled, this function returns
- * `GLFW_PRESS` the first time you call it for a key that was pressed, even if
- * that key has already been released.
- *
- * The key functions deal with physical keys, with [key tokens](@ref keys)
- * named after their use on the standard US keyboard layout. If you want to
- * input text, use the Unicode character callback instead.
- *
- * The [modifier key bit masks](@ref mods) are not key tokens and cannot be
- * used with this function.
- *
- * __Do not use this function__ to implement [text input](@ref input_char).
- *
- * @param[in] window The desired window.
- * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is
- * not a valid key for this function.
- * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
-
-/*! @brief Returns the last reported state of a mouse button for the specified
- * window.
- *
- * This function returns the last state reported for the specified mouse button
- * to the specified window. The returned state is one of `GLFW_PRESS` or
- * `GLFW_RELEASE`.
- *
- * If the `GLFW_STICKY_MOUSE_BUTTONS` input mode is enabled, this function
- * `GLFW_PRESS` the first time you call it for a mouse button that was pressed,
- * even if that mouse button has already been released.
- *
- * @param[in] window The desired window.
- * @param[in] button The desired [mouse button](@ref buttons).
- * @return One of `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_ENUM.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_mouse_button
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup input
- */
-GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
-
-/*! @brief Retrieves the position of the cursor relative to the client area of
- * the window.
- *
- * This function returns the position of the cursor, in screen coordinates,
- * relative to the upper-left corner of the client area of the specified
- * window.
- *
- * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor
- * position is unbounded and limited only by the minimum and maximum values of
- * a `double`.
- *
- * The coordinate can be converted to their integer equivalents with the
- * `floor` function. Casting directly to an integer type works for positive
- * coordinates, but fails for negative ones.
- *
- * Any or all of the position arguments may be `NULL`. If an error occurs, all
- * non-`NULL` position arguments will be set to zero.
- *
- * @param[in] window The desired window.
- * @param[out] xpos Where to store the cursor x-coordinate, relative to the
- * left edge of the client area, or `NULL`.
- * @param[out] ypos Where to store the cursor y-coordinate, relative to the to
- * top edge of the client area, or `NULL`.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- * @sa glfwSetCursorPos
- *
- * @since Added in version 3.0. Replaces `glfwGetMousePos`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
-
-/*! @brief Sets the position of the cursor, relative to the client area of the
- * window.
- *
- * This function sets the position, in screen coordinates, of the cursor
- * relative to the upper-left corner of the client area of the specified
- * window. The window must have input focus. If the window does not have
- * input focus when this function is called, it fails silently.
- *
- * __Do not use this function__ to implement things like camera controls. GLFW
- * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the
- * cursor, transparently re-centers it and provides unconstrained cursor
- * motion. See @ref glfwSetInputMode for more information.
- *
- * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is
- * unconstrained and limited only by the minimum and maximum values of
- * a `double`.
- *
- * @param[in] window The desired window.
- * @param[in] xpos The desired x-coordinate, relative to the left edge of the
- * client area.
- * @param[in] ypos The desired y-coordinate, relative to the top edge of the
- * client area.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for
- * the window focus event to arrive. This means you may not be able to set the
- * cursor position directly after window creation.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- * @sa glfwGetCursorPos
- *
- * @since Added in version 3.0. Replaces `glfwSetMousePos`.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
-
-/*! @brief Creates a custom cursor.
- *
- * Creates a new custom cursor image that can be set for a window with @ref
- * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor.
- * Any remaining cursors are destroyed by @ref glfwTerminate.
- *
- * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
- * bits per channel. They are arranged canonically as packed sequential rows,
- * starting from the top-left corner.
- *
- * The cursor hotspot is specified in pixels, relative to the upper-left corner
- * of the cursor image. Like all other coordinate systems in GLFW, the X-axis
- * points to the right and the Y-axis points down.
- *
- * @param[in] image The desired cursor image.
- * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.
- * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.
- * @return The handle of the created cursor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified image data is copied before this function
- * returns.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa glfwDestroyCursor
- * @sa glfwCreateStandardCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot);
-
-/*! @brief Creates a cursor with a standard shape.
- *
- * Returns a cursor with a [standard shape](@ref shapes), that can be set for
- * a window with @ref glfwSetCursor.
- *
- * @param[in] shape One of the [standard shapes](@ref shapes).
- * @return A new cursor ready to use or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa glfwCreateCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);
-
-/*! @brief Destroys a cursor.
- *
- * This function destroys a cursor previously created with @ref
- * glfwCreateCursor. Any remaining cursors will be destroyed by @ref
- * glfwTerminate.
- *
- * @param[in] cursor The cursor object to destroy.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @reentrancy This function must not be called from a callback.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- * @sa glfwCreateCursor
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);
-
-/*! @brief Sets the cursor for the window.
- *
- * This function sets the cursor image to be used when the cursor is over the
- * client area of the specified window. The set cursor will only be visible
- * when the [cursor mode](@ref cursor_mode) of the window is
- * `GLFW_CURSOR_NORMAL`.
- *
- * On some platforms, the set cursor may not be visible unless the window also
- * has input focus.
- *
- * @param[in] window The window to set the cursor for.
- * @param[in] cursor The cursor to set, or `NULL` to switch back to the default
- * arrow cursor.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_object
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
-
-/*! @brief Sets the key callback.
- *
- * This function sets the key callback of the specified window, which is called
- * when a key is pressed, repeated or released.
- *
- * The key functions deal with physical keys, with layout independent
- * [key tokens](@ref keys) named after their values in the standard US keyboard
- * layout. If you want to input text, use the
- * [character callback](@ref glfwSetCharCallback) instead.
- *
- * When a window loses input focus, it will generate synthetic key release
- * events for all pressed keys. You can tell these events from user-generated
- * events by the fact that the synthetic ones are generated after the focus
- * loss event has been processed, i.e. after the
- * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
- *
- * The scancode of a key is specific to that platform or sometimes even to that
- * machine. Scancodes are intended to allow users to bind keys that don't have
- * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their
- * state is not saved and so it cannot be queried with @ref glfwGetKey.
- *
- * Sometimes GLFW needs to generate synthetic key events, in which case the
- * scancode may be zero.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new key callback, or `NULL` to remove the currently
- * set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_key
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
-
-/*! @brief Sets the Unicode character callback.
- *
- * This function sets the character callback of the specified window, which is
- * called when a Unicode character is input.
- *
- * The character callback is intended for Unicode text input. As it deals with
- * characters, it is keyboard layout dependent, whereas the
- * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1
- * to physical keys, as a key may produce zero, one or more characters. If you
- * want to know whether a specific physical key was pressed or released, see
- * the key callback instead.
- *
- * The character callback behaves as system text input normally does and will
- * not be called if modifier keys are held down that would prevent normal text
- * input on that platform, for example a Super (Command) key on OS X or Alt key
- * on Windows. There is a
- * [character with modifiers callback](@ref glfwSetCharModsCallback) that
- * receives these events.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_char
- *
- * @since Added in version 2.4.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
-
-/*! @brief Sets the Unicode character with modifiers callback.
- *
- * This function sets the character with modifiers callback of the specified
- * window, which is called when a Unicode character is input regardless of what
- * modifier keys are used.
- *
- * The character with modifiers callback is intended for implementing custom
- * Unicode character input. For regular Unicode text input, see the
- * [character callback](@ref glfwSetCharCallback). Like the character
- * callback, the character with modifiers callback deals with characters and is
- * keyboard layout dependent. Characters do not map 1:1 to physical keys, as
- * a key may produce zero, one or more characters. If you want to know whether
- * a specific physical key was pressed or released, see the
- * [key callback](@ref glfwSetKeyCallback) instead.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or an
- * error occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_char
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun);
-
-/*! @brief Sets the mouse button callback.
- *
- * This function sets the mouse button callback of the specified window, which
- * is called when a mouse button is pressed or released.
- *
- * When a window loses input focus, it will generate synthetic mouse button
- * release events for all pressed mouse buttons. You can tell these events
- * from user-generated events by the fact that the synthetic ones are generated
- * after the focus loss event has been processed, i.e. after the
- * [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref input_mouse_button
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter and return value.
- *
- * @ingroup input
- */
-GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun);
-
-/*! @brief Sets the cursor position callback.
- *
- * This function sets the cursor position callback of the specified window,
- * which is called when the cursor is moved. The callback is provided with the
- * position, in screen coordinates, relative to the upper-left corner of the
- * client area of the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_pos
- *
- * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun);
-
-/*! @brief Sets the cursor enter/exit callback.
- *
- * This function sets the cursor boundary crossing callback of the specified
- * window, which is called when the cursor enters or leaves the client area of
- * the window.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref cursor_enter
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun);
-
-/*! @brief Sets the scroll callback.
- *
- * This function sets the scroll callback of the specified window, which is
- * called when a scrolling device is used, such as a mouse wheel or scrolling
- * area of a touchpad.
- *
- * The scroll callback receives all scrolling input, like that from a mouse
- * wheel or a touchpad scrolling area.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new scroll callback, or `NULL` to remove the currently
- * set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref scrolling
- *
- * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`.
- *
- * @ingroup input
- */
-GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun);
-
-/*! @brief Sets the file drop callback.
- *
- * This function sets the file drop callback of the specified window, which is
- * called when one or more dragged files are dropped on the window.
- *
- * Because the path array and its strings may have been generated specifically
- * for that event, they are not guaranteed to be valid after the callback has
- * returned. If you wish to use them after the callback returns, you need to
- * make a deep copy.
- *
- * @param[in] window The window whose callback to set.
- * @param[in] cbfun The new file drop callback, or `NULL` to remove the
- * currently set callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref path_drop
- *
- * @since Added in version 3.1.
- *
- * @ingroup input
- */
-GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun);
-
-/*! @brief Returns whether the specified joystick is present.
- *
- * This function returns whether the specified joystick is present.
- *
- * @param[in] joy The [joystick](@ref joysticks) to query.
- * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick
- *
- * @since Added in version 3.0. Replaces `glfwGetJoystickParam`.
- *
- * @ingroup input
- */
-GLFWAPI int glfwJoystickPresent(int joy);
-
-/*! @brief Returns the values of all axes of the specified joystick.
- *
- * This function returns the values of all axes of the specified joystick.
- * Each element in the array is a value between -1.0 and 1.0.
- *
- * Querying a joystick slot with no device present is not an error, but will
- * cause this function to return `NULL`. Call @ref glfwJoystickPresent to
- * check device presence.
- *
- * @param[in] joy The [joystick](@ref joysticks) to query.
- * @param[out] count Where to store the number of axis values in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of axis values, or `NULL` if the joystick is not present.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected, this function is called again for that joystick or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_axis
- *
- * @since Added in version 3.0. Replaces `glfwGetJoystickPos`.
- *
- * @ingroup input
- */
-GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count);
-
-/*! @brief Returns the state of all buttons of the specified joystick.
- *
- * This function returns the state of all buttons of the specified joystick.
- * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.
- *
- * Querying a joystick slot with no device present is not an error, but will
- * cause this function to return `NULL`. Call @ref glfwJoystickPresent to
- * check device presence.
- *
- * @param[in] joy The [joystick](@ref joysticks) to query.
- * @param[out] count Where to store the number of button states in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of button states, or `NULL` if the joystick is not present.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected, this function is called again for that joystick or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_button
- *
- * @since Added in version 2.2.
- * @glfw3 Changed to return a dynamic array.
- *
- * @ingroup input
- */
-GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count);
-
-/*! @brief Returns the name of the specified joystick.
- *
- * This function returns the name, encoded as UTF-8, of the specified joystick.
- * The returned string is allocated and freed by GLFW. You should not free it
- * yourself.
- *
- * Querying a joystick slot with no device present is not an error, but will
- * cause this function to return `NULL`. Call @ref glfwJoystickPresent to
- * check device presence.
- *
- * @param[in] joy The [joystick](@ref joysticks) to query.
- * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick
- * is not present.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the specified joystick is
- * disconnected, this function is called again for that joystick or the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_name
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetJoystickName(int joy);
-
-/*! @brief Sets the joystick configuration callback.
- *
- * This function sets the joystick configuration callback, or removes the
- * currently set callback. This is called when a joystick is connected to or
- * disconnected from the system.
- *
- * @param[in] cbfun The new callback, or `NULL` to remove the currently set
- * callback.
- * @return The previously set callback, or `NULL` if no callback was set or the
- * library had not been [initialized](@ref intro_init).
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref joystick_event
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun);
-
-/*! @brief Sets the clipboard to the specified string.
- *
- * This function sets the system clipboard to the specified, UTF-8 encoded
- * string.
- *
- * @param[in] window The window that will own the clipboard contents.
- * @param[in] string A UTF-8 encoded string.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The specified string is copied before this function
- * returns.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa glfwGetClipboardString
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
-
-/*! @brief Returns the contents of the clipboard as a string.
- *
- * This function returns the contents of the system clipboard, if it contains
- * or is convertible to a UTF-8 encoded string. If the clipboard is empty or
- * if its contents cannot be converted, `NULL` is returned and a @ref
- * GLFW_FORMAT_UNAVAILABLE error is generated.
- *
- * @param[in] window The window that will request the clipboard contents.
- * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`
- * if an [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @pointer_lifetime The returned string is allocated and freed by GLFW. You
- * should not free it yourself. It is valid until the next call to @ref
- * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library
- * is terminated.
- *
- * @thread_safety This function must only be called from the main thread.
- *
- * @sa @ref clipboard
- * @sa glfwSetClipboardString
- *
- * @since Added in version 3.0.
- *
- * @ingroup input
- */
-GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
-
-/*! @brief Returns the value of the GLFW timer.
- *
- * This function returns the value of the GLFW timer. Unless the timer has
- * been set using @ref glfwSetTime, the timer measures time elapsed since GLFW
- * was initialized.
- *
- * The resolution of the timer is system dependent, but is usually on the order
- * of a few micro- or nanoseconds. It uses the highest-resolution monotonic
- * time source on each supported platform.
- *
- * @return The current value, in seconds, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread. Reading of the
- * internal timer offset is not atomic.
- *
- * @sa @ref time
- *
- * @since Added in version 1.0.
- *
- * @ingroup input
- */
-GLFWAPI double glfwGetTime(void);
-
-/*! @brief Sets the GLFW timer.
- *
- * This function sets the value of the GLFW timer. It then continues to count
- * up from that value. The value must be a positive finite number less than
- * or equal to 18446744073.0, which is approximately 584.5 years.
- *
- * @param[in] time The new value, in seconds.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_INVALID_VALUE.
- *
- * @remark The upper limit of the timer is calculated as
- * floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations
- * storing nanoseconds in 64 bits. The limit may be increased in the future.
- *
- * @thread_safety This function may be called from any thread. Writing of the
- * internal timer offset is not atomic.
- *
- * @sa @ref time
- *
- * @since Added in version 2.2.
- *
- * @ingroup input
- */
-GLFWAPI void glfwSetTime(double time);
-
-/*! @brief Returns the current value of the raw timer.
- *
- * This function returns the current value of the raw timer, measured in
- * 1&nbsp;/&nbsp;frequency seconds. To get the frequency, call @ref
- * glfwGetTimerFrequency.
- *
- * @return The value of the timer, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref time
- * @sa glfwGetTimerFrequency
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI uint64_t glfwGetTimerValue(void);
-
-/*! @brief Returns the frequency, in Hz, of the raw timer.
- *
- * This function returns the frequency, in Hz, of the raw timer.
- *
- * @return The frequency of the timer, in Hz, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref time
- * @sa glfwGetTimerValue
- *
- * @since Added in version 3.2.
- *
- * @ingroup input
- */
-GLFWAPI uint64_t glfwGetTimerFrequency(void);
-
-/*! @brief Makes the context of the specified window current for the calling
- * thread.
- *
- * This function makes the OpenGL or OpenGL ES context of the specified window
- * current on the calling thread. A context can only be made current on
- * a single thread at a time and each thread can have only a single current
- * context at a time.
- *
- * By default, making a context non-current implicitly forces a pipeline flush.
- * On machines that support `GL_KHR_context_flush_control`, you can control
- * whether a context performs this flush by setting the
- * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref window_hints_ctx) window hint.
- *
- * The specified window must have an OpenGL or OpenGL ES context. Specifying
- * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
- * error.
- *
- * @param[in] window The window whose context to make current, or `NULL` to
- * detach the current context.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_current
- * @sa glfwGetCurrentContext
- *
- * @since Added in version 3.0.
- *
- * @ingroup context
- */
-GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
-
-/*! @brief Returns the window whose context is current on the calling thread.
- *
- * This function returns the window whose OpenGL or OpenGL ES context is
- * current on the calling thread.
- *
- * @return The window whose context is current, or `NULL` if no window's
- * context is current.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_current
- * @sa glfwMakeContextCurrent
- *
- * @since Added in version 3.0.
- *
- * @ingroup context
- */
-GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
-
-/*! @brief Swaps the front and back buffers of the specified window.
- *
- * This function swaps the front and back buffers of the specified window when
- * rendering with OpenGL or OpenGL ES. If the swap interval is greater than
- * zero, the GPU driver waits the specified number of screen updates before
- * swapping the buffers.
- *
- * The specified window must have an OpenGL or OpenGL ES context. Specifying
- * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT
- * error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see `vkQueuePresentKHR` instead.
- *
- * @param[in] window The window whose buffers to swap.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark __EGL:__ The context of the specified window must be current on the
- * calling thread.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref buffer_swap
- * @sa glfwSwapInterval
- *
- * @since Added in version 1.0.
- * @glfw3 Added window handle parameter.
- *
- * @ingroup window
- */
-GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
-
-/*! @brief Sets the swap interval for the current context.
- *
- * This function sets the swap interval for the current OpenGL or OpenGL ES
- * context, i.e. the number of screen updates to wait from the time @ref
- * glfwSwapBuffers was called before swapping the buffers and returning. This
- * is sometimes called _vertical synchronization_, _vertical retrace
- * synchronization_ or just _vsync_.
- *
- * Contexts that support either of the `WGL_EXT_swap_control_tear` and
- * `GLX_EXT_swap_control_tear` extensions also accept negative swap intervals,
- * which allow the driver to swap even if a frame arrives a little bit late.
- * You can check for the presence of these extensions using @ref
- * glfwExtensionSupported. For more information about swap tearing, see the
- * extension specifications.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see the present mode of your swapchain instead.
- *
- * @param[in] interval The minimum number of screen updates to wait for
- * until the buffers are swapped by @ref glfwSwapBuffers.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark This function is not called during context creation, leaving the
- * swap interval set to whatever is the default on that platform. This is done
- * because some swap interval extensions used by GLFW do not allow the swap
- * interval to be reset to zero once it has been set to a non-zero value.
- *
- * @remark Some GPU drivers do not honor the requested swap interval, either
- * because of a user setting that overrides the application's request or due to
- * bugs in the driver.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref buffer_swap
- * @sa glfwSwapBuffers
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI void glfwSwapInterval(int interval);
-
-/*! @brief Returns whether the specified extension is available.
- *
- * This function returns whether the specified
- * [API extension](@ref context_glext) is supported by the current OpenGL or
- * OpenGL ES context. It searches both for client API extension and context
- * creation API extensions.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * As this functions retrieves and searches one or more extension strings each
- * call, it is recommended that you cache its results if it is going to be used
- * frequently. The extension strings will not change during the lifetime of
- * a context, so there is no danger in doing this.
- *
- * This function does not apply to Vulkan. If you are using Vulkan, see @ref
- * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`
- * and `vkEnumerateDeviceExtensionProperties` instead.
- *
- * @param[in] extension The ASCII encoded name of the extension.
- * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`
- * otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref
- * GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_glext
- * @sa glfwGetProcAddress
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI int glfwExtensionSupported(const char* extension);
-
-/*! @brief Returns the address of the specified function for the current
- * context.
- *
- * This function returns the address of the specified OpenGL or OpenGL ES
- * [core or extension function](@ref context_glext), if it is supported
- * by the current context.
- *
- * A context must be current on the calling thread. Calling this function
- * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.
- *
- * This function does not apply to Vulkan. If you are rendering with Vulkan,
- * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and
- * `vkGetDeviceProcAddr` instead.
- *
- * @param[in] procname The ASCII encoded name of the function.
- * @return The address of the function, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.
- *
- * @remark The address of a given function is not guaranteed to be the same
- * between contexts.
- *
- * @remark This function may return a non-`NULL` address despite the
- * associated version or extension not being available. Always check the
- * context version or extension string first.
- *
- * @pointer_lifetime The returned function pointer is valid until the context
- * is destroyed or the library is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref context_glext
- * @sa glfwExtensionSupported
- *
- * @since Added in version 1.0.
- *
- * @ingroup context
- */
-GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
-
-/*! @brief Returns whether the Vulkan loader has been found.
- *
- * This function returns whether the Vulkan loader has been found. This check
- * is performed by @ref glfwInit.
- *
- * The availability of a Vulkan loader does not by itself guarantee that window
- * surface creation or even device creation is possible. Call @ref
- * glfwGetRequiredInstanceExtensions to check whether the extensions necessary
- * for Vulkan surface creation are available and @ref
- * glfwGetPhysicalDevicePresentationSupport to check whether a queue family of
- * a physical device supports image presentation.
- *
- * @return `GLFW_TRUE` if Vulkan is available, or `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_support
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI int glfwVulkanSupported(void);
-
-/*! @brief Returns the Vulkan instance extensions required by GLFW.
- *
- * This function returns an array of names of Vulkan instance extensions required
- * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the
- * list will always contains `VK_KHR_surface`, so if you don't require any
- * additional extensions you can pass this list directly to the
- * `VkInstanceCreateInfo` struct.
- *
- * If Vulkan is not available on the machine, this function returns `NULL` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is available.
- *
- * If Vulkan is available but no set of extensions allowing window surface
- * creation was found, this function returns `NULL`. You may still use Vulkan
- * for off-screen rendering and compute work.
- *
- * @param[out] count Where to store the number of extensions in the returned
- * array. This is set to zero if an error occurred.
- * @return An array of ASCII encoded extension names, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_API_UNAVAILABLE.
- *
- * @remarks Additional extensions may be required by future versions of GLFW.
- * You should check if any extensions you wish to enable are already in the
- * returned array, as it is an error to specify an extension more than once in
- * the `VkInstanceCreateInfo` struct.
- *
- * @pointer_lifetime The returned array is allocated and freed by GLFW. You
- * should not free it yourself. It is guaranteed to be valid only until the
- * library is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_ext
- * @sa glfwCreateWindowSurface
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);
-
-#if defined(VK_VERSION_1_0)
-
-/*! @brief Returns the address of the specified Vulkan instance function.
- *
- * This function returns the address of the specified Vulkan core or extension
- * function for the specified instance. If instance is set to `NULL` it can
- * return any function exported from the Vulkan loader, including at least the
- * following functions:
- *
- * - `vkEnumerateInstanceExtensionProperties`
- * - `vkEnumerateInstanceLayerProperties`
- * - `vkCreateInstance`
- * - `vkGetInstanceProcAddr`
- *
- * If Vulkan is not available on the machine, this function returns `NULL` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is available.
- *
- * This function is equivalent to calling `vkGetInstanceProcAddr` with
- * a platform-specific query of the Vulkan loader as a fallback.
- *
- * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve
- * functions related to instance creation.
- * @param[in] procname The ASCII encoded name of the function.
- * @return The address of the function, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- * GLFW_API_UNAVAILABLE.
- *
- * @pointer_lifetime The returned function pointer is valid until the library
- * is terminated.
- *
- * @thread_safety This function may be called from any thread.
- *
- * @sa @ref vulkan_proc
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);
-
-/*! @brief Returns whether the specified queue family can present images.
- *
- * This function returns whether the specified queue family of the specified
- * physical device supports presentation to the platform GLFW was built for.
- *
- * If Vulkan or the required window surface creation instance extensions are
- * not available on the machine, or if the specified instance was not created
- * with the required extensions, this function returns `GLFW_FALSE` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported
- * to check whether Vulkan is available and @ref
- * glfwGetRequiredInstanceExtensions to check what instance extensions are
- * required.
- *
- * @param[in] instance The instance that the physical device belongs to.
- * @param[in] device The physical device that the queue family belongs to.
- * @param[in] queuefamily The index of the queue family to query.
- * @return `GLFW_TRUE` if the queue family supports presentation, or
- * `GLFW_FALSE` otherwise.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
- *
- * @thread_safety This function may be called from any thread. For
- * synchronization details of Vulkan objects, see the Vulkan specification.
- *
- * @sa @ref vulkan_present
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
-
-/*! @brief Creates a Vulkan surface for the specified window.
- *
- * This function creates a Vulkan surface for the specified window.
- *
- * If the Vulkan loader was not found at initialization, this function returns
- * `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref GLFW_API_UNAVAILABLE
- * error. Call @ref glfwVulkanSupported to check whether the Vulkan loader was
- * found.
- *
- * If the required window surface creation instance extensions are not
- * available or if the specified instance was not created with these extensions
- * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and
- * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref
- * glfwGetRequiredInstanceExtensions to check what instance extensions are
- * required.
- *
- * The window surface must be destroyed before the specified Vulkan instance.
- * It is the responsibility of the caller to destroy the window surface. GLFW
- * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the
- * surface.
- *
- * @param[in] instance The Vulkan instance to create the surface in.
- * @param[in] window The window to create the surface for.
- * @param[in] allocator The allocator to use, or `NULL` to use the default
- * allocator.
- * @param[out] surface Where to store the handle of the surface. This is set
- * to `VK_NULL_HANDLE` if an error occurred.
- * @return `VK_SUCCESS` if successful, or a Vulkan error code if an
- * [error](@ref error_handling) occurred.
- *
- * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
- * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
- *
- * @remarks If an error occurs before the creation call is made, GLFW returns
- * the Vulkan error code most appropriate for the error. Appropriate use of
- * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should
- * eliminate almost all occurrences of these errors.
- *
- * @thread_safety This function may be called from any thread. For
- * synchronization details of Vulkan objects, see the Vulkan specification.
- *
- * @sa @ref vulkan_surface
- * @sa glfwGetRequiredInstanceExtensions
- *
- * @since Added in version 3.2.
- *
- * @ingroup vulkan
- */
-GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
-
-#endif /*VK_VERSION_1_0*/
-
-
-/*************************************************************************
- * Global definition cleanup
- *************************************************************************/
-
-/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
-
-#ifdef GLFW_WINGDIAPI_DEFINED
- #undef WINGDIAPI
- #undef GLFW_WINGDIAPI_DEFINED
-#endif
-
-#ifdef GLFW_CALLBACK_DEFINED
- #undef CALLBACK
- #undef GLFW_CALLBACK_DEFINED
-#endif
-
-/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _glfw3_h_ */
-
diff --git a/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3native.h b/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3native.h
deleted file mode 100644
index 9fa955e..0000000
--- a/libs/imgui-1.92.1/examples/libs/glfw/include/GLFW/glfw3native.h
+++ /dev/null
@@ -1,456 +0,0 @@
-/*************************************************************************
- * GLFW 3.2 - www.glfw.org
- * A library for OpenGL, window and input
- *------------------------------------------------------------------------
- * Copyright (c) 2002-2006 Marcus Geelnard
- * Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would
- * be appreciated but is not required.
- *
- * 2. Altered source versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *
- * 3. This notice may not be removed or altered from any source
- * distribution.
- *
- *************************************************************************/
-
-#ifndef _glfw3_native_h_
-#define _glfw3_native_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*************************************************************************
- * Doxygen documentation
- *************************************************************************/
-
-/*! @file glfw3native.h
- * @brief The header of the native access functions.
- *
- * This is the header file of the native access functions. See @ref native for
- * more information.
- */
-/*! @defgroup native Native access
- *
- * **By using the native access functions you assert that you know what you're
- * doing and how to fix problems caused by using them. If you don't, you
- * shouldn't be using them.**
- *
- * Before the inclusion of @ref glfw3native.h, you may define exactly one
- * window system API macro and zero or more context creation API macros.
- *
- * The chosen backends must match those the library was compiled for. Failure
- * to do this will cause a link-time error.
- *
- * The available window API macros are:
- * * `GLFW_EXPOSE_NATIVE_WIN32`
- * * `GLFW_EXPOSE_NATIVE_COCOA`
- * * `GLFW_EXPOSE_NATIVE_X11`
- * * `GLFW_EXPOSE_NATIVE_WAYLAND`
- * * `GLFW_EXPOSE_NATIVE_MIR`
- *
- * The available context API macros are:
- * * `GLFW_EXPOSE_NATIVE_WGL`
- * * `GLFW_EXPOSE_NATIVE_NSGL`
- * * `GLFW_EXPOSE_NATIVE_GLX`
- * * `GLFW_EXPOSE_NATIVE_EGL`
- *
- * These macros select which of the native access functions that are declared
- * and which platform-specific headers to include. It is then up your (by
- * definition platform-specific) code to handle which of these should be
- * defined.
- */
-
-
-/*************************************************************************
- * System headers and types
- *************************************************************************/
-
-#if defined(GLFW_EXPOSE_NATIVE_WIN32)
- // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
- // example to allow applications to correctly declare a GL_ARB_debug_output
- // callback) but windows.h assumes no one will define APIENTRY before it does
- #undef APIENTRY
- #include <windows.h>
-#elif defined(GLFW_EXPOSE_NATIVE_COCOA)
- #include <ApplicationServices/ApplicationServices.h>
- #if defined(__OBJC__)
- #import <Cocoa/Cocoa.h>
- #else
- typedef void* id;
- #endif
-#elif defined(GLFW_EXPOSE_NATIVE_X11)
- #include <X11/Xlib.h>
- #include <X11/extensions/Xrandr.h>
-#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
- #include <wayland-client.h>
-#elif defined(GLFW_EXPOSE_NATIVE_MIR)
- #include <mir_toolkit/mir_client_library.h>
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WGL)
- /* WGL is declared by windows.h */
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_NSGL)
- /* NSGL is declared by Cocoa.h */
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_GLX)
- #include <GL/glx.h>
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_EGL)
- #include <EGL/egl.h>
-#endif
-
-
-/*************************************************************************
- * Functions
- *************************************************************************/
-
-#if defined(GLFW_EXPOSE_NATIVE_WIN32)
-/*! @brief Returns the adapter device name of the specified monitor.
- *
- * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
- * of the specified monitor, or `NULL` if an [error](@ref error_handling)
- * occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the display device name of the specified monitor.
- *
- * @return The UTF-8 encoded display device name (for example
- * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `HWND` of the specified window.
- *
- * @return The `HWND` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WGL)
-/*! @brief Returns the `HGLRC` of the specified window.
- *
- * @return The `HGLRC` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_COCOA)
-/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
- *
- * @return The `CGDirectDisplayID` of the specified monitor, or
- * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `NSWindow` of the specified window.
- *
- * @return The `NSWindow` of the specified window, or `nil` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_NSGL)
-/*! @brief Returns the `NSOpenGLContext` of the specified window.
- *
- * @return The `NSOpenGLContext` of the specified window, or `nil` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_X11)
-/*! @brief Returns the `Display` used by GLFW.
- *
- * @return The `Display` used by GLFW, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI Display* glfwGetX11Display(void);
-
-/*! @brief Returns the `RRCrtc` of the specified monitor.
- *
- * @return The `RRCrtc` of the specified monitor, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the `RROutput` of the specified monitor.
- *
- * @return The `RROutput` of the specified monitor, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.1.
- *
- * @ingroup native
- */
-GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `Window` of the specified window.
- *
- * @return The `Window` of the specified window, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_GLX)
-/*! @brief Returns the `GLXContext` of the specified window.
- *
- * @return The `GLXContext` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
-
-/*! @brief Returns the `GLXWindow` of the specified window.
- *
- * @return The `GLXWindow` of the specified window, or `None` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
-/*! @brief Returns the `struct wl_display*` used by GLFW.
- *
- * @return The `struct wl_display*` used by GLFW, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
-
-/*! @brief Returns the `struct wl_output*` of the specified monitor.
- *
- * @return The `struct wl_output*` of the specified monitor, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the main `struct wl_surface*` of the specified window.
- *
- * @return The main `struct wl_surface*` of the specified window, or `NULL` if
- * an [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_MIR)
-/*! @brief Returns the `MirConnection*` used by GLFW.
- *
- * @return The `MirConnection*` used by GLFW, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI MirConnection* glfwGetMirDisplay(void);
-
-/*! @brief Returns the Mir output ID of the specified monitor.
- *
- * @return The Mir output ID of the specified monitor, or zero if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI int glfwGetMirMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `MirSurface*` of the specified window.
- *
- * @return The `MirSurface*` of the specified window, or `NULL` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.2.
- *
- * @ingroup native
- */
-GLFWAPI MirSurface* glfwGetMirWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_EGL)
-/*! @brief Returns the `EGLDisplay` used by GLFW.
- *
- * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
-
-/*! @brief Returns the `EGLContext` of the specified window.
- *
- * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
-
-/*! @brief Returns the `EGLSurface` of the specified window.
- *
- * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
- * [error](@ref error_handling) occurred.
- *
- * @thread_safety This function may be called from any thread. Access is not
- * synchronized.
- *
- * @since Added in version 3.0.
- *
- * @ingroup native
- */
-GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _glfw3_native_h_ */
-
diff --git a/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-32/glfw3.lib b/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-32/glfw3.lib
deleted file mode 100644
index 348abec..0000000
--- a/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-32/glfw3.lib
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-64/glfw3.lib b/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-64/glfw3.lib
deleted file mode 100644
index 768f308..0000000
--- a/libs/imgui-1.92.1/examples/libs/glfw/lib-vc2010-64/glfw3.lib
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/examples/libs/usynergy/README.txt b/libs/imgui-1.92.1/examples/libs/usynergy/README.txt
deleted file mode 100644
index c86b909..0000000
--- a/libs/imgui-1.92.1/examples/libs/usynergy/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-
-uSynergy client -- Implementation for the embedded Synergy client library
-version 1.0.0, July 7th, 2012
-Copyright (c) 2012 Alex Evans
-
-This is a copy of the files once found at:
- https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro
-
diff --git a/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.c b/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.c
deleted file mode 100644
index 8dce47b..0000000
--- a/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.c
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
-uSynergy client -- Implementation for the embedded Synergy client library
- version 1.0.0, July 7th, 2012
-
-Copyright (c) 2012 Alex Evans
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source
- distribution.
-*/
-#include "uSynergy.h"
-#include <stdio.h>
-#include <string.h>
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Internal helpers
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Read 16 bit integer in network byte order and convert to native byte order
-**/
-static int16_t sNetToNative16(const unsigned char *value)
-{
-#ifdef USYNERGY_LITTLE_ENDIAN
- return value[1] | (value[0] << 8);
-#else
- return value[0] | (value[1] << 8);
-#endif
-}
-
-
-
-/**
-@brief Read 32 bit integer in network byte order and convert to native byte order
-**/
-static int32_t sNetToNative32(const unsigned char *value)
-{
-#ifdef USYNERGY_LITTLE_ENDIAN
- return value[3] | (value[2] << 8) | (value[1] << 16) | (value[0] << 24);
-#else
- return value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
-#endif
-}
-
-
-
-/**
-@brief Trace text to client
-**/
-static void sTrace(uSynergyContext *context, const char* text)
-{
- // Don't trace if we don't have a trace function
- if (context->m_traceFunc != 0L)
- context->m_traceFunc(context->m_cookie, text);
-}
-
-
-
-/**
-@brief Add string to reply packet
-**/
-static void sAddString(uSynergyContext *context, const char *string)
-{
- size_t len = strlen(string);
- memcpy(context->m_replyCur, string, len);
- context->m_replyCur += len;
-}
-
-
-
-/**
-@brief Add uint8 to reply packet
-**/
-static void sAddUInt8(uSynergyContext *context, uint8_t value)
-{
- *context->m_replyCur++ = value;
-}
-
-
-
-/**
-@brief Add uint16 to reply packet
-**/
-static void sAddUInt16(uSynergyContext *context, uint16_t value)
-{
- uint8_t *reply = context->m_replyCur;
- *reply++ = (uint8_t)(value >> 8);
- *reply++ = (uint8_t)value;
- context->m_replyCur = reply;
-}
-
-
-
-/**
-@brief Add uint32 to reply packet
-**/
-static void sAddUInt32(uSynergyContext *context, uint32_t value)
-{
- uint8_t *reply = context->m_replyCur;
- *reply++ = (uint8_t)(value >> 24);
- *reply++ = (uint8_t)(value >> 16);
- *reply++ = (uint8_t)(value >> 8);
- *reply++ = (uint8_t)value;
- context->m_replyCur = reply;
-}
-
-
-
-/**
-@brief Send reply packet
-**/
-static uSynergyBool sSendReply(uSynergyContext *context)
-{
- // Set header size
- uint8_t *reply_buf = context->m_replyBuffer;
- uint32_t reply_len = (uint32_t)(context->m_replyCur - reply_buf); /* Total size of reply */
- uint32_t body_len = reply_len - 4; /* Size of body */
- uSynergyBool ret;
- reply_buf[0] = (uint8_t)(body_len >> 24);
- reply_buf[1] = (uint8_t)(body_len >> 16);
- reply_buf[2] = (uint8_t)(body_len >> 8);
- reply_buf[3] = (uint8_t)body_len;
-
- // Send reply
- ret = context->m_sendFunc(context->m_cookie, context->m_replyBuffer, reply_len);
-
- // Reset reply buffer write pointer
- context->m_replyCur = context->m_replyBuffer+4;
- return ret;
-}
-
-
-
-/**
-@brief Call mouse callback after a mouse event
-**/
-static void sSendMouseCallback(uSynergyContext *context)
-{
- // Skip if no callback is installed
- if (context->m_mouseCallback == 0L)
- return;
-
- // Send callback
- context->m_mouseCallback(context->m_cookie, context->m_mouseX, context->m_mouseY, context->m_mouseWheelX,
- context->m_mouseWheelY, context->m_mouseButtonLeft, context->m_mouseButtonRight, context->m_mouseButtonMiddle);
-}
-
-
-
-/**
-@brief Send keyboard callback when a key has been pressed or released
-**/
-static void sSendKeyboardCallback(uSynergyContext *context, uint16_t key, uint16_t modifiers, uSynergyBool down, uSynergyBool repeat)
-{
- // Skip if no callback is installed
- if (context->m_keyboardCallback == 0L)
- return;
-
- // Send callback
- context->m_keyboardCallback(context->m_cookie, key, modifiers, down, repeat);
-}
-
-
-
-/**
-@brief Send joystick callback
-**/
-static void sSendJoystickCallback(uSynergyContext *context, uint8_t joyNum)
-{
- int8_t *sticks;
-
- // Skip if no callback is installed
- if (context->m_joystickCallback == 0L)
- return;
-
- // Send callback
- sticks = context->m_joystickSticks[joyNum];
- context->m_joystickCallback(context->m_cookie, joyNum, context->m_joystickButtons[joyNum], sticks[0], sticks[1], sticks[2], sticks[3]);
-}
-
-
-
-/**
-@brief Parse a single client message, update state, send callbacks and send replies
-**/
-#define USYNERGY_IS_PACKET(pkt_id) memcmp(message+4, pkt_id, 4)==0
-static void sProcessMessage(uSynergyContext *context, const uint8_t *message)
-{
- // We have a packet!
- if (memcmp(message+4, "Synergy", 7)==0)
- {
- // Welcome message
- // kMsgHello = "Synergy%2i%2i"
- // kMsgHelloBack = "Synergy%2i%2i%s"
- sAddString(context, "Synergy");
- sAddUInt16(context, USYNERGY_PROTOCOL_MAJOR);
- sAddUInt16(context, USYNERGY_PROTOCOL_MINOR);
- sAddUInt32(context, (uint32_t)strlen(context->m_clientName));
- sAddString(context, context->m_clientName);
- if (!sSendReply(context))
- {
- // Send reply failed, let's try to reconnect
- sTrace(context, "SendReply failed, trying to reconnect in a second");
- context->m_connected = USYNERGY_FALSE;
- context->m_sleepFunc(context->m_cookie, 1000);
- }
- else
- {
- // Let's assume we're connected
- char buffer[256+1];
- sprintf(buffer, "Connected as client \"%s\"", context->m_clientName);
- sTrace(context, buffer);
- context->m_hasReceivedHello = USYNERGY_TRUE;
- }
- return;
- }
- else if (USYNERGY_IS_PACKET("QINF"))
- {
- // Screen info. Reply with DINF
- // kMsgQInfo = "QINF"
- // kMsgDInfo = "DINF%2i%2i%2i%2i%2i%2i%2i"
- uint16_t x = 0, y = 0, warp = 0;
- sAddString(context, "DINF");
- sAddUInt16(context, x);
- sAddUInt16(context, y);
- sAddUInt16(context, context->m_clientWidth);
- sAddUInt16(context, context->m_clientHeight);
- sAddUInt16(context, warp);
- sAddUInt16(context, 0); // mx?
- sAddUInt16(context, 0); // my?
- sSendReply(context);
- return;
- }
- else if (USYNERGY_IS_PACKET("CIAK"))
- {
- // Do nothing?
- // kMsgCInfoAck = "CIAK"
- return;
- }
- else if (USYNERGY_IS_PACKET("CROP"))
- {
- // Do nothing?
- // kMsgCResetOptions = "CROP"
- return;
- }
- else if (USYNERGY_IS_PACKET("CINN"))
- {
- // Screen enter. Reply with CNOP
- // kMsgCEnter = "CINN%2i%2i%4i%2i"
-
- // Obtain the Synergy sequence number
- context->m_sequenceNumber = sNetToNative32(message + 12);
- context->m_isCaptured = USYNERGY_TRUE;
-
- // Call callback
- if (context->m_screenActiveCallback != 0L)
- context->m_screenActiveCallback(context->m_cookie, USYNERGY_TRUE);
- }
- else if (USYNERGY_IS_PACKET("COUT"))
- {
- // Screen leave
- // kMsgCLeave = "COUT"
- context->m_isCaptured = USYNERGY_FALSE;
-
- // Call callback
- if (context->m_screenActiveCallback != 0L)
- context->m_screenActiveCallback(context->m_cookie, USYNERGY_FALSE);
- }
- else if (USYNERGY_IS_PACKET("DMDN"))
- {
- // Mouse down
- // kMsgDMouseDown = "DMDN%1i"
- char btn = message[8]-1;
- if (btn==2)
- context->m_mouseButtonRight = USYNERGY_TRUE;
- else if (btn==1)
- context->m_mouseButtonMiddle = USYNERGY_TRUE;
- else
- context->m_mouseButtonLeft = USYNERGY_TRUE;
- sSendMouseCallback(context);
- }
- else if (USYNERGY_IS_PACKET("DMUP"))
- {
- // Mouse up
- // kMsgDMouseUp = "DMUP%1i"
- char btn = message[8]-1;
- if (btn==2)
- context->m_mouseButtonRight = USYNERGY_FALSE;
- else if (btn==1)
- context->m_mouseButtonMiddle = USYNERGY_FALSE;
- else
- context->m_mouseButtonLeft = USYNERGY_FALSE;
- sSendMouseCallback(context);
- }
- else if (USYNERGY_IS_PACKET("DMMV"))
- {
- // Mouse move. Reply with CNOP
- // kMsgDMouseMove = "DMMV%2i%2i"
- context->m_mouseX = sNetToNative16(message+8);
- context->m_mouseY = sNetToNative16(message+10);
- sSendMouseCallback(context);
- }
- else if (USYNERGY_IS_PACKET("DMWM"))
- {
- // Mouse wheel
- // kMsgDMouseWheel = "DMWM%2i%2i"
- // kMsgDMouseWheel1_0 = "DMWM%2i"
- context->m_mouseWheelX += sNetToNative16(message+8);
- context->m_mouseWheelY += sNetToNative16(message+10);
- sSendMouseCallback(context);
- }
- else if (USYNERGY_IS_PACKET("DKDN"))
- {
- // Key down
- // kMsgDKeyDown = "DKDN%2i%2i%2i"
- // kMsgDKeyDown1_0 = "DKDN%2i%2i"
- //uint16_t id = sNetToNative16(message+8);
- uint16_t mod = sNetToNative16(message+10);
- uint16_t key = sNetToNative16(message+12);
- sSendKeyboardCallback(context, key, mod, USYNERGY_TRUE, USYNERGY_FALSE);
- }
- else if (USYNERGY_IS_PACKET("DKRP"))
- {
- // Key repeat
- // kMsgDKeyRepeat = "DKRP%2i%2i%2i%2i"
- // kMsgDKeyRepeat1_0 = "DKRP%2i%2i%2i"
- uint16_t mod = sNetToNative16(message+10);
-// uint16_t count = sNetToNative16(message+12);
- uint16_t key = sNetToNative16(message+14);
- sSendKeyboardCallback(context, key, mod, USYNERGY_TRUE, USYNERGY_TRUE);
- }
- else if (USYNERGY_IS_PACKET("DKUP"))
- {
- // Key up
- // kMsgDKeyUp = "DKUP%2i%2i%2i"
- // kMsgDKeyUp1_0 = "DKUP%2i%2i"
- //uint16 id=Endian::sNetToNative(sbuf[4]);
- uint16_t mod = sNetToNative16(message+10);
- uint16_t key = sNetToNative16(message+12);
- sSendKeyboardCallback(context, key, mod, USYNERGY_FALSE, USYNERGY_FALSE);
- }
- else if (USYNERGY_IS_PACKET("DGBT"))
- {
- // Joystick buttons
- // kMsgDGameButtons = "DGBT%1i%2i";
- uint8_t joy_num = message[8];
- if (joy_num<USYNERGY_NUM_JOYSTICKS)
- {
- // Copy button state, then send callback
- context->m_joystickButtons[joy_num] = (message[9] << 8) | message[10];
- sSendJoystickCallback(context, joy_num);
- }
- }
- else if (USYNERGY_IS_PACKET("DGST"))
- {
- // Joystick sticks
- // kMsgDGameSticks = "DGST%1i%1i%1i%1i%1i";
- uint8_t joy_num = message[8];
- if (joy_num<USYNERGY_NUM_JOYSTICKS)
- {
- // Copy stick state, then send callback
- memcpy(context->m_joystickSticks[joy_num], message+9, 4);
- sSendJoystickCallback(context, joy_num);
- }
- }
- else if (USYNERGY_IS_PACKET("DSOP"))
- {
- // Set options
- // kMsgDSetOptions = "DSOP%4I"
- }
- else if (USYNERGY_IS_PACKET("CALV"))
- {
- // Keepalive, reply with CALV and then CNOP
- // kMsgCKeepAlive = "CALV"
- sAddString(context, "CALV");
- sSendReply(context);
- // now reply with CNOP
- }
- else if (USYNERGY_IS_PACKET("DCLP"))
- {
- // Clipboard message
- // kMsgDClipboard = "DCLP%1i%4i%s"
- //
- // The clipboard message contains:
- // 1 uint32: The size of the message
- // 4 chars: The identifier ("DCLP")
- // 1 uint8: The clipboard index
- // 1 uint32: The sequence number. It's zero, because this message is always coming from the server?
- // 1 uint32: The total size of the remaining 'string' (as per the Synergy %s string format (which is 1 uint32 for size followed by a char buffer (not necessarily null terminated)).
- // 1 uint32: The number of formats present in the message
- // And then 'number of formats' times the following:
- // 1 uint32: The format of the clipboard data
- // 1 uint32: The size n of the clipboard data
- // n uint8: The clipboard data
- const uint8_t * parse_msg = message+17;
- uint32_t num_formats = sNetToNative32(parse_msg);
- parse_msg += 4;
- for (; num_formats; num_formats--)
- {
- // Parse clipboard format header
- uint32_t format = sNetToNative32(parse_msg);
- uint32_t size = sNetToNative32(parse_msg+4);
- parse_msg += 8;
-
- // Call callback
- if (context->m_clipboardCallback)
- context->m_clipboardCallback(context->m_cookie, format, parse_msg, size);
-
- parse_msg += size;
- }
- }
- else
- {
- // Unknown packet, could be any of these
- // kMsgCNoop = "CNOP"
- // kMsgCClose = "CBYE"
- // kMsgCClipboard = "CCLP%1i%4i"
- // kMsgCScreenSaver = "CSEC%1i"
- // kMsgDKeyRepeat = "DKRP%2i%2i%2i%2i"
- // kMsgDKeyRepeat1_0 = "DKRP%2i%2i%2i"
- // kMsgDMouseRelMove = "DMRM%2i%2i"
- // kMsgEIncompatible = "EICV%2i%2i"
- // kMsgEBusy = "EBSY"
- // kMsgEUnknown = "EUNK"
- // kMsgEBad = "EBAD"
- char buffer[64];
- sprintf(buffer, "Unknown packet '%c%c%c%c'", message[4], message[5], message[6], message[7]);
- sTrace(context, buffer);
- return;
- }
-
- // Reply with CNOP maybe?
- sAddString(context, "CNOP");
- sSendReply(context);
-}
-#undef USYNERGY_IS_PACKET
-
-
-
-/**
-@brief Mark context as being disconnected
-**/
-static void sSetDisconnected(uSynergyContext *context)
-{
- context->m_connected = USYNERGY_FALSE;
- context->m_hasReceivedHello = USYNERGY_FALSE;
- context->m_isCaptured = USYNERGY_FALSE;
- context->m_replyCur = context->m_replyBuffer + 4;
- context->m_sequenceNumber = 0;
-}
-
-
-
-/**
-@brief Update a connected context
-**/
-static void sUpdateContext(uSynergyContext *context)
-{
- /* Receive data (blocking) */
- int receive_size = USYNERGY_RECEIVE_BUFFER_SIZE - context->m_receiveOfs;
- int num_received = 0;
- int packlen = 0;
- if (context->m_receiveFunc(context->m_cookie, context->m_receiveBuffer + context->m_receiveOfs, receive_size, &num_received) == USYNERGY_FALSE)
- {
- /* Receive failed, let's try to reconnect */
- char buffer[128];
- sprintf(buffer, "Receive failed (%d bytes asked, %d bytes received), trying to reconnect in a second", receive_size, num_received);
- sTrace(context, buffer);
- sSetDisconnected(context);
- context->m_sleepFunc(context->m_cookie, 1000);
- return;
- }
- context->m_receiveOfs += num_received;
-
- /* If we didn't receive any data then we're probably still polling to get connected and
- therefore not getting any data back. To avoid overloading the system with a Synergy
- thread that would hammer on polling, we let it rest for a bit if there's no data. */
- if (num_received == 0)
- context->m_sleepFunc(context->m_cookie, 500);
-
- /* Check for timeouts */
- if (context->m_hasReceivedHello)
- {
- uint32_t cur_time = context->m_getTimeFunc();
- if (num_received == 0)
- {
- /* Timeout after 2 secs of inactivity (we received no CALV) */
- if ((cur_time - context->m_lastMessageTime) > USYNERGY_IDLE_TIMEOUT)
- sSetDisconnected(context);
- }
- else
- context->m_lastMessageTime = cur_time;
- }
-
- /* Eat packets */
- for (;;)
- {
- /* Grab packet length and bail out if the packet goes beyond the end of the buffer */
- packlen = sNetToNative32(context->m_receiveBuffer);
- if (packlen+4 > context->m_receiveOfs)
- break;
-
- /* Process message */
- sProcessMessage(context, context->m_receiveBuffer);
-
- /* Move packet to front of buffer */
- memmove(context->m_receiveBuffer, context->m_receiveBuffer+packlen+4, context->m_receiveOfs-packlen-4);
- context->m_receiveOfs -= packlen+4;
- }
-
- /* Throw away over-sized packets */
- if (packlen > USYNERGY_RECEIVE_BUFFER_SIZE)
- {
- /* Oversized packet, ditch tail end */
- char buffer[128];
- sprintf(buffer, "Oversized packet: '%c%c%c%c' (length %d)", context->m_receiveBuffer[4], context->m_receiveBuffer[5], context->m_receiveBuffer[6], context->m_receiveBuffer[7], packlen);
- sTrace(context, buffer);
- num_received = context->m_receiveOfs-4; // 4 bytes for the size field
- while (num_received != packlen)
- {
- int buffer_left = packlen - num_received;
- int to_receive = buffer_left < USYNERGY_RECEIVE_BUFFER_SIZE ? buffer_left : USYNERGY_RECEIVE_BUFFER_SIZE;
- int ditch_received = 0;
- if (context->m_receiveFunc(context->m_cookie, context->m_receiveBuffer, to_receive, &ditch_received) == USYNERGY_FALSE)
- {
- /* Receive failed, let's try to reconnect */
- sTrace(context, "Receive failed, trying to reconnect in a second");
- sSetDisconnected(context);
- context->m_sleepFunc(context->m_cookie, 1000);
- break;
- }
- else
- {
- num_received += ditch_received;
- }
- }
- context->m_receiveOfs = 0;
- }
-}
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Public interface
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Initialize uSynergy context
-**/
-void uSynergyInit(uSynergyContext *context)
-{
- /* Zero memory */
- memset(context, 0, sizeof(uSynergyContext));
-
- /* Initialize to default state */
- sSetDisconnected(context);
-}
-
-
-/**
-@brief Update uSynergy
-**/
-void uSynergyUpdate(uSynergyContext *context)
-{
- if (context->m_connected)
- {
- /* Update context, receive data, call callbacks */
- sUpdateContext(context);
- }
- else
- {
- /* Try to connect */
- if (context->m_connectFunc(context->m_cookie))
- context->m_connected = USYNERGY_TRUE;
- }
-}
-
-
-
-/**
-@brief Send clipboard data
-**/
-void uSynergySendClipboard(uSynergyContext *context, const char *text)
-{
- // Calculate maximum size that will fit in a reply packet
- uint32_t overhead_size = 4 + /* Message size */
- 4 + /* Message ID */
- 1 + /* Clipboard index */
- 4 + /* Sequence number */
- 4 + /* Rest of message size (because it's a Synergy string from here on) */
- 4 + /* Number of clipboard formats */
- 4 + /* Clipboard format */
- 4; /* Clipboard data length */
- uint32_t max_length = USYNERGY_REPLY_BUFFER_SIZE - overhead_size;
-
- // Clip text to max length
- uint32_t text_length = (uint32_t)strlen(text);
- if (text_length > max_length)
- {
- char buffer[128];
- sprintf(buffer, "Clipboard buffer too small, clipboard truncated at %d characters", max_length);
- sTrace(context, buffer);
- text_length = max_length;
- }
-
- // Assemble packet
- sAddString(context, "DCLP");
- sAddUInt8(context, 0); /* Clipboard index */
- sAddUInt32(context, context->m_sequenceNumber);
- sAddUInt32(context, 4+4+4+text_length); /* Rest of message size: numFormats, format, length, data */
- sAddUInt32(context, 1); /* Number of formats (only text for now) */
- sAddUInt32(context, USYNERGY_CLIPBOARD_FORMAT_TEXT);
- sAddUInt32(context, text_length);
- sAddString(context, text);
- sSendReply(context);
-}
diff --git a/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.h b/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.h
deleted file mode 100644
index 2b4d779..0000000
--- a/libs/imgui-1.92.1/examples/libs/usynergy/uSynergy.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
-uSynergy client -- Interface for the embedded Synergy client library
- version 1.0.0, July 7th, 2012
-
-Copyright (C) 2012 Synergy Si Ltd.
-Copyright (c) 2012 Alex Evans
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source
- distribution.
-*/
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Configuration
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Determine endianness
-**/
-#if defined(USYNERGY_LITTLE_ENDIAN) && defined(USYNERGY_BIG_ENDIAN)
- /* Ambiguous: both endians specified */
- #error "Can't define both USYNERGY_LITTLE_ENDIAN and USYNERGY_BIG_ENDIAN"
-#elif !defined(USYNERGY_LITTLE_ENDIAN) && !defined(USYNERGY_BIG_ENDIAN)
- /* Attempt to auto detect */
- #if defined(__LITTLE_ENDIAN__) || defined(LITTLE_ENDIAN) || (_BYTE_ORDER == _LITTLE_ENDIAN)
- #define USYNERGY_LITTLE_ENDIAN
- #elif defined(__BIG_ENDIAN__) || defined(BIG_ENDIAN) || (_BYTE_ORDER == _BIG_ENDIAN)
- #define USYNERGY_BIG_ENDIAN
- #else
- #error "Can't detect endian-nes, please defined either USYNERGY_LITTLE_ENDIAN or USYNERGY_BIG_ENDIAN";
- #endif
-#else
- /* User-specified endian-nes, nothing to do for us */
-#endif
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Types and Constants
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Boolean type
-**/
-typedef int uSynergyBool;
-#define USYNERGY_FALSE 0 /* False value */
-#define USYNERGY_TRUE 1 /* True value */
-
-
-/**
-@brief User context type
-
-The uSynergyCookie type is an opaque type that is used by uSynergy to communicate to the client. It is passed along to
-callback functions as context.
-**/
-typedef struct { int ignored; } * uSynergyCookie;
-
-
-
-/**
-@brief Clipboard types
-**/
-enum uSynergyClipboardFormat
-{
- USYNERGY_CLIPBOARD_FORMAT_TEXT = 0, /* Text format, UTF-8, newline is LF */
- USYNERGY_CLIPBOARD_FORMAT_BITMAP = 1, /* Bitmap format, BMP 24/32bpp, BI_RGB */
- USYNERGY_CLIPBOARD_FORMAT_HTML = 2, /* HTML format, HTML fragment, UTF-8, newline is LF */
-};
-
-
-
-/**
-@brief Constants and limits
-**/
-#define USYNERGY_NUM_JOYSTICKS 4 /* Maximum number of supported joysticks */
-
-#define USYNERGY_PROTOCOL_MAJOR 1 /* Major protocol version */
-#define USYNERGY_PROTOCOL_MINOR 4 /* Minor protocol version */
-
-#define USYNERGY_IDLE_TIMEOUT 2000 /* Timeout in milliseconds before reconnecting */
-
-#define USYNERGY_TRACE_BUFFER_SIZE 1024 /* Maximum length of traced message */
-#define USYNERGY_REPLY_BUFFER_SIZE 1024 /* Maximum size of a reply packet */
-#define USYNERGY_RECEIVE_BUFFER_SIZE 4096 /* Maximum size of an incoming packet */
-
-
-
-/**
-@brief Keyboard constants
-**/
-#define USYNERGY_MODIFIER_SHIFT 0x0001 /* Shift key modifier */
-#define USYNERGY_MODIFIER_CTRL 0x0002 /* Ctrl key modifier */
-#define USYNERGY_MODIFIER_ALT 0x0004 /* Alt key modifier */
-#define USYNERGY_MODIFIER_META 0x0008 /* Meta key modifier */
-#define USYNERGY_MODIFIER_WIN 0x0010 /* Windows key modifier */
-#define USYNERGY_MODIFIER_ALT_GR 0x0020 /* AltGr key modifier */
-#define USYNERGY_MODIFIER_LEVEL5LOCK 0x0040 /* Level5Lock key modifier */
-#define USYNERGY_MODIFIER_CAPSLOCK 0x1000 /* CapsLock key modifier */
-#define USYNERGY_MODIFIER_NUMLOCK 0x2000 /* NumLock key modifier */
-#define USYNERGY_MODIFIER_SCROLLOCK 0x4000 /* ScrollLock key modifier */
-
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Functions and Callbacks
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Connect function
-
-This function is called when uSynergy needs to connect to the host. It doesn't imply a network implementation or
-destination address, that must all be handled on the user side. The function should return USYNERGY_TRUE if a
-connection was established or USYNERGY_FALSE if it could not connect.
-
-When network errors occur (e.g. uSynergySend or uSynergyReceive fail) then the connect call will be called again
-so the implementation of the function must close any old connections and clean up resources before retrying.
-
-@param cookie Cookie supplied in the Synergy context
-**/
-typedef uSynergyBool (*uSynergyConnectFunc)(uSynergyCookie cookie);
-
-
-
-/**
-@brief Send function
-
-This function is called when uSynergy needs to send something over the default connection. It should return
-USYNERGY_TRUE if sending succeeded and USYNERGY_FALSE otherwise. This function should block until the send
-operation is completed.
-
-@param cookie Cookie supplied in the Synergy context
-@param buffer Address of buffer to send
-@param length Length of buffer to send
-**/
-typedef uSynergyBool (*uSynergySendFunc)(uSynergyCookie cookie, const uint8_t *buffer, int length);
-
-
-
-/**
-@brief Receive function
-
-This function is called when uSynergy needs to receive data from the default connection. It should return
-USYNERGY_TRUE if receiving data succeeded and USYNERGY_FALSE otherwise. This function should block until data
-has been received and wait for data to become available. If @a outLength is set to 0 upon completion it is
-assumed that the connection is alive, but still in a connecting state and needs time to settle.
-
-@param cookie Cookie supplied in the Synergy context
-@param buffer Address of buffer to receive data into
-@param maxLength Maximum amount of bytes to write into the receive buffer
-@param outLength Address of integer that receives the actual amount of bytes written into @a buffer
-**/
-typedef uSynergyBool (*uSynergyReceiveFunc)(uSynergyCookie cookie, uint8_t *buffer, int maxLength, int* outLength);
-
-
-
-/**
-@brief Thread sleep function
-
-This function is called when uSynergy wants to suspend operation for a while before retrying an operation. It
-is mostly used when a socket times out or disconnect occurs to prevent uSynergy from continuously hammering a
-network connection in case the network is down.
-
-@param cookie Cookie supplied in the Synergy context
-@param timeMs Time to sleep the current thread (in milliseconds)
-**/
-typedef void (*uSynergySleepFunc)(uSynergyCookie cookie, int timeMs);
-
-
-
-/**
-@brief Get time function
-
-This function is called when uSynergy needs to know the current time. This is used to determine when timeouts
-have occurred. The time base should be a cyclic millisecond time value.
-
-@returns Time value in milliseconds
-**/
-typedef uint32_t (*uSynergyGetTimeFunc)();
-
-
-
-/**
-@brief Trace function
-
-This function is called when uSynergy wants to trace something. It is optional to show these messages, but they
-are often useful when debugging. uSynergy only traces major events like connecting and disconnecting. Usually
-only a single trace is shown when the connection is established and no more trace are called.
-
-@param cookie Cookie supplied in the Synergy context
-@param text Text to be traced
-**/
-typedef void (*uSynergyTraceFunc)(uSynergyCookie cookie, const char *text);
-
-
-
-/**
-@brief Screen active callback
-
-This callback is called when Synergy makes the screen active or inactive. This
-callback is usually sent when the mouse enters or leaves the screen.
-
-@param cookie Cookie supplied in the Synergy context
-@param active Activation flag, 1 if the screen has become active, 0 if the screen has become inactive
-**/
-typedef void (*uSynergyScreenActiveCallback)(uSynergyCookie cookie, uSynergyBool active);
-
-
-
-/**
-@brief Mouse callback
-
-This callback is called when a mouse events happens. The mouse X and Y position,
-wheel and button state is communicated in the message. It's up to the user to
-interpret if this is a mouse up, down, double-click or other message.
-
-@param cookie Cookie supplied in the Synergy context
-@param x Mouse X position
-@param y Mouse Y position
-@param wheelX Mouse wheel X position
-@param wheelY Mouse wheel Y position
-@param buttonLeft Left button pressed status, 0 for released, 1 for pressed
-@param buttonMiddle Middle button pressed status, 0 for released, 1 for pressed
-@param buttonRight Right button pressed status, 0 for released, 1 for pressed
-**/
-typedef void (*uSynergyMouseCallback)(uSynergyCookie cookie, uint16_t x, uint16_t y, int16_t wheelX, int16_t wheelY, uSynergyBool buttonLeft, uSynergyBool buttonRight, uSynergyBool buttonMiddle);
-
-
-
-/**
-@brief Key event callback
-
-This callback is called when a key is pressed or released.
-
-@param cookie Cookie supplied in the Synergy context
-@param key Key code of key that was pressed or released
-@param modifiers Status of modifier keys (alt, shift, etc.)
-@param down Down or up status, 1 is key is pressed down, 0 if key is released (up)
-@param repeat Repeat flag, 1 if the key is down because the key is repeating, 0 if the key is initially pressed by the user
-**/
-typedef void (*uSynergyKeyboardCallback)(uSynergyCookie cookie, uint16_t key, uint16_t modifiers, uSynergyBool down, uSynergyBool repeat);
-
-
-
-/**
-@brief Joystick event callback
-
-This callback is called when a joystick stick or button changes. It is possible that multiple callbacks are
-fired when different sticks or buttons change as these are individual messages in the packet stream. Each
-callback will contain all the valid state for the different axes and buttons. The last callback received will
-represent the most current joystick state.
-
-@param cookie Cookie supplied in the Synergy context
-@param joyNum Joystick number, always in the range [0 ... USYNERGY_NUM_JOYSTICKS>
-@param buttons Button pressed mask
-@param leftStickX Left stick X position, in range [-127 ... 127]
-@param leftStickY Left stick Y position, in range [-127 ... 127]
-@param rightStickX Right stick X position, in range [-127 ... 127]
-@param rightStickY Right stick Y position, in range [-127 ... 127]
-**/
-typedef void (*uSynergyJoystickCallback)(uSynergyCookie cookie, uint8_t joyNum, uint16_t buttons, int8_t leftStickX, int8_t leftStickY, int8_t rightStickX, int8_t rightStickY);
-
-
-
-/**
-@brief Clipboard event callback
-
-This callback is called when something is placed on the clipboard. Multiple callbacks may be fired for
-multiple clipboard formats if they are supported. The data provided is read-only and may not be modified
-by the application.
-
-@param cookie Cookie supplied in the Synergy context
-@param format Clipboard format
-@param data Memory area containing the clipboard raw data
-@param size Size of clipboard data
-**/
-typedef void (*uSynergyClipboardCallback)(uSynergyCookie cookie, enum uSynergyClipboardFormat format, const uint8_t *data, uint32_t size);
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Context
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief uSynergy context
-**/
-typedef struct
-{
- /* Mandatory configuration data, filled in by client */
- uSynergyConnectFunc m_connectFunc; /* Connect function */
- uSynergySendFunc m_sendFunc; /* Send data function */
- uSynergyReceiveFunc m_receiveFunc; /* Receive data function */
- uSynergySleepFunc m_sleepFunc; /* Thread sleep function */
- uSynergyGetTimeFunc m_getTimeFunc; /* Get current time function */
- const char* m_clientName; /* Name of Synergy Screen / Client */
- uint16_t m_clientWidth; /* Width of screen */
- uint16_t m_clientHeight; /* Height of screen */
-
- /* Optional configuration data, filled in by client */
- uSynergyCookie m_cookie; /* Cookie pointer passed to callback functions (can be NULL) */
- uSynergyTraceFunc m_traceFunc; /* Function for tracing status (can be NULL) */
- uSynergyScreenActiveCallback m_screenActiveCallback; /* Callback for entering and leaving screen */
- uSynergyMouseCallback m_mouseCallback; /* Callback for mouse events */
- uSynergyKeyboardCallback m_keyboardCallback; /* Callback for keyboard events */
- uSynergyJoystickCallback m_joystickCallback; /* Callback for joystick events */
- uSynergyClipboardCallback m_clipboardCallback; /* Callback for clipboard events */
-
- /* State data, used internally by client, initialized by uSynergyInit() */
- uSynergyBool m_connected; /* Is our socket connected? */
- uSynergyBool m_hasReceivedHello; /* Have we received a 'Hello' from the server? */
- uSynergyBool m_isCaptured; /* Is Synergy active (i.e. this client is receiving input messages?) */
- uint32_t m_lastMessageTime; /* Time at which last message was received */
- uint32_t m_sequenceNumber; /* Packet sequence number */
- uint8_t m_receiveBuffer[USYNERGY_RECEIVE_BUFFER_SIZE]; /* Receive buffer */
- int m_receiveOfs; /* Receive buffer offset */
- uint8_t m_replyBuffer[USYNERGY_REPLY_BUFFER_SIZE]; /* Reply buffer */
- uint8_t* m_replyCur; /* Write offset into reply buffer */
- uint16_t m_mouseX; /* Mouse X position */
- uint16_t m_mouseY; /* Mouse Y position */
- int16_t m_mouseWheelX; /* Mouse wheel X position */
- int16_t m_mouseWheelY; /* Mouse wheel Y position */
- uSynergyBool m_mouseButtonLeft; /* Mouse left button */
- uSynergyBool m_mouseButtonRight; /* Mouse right button */
- uSynergyBool m_mouseButtonMiddle; /* Mouse middle button */
- int8_t m_joystickSticks[USYNERGY_NUM_JOYSTICKS][4]; /* Joystick stick position in 2 axes for 2 sticks */
- uint16_t m_joystickButtons[USYNERGY_NUM_JOYSTICKS]; /* Joystick button state */
-} uSynergyContext;
-
-
-
-//---------------------------------------------------------------------------------------------------------------------
-// Interface
-//---------------------------------------------------------------------------------------------------------------------
-
-
-
-/**
-@brief Initialize uSynergy context
-
-This function initializes @a context for use. Call this function directly after
-creating the context, before filling in any configuration data in it. Not calling
-this function will cause undefined behavior.
-
-@param context Context to be initialized
-**/
-extern void uSynergyInit(uSynergyContext *context);
-
-
-
-/**
-@brief Update uSynergy
-
-This function updates uSynergy and does the bulk of the work. It does connection management,
-receiving data, reconnecting after errors or timeouts and so on. It assumes that networking
-operations are blocking and it can suspend the current thread if it needs to wait. It is
-best practice to call uSynergyUpdate from a background thread so it is responsive.
-
-Because uSynergy relies mostly on blocking calls it will mostly stay in thread sleep state
-waiting for system mutexes and won't eat much memory.
-
-uSynergyUpdate doesn't do any memory allocations or have any side effects beyond those of
-the callbacks it calls.
-
-@param context Context to be updated
-**/
-extern void uSynergyUpdate(uSynergyContext *context);
-
-
-
-/**
-@brief Send clipboard data
-
-This function sets new clipboard data and sends it to the server. Use this function if
-your client cuts or copies data onto the clipboard that it needs to share with the
-server.
-
-Currently there is only support for plaintext, but HTML and image data could be
-supported with some effort.
-
-@param context Context to send clipboard data to
-@param text Text to set to the clipboard
-**/
-extern void uSynergySendClipboard(uSynergyContext *context, const char *text);
-
-
-
-#ifdef __cplusplus
-};
-#endif
diff --git a/libs/imgui-1.92.1/misc/fonts/Cousine-Regular.ttf b/libs/imgui-1.92.1/misc/fonts/Cousine-Regular.ttf
deleted file mode 100644
index 70a0bf9..0000000
--- a/libs/imgui-1.92.1/misc/fonts/Cousine-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/DroidSans.ttf b/libs/imgui-1.92.1/misc/fonts/DroidSans.ttf
deleted file mode 100644
index 767c63a..0000000
--- a/libs/imgui-1.92.1/misc/fonts/DroidSans.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/Karla-Regular.ttf b/libs/imgui-1.92.1/misc/fonts/Karla-Regular.ttf
deleted file mode 100644
index 81b3de6..0000000
--- a/libs/imgui-1.92.1/misc/fonts/Karla-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/ProggyClean.ttf b/libs/imgui-1.92.1/misc/fonts/ProggyClean.ttf
deleted file mode 100644
index 0270cdf..0000000
--- a/libs/imgui-1.92.1/misc/fonts/ProggyClean.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/ProggyTiny.ttf b/libs/imgui-1.92.1/misc/fonts/ProggyTiny.ttf
deleted file mode 100644
index 1c4312c..0000000
--- a/libs/imgui-1.92.1/misc/fonts/ProggyTiny.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/Roboto-Medium.ttf b/libs/imgui-1.92.1/misc/fonts/Roboto-Medium.ttf
deleted file mode 100644
index 39c63d7..0000000
--- a/libs/imgui-1.92.1/misc/fonts/Roboto-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/libs/imgui-1.92.1/misc/fonts/binary_to_compressed_c.cpp b/libs/imgui-1.92.1/misc/fonts/binary_to_compressed_c.cpp
deleted file mode 100644
index da98831..0000000
--- a/libs/imgui-1.92.1/misc/fonts/binary_to_compressed_c.cpp
+++ /dev/null
@@ -1,424 +0,0 @@
-// dear imgui
-// (binary_to_compressed_c.cpp)
-// Helper tool to turn a file into a C array, if you want to embed font data in your source code.
-
-// The data is first compressed with stb_compress() to reduce source code size.
-// Then stored in a C array:
-// - Base85: ~5 bytes of source code for 4 bytes of input data. 5 bytes stored in binary (suggested by @mmalex).
-// - As int: ~11 bytes of source code for 4 bytes of input data. 4 bytes stored in binary. Endianness dependent, need swapping on big-endian CPU.
-// - As char: ~12 bytes of source code for 4 bytes of input data. 4 bytes stored in binary. Not endianness dependent.
-// Load compressed TTF fonts with ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF()
-
-// Build with, e.g:
-// # cl.exe binary_to_compressed_c.cpp
-// # g++ binary_to_compressed_c.cpp
-// # clang++ binary_to_compressed_c.cpp
-// You can also find a precompiled Windows binary in the binary/demo package available from https://github.com/ocornut/imgui
-
-// Usage:
-// binary_to_compressed_c.exe [-nocompress] [-nostatic] [-base85] <inputfile> <symbolname>
-// Usage example:
-// # binary_to_compressed_c.exe myfont.ttf MyFont > myfont.cpp
-// # binary_to_compressed_c.exe -base85 myfont.ttf MyFont > myfont.cpp
-// Note:
-// Base85 encoding will be obsoleted by future version of Dear ImGui!
-
-#define _CRT_SECURE_NO_WARNINGS
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-// stb_compress* from stb.h - declaration
-typedef unsigned int stb_uint;
-typedef unsigned char stb_uchar;
-stb_uint stb_compress(stb_uchar* out, stb_uchar* in, stb_uint len);
-
-enum SourceEncoding
-{
- SourceEncoding_U8, // New default since 2024/11
- SourceEncoding_U32,
- SourceEncoding_Base85,
-};
-
-static bool binary_to_compressed_c(const char* filename, const char* symbol, SourceEncoding source_encoding, bool use_compression, bool use_static);
-
-int main(int argc, char** argv)
-{
- if (argc < 3)
- {
- printf("Syntax: %s [-u8|-u32|-base85] [-nocompress] [-nostatic] <inputfile> <symbolname>\n", argv[0]);
- printf("Source encoding types:\n");
- printf(" -u8 = ~12 bytes of source per 4 bytes of data. 4 bytes in binary.\n");
- printf(" -u32 = ~11 bytes of source per 4 bytes of data. 4 bytes in binary. Need endianness swapping on big-endian.\n");
- printf(" -base85 = ~5 bytes of source per 4 bytes of data. 5 bytes in binary. Need decoder.\n");
- return 0;
- }
-
- int argn = 1;
- bool use_compression = true;
- bool use_static = true;
- SourceEncoding source_encoding = SourceEncoding_U8; // New default
- while (argn < (argc - 2) && argv[argn][0] == '-')
- {
- if (strcmp(argv[argn], "-u8") == 0) { source_encoding = SourceEncoding_U8; argn++; }
- else if (strcmp(argv[argn], "-u32") == 0) { source_encoding = SourceEncoding_U32; argn++; }
- else if (strcmp(argv[argn], "-base85") == 0) { source_encoding = SourceEncoding_Base85; argn++; }
- else if (strcmp(argv[argn], "-nocompress") == 0) { use_compression = false; argn++; }
- else if (strcmp(argv[argn], "-nostatic") == 0) { use_static = false; argn++; }
- else
- {
- fprintf(stderr, "Unknown argument: '%s'\n", argv[argn]);
- return 1;
- }
- }
-
- bool ret = binary_to_compressed_c(argv[argn], argv[argn + 1], source_encoding, use_compression, use_static);
- if (!ret)
- fprintf(stderr, "Error opening or reading file: '%s'\n", argv[argn]);
- return ret ? 0 : 1;
-}
-
-char Encode85Byte(unsigned int x)
-{
- x = (x % 85) + 35;
- return (char)((x >= '\\') ? x + 1 : x);
-}
-
-bool binary_to_compressed_c(const char* filename, const char* symbol, SourceEncoding source_encoding, bool use_compression, bool use_static)
-{
- // Read file
- FILE* f = fopen(filename, "rb");
- if (!f) return false;
- int data_sz;
- if (fseek(f, 0, SEEK_END) || (data_sz = (int)ftell(f)) == -1 || fseek(f, 0, SEEK_SET)) { fclose(f); return false; }
- char* data = new char[data_sz + 4];
- if (fread(data, 1, data_sz, f) != (size_t)data_sz) { fclose(f); delete[] data; return false; }
- memset((void*)(((char*)data) + data_sz), 0, 4);
- fclose(f);
-
- // Compress
- int maxlen = data_sz + 512 + (data_sz >> 2) + sizeof(int); // total guess
- char* compressed = use_compression ? new char[maxlen] : data;
- int compressed_sz = use_compression ? stb_compress((stb_uchar*)compressed, (stb_uchar*)data, data_sz) : data_sz;
- if (use_compression)
- memset(compressed + compressed_sz, 0, maxlen - compressed_sz);
-
- // Output as Base85 encoded
- FILE* out = stdout;
- fprintf(out, "// File: '%s' (%d bytes)\n", filename, (int)data_sz);
- const char* static_str = use_static ? "static " : "";
- const char* compressed_str = use_compression ? "compressed_" : "";
- if (source_encoding == SourceEncoding_Base85)
- {
- fprintf(out, "// Exported using binary_to_compressed_c.exe -base85 \"%s\" %s\n", filename, symbol);
- fprintf(out, "%sconst char %s_%sdata_base85[%d+1] =\n \"", static_str, symbol, compressed_str, (int)((compressed_sz + 3) / 4)*5);
- char prev_c = 0;
- for (int src_i = 0; src_i < compressed_sz; src_i += 4)
- {
- // This is made a little more complicated by the fact that ??X sequences are interpreted as trigraphs by old C/C++ compilers. So we need to escape pairs of ??.
- unsigned int d = *(unsigned int*)(compressed + src_i);
- for (unsigned int n5 = 0; n5 < 5; n5++, d /= 85)
- {
- char c = Encode85Byte(d);
- fprintf(out, (c == '?' && prev_c == '?') ? "\\%c" : "%c", c);
- prev_c = c;
- }
- if ((src_i % 112) == 112 - 4)
- fprintf(out, "\"\n \"");
- }
- fprintf(out, "\";\n\n");
- }
- else if (source_encoding == SourceEncoding_U8)
- {
- // As individual bytes, not subject to endianness issues.
- fprintf(out, "// Exported using binary_to_compressed_c.exe -u8 \"%s\" %s\n", filename, symbol);
- fprintf(out, "%sconst unsigned int %s_%ssize = %d;\n", static_str, symbol, compressed_str, (int)compressed_sz);
- fprintf(out, "%sconst unsigned char %s_%sdata[%d] =\n{", static_str, symbol, compressed_str, (int)compressed_sz);
- int column = 0;
- for (int i = 0; i < compressed_sz; i++)
- {
- unsigned char d = *(unsigned char*)(compressed + i);
- if (column == 0)
- fprintf(out, "\n ");
- column += fprintf(out, "%d,", d);
- if (column >= 180)
- column = 0;
- }
- fprintf(out, "\n};\n\n");
- }
- else if (source_encoding == SourceEncoding_U32)
- {
- // As integers
- fprintf(out, "// Exported using binary_to_compressed_c.exe -u32 \"%s\" %s\n", filename, symbol);
- fprintf(out, "%sconst unsigned int %s_%ssize = %d;\n", static_str, symbol, compressed_str, (int)compressed_sz);
- fprintf(out, "%sconst unsigned int %s_%sdata[%d/4] =\n{", static_str, symbol, compressed_str, (int)((compressed_sz + 3) / 4)*4);
- int column = 0;
- for (int i = 0; i < compressed_sz; i += 4)
- {
- unsigned int d = *(unsigned int*)(compressed + i);
- if ((column++ % 14) == 0)
- fprintf(out, "\n 0x%08x, ", d);
- else
- fprintf(out, "0x%08x, ", d);
- }
- fprintf(out, "\n};\n\n");
- }
-
- // Cleanup
- delete[] data;
- if (use_compression)
- delete[] compressed;
- return true;
-}
-
-// stb_compress* from stb.h - definition
-
-//////////////////// compressor ///////////////////////
-
-static stb_uint stb_adler32(stb_uint adler32, stb_uchar *buffer, stb_uint buflen)
-{
- const unsigned long ADLER_MOD = 65521;
- unsigned long s1 = adler32 & 0xffff, s2 = adler32 >> 16;
- unsigned long blocklen, i;
-
- blocklen = buflen % 5552;
- while (buflen) {
- for (i=0; i + 7 < blocklen; i += 8) {
- s1 += buffer[0], s2 += s1;
- s1 += buffer[1], s2 += s1;
- s1 += buffer[2], s2 += s1;
- s1 += buffer[3], s2 += s1;
- s1 += buffer[4], s2 += s1;
- s1 += buffer[5], s2 += s1;
- s1 += buffer[6], s2 += s1;
- s1 += buffer[7], s2 += s1;
-
- buffer += 8;
- }
-
- for (; i < blocklen; ++i)
- s1 += *buffer++, s2 += s1;
-
- s1 %= ADLER_MOD, s2 %= ADLER_MOD;
- buflen -= blocklen;
- blocklen = 5552;
- }
- return (s2 << 16) + s1;
-}
-
-static unsigned int stb_matchlen(stb_uchar *m1, stb_uchar *m2, stb_uint maxlen)
-{
- stb_uint i;
- for (i=0; i < maxlen; ++i)
- if (m1[i] != m2[i]) return i;
- return i;
-}
-
-// simple implementation that just takes the source data in a big block
-
-static stb_uchar *stb__out;
-static FILE *stb__outfile;
-static stb_uint stb__outbytes;
-
-static void stb__write(unsigned char v)
-{
- fputc(v, stb__outfile);
- ++stb__outbytes;
-}
-
-//#define stb_out(v) (stb__out ? *stb__out++ = (stb_uchar) (v) : stb__write((stb_uchar) (v)))
-#define stb_out(v) do { if (stb__out) *stb__out++ = (stb_uchar) (v); else stb__write((stb_uchar) (v)); } while (0)
-
-static void stb_out2(stb_uint v) { stb_out(v >> 8); stb_out(v); }
-static void stb_out3(stb_uint v) { stb_out(v >> 16); stb_out(v >> 8); stb_out(v); }
-static void stb_out4(stb_uint v) { stb_out(v >> 24); stb_out(v >> 16); stb_out(v >> 8 ); stb_out(v); }
-
-static void outliterals(stb_uchar *in, int numlit)
-{
- while (numlit > 65536) {
- outliterals(in,65536);
- in += 65536;
- numlit -= 65536;
- }
-
- if (numlit == 0) ;
- else if (numlit <= 32) stb_out (0x000020 + numlit-1);
- else if (numlit <= 2048) stb_out2(0x000800 + numlit-1);
- else /* numlit <= 65536) */ stb_out3(0x070000 + numlit-1);
-
- if (stb__out) {
- memcpy(stb__out,in,numlit);
- stb__out += numlit;
- } else
- fwrite(in, 1, numlit, stb__outfile);
-}
-
-static int stb__window = 0x40000; // 256K
-
-static int stb_not_crap(int best, int dist)
-{
- return ((best > 2 && dist <= 0x00100)
- || (best > 5 && dist <= 0x04000)
- || (best > 7 && dist <= 0x80000));
-}
-
-static stb_uint stb__hashsize = 32768;
-
-// note that you can play with the hashing functions all you
-// want without needing to change the decompressor
-#define stb__hc(q,h,c) (((h) << 7) + ((h) >> 25) + q[c])
-#define stb__hc2(q,h,c,d) (((h) << 14) + ((h) >> 18) + (q[c] << 7) + q[d])
-#define stb__hc3(q,c,d,e) ((q[c] << 14) + (q[d] << 7) + q[e])
-
-static unsigned int stb__running_adler;
-
-static int stb_compress_chunk(stb_uchar *history,
- stb_uchar *start,
- stb_uchar *end,
- int length,
- int *pending_literals,
- stb_uchar **chash,
- stb_uint mask)
-{
- (void)history;
- int window = stb__window;
- stb_uint match_max;
- stb_uchar *lit_start = start - *pending_literals;
- stb_uchar *q = start;
-
-#define STB__SCRAMBLE(h) (((h) + ((h) >> 16)) & mask)
-
- // stop short of the end so we don't scan off the end doing
- // the hashing; this means we won't compress the last few bytes
- // unless they were part of something longer
- while (q < start+length && q+12 < end) {
- int m;
- stb_uint h1,h2,h3,h4, h;
- stb_uchar *t;
- int best = 2, dist=0;
-
- if (q+65536 > end)
- match_max = (stb_uint)(end-q);
- else
- match_max = 65536;
-
-#define stb__nc(b,d) ((d) <= window && ((b) > 9 || stb_not_crap((int)(b),(int)(d))))
-
-#define STB__TRY(t,p) /* avoid retrying a match we already tried */ \
- if (p ? dist != (int)(q-t) : 1) \
- if ((m = stb_matchlen(t, q, match_max)) > best) \
- if (stb__nc(m,q-(t))) \
- best = m, dist = (int)(q - (t))
-
- // rather than search for all matches, only try 4 candidate locations,
- // chosen based on 4 different hash functions of different lengths.
- // this strategy is inspired by LZO; hashing is unrolled here using the
- // 'hc' macro
- h = stb__hc3(q,0, 1, 2); h1 = STB__SCRAMBLE(h);
- t = chash[h1]; if (t) STB__TRY(t,0);
- h = stb__hc2(q,h, 3, 4); h2 = STB__SCRAMBLE(h);
- h = stb__hc2(q,h, 5, 6); t = chash[h2]; if (t) STB__TRY(t,1);
- h = stb__hc2(q,h, 7, 8); h3 = STB__SCRAMBLE(h);
- h = stb__hc2(q,h, 9,10); t = chash[h3]; if (t) STB__TRY(t,1);
- h = stb__hc2(q,h,11,12); h4 = STB__SCRAMBLE(h);
- t = chash[h4]; if (t) STB__TRY(t,1);
-
- // because we use a shared hash table, can only update it
- // _after_ we've probed all of them
- chash[h1] = chash[h2] = chash[h3] = chash[h4] = q;
-
- if (best > 2)
- assert(dist > 0);
-
- // see if our best match qualifies
- if (best < 3) { // fast path literals
- ++q;
- } else if (best > 2 && best <= 0x80 && dist <= 0x100) {
- outliterals(lit_start, (int)(q-lit_start)); lit_start = (q += best);
- stb_out(0x80 + best-1);
- stb_out(dist-1);
- } else if (best > 5 && best <= 0x100 && dist <= 0x4000) {
- outliterals(lit_start, (int)(q-lit_start)); lit_start = (q += best);
- stb_out2(0x4000 + dist-1);
- stb_out(best-1);
- } else if (best > 7 && best <= 0x100 && dist <= 0x80000) {
- outliterals(lit_start, (int)(q-lit_start)); lit_start = (q += best);
- stb_out3(0x180000 + dist-1);
- stb_out(best-1);
- } else if (best > 8 && best <= 0x10000 && dist <= 0x80000) {
- outliterals(lit_start, (int)(q-lit_start)); lit_start = (q += best);
- stb_out3(0x100000 + dist-1);
- stb_out2(best-1);
- } else if (best > 9 && dist <= 0x1000000) {
- if (best > 65536) best = 65536;
- outliterals(lit_start, (int)(q-lit_start)); lit_start = (q += best);
- if (best <= 0x100) {
- stb_out(0x06);
- stb_out3(dist-1);
- stb_out(best-1);
- } else {
- stb_out(0x04);
- stb_out3(dist-1);
- stb_out2(best-1);
- }
- } else { // fallback literals if no match was a balanced tradeoff
- ++q;
- }
- }
-
- // if we didn't get all the way, add the rest to literals
- if (q-start < length)
- q = start+length;
-
- // the literals are everything from lit_start to q
- *pending_literals = (int)(q - lit_start);
-
- stb__running_adler = stb_adler32(stb__running_adler, start, (stb_uint)(q - start));
- return (int)(q - start);
-}
-
-static int stb_compress_inner(stb_uchar *input, stb_uint length)
-{
- int literals = 0;
- stb_uint len,i;
-
- stb_uchar **chash;
- chash = (stb_uchar**) malloc(stb__hashsize * sizeof(stb_uchar*));
- if (chash == nullptr) return 0; // failure
- for (i=0; i < stb__hashsize; ++i)
- chash[i] = nullptr;
-
- // stream signature
- stb_out(0x57); stb_out(0xbc);
- stb_out2(0);
-
- stb_out4(0); // 64-bit length requires 32-bit leading 0
- stb_out4(length);
- stb_out4(stb__window);
-
- stb__running_adler = 1;
-
- len = stb_compress_chunk(input, input, input+length, length, &literals, chash, stb__hashsize-1);
- assert(len == length);
-
- outliterals(input+length - literals, literals);
-
- free(chash);
-
- stb_out2(0x05fa); // end opcode
-
- stb_out4(stb__running_adler);
-
- return 1; // success
-}
-
-stb_uint stb_compress(stb_uchar *out, stb_uchar *input, stb_uint length)
-{
- stb__out = out;
- stb__outfile = nullptr;
-
- stb_compress_inner(input, length);
-
- return (stb_uint)(stb__out - out);
-}
diff --git a/libs/imgui-1.92.1/misc/freetype/README.md b/libs/imgui-1.92.1/misc/freetype/README.md
deleted file mode 100644
index e1bd019..0000000
--- a/libs/imgui-1.92.1/misc/freetype/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# imgui_freetype
-
-Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer).
-<br>by @vuhdo, @mikesart, @ocornut.
-
-### Usage
-
-1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype --triplet=x64-windows`, `vcpkg integrate install`).
-2. Add imgui_freetype.h/cpp alongside your project files.
-3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file
-
-### About Gamma Correct Blending
-
-FreeType assumes blending in linear space rather than gamma space.
-See FreeType note for [FT_Render_Glyph](https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_render_glyph).
-For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
-The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking).
-
-### Testbed for toying with settings (for developers)
-
-See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
-
-### Known issues
-
-- Oversampling settings are ignored but also not so much necessary with the higher quality rendering.
-
-### Comparison
-
-Small, thin anti-aliased fonts typically benefit a lot from FreeType's hinting:
-![comparing_font_rasterizers](https://user-images.githubusercontent.com/8225057/107550178-fef87f00-6bd0-11eb-8d09-e2edb2f0ccfc.gif)
-
-### Colorful glyphs/emojis
-
-You can use the `ImGuiFreeTypeBuilderFlags_LoadColor` flag to load certain colorful glyphs. See the
-["Using Colorful Glyphs/Emojis"](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md#using-colorful-glyphsemojis) section of FONTS.md.
-
-![colored glyphs](https://user-images.githubusercontent.com/8225057/106171241-9dc4ba80-6191-11eb-8a69-ca1467b206d1.png)
-
-### Using OpenType SVG fonts (SVGinOT)
-- *SVG in Open Type* is a standard by Adobe and Mozilla for color OpenType and Open Font Format fonts. It allows font creators to embed complete SVG files within a font enabling full color and even animations.
-- Popular fonts such as [twemoji](https://github.com/13rac1/twemoji-color-font) and fonts made with [scfbuild](https://github.com/13rac1/scfbuild) is SVGinOT.
-- Two alternatives are possible to render SVG fonts: use "lunasvg" or "plutosvg". plutosvg will support some more fonts (e.g. NotoColorEmoji-Regular) and may load them faster.
-
-#### Using lunasvg
-Requires: [lunasvg](https://github.com/sammycage/lunasvg) v2.3.2 and above
-- Add `#define IMGUI_ENABLE_FREETYPE_LUNASVG` in your `imconfig.h`.
-- Get latest lunasvg binaries or build yourself. Under Windows you may use vcpkg with: `vcpkg install lunasvg --triplet=x64-windows`.
-
-#### Using plutosvg (and plutovg)
-- Add `#define IMGUI_ENABLE_FREETYPE_PLUTOSVG` in your `imconfig.h`.
-- Get latest plutosvg binaries or build yourself. Under Windows you may use vcpkg with: `vcpkg install plutosvg --triplet=x64-windows`. Alternatively, if you build imgui from vcpkg, you just need to enable the plutosvg feature: `vcpkg install imgui[plutosvg] --triplet=x64-windows`
-- If you prefer to build plutosvg manually:
- - Compilation hints for plutovg: Compile all source files in `plutovg/source/*.c` + Add include directory: `plutovg/include` + `plutovg/stb`
- - Compilation hints for plutosvg: Compile `plutosvg/source/plutosvg.c` + Add include directory: `plutosvg/source` + Add define: `PLUTOSVG_HAS_FREETYPE` + Link with: plutovg, freetype
diff --git a/libs/imgui-1.92.1/misc/freetype/imgui_freetype.cpp b/libs/imgui-1.92.1/misc/freetype/imgui_freetype.cpp
deleted file mode 100644
index 7a94683..0000000
--- a/libs/imgui-1.92.1/misc/freetype/imgui_freetype.cpp
+++ /dev/null
@@ -1,751 +0,0 @@
-// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
-// (code)
-
-// Get the latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype
-// Original code by @vuhdo (Aleksei Skriabin) in 2017, with improvements by @mikesart.
-// Maintained since 2019 by @ocornut.
-
-// CHANGELOG
-// (minor and older changes stripped away, please see git history for details)
-// 2025/06/11: refactored for the new ImFontLoader architecture, and ImGuiBackendFlags_RendererHasTextures support.
-// 2024/10/17: added plutosvg support for SVG Fonts (seems faster/better than lunasvg). Enable by using '#define IMGUI_ENABLE_FREETYPE_PLUTOSVG'. (#7927)
-// 2023/11/13: added support for ImFontConfig::RasterizationDensity field for scaling render density without scaling metrics.
-// 2023/08/01: added support for SVG fonts, enable by using '#define IMGUI_ENABLE_FREETYPE_LUNASVG'. (#6591)
-// 2023/01/04: fixed a packing issue which in some occurrences would prevent large amount of glyphs from being packed correctly.
-// 2021/08/23: fixed crash when FT_Render_Glyph() fails to render a glyph and returns nullptr.
-// 2021/03/05: added ImGuiFreeTypeBuilderFlags_Bitmap to load bitmap glyphs.
-// 2021/03/02: set 'atlas->TexPixelsUseColors = true' to help some backends with deciding of a preferred texture format.
-// 2021/01/28: added support for color-layered glyphs via ImGuiFreeTypeBuilderFlags_LoadColor (require Freetype 2.10+).
-// 2021/01/26: simplified integration by using '#define IMGUI_ENABLE_FREETYPE'. renamed ImGuiFreeType::XXX flags to ImGuiFreeTypeBuilderFlags_XXX for consistency with other API. removed ImGuiFreeType::BuildFontAtlas().
-// 2020/06/04: fix for rare case where FT_Get_Char_Index() succeed but FT_Load_Glyph() fails.
-// 2019/02/09: added RasterizerFlags::Monochrome flag to disable font anti-aliasing (combine with ::MonoHinting for best results!)
-// 2019/01/15: added support for imgui allocators + added FreeType only override function SetAllocatorFunctions().
-// 2019/01/10: re-factored to match big update in STB builder. fixed texture height waste. fixed redundant glyphs when merging. support for glyph padding.
-// 2018/06/08: added support for ImFontConfig::GlyphMinAdvanceX, GlyphMaxAdvanceX.
-// 2018/02/04: moved to main imgui repository (away from http://www.github.com/ocornut/imgui_club)
-// 2018/01/22: fix for addition of ImFontAtlas::TexUvscale member.
-// 2017/10/22: minor inconsequential change to match change in master (removed an unnecessary statement).
-// 2017/09/26: fixes for imgui internal changes.
-// 2017/08/26: cleanup, optimizations, support for ImFontConfig::RasterizerFlags, ImFontConfig::RasterizerMultiply.
-// 2017/08/16: imported from https://github.com/Vuhdo/imgui_freetype into http://www.github.com/ocornut/imgui_club, updated for latest changes in ImFontAtlas, minor tweaks.
-
-// About Gamma Correct Blending:
-// - FreeType assumes blending in linear space rather than gamma space.
-// - See https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Glyph
-// - For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
-// - The default dear imgui styles will be impacted by this change (alpha values will need tweaking).
-
-// FIXME: cfg.OversampleH, OversampleV are not supported, but generally not necessary with this rasterizer because Hinting makes everything look better.
-
-#include "imgui.h"
-#ifndef IMGUI_DISABLE
-#include "imgui_freetype.h"
-#include "imgui_internal.h" // ImMin,ImMax,ImFontAtlasBuild*,
-#include <stdint.h>
-#include <ft2build.h>
-#include FT_FREETYPE_H // <freetype/freetype.h>
-#include FT_MODULE_H // <freetype/ftmodapi.h>
-#include FT_GLYPH_H // <freetype/ftglyph.h>
-#include FT_SIZES_H // <freetype/ftsizes.h>
-#include FT_SYNTHESIS_H // <freetype/ftsynth.h>
-
-// Handle LunaSVG and PlutoSVG
-#if defined(IMGUI_ENABLE_FREETYPE_LUNASVG) && defined(IMGUI_ENABLE_FREETYPE_PLUTOSVG)
-#error "Cannot enable both IMGUI_ENABLE_FREETYPE_LUNASVG and IMGUI_ENABLE_FREETYPE_PLUTOSVG"
-#endif
-#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
-#include FT_OTSVG_H // <freetype/otsvg.h>
-#include FT_BBOX_H // <freetype/ftbbox.h>
-#include <lunasvg.h>
-#endif
-#ifdef IMGUI_ENABLE_FREETYPE_PLUTOSVG
-#include <plutosvg.h>
-#endif
-#if defined(IMGUI_ENABLE_FREETYPE_LUNASVG) || defined (IMGUI_ENABLE_FREETYPE_PLUTOSVG)
-#if !((FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR >= 12))
-#error IMGUI_ENABLE_FREETYPE_PLUTOSVG or IMGUI_ENABLE_FREETYPE_LUNASVG requires FreeType version >= 2.12
-#endif
-#endif
-
-#ifdef _MSC_VER
-#pragma warning (push)
-#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
-#pragma warning (disable: 26812) // [Static Analyzer] The enum type 'xxx' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
-#endif
-
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
-#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
-#ifndef __clang__
-#pragma GCC diagnostic ignored "-Wsubobject-linkage" // warning: 'xxxx' has a field 'xxxx' whose type uses the anonymous namespace
-#endif
-#endif
-
-//-------------------------------------------------------------------------
-// Data
-//-------------------------------------------------------------------------
-
-// Default memory allocators
-static void* ImGuiFreeTypeDefaultAllocFunc(size_t size, void* user_data) { IM_UNUSED(user_data); return IM_ALLOC(size); }
-static void ImGuiFreeTypeDefaultFreeFunc(void* ptr, void* user_data) { IM_UNUSED(user_data); IM_FREE(ptr); }
-
-// Current memory allocators
-static void* (*GImGuiFreeTypeAllocFunc)(size_t size, void* user_data) = ImGuiFreeTypeDefaultAllocFunc;
-static void (*GImGuiFreeTypeFreeFunc)(void* ptr, void* user_data) = ImGuiFreeTypeDefaultFreeFunc;
-static void* GImGuiFreeTypeAllocatorUserData = nullptr;
-
-// Lunasvg support
-#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
-static FT_Error ImGuiLunasvgPortInit(FT_Pointer* state);
-static void ImGuiLunasvgPortFree(FT_Pointer* state);
-static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state);
-static FT_Error ImGuiLunasvgPortPresetSlot(FT_GlyphSlot slot, FT_Bool cache, FT_Pointer* _state);
-#endif
-
-//-------------------------------------------------------------------------
-// Code
-//-------------------------------------------------------------------------
-
-#define FT_CEIL(X) (((X + 63) & -64) / 64) // From SDL_ttf: Handy routines for converting from fixed point
-#define FT_SCALEFACTOR 64.0f
-
-// Glyph metrics:
-// --------------
-//
-// xmin xmax
-// | |
-// |<-------- width -------->|
-// | |
-// | +-------------------------+----------------- ymax
-// | | ggggggggg ggggg | ^ ^
-// | | g:::::::::ggg::::g | | |
-// | | g:::::::::::::::::g | | |
-// | | g::::::ggggg::::::gg | | |
-// | | g:::::g g:::::g | | |
-// offsetX -|-------->| g:::::g g:::::g | offsetY |
-// | | g:::::g g:::::g | | |
-// | | g::::::g g:::::g | | |
-// | | g:::::::ggggg:::::g | | |
-// | | g::::::::::::::::g | | height
-// | | gg::::::::::::::g | | |
-// baseline ---*---------|---- gggggggg::::::g-----*-------- |
-// / | | g:::::g | |
-// origin | | gggggg g:::::g | |
-// | | g:::::gg gg:::::g | |
-// | | g::::::ggg:::::::g | |
-// | | gg:::::::::::::g | |
-// | | ggg::::::ggg | |
-// | | gggggg | v
-// | +-------------------------+----------------- ymin
-// | |
-// |------------- advanceX ----------->|
-
-// Stored in ImFontAtlas::FontLoaderData. ALLOCATED BY US.
-struct ImGui_ImplFreeType_Data
-{
- FT_Library Library;
- FT_MemoryRec_ MemoryManager;
- ImGui_ImplFreeType_Data() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-// Stored in ImFontConfig::FontLoaderData. ALLOCATED BY US.
-struct ImGui_ImplFreeType_FontSrcData
-{
- // Initialize from an external data buffer. Doesn't copy data, and you must ensure it stays valid up to this object lifetime.
- bool InitFont(FT_Library ft_library, ImFontConfig* src, ImGuiFreeTypeLoaderFlags extra_user_flags);
- void CloseFont();
- ImGui_ImplFreeType_FontSrcData() { memset((void*)this, 0, sizeof(*this)); }
- ~ImGui_ImplFreeType_FontSrcData() { CloseFont(); }
-
- // Members
- FT_Face FtFace;
- ImGuiFreeTypeLoaderFlags UserFlags; // = ImFontConfig::FontLoaderFlags
- FT_Int32 LoadFlags;
- ImFontBaked* BakedLastActivated;
-};
-
-// Stored in ImFontBaked::FontLoaderDatas: pointer to SourcesCount instances of this. ALLOCATED BY CORE.
-struct ImGui_ImplFreeType_FontSrcBakedData
-{
- FT_Size FtSize; // This represent a FT_Face with a given size.
- ImGui_ImplFreeType_FontSrcBakedData() { memset((void*)this, 0, sizeof(*this)); }
-};
-
-bool ImGui_ImplFreeType_FontSrcData::InitFont(FT_Library ft_library, ImFontConfig* src, ImGuiFreeTypeLoaderFlags extra_font_loader_flags)
-{
- FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)src->FontData, (FT_Long)src->FontDataSize, (FT_Long)src->FontNo, &FtFace);
- if (error != 0)
- return false;
- error = FT_Select_Charmap(FtFace, FT_ENCODING_UNICODE);
- if (error != 0)
- return false;
-
- // Convert to FreeType flags (NB: Bold and Oblique are processed separately)
- UserFlags = (ImGuiFreeTypeLoaderFlags)(src->FontLoaderFlags | extra_font_loader_flags);
-
- LoadFlags = 0;
- if ((UserFlags & ImGuiFreeTypeLoaderFlags_Bitmap) == 0)
- LoadFlags |= FT_LOAD_NO_BITMAP;
-
- if (UserFlags & ImGuiFreeTypeLoaderFlags_NoHinting)
- LoadFlags |= FT_LOAD_NO_HINTING;
- else
- src->PixelSnapH = true; // FIXME: A bit weird to do this this way.
-
- if (UserFlags & ImGuiFreeTypeLoaderFlags_NoAutoHint)
- LoadFlags |= FT_LOAD_NO_AUTOHINT;
- if (UserFlags & ImGuiFreeTypeLoaderFlags_ForceAutoHint)
- LoadFlags |= FT_LOAD_FORCE_AUTOHINT;
- if (UserFlags & ImGuiFreeTypeLoaderFlags_LightHinting)
- LoadFlags |= FT_LOAD_TARGET_LIGHT;
- else if (UserFlags & ImGuiFreeTypeLoaderFlags_MonoHinting)
- LoadFlags |= FT_LOAD_TARGET_MONO;
- else
- LoadFlags |= FT_LOAD_TARGET_NORMAL;
-
- if (UserFlags & ImGuiFreeTypeLoaderFlags_LoadColor)
- LoadFlags |= FT_LOAD_COLOR;
-
- return true;
-}
-
-void ImGui_ImplFreeType_FontSrcData::CloseFont()
-{
- if (FtFace)
- {
- FT_Done_Face(FtFace);
- FtFace = nullptr;
- }
-}
-
-static const FT_Glyph_Metrics* ImGui_ImplFreeType_LoadGlyph(ImGui_ImplFreeType_FontSrcData* src_data, uint32_t codepoint)
-{
- uint32_t glyph_index = FT_Get_Char_Index(src_data->FtFace, codepoint);
- if (glyph_index == 0)
- return nullptr;
-
- // If this crash for you: FreeType 2.11.0 has a crash bug on some bitmap/colored fonts.
- // - https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
- // - https://github.com/ocornut/imgui/issues/4567
- // - https://github.com/ocornut/imgui/issues/4566
- // You can use FreeType 2.10, or the patched version of 2.11.0 in VcPkg, or probably any upcoming FreeType version.
- FT_Error error = FT_Load_Glyph(src_data->FtFace, glyph_index, src_data->LoadFlags);
- if (error)
- return nullptr;
-
- // Need an outline for this to work
- FT_GlyphSlot slot = src_data->FtFace->glyph;
-#if defined(IMGUI_ENABLE_FREETYPE_LUNASVG) || defined(IMGUI_ENABLE_FREETYPE_PLUTOSVG)
- IM_ASSERT(slot->format == FT_GLYPH_FORMAT_OUTLINE || slot->format == FT_GLYPH_FORMAT_BITMAP || slot->format == FT_GLYPH_FORMAT_SVG);
-#else
-#if ((FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR >= 12))
- IM_ASSERT(slot->format != FT_GLYPH_FORMAT_SVG && "The font contains SVG glyphs, you'll need to enable IMGUI_ENABLE_FREETYPE_PLUTOSVG or IMGUI_ENABLE_FREETYPE_LUNASVG in imconfig.h and install required libraries in order to use this font");
-#endif
- IM_ASSERT(slot->format == FT_GLYPH_FORMAT_OUTLINE || slot->format == FT_GLYPH_FORMAT_BITMAP);
-#endif // IMGUI_ENABLE_FREETYPE_LUNASVG
-
- // Apply convenience transform (this is not picking from real "Bold"/"Italic" fonts! Merely applying FreeType helper transform. Oblique == Slanting)
- if (src_data->UserFlags & ImGuiFreeTypeLoaderFlags_Bold)
- FT_GlyphSlot_Embolden(slot);
- if (src_data->UserFlags & ImGuiFreeTypeLoaderFlags_Oblique)
- {
- FT_GlyphSlot_Oblique(slot);
- //FT_BBox bbox;
- //FT_Outline_Get_BBox(&slot->outline, &bbox);
- //slot->metrics.width = bbox.xMax - bbox.xMin;
- //slot->metrics.height = bbox.yMax - bbox.yMin;
- }
-
- return &slot->metrics;
-}
-
-static void ImGui_ImplFreeType_BlitGlyph(const FT_Bitmap* ft_bitmap, uint32_t* dst, uint32_t dst_pitch)
-{
- IM_ASSERT(ft_bitmap != nullptr);
- const uint32_t w = ft_bitmap->width;
- const uint32_t h = ft_bitmap->rows;
- const uint8_t* src = ft_bitmap->buffer;
- const uint32_t src_pitch = ft_bitmap->pitch;
-
- switch (ft_bitmap->pixel_mode)
- {
- case FT_PIXEL_MODE_GRAY: // Grayscale image, 1 byte per pixel.
- {
- for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
- for (uint32_t x = 0; x < w; x++)
- dst[x] = IM_COL32(255, 255, 255, src[x]);
- break;
- }
- case FT_PIXEL_MODE_MONO: // Monochrome image, 1 bit per pixel. The bits in each byte are ordered from MSB to LSB.
- {
- for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
- {
- uint8_t bits = 0;
- const uint8_t* bits_ptr = src;
- for (uint32_t x = 0; x < w; x++, bits <<= 1)
- {
- if ((x & 7) == 0)
- bits = *bits_ptr++;
- dst[x] = IM_COL32(255, 255, 255, (bits & 0x80) ? 255 : 0);
- }
- }
- break;
- }
- case FT_PIXEL_MODE_BGRA:
- {
- // FIXME: Converting pre-multiplied alpha to straight. Doesn't smell good.
- #define DE_MULTIPLY(color, alpha) ImMin((ImU32)(255.0f * (float)color / (float)(alpha + FLT_MIN) + 0.5f), 255u)
- for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
- for (uint32_t x = 0; x < w; x++)
- {
- uint8_t r = src[x * 4 + 2], g = src[x * 4 + 1], b = src[x * 4], a = src[x * 4 + 3];
- dst[x] = IM_COL32(DE_MULTIPLY(r, a), DE_MULTIPLY(g, a), DE_MULTIPLY(b, a), a);
- }
- #undef DE_MULTIPLY
- break;
- }
- default:
- IM_ASSERT(0 && "FreeTypeFont::BlitGlyph(): Unknown bitmap pixel mode!");
- }
-}
-
-// FreeType memory allocation callbacks
-static void* FreeType_Alloc(FT_Memory /*memory*/, long size)
-{
- return GImGuiFreeTypeAllocFunc((size_t)size, GImGuiFreeTypeAllocatorUserData);
-}
-
-static void FreeType_Free(FT_Memory /*memory*/, void* block)
-{
- GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
-}
-
-static void* FreeType_Realloc(FT_Memory /*memory*/, long cur_size, long new_size, void* block)
-{
- // Implement realloc() as we don't ask user to provide it.
- if (block == nullptr)
- return GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
-
- if (new_size == 0)
- {
- GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
- return nullptr;
- }
-
- if (new_size > cur_size)
- {
- void* new_block = GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
- memcpy(new_block, block, (size_t)cur_size);
- GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
- return new_block;
- }
-
- return block;
-}
-
-bool ImGui_ImplFreeType_LoaderInit(ImFontAtlas* atlas)
-{
- IM_ASSERT(atlas->FontLoaderData == nullptr);
- ImGui_ImplFreeType_Data* bd = IM_NEW(ImGui_ImplFreeType_Data)();
-
- // FreeType memory management: https://www.freetype.org/freetype2/docs/design/design-4.html
- bd->MemoryManager.user = nullptr;
- bd->MemoryManager.alloc = &FreeType_Alloc;
- bd->MemoryManager.free = &FreeType_Free;
- bd->MemoryManager.realloc = &FreeType_Realloc;
-
- // https://www.freetype.org/freetype2/docs/reference/ft2-module_management.html#FT_New_Library
- FT_Error error = FT_New_Library(&bd->MemoryManager, &bd->Library);
- if (error != 0)
- {
- IM_DELETE(bd);
- return false;
- }
-
- // If you don't call FT_Add_Default_Modules() the rest of code may work, but FreeType won't use our custom allocator.
- FT_Add_Default_Modules(bd->Library);
-
-#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
- // Install svg hooks for FreeType
- // https://freetype.org/freetype2/docs/reference/ft2-properties.html#svg-hooks
- // https://freetype.org/freetype2/docs/reference/ft2-svg_fonts.html#svg_fonts
- SVG_RendererHooks hooks = { ImGuiLunasvgPortInit, ImGuiLunasvgPortFree, ImGuiLunasvgPortRender, ImGuiLunasvgPortPresetSlot };
- FT_Property_Set(bd->Library, "ot-svg", "svg-hooks", &hooks);
-#endif // IMGUI_ENABLE_FREETYPE_LUNASVG
-#ifdef IMGUI_ENABLE_FREETYPE_PLUTOSVG
- // With plutosvg, use provided hooks
- FT_Property_Set(bd->Library, "ot-svg", "svg-hooks", plutosvg_ft_svg_hooks());
-#endif // IMGUI_ENABLE_FREETYPE_PLUTOSVG
-
- // Store our data
- atlas->FontLoaderData = (void*)bd;
-
- return true;
-}
-
-void ImGui_ImplFreeType_LoaderShutdown(ImFontAtlas* atlas)
-{
- ImGui_ImplFreeType_Data* bd = (ImGui_ImplFreeType_Data*)atlas->FontLoaderData;
- IM_ASSERT(bd != nullptr);
- FT_Done_Library(bd->Library);
- IM_DELETE(bd);
- atlas->FontLoaderData = nullptr;
-}
-
-bool ImGui_ImplFreeType_FontSrcInit(ImFontAtlas* atlas, ImFontConfig* src)
-{
- ImGui_ImplFreeType_Data* bd = (ImGui_ImplFreeType_Data*)atlas->FontLoaderData;
- ImGui_ImplFreeType_FontSrcData* bd_font_data = IM_NEW(ImGui_ImplFreeType_FontSrcData);
- IM_ASSERT(src->FontLoaderData == nullptr);
- src->FontLoaderData = bd_font_data;
-
- if (!bd_font_data->InitFont(bd->Library, src, (ImGuiFreeTypeLoaderFlags)atlas->FontLoaderFlags))
- {
- IM_DELETE(bd_font_data);
- src->FontLoaderData = nullptr;
- return false;
- }
-
- return true;
-}
-
-void ImGui_ImplFreeType_FontSrcDestroy(ImFontAtlas* atlas, ImFontConfig* src)
-{
- IM_UNUSED(atlas);
- ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
- IM_DELETE(bd_font_data);
- src->FontLoaderData = nullptr;
-}
-
-bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
-{
- IM_UNUSED(atlas);
- float size = baked->Size;
- if (src->MergeMode && src->SizePixels != 0.0f)
- size *= (src->SizePixels / baked->ContainerFont->Sources[0]->SizePixels);
-
- ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
- bd_font_data->BakedLastActivated = baked;
-
- // We use one FT_Size per (source + baked) combination.
- ImGui_ImplFreeType_FontSrcBakedData* bd_baked_data = (ImGui_ImplFreeType_FontSrcBakedData*)loader_data_for_baked_src;
- IM_ASSERT(bd_baked_data != nullptr);
- IM_PLACEMENT_NEW(bd_baked_data) ImGui_ImplFreeType_FontSrcBakedData();
-
- FT_New_Size(bd_font_data->FtFace, &bd_baked_data->FtSize);
- FT_Activate_Size(bd_baked_data->FtSize);
-
- // Vuhdo 2017: "I'm not sure how to deal with font sizes properly. As far as I understand, currently ImGui assumes that the 'pixel_height'
- // is a maximum height of an any given glyph, i.e. it's the sum of font's ascender and descender. Seems strange to me.
- // FT_Set_Pixel_Sizes() doesn't seem to get us the same result."
- // (FT_Set_Pixel_Sizes() essentially calls FT_Request_Size() with FT_SIZE_REQUEST_TYPE_NOMINAL)
- const float rasterizer_density = src->RasterizerDensity * baked->RasterizerDensity;
- FT_Size_RequestRec req;
- req.type = (bd_font_data->UserFlags & ImGuiFreeTypeLoaderFlags_Bitmap) ? FT_SIZE_REQUEST_TYPE_NOMINAL : FT_SIZE_REQUEST_TYPE_REAL_DIM;
- req.width = 0;
- req.height = (uint32_t)(size * 64 * rasterizer_density);
- req.horiResolution = 0;
- req.vertResolution = 0;
- FT_Request_Size(bd_font_data->FtFace, &req);
-
- // Output
- if (src->MergeMode == false)
- {
- // Read metrics
- FT_Size_Metrics metrics = bd_baked_data->FtSize->metrics;
- const float scale = 1.0f / rasterizer_density;
- baked->Ascent = (float)FT_CEIL(metrics.ascender) * scale; // The pixel extents above the baseline in pixels (typically positive).
- baked->Descent = (float)FT_CEIL(metrics.descender) * scale; // The extents below the baseline in pixels (typically negative).
- //LineSpacing = (float)FT_CEIL(metrics.height) * scale; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
- //LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender) * scale; // The spacing in pixels between one row's descent and the next row's ascent.
- //MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance) * scale; // This field gives the maximum horizontal cursor advance for all glyphs in the font.
- }
- return true;
-}
-
-void ImGui_ImplFreeType_FontBakedDestroy(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src)
-{
- IM_UNUSED(atlas);
- IM_UNUSED(baked);
- IM_UNUSED(src);
- ImGui_ImplFreeType_FontSrcBakedData* bd_baked_data = (ImGui_ImplFreeType_FontSrcBakedData*)loader_data_for_baked_src;
- IM_ASSERT(bd_baked_data != nullptr);
- FT_Done_Size(bd_baked_data->FtSize);
- bd_baked_data->~ImGui_ImplFreeType_FontSrcBakedData(); // ~IM_PLACEMENT_DELETE()
-}
-
-bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph, float* out_advance_x)
-{
- ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
- uint32_t glyph_index = FT_Get_Char_Index(bd_font_data->FtFace, codepoint);
- if (glyph_index == 0)
- return false;
-
- if (bd_font_data->BakedLastActivated != baked) // <-- could use id
- {
- // Activate current size
- ImGui_ImplFreeType_FontSrcBakedData* bd_baked_data = (ImGui_ImplFreeType_FontSrcBakedData*)loader_data_for_baked_src;
- FT_Activate_Size(bd_baked_data->FtSize);
- bd_font_data->BakedLastActivated = baked;
- }
-
- const FT_Glyph_Metrics* metrics = ImGui_ImplFreeType_LoadGlyph(bd_font_data, codepoint);
- if (metrics == nullptr)
- return false;
-
- FT_Face face = bd_font_data->FtFace;
- FT_GlyphSlot slot = face->glyph;
- const float rasterizer_density = src->RasterizerDensity * baked->RasterizerDensity;
-
- // Load metrics only mode
- const float advance_x = (slot->advance.x / FT_SCALEFACTOR) / rasterizer_density;
- if (out_advance_x != NULL)
- {
- IM_ASSERT(out_glyph == NULL);
- *out_advance_x = advance_x;
- return true;
- }
-
- // Render glyph into a bitmap (currently held by FreeType)
- FT_Render_Mode render_mode = (bd_font_data->UserFlags & ImGuiFreeTypeLoaderFlags_Monochrome) ? FT_RENDER_MODE_MONO : FT_RENDER_MODE_NORMAL;
- FT_Error error = FT_Render_Glyph(slot, render_mode);
- const FT_Bitmap* ft_bitmap = &slot->bitmap;
- if (error != 0 || ft_bitmap == nullptr)
- return false;
-
- const int w = (int)ft_bitmap->width;
- const int h = (int)ft_bitmap->rows;
- const bool is_visible = (w != 0 && h != 0);
-
- // Prepare glyph
- out_glyph->Codepoint = codepoint;
- out_glyph->AdvanceX = advance_x;
-
- // Pack and retrieve position inside texture atlas
- if (is_visible)
- {
- ImFontAtlasRectId pack_id = ImFontAtlasPackAddRect(atlas, w, h);
- if (pack_id == ImFontAtlasRectId_Invalid)
- {
- // Pathological out of memory case (TexMaxWidth/TexMaxHeight set too small?)
- IM_ASSERT(pack_id != ImFontAtlasRectId_Invalid && "Out of texture memory.");
- return false;
- }
- ImTextureRect* r = ImFontAtlasPackGetRect(atlas, pack_id);
-
- // Render pixels to our temporary buffer
- atlas->Builder->TempBuffer.resize(w * h * 4);
- uint32_t* temp_buffer = (uint32_t*)atlas->Builder->TempBuffer.Data;
- ImGui_ImplFreeType_BlitGlyph(ft_bitmap, temp_buffer, w);
-
- const float ref_size = baked->ContainerFont->Sources[0]->SizePixels;
- const float offsets_scale = (ref_size != 0.0f) ? (baked->Size / ref_size) : 1.0f;
- float font_off_x = (src->GlyphOffset.x * offsets_scale);
- float font_off_y = (src->GlyphOffset.y * offsets_scale) + baked->Ascent;
- if (src->PixelSnapH) // Snap scaled offset. This is to mitigate backward compatibility issues for GlyphOffset, but a better design would be welcome.
- font_off_x = IM_ROUND(font_off_x);
- if (src->PixelSnapV)
- font_off_y = IM_ROUND(font_off_y);
- float recip_h = 1.0f / rasterizer_density;
- float recip_v = 1.0f / rasterizer_density;
-
- // Register glyph
- float glyph_off_x = (float)face->glyph->bitmap_left;
- float glyph_off_y = (float)-face->glyph->bitmap_top;
- out_glyph->X0 = glyph_off_x * recip_h + font_off_x;
- out_glyph->Y0 = glyph_off_y * recip_v + font_off_y;
- out_glyph->X1 = (glyph_off_x + w) * recip_h + font_off_x;
- out_glyph->Y1 = (glyph_off_y + h) * recip_v + font_off_y;
- out_glyph->Visible = true;
- out_glyph->Colored = (ft_bitmap->pixel_mode == FT_PIXEL_MODE_BGRA);
- out_glyph->PackId = pack_id;
- ImFontAtlasBakedSetFontGlyphBitmap(atlas, baked, src, out_glyph, r, (const unsigned char*)temp_buffer, ImTextureFormat_RGBA32, w * 4);
- }
-
- return true;
-}
-
-bool ImGui_ImplFreetype_FontSrcContainsGlyph(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint)
-{
- IM_UNUSED(atlas);
- ImGui_ImplFreeType_FontSrcData* bd_font_data = (ImGui_ImplFreeType_FontSrcData*)src->FontLoaderData;
- int glyph_index = FT_Get_Char_Index(bd_font_data->FtFace, codepoint);
- return glyph_index != 0;
-}
-
-const ImFontLoader* ImGuiFreeType::GetFontLoader()
-{
- static ImFontLoader loader;
- loader.Name = "FreeType";
- loader.LoaderInit = ImGui_ImplFreeType_LoaderInit;
- loader.LoaderShutdown = ImGui_ImplFreeType_LoaderShutdown;
- loader.FontSrcInit = ImGui_ImplFreeType_FontSrcInit;
- loader.FontSrcDestroy = ImGui_ImplFreeType_FontSrcDestroy;
- loader.FontSrcContainsGlyph = ImGui_ImplFreetype_FontSrcContainsGlyph;
- loader.FontBakedInit = ImGui_ImplFreeType_FontBakedInit;
- loader.FontBakedDestroy = ImGui_ImplFreeType_FontBakedDestroy;
- loader.FontBakedLoadGlyph = ImGui_ImplFreeType_FontBakedLoadGlyph;
- loader.FontBakedSrcLoaderDataSize = sizeof(ImGui_ImplFreeType_FontSrcBakedData);
- return &loader;
-}
-
-void ImGuiFreeType::SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data)
-{
- GImGuiFreeTypeAllocFunc = alloc_func;
- GImGuiFreeTypeFreeFunc = free_func;
- GImGuiFreeTypeAllocatorUserData = user_data;
-}
-
-bool ImGuiFreeType::DebugEditFontLoaderFlags(unsigned int* p_font_loader_flags)
-{
- bool edited = false;
- edited |= ImGui::CheckboxFlags("NoHinting", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_NoHinting);
- edited |= ImGui::CheckboxFlags("NoAutoHint", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_NoAutoHint);
- edited |= ImGui::CheckboxFlags("ForceAutoHint",p_font_loader_flags, ImGuiFreeTypeLoaderFlags_ForceAutoHint);
- edited |= ImGui::CheckboxFlags("LightHinting", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_LightHinting);
- edited |= ImGui::CheckboxFlags("MonoHinting", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_MonoHinting);
- edited |= ImGui::CheckboxFlags("Bold", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_Bold);
- edited |= ImGui::CheckboxFlags("Oblique", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_Oblique);
- edited |= ImGui::CheckboxFlags("Monochrome", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_Monochrome);
- edited |= ImGui::CheckboxFlags("LoadColor", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_LoadColor);
- edited |= ImGui::CheckboxFlags("Bitmap", p_font_loader_flags, ImGuiFreeTypeLoaderFlags_Bitmap);
- return edited;
-}
-
-#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
-// For more details, see https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/rsvg-port.c
-// The original code from the demo is licensed under CeCILL-C Free Software License Agreement (https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/LICENSE.TXT)
-struct LunasvgPortState
-{
- FT_Error err = FT_Err_Ok;
- lunasvg::Matrix matrix;
- std::unique_ptr<lunasvg::Document> svg = nullptr;
-};
-
-static FT_Error ImGuiLunasvgPortInit(FT_Pointer* _state)
-{
- *_state = IM_NEW(LunasvgPortState)();
- return FT_Err_Ok;
-}
-
-static void ImGuiLunasvgPortFree(FT_Pointer* _state)
-{
- IM_DELETE(*(LunasvgPortState**)_state);
-}
-
-static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state)
-{
- LunasvgPortState* state = *(LunasvgPortState**)_state;
-
- // If there was an error while loading the svg in ImGuiLunasvgPortPresetSlot(), the renderer hook still get called, so just returns the error.
- if (state->err != FT_Err_Ok)
- return state->err;
-
- // rows is height, pitch (or stride) equals to width * sizeof(int32)
- lunasvg::Bitmap bitmap((uint8_t*)slot->bitmap.buffer, slot->bitmap.width, slot->bitmap.rows, slot->bitmap.pitch);
-#if LUNASVG_VERSION_MAJOR >= 3
- state->svg->render(bitmap, state->matrix); // state->matrix is already scaled and translated
-#else
- state->svg->setMatrix(state->svg->matrix().identity()); // Reset the svg matrix to the default value
- state->svg->render(bitmap, state->matrix); // state->matrix is already scaled and translated
-#endif
- state->err = FT_Err_Ok;
- return state->err;
-}
-
-static FT_Error ImGuiLunasvgPortPresetSlot(FT_GlyphSlot slot, FT_Bool cache, FT_Pointer* _state)
-{
- FT_SVG_Document document = (FT_SVG_Document)slot->other;
- LunasvgPortState* state = *(LunasvgPortState**)_state;
- FT_Size_Metrics& metrics = document->metrics;
-
- // This function is called twice, once in the FT_Load_Glyph() and another right before ImGuiLunasvgPortRender().
- // If it's the latter, don't do anything because it's // already done in the former.
- if (cache)
- return state->err;
-
- state->svg = lunasvg::Document::loadFromData((const char*)document->svg_document, document->svg_document_length);
- if (state->svg == nullptr)
- {
- state->err = FT_Err_Invalid_SVG_Document;
- return state->err;
- }
-
-#if LUNASVG_VERSION_MAJOR >= 3
- lunasvg::Box box = state->svg->boundingBox();
-#else
- lunasvg::Box box = state->svg->box();
-#endif
- double scale = std::min(metrics.x_ppem / box.w, metrics.y_ppem / box.h);
- double xx = (double)document->transform.xx / (1 << 16);
- double xy = -(double)document->transform.xy / (1 << 16);
- double yx = -(double)document->transform.yx / (1 << 16);
- double yy = (double)document->transform.yy / (1 << 16);
- double x0 = (double)document->delta.x / 64 * box.w / metrics.x_ppem;
- double y0 = -(double)document->delta.y / 64 * box.h / metrics.y_ppem;
-
-#if LUNASVG_VERSION_MAJOR >= 3
- // Scale, transform and pre-translate the matrix for the rendering step
- state->matrix = lunasvg::Matrix::translated(-box.x, -box.y);
- state->matrix.multiply(lunasvg::Matrix(xx, xy, yx, yy, x0, y0));
- state->matrix.scale(scale, scale);
-
- // Apply updated transformation to the bounding box
- box.transform(state->matrix);
-#else
- // Scale and transform, we don't translate the svg yet
- state->matrix.identity();
- state->matrix.scale(scale, scale);
- state->matrix.transform(xx, xy, yx, yy, x0, y0);
- state->svg->setMatrix(state->matrix);
-
- // Pre-translate the matrix for the rendering step
- state->matrix.translate(-box.x, -box.y);
-
- // Get the box again after the transformation
- box = state->svg->box();
-#endif
-
- // Calculate the bitmap size
- slot->bitmap_left = FT_Int(box.x);
- slot->bitmap_top = FT_Int(-box.y);
- slot->bitmap.rows = (unsigned int)(ImCeil((float)box.h));
- slot->bitmap.width = (unsigned int)(ImCeil((float)box.w));
- slot->bitmap.pitch = slot->bitmap.width * 4;
- slot->bitmap.pixel_mode = FT_PIXEL_MODE_BGRA;
-
- // Compute all the bearings and set them correctly. The outline is scaled already, we just need to use the bounding box.
- double metrics_width = box.w;
- double metrics_height = box.h;
- double horiBearingX = box.x;
- double horiBearingY = -box.y;
- double vertBearingX = slot->metrics.horiBearingX / 64.0 - slot->metrics.horiAdvance / 64.0 / 2.0;
- double vertBearingY = (slot->metrics.vertAdvance / 64.0 - slot->metrics.height / 64.0) / 2.0;
- slot->metrics.width = FT_Pos(IM_ROUND(metrics_width * 64.0)); // Using IM_ROUND() assume width and height are positive
- slot->metrics.height = FT_Pos(IM_ROUND(metrics_height * 64.0));
- slot->metrics.horiBearingX = FT_Pos(horiBearingX * 64);
- slot->metrics.horiBearingY = FT_Pos(horiBearingY * 64);
- slot->metrics.vertBearingX = FT_Pos(vertBearingX * 64);
- slot->metrics.vertBearingY = FT_Pos(vertBearingY * 64);
-
- if (slot->metrics.vertAdvance == 0)
- slot->metrics.vertAdvance = FT_Pos(metrics_height * 1.2 * 64.0);
-
- state->err = FT_Err_Ok;
- return state->err;
-}
-
-#endif // #ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
-
-//-----------------------------------------------------------------------------
-
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
-
-#ifdef _MSC_VER
-#pragma warning (pop)
-#endif
-
-#endif // #ifndef IMGUI_DISABLE
diff --git a/libs/imgui-1.92.1/misc/freetype/imgui_freetype.h b/libs/imgui-1.92.1/misc/freetype/imgui_freetype.h
deleted file mode 100644
index 8531369..0000000
--- a/libs/imgui-1.92.1/misc/freetype/imgui_freetype.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
-// (headers)
-
-#pragma once
-#include "imgui.h" // IMGUI_API
-#ifndef IMGUI_DISABLE
-
-// Usage:
-// - Add '#define IMGUI_ENABLE_FREETYPE' in your imconfig to automatically enable support
-// for imgui_freetype in imgui. It is equivalent to selecting the default loader with:
-// io.Fonts->SetFontLoader(ImGuiFreeType::GetFontLoader())
-
-// Optional support for OpenType SVG fonts:
-// - Add '#define IMGUI_ENABLE_FREETYPE_PLUTOSVG' to use plutosvg (not provided). See #7927.
-// - Add '#define IMGUI_ENABLE_FREETYPE_LUNASVG' to use lunasvg (not provided). See #6591.
-
-// Forward declarations
-struct ImFontAtlas;
-struct ImFontLoader;
-
-// Hinting greatly impacts visuals (and glyph sizes).
-// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter.
-// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h
-// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way.
-// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer.
-// You can set those flags globally in ImFontAtlas::FontLoaderFlags
-// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags
-typedef unsigned int ImGuiFreeTypeLoaderFlags;
-enum ImGuiFreeTypeLoaderFlags_
-{
- ImGuiFreeTypeLoaderFlags_NoHinting = 1 << 0, // Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of the anti-aliased modes.
- ImGuiFreeTypeLoaderFlags_NoAutoHint = 1 << 1, // Disable auto-hinter.
- ImGuiFreeTypeLoaderFlags_ForceAutoHint = 1 << 2, // Indicates that the auto-hinter is preferred over the font's native hinter.
- ImGuiFreeTypeLoaderFlags_LightHinting = 1 << 3, // A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text.
- ImGuiFreeTypeLoaderFlags_MonoHinting = 1 << 4, // Strong hinting algorithm that should only be used for monochrome output.
- ImGuiFreeTypeLoaderFlags_Bold = 1 << 5, // Styling: Should we artificially embolden the font?
- ImGuiFreeTypeLoaderFlags_Oblique = 1 << 6, // Styling: Should we slant the font, emulating italic style?
- ImGuiFreeTypeLoaderFlags_Monochrome = 1 << 7, // Disable anti-aliasing. Combine this with MonoHinting for best results!
- ImGuiFreeTypeLoaderFlags_LoadColor = 1 << 8, // Enable FreeType color-layered glyphs
- ImGuiFreeTypeLoaderFlags_Bitmap = 1 << 9, // Enable FreeType bitmap glyphs
-
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- ImGuiFreeTypeBuilderFlags_NoHinting = ImGuiFreeTypeLoaderFlags_NoHinting,
- ImGuiFreeTypeBuilderFlags_NoAutoHint = ImGuiFreeTypeLoaderFlags_NoAutoHint,
- ImGuiFreeTypeBuilderFlags_ForceAutoHint = ImGuiFreeTypeLoaderFlags_ForceAutoHint,
- ImGuiFreeTypeBuilderFlags_LightHinting = ImGuiFreeTypeLoaderFlags_LightHinting,
- ImGuiFreeTypeBuilderFlags_MonoHinting = ImGuiFreeTypeLoaderFlags_MonoHinting,
- ImGuiFreeTypeBuilderFlags_Bold = ImGuiFreeTypeLoaderFlags_Bold,
- ImGuiFreeTypeBuilderFlags_Oblique = ImGuiFreeTypeLoaderFlags_Oblique,
- ImGuiFreeTypeBuilderFlags_Monochrome = ImGuiFreeTypeLoaderFlags_Monochrome,
- ImGuiFreeTypeBuilderFlags_LoadColor = ImGuiFreeTypeLoaderFlags_LoadColor,
- ImGuiFreeTypeBuilderFlags_Bitmap = ImGuiFreeTypeLoaderFlags_Bitmap,
-#endif
-};
-
-// Obsolete names (will be removed)
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-typedef ImGuiFreeTypeLoaderFlags_ ImGuiFreeTypeBuilderFlags_;
-#endif
-
-namespace ImGuiFreeType
-{
- // This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'.
- // If you need to dynamically select between multiple builders:
- // - you can manually assign this builder with 'atlas->SetFontLoader(ImGuiFreeType::GetFontLoader())'
- // - prefer deep-copying this into your own ImFontLoader instance if you use hot-reloading that messes up static data.
- IMGUI_API const ImFontLoader* GetFontLoader();
-
- // Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE()
- // However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired.
- IMGUI_API void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr);
-
- // Display UI to edit ImFontAtlas::FontLoaderFlags (shared) or ImFontConfig::FontLoaderFlags (single source)
- IMGUI_API bool DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags);
-
- // Obsolete names (will be removed)
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- //IMGUI_API const ImFontBuilderIO* GetBuilderForFreeType(); // Renamed/changed in 1.92. Change 'io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()' to 'io.Fonts->SetFontLoader(ImGuiFreeType::GetFontLoader())' if you need runtime selection.
- //static inline bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int flags = 0) { atlas->FontBuilderIO = GetBuilderForFreeType(); atlas->FontLoaderFlags = flags; return atlas->Build(); } // Prefer using '#define IMGUI_ENABLE_FREETYPE'
-#endif
-}
-
-#endif // #ifndef IMGUI_DISABLE