Skip to content

Commit

Permalink
Backends+Examples: SDL2: renamed imgui_impl_sdl.cpp/.h to imgui_impl_…
Browse files Browse the repository at this point in the history
…sdl2.cpp/.h. (#6146)

+ CI: Update Windows CI to update SDL 2.26.3 instead of 2.0.10
  • Loading branch information
ocornut committed Feb 7, 2023
1 parent d6ea56d commit 6e976e5
Show file tree
Hide file tree
Showing 40 changed files with 204 additions and 196 deletions.
62 changes: 31 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
- name: Install Dependencies
shell: powershell
run: |
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip" -OutFile "SDL2-devel-2.0.10-VC.zip"
Expand-Archive -Path SDL2-devel-2.0.10-VC.zip
echo "SDL2_DIR=$(pwd)\SDL2-devel-2.0.10-VC\SDL2-2.0.10\" >>${env:GITHUB_ENV}
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
Expand Down Expand Up @@ -123,23 +123,23 @@ jobs:
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_sdl_vulkan
- name: Build Win32 example_sdl2_vulkan
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
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_sdl_opengl2
- name: Build Win32 example_sdl2_opengl2
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
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_sdl_opengl3
- name: Build Win32 example_sdl2_opengl3
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'

- name: Build Win32 example_sdl_directx11
- name: Build Win32 example_sdl2_directx11
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_directx11/example_sdl_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
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
Expand Down Expand Up @@ -168,24 +168,24 @@ jobs:
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_sdl_vulkan
- name: Build x64 example_sdl2_vulkan
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
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_sdl_opengl2
- name: Build x64 example_sdl2_opengl2
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
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_sdl_opengl3
- name: Build x64 example_sdl2_opengl3
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
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_sdl_directx11
- name: Build x64 example_sdl2_directx11
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_directx11/example_sdl_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
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
Expand Down Expand Up @@ -389,12 +389,12 @@ jobs:
run: make -C examples/example_glfw_opengl3
if: github.event_name == 'workflow_run'

- name: Build example_sdl_opengl2
run: make -C examples/example_sdl_opengl2
- name: Build example_sdl2_opengl2
run: make -C examples/example_sdl2_opengl2
if: github.event_name == 'workflow_run'

- name: Build example_sdl_opengl3
run: make -C examples/example_sdl_opengl3
- 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
Expand Down Expand Up @@ -443,15 +443,15 @@ jobs:
- name: Build example_glfw_metal
run: make -C examples/example_glfw_metal

- name: Build example_sdl_metal
run: make -C examples/example_sdl_metal
- name: Build example_sdl2_metal
run: make -C examples/example_sdl2_metal

- name: Build example_sdl_opengl2
run: make -C examples/example_sdl_opengl2
- name: Build example_sdl2_opengl2
run: make -C examples/example_sdl2_opengl2
if: github.event_name == 'workflow_run'

- name: Build example_sdl_opengl3
run: make -C examples/example_sdl_opengl3
- 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
Expand Down Expand Up @@ -482,12 +482,12 @@ jobs:
emsdk-master/emsdk install latest
emsdk-master/emsdk activate latest
- name: Build example_sdl_opengl3 with Emscripten
- name: Build example_sdl2_opengl3 with Emscripten
run: |
pushd emsdk-master
source ./emsdk_env.sh
popd
make -C examples/example_sdl_opengl3 -f Makefile.emscripten
make -C examples/example_sdl2_opengl3 -f Makefile.emscripten
- name: Build example_emscripten_wgpu
run: |
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ examples/*.o.tmp
examples/*.out.js
examples/*.out.wasm
examples/example_glfw_opengl3/web/*
examples/example_sdl_opengl3/web/*
examples/example_sdl2_opengl3/web/*
examples/example_emscripten_wgpu/web/*

## JetBrains IDE artifacts
Expand All @@ -54,7 +54,7 @@ examples/example_glfw_opengl2/example_glfw_opengl2
examples/example_glfw_opengl3/example_glfw_opengl3
examples/example_glut_opengl2/example_glut_opengl2
examples/example_null/example_null
examples/example_sdl_metal/example_sdl_metal
examples/example_sdl_opengl2/example_sdl_opengl2
examples/example_sdl_opengl3/example_sdl_opengl3
examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer
examples/example_sdl2_metal/example_sdl2_metal
examples/example_sdl2_opengl2/example_sdl2_opengl2
examples/example_sdl2_opengl3/example_sdl2_opengl3
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer
5 changes: 3 additions & 2 deletions backends/imgui_impl_sdl.cpp → backends/imgui_impl_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 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)
Expand Down Expand Up @@ -68,7 +69,7 @@
// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.

#include "imgui.h"
#include "imgui_impl_sdl.h"
#include "imgui_impl_sdl2.h"

// SDL
#include <SDL.h>
Expand Down Expand Up @@ -349,7 +350,7 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer)
// Setup backend capabilities flags
ImGui_ImplSDL2_Data* bd = IM_NEW(ImGui_ImplSDL2_Data)();
io.BackendPlatformUserData = (void*)bd;
io.BackendPlatformName = "imgui_impl_sdl";
io.BackendPlatformName = "imgui_impl_sdl2";
io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions docs/BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/BACKE
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)), GLFW ([imgui_impl_glfw.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_glfw.cpp)), SDL2 ([imgui_impl_sdl.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_sdl.cpp)), etc.
e.g. Windows ([imgui_impl_win32.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_win32.cpp)), GLFW ([imgui_impl_glfw.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_glfw.cpp)), SDL2 ([imgui_impl_sdl2.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_sdl2.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.
Expand Down Expand Up @@ -62,7 +62,7 @@ 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_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
imgui_impl_sdl2.cpp ; SDL2 (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!)

Expand All @@ -83,8 +83,8 @@ List of high-level Frameworks Backends (combining Platform + Renderer):

imgui_impl_allegro5.cpp

Emscripten is also supported.
The [example_emscripten_opengl3](https://github.com/ocornut/imgui/tree/master/examples/example_emscripten_opengl3) app uses imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp, but other combos are possible.
Emscripten is also supported!
The SDL+GL, GLFW+GL and SDL+WebGPU examples are all ready to build and run with Emscripten.

### Backends for third-party frameworks, graphics API or other languages

Expand All @@ -97,7 +97,7 @@ If you are not sure which backend to use, the recommended platform/frameworks fo
|Library |Website |Backend |Note |
|--------|--------|--------|-----|
| GLFW | https://github.com/glfw/glfw | imgui_impl_glfw.cpp | |
| SDL2 | https://www.libsdl.org | imgui_impl_sdl.cpp | |
| SDL2 | https://www.libsdl.org | imgui_impl_sdl2.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 |


Expand Down
19 changes: 13 additions & 6 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ HOW TO UPDATE?
VERSION 1.89.3 (In Progress)
-----------------------------------------------------------------------

Breaking Changes:

- Backends: SDL2: renamed imgui_impl_sdl.cpp/.h to imgui_impl_sdl2.cpp/.h. (#6146)
This is in prevision for the future release of SDL3 which will require a dedicated backend.
- Examples: SDL2: renamed all example_sdl_XXXX/ folders and projects to example_sdl2_xxxx/.


All changes:

- Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent
Expand Down Expand Up @@ -83,12 +90,12 @@ All changes:
hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
- Backends: SDL2: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
- Backends: SDL: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data
- 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: SDL: Avoid calling SDL_SetCursor() when cursor has not changed, as the function
- Backends: SDL2: 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). (#6113)
- Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate
scrolling impulses on Emscripten. (#4019, #6096) [@ocornut, @wolfpld, @tolopolarity]
Expand All @@ -97,13 +104,13 @@ All changes:
the 'window' parameter. (#6142)
- Backends: WebGPU: Fix building for latest WebGPU specs (remove implicit layout generation).
(#6117, #4116, #3632) [@tonygrue, @bfierz]
- Examples: refactored SDL+GL and GLFW+GL examples to compile with Emscripten.
- 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: 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: SDL+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a
- Examples: SDL2+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a
Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931).


Expand Down
30 changes: 15 additions & 15 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ OSX + OpenGL2 example. <BR>
[example_emscripten_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_emscripten_wgpu/) <BR>
Emcripten + GLFW + WebGPU example. <BR>
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
Note that the 'example_glfw_opengl3' and 'example_sdl_opengl3' examples also supports Emscripten!
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>
Expand Down Expand Up @@ -146,40 +146,40 @@ Null example, compile and link imgui, create context, run headless with no input
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_sdl_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_directx11/) <BR>
[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_sdl.cpp + imgui_impl_dx11.cpp <BR>
This to demonstrate usage of DirectX with SDL.
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_dx11.cpp <BR>
This to demonstrate usage of DirectX with SDL2.
[example_sdl_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_metal/) <BR>
SDL2 (Mac) + Metal example. <BR>
= main.mm + imgui_impl_sdl.cpp + imgui_impl_metal.mm
[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_sdl_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl2/) <BR>
[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_sdl.cpp + imgui_impl_opengl2.cpp <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_sdl_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl3/) <BR>
[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_sdl.cpp + imgui_impl_opengl3.cpp <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 targetting WebGL.<BR>
Prefer using that if you are using modern GL or WebGL in your application.
[example_sdl_sdlrenderer/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_sdlrenderer/) <BR>
[example_sdl2_sdlrenderer/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_sdlrenderer/) <BR>
SDL2 (Win32, Mac, Linux, etc.) + SDL_Renderer (most graphics backends are supported underneath) <BR>
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_sdlrenderer.cpp <BR>
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer.cpp <BR>
This requires SDL 2.0.18+ (released November 2021) <BR>
We do not really recommend using SDL_Renderer as it is a rather primitive API.
[example_sdl_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_vulkan/) <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_sdl.cpp + imgui_impl_vulkan.cpp <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.
Expand Down
2 changes: 1 addition & 1 deletion examples/example_apple_metal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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_sdl_metal/ examples. They are better supported and will be portable unlike this one.
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.



Loading

0 comments on commit 6e976e5

Please sign in to comment.