Skip to content

Commit 1b27ac9

Browse files
committed
Backends+Examples: SDL2: renamed imgui_impl_sdl.cpp/.h to imgui_impl_sdl2.cpp/.h. (#6146)
+ CI: Update Windows CI to update SDL 2.26.3 instead of 2.0.10
1 parent d6ea56d commit 1b27ac9

Some content is hidden

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

41 files changed

+206
-196
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
- name: Install Dependencies
2727
shell: powershell
2828
run: |
29-
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip" -OutFile "SDL2-devel-2.0.10-VC.zip"
30-
Expand-Archive -Path SDL2-devel-2.0.10-VC.zip
31-
echo "SDL2_DIR=$(pwd)\SDL2-devel-2.0.10-VC\SDL2-2.0.10\" >>${env:GITHUB_ENV}
29+
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.26.3-VC.zip" -OutFile "SDL2-devel-2.26.3-VC.zip"
30+
Expand-Archive -Path SDL2-devel-2.26.3-VC.zip
31+
echo "SDL2_DIR=$(pwd)\SDL2-devel-2.26.3-VC\SDL2-2.26.3\" >>${env:GITHUB_ENV}
3232
3333
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
3434
Expand-Archive -Path vulkan-sdk-1.1.121.2.zip
@@ -123,23 +123,23 @@ jobs:
123123
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
124124
if: github.event_name == 'workflow_run'
125125

126-
- name: Build Win32 example_sdl_vulkan
126+
- name: Build Win32 example_sdl2_vulkan
127127
shell: cmd
128-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
128+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
129129
if: github.event_name == 'workflow_run'
130130

131-
- name: Build Win32 example_sdl_opengl2
131+
- name: Build Win32 example_sdl2_opengl2
132132
shell: cmd
133-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
133+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
134134
if: github.event_name == 'workflow_run'
135135

136-
- name: Build Win32 example_sdl_opengl3
136+
- name: Build Win32 example_sdl2_opengl3
137137
shell: cmd
138-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
138+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
139139

140-
- name: Build Win32 example_sdl_directx11
140+
- name: Build Win32 example_sdl2_directx11
141141
shell: cmd
142-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_directx11/example_sdl_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
142+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
143143
if: github.event_name == 'workflow_run'
144144

145145
- name: Build Win32 example_win32_directx9
@@ -168,24 +168,24 @@ jobs:
168168
shell: cmd
169169
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
170170

171-
- name: Build x64 example_sdl_vulkan
171+
- name: Build x64 example_sdl2_vulkan
172172
shell: cmd
173-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
173+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
174174
if: github.event_name == 'workflow_run'
175175

176-
- name: Build x64 example_sdl_opengl2
176+
- name: Build x64 example_sdl2_opengl2
177177
shell: cmd
178-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
178+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
179179
if: github.event_name == 'workflow_run'
180180

181-
- name: Build x64 example_sdl_opengl3
181+
- name: Build x64 example_sdl2_opengl3
182182
shell: cmd
183-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
183+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
184184
if: github.event_name == 'workflow_run'
185185

186-
- name: Build x64 example_sdl_directx11
186+
- name: Build x64 example_sdl2_directx11
187187
shell: cmd
188-
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl_directx11/example_sdl_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
188+
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
189189

190190
- name: Build x64 example_win32_directx9
191191
shell: cmd
@@ -389,12 +389,12 @@ jobs:
389389
run: make -C examples/example_glfw_opengl3
390390
if: github.event_name == 'workflow_run'
391391

392-
- name: Build example_sdl_opengl2
393-
run: make -C examples/example_sdl_opengl2
392+
- name: Build example_sdl2_opengl2
393+
run: make -C examples/example_sdl2_opengl2
394394
if: github.event_name == 'workflow_run'
395395

396-
- name: Build example_sdl_opengl3
397-
run: make -C examples/example_sdl_opengl3
396+
- name: Build example_sdl2_opengl3
397+
run: make -C examples/example_sdl2_opengl3
398398

399399
- name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES
400400
run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp
@@ -443,15 +443,15 @@ jobs:
443443
- name: Build example_glfw_metal
444444
run: make -C examples/example_glfw_metal
445445

446-
- name: Build example_sdl_metal
447-
run: make -C examples/example_sdl_metal
446+
- name: Build example_sdl2_metal
447+
run: make -C examples/example_sdl2_metal
448448

449-
- name: Build example_sdl_opengl2
450-
run: make -C examples/example_sdl_opengl2
449+
- name: Build example_sdl2_opengl2
450+
run: make -C examples/example_sdl2_opengl2
451451
if: github.event_name == 'workflow_run'
452452

453-
- name: Build example_sdl_opengl3
454-
run: make -C examples/example_sdl_opengl3
453+
- name: Build example_sdl2_opengl3
454+
run: make -C examples/example_sdl2_opengl3
455455

456456
- name: Build example_apple_metal
457457
run: xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_macos
@@ -482,12 +482,12 @@ jobs:
482482
emsdk-master/emsdk install latest
483483
emsdk-master/emsdk activate latest
484484
485-
- name: Build example_sdl_opengl3 with Emscripten
485+
- name: Build example_sdl2_opengl3 with Emscripten
486486
run: |
487487
pushd emsdk-master
488488
source ./emsdk_env.sh
489489
popd
490-
make -C examples/example_sdl_opengl3 -f Makefile.emscripten
490+
make -C examples/example_sdl2_opengl3 -f Makefile.emscripten
491491
492492
- name: Build example_emscripten_wgpu
493493
run: |

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ examples/*.o.tmp
4141
examples/*.out.js
4242
examples/*.out.wasm
4343
examples/example_glfw_opengl3/web/*
44-
examples/example_sdl_opengl3/web/*
44+
examples/example_sdl2_opengl3/web/*
4545
examples/example_emscripten_wgpu/web/*
4646

4747
## JetBrains IDE artifacts
@@ -54,7 +54,7 @@ examples/example_glfw_opengl2/example_glfw_opengl2
5454
examples/example_glfw_opengl3/example_glfw_opengl3
5555
examples/example_glut_opengl2/example_glut_opengl2
5656
examples/example_null/example_null
57-
examples/example_sdl_metal/example_sdl_metal
58-
examples/example_sdl_opengl2/example_sdl_opengl2
59-
examples/example_sdl_opengl3/example_sdl_opengl3
60-
examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer
57+
examples/example_sdl2_metal/example_sdl2_metal
58+
examples/example_sdl2_opengl2/example_sdl2_opengl2
59+
examples/example_sdl2_opengl3/example_sdl2_opengl3
60+
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer

backends/imgui_impl_sdl.cpp renamed to backends/imgui_impl_sdl2.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
// CHANGELOG
2020
// (minor and older changes stripped away, please see git history for details)
21+
// 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.
2122
// 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).
2223
// 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)
2324
// 2023-02-02: Removed SDL_MOUSEWHEEL value clamping, as values seem correct in latest Emscripten. (#4019)
@@ -68,7 +69,7 @@
6869
// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
6970

7071
#include "imgui.h"
71-
#include "imgui_impl_sdl.h"
72+
#include "imgui_impl_sdl2.h"
7273

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

File renamed without changes.

docs/BACKENDS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/BACKE
66
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.
77

88
- The 'Platform' backends are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, and windowing.<BR>
9-
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.
9+
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.
1010

1111
- The 'Renderer' backends are in charge of: creating atlas texture, and rendering imgui draw data.<BR>
1212
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.
@@ -62,7 +62,7 @@ List of Platforms Backends:
6262
imgui_impl_android.cpp ; Android native app API
6363
imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
6464
imgui_impl_osx.mm ; macOS native API (not as feature complete as glfw/sdl backends)
65-
imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
65+
imgui_impl_sdl2.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
6666
imgui_impl_win32.cpp ; Win32 native API (Windows)
6767
imgui_impl_glut.cpp ; GLUT/FreeGLUT (this is prehistoric software and absolutely not recommended today!)
6868

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

8484
imgui_impl_allegro5.cpp
8585

86-
Emscripten is also supported.
87-
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.
86+
Emscripten is also supported!
87+
The SDL+GL, GLFW+GL and SDL+WebGPU examples are all ready to build and run with Emscripten.
8888

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

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

103103

docs/CHANGELOG.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ HOW TO UPDATE?
3535
VERSION 1.89.3 (In Progress)
3636
-----------------------------------------------------------------------
3737

38+
Breaking Changes:
39+
40+
- Backends+Examples: SDL2: renamed all unnumbered references to "sdl" to "sdl2".
41+
This is in prevision for the future release of SDL3 (#6146)
42+
- imgui_impl_sdl.cpp -> imgui_impl_sdl2.cpp
43+
- imgui_impl_sdl.h -> imgui_impl_sdl2.h
44+
- example_sdl_xxxx/ -> example_sdl2_xxxx/ (folders and projects)
45+
3846
All changes:
3947

4048
- Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent
@@ -83,12 +91,12 @@ All changes:
8391
hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
8492
- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and
8593
offer consistent horizontal scrolling direction. (#4019)
86-
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
94+
- Backends: SDL2: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
8795
offer consistent horizontal scrolling direction. (#4019)
88-
- Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
89-
- Backends: SDL: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data
96+
- Backends: SDL2: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
97+
- Backends: SDL2: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data
9098
for smooth scrolling as reported by SDL. (#4019, #6096)
91-
- Backends: SDL: Avoid calling SDL_SetCursor() when cursor has not changed, as the function
99+
- Backends: SDL2: Avoid calling SDL_SetCursor() when cursor has not changed, as the function
92100
is surprisingly costly on Mac with latest SDL (may be fixed in next SDL version). (#6113)
93101
- Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate
94102
scrolling impulses on Emscripten. (#4019, #6096) [@ocornut, @wolfpld, @tolopolarity]
@@ -97,13 +105,13 @@ All changes:
97105
the 'window' parameter. (#6142)
98106
- Backends: WebGPU: Fix building for latest WebGPU specs (remove implicit layout generation).
99107
(#6117, #4116, #3632) [@tonygrue, @bfierz]
100-
- Examples: refactored SDL+GL and GLFW+GL examples to compile with Emscripten.
108+
- Examples: refactored SDL2+GL and GLFW+GL examples to compile with Emscripten.
101109
(#2492, #2494, #3699, #3705) [@ocornut, @nicolasnoble]
102110
The dedicated example_emscripten_opengl3/ has been removed.
103111
- Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call
104112
DefWindowProcW() instead of DefWindowProc() so that title text are correctly converted
105113
when application is compiled without /DUNICODE. (#5725, #5961, #5975) [@markreidvfx]
106-
- Examples: SDL+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a
114+
- Examples: SDL2+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a
107115
Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931).
108116

109117

docs/EXAMPLES.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ OSX + OpenGL2 example. <BR>
107107
[example_emscripten_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_emscripten_wgpu/) <BR>
108108
Emcripten + GLFW + WebGPU example. <BR>
109109
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
110-
Note that the 'example_glfw_opengl3' and 'example_sdl_opengl3' examples also supports Emscripten!
110+
Note that the 'example_glfw_opengl3' and 'example_sdl2_opengl3' examples also supports Emscripten!
111111
112112
[example_glfw_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_metal/) <BR>
113113
GLFW (Mac) + Metal example. <BR>
@@ -146,40 +146,40 @@ Null example, compile and link imgui, create context, run headless with no input
146146
This is used to quickly test compilation of core imgui files in as many setups as possible.
147147
Because this application doesn't create a window nor a graphic context, there's no graphics output.
148148
149-
[example_sdl_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_directx11/) <BR>
149+
[example_sdl2_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_directx11/) <BR>
150150
SDL2 + DirectX11 example, Windows only. <BR>
151-
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_dx11.cpp <BR>
152-
This to demonstrate usage of DirectX with SDL.
151+
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_dx11.cpp <BR>
152+
This to demonstrate usage of DirectX with SDL2.
153153
154-
[example_sdl_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_metal/) <BR>
155-
SDL2 (Mac) + Metal example. <BR>
156-
= main.mm + imgui_impl_sdl.cpp + imgui_impl_metal.mm
154+
[example_sdl2_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_metal/) <BR>
155+
SDL2 + Metal example, Mac only. <BR>
156+
= main.mm + imgui_impl_sdl2.cpp + imgui_impl_metal.mm
157157
158-
[example_sdl_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl2/) <BR>
158+
[example_sdl2_opengl2/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl2/) <BR>
159159
SDL2 (Win32, Mac, Linux etc.) + OpenGL example (legacy, fixed pipeline). <BR>
160-
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl2.cpp <BR>
160+
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp <BR>
161161
**DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING GL OR WEBGL (SHADERS, VBO, VAO, etc.)** <BR>
162162
This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
163163
If your code is using GL3+ context or any semi modern GL calls, using this renderer is likely to
164164
make things more complicated, will require your code to reset many GL attributes to their initial
165165
state, and might confuse your GPU driver. One star, not recommended.
166166
167-
[example_sdl_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl3/) <BR>
167+
[example_sdl2_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl3/) <BR>
168168
SDL2 (Win32, Mac, Linux, etc.) + OpenGL3+/ES2/ES3 example. <BR>
169-
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp <BR>
169+
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp <BR>
170170
This uses more modern GL calls and custom shaders. <BR>
171171
This support building with Emscripten and targetting WebGL.<BR>
172172
Prefer using that if you are using modern GL or WebGL in your application.
173173
174-
[example_sdl_sdlrenderer/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_sdlrenderer/) <BR>
174+
[example_sdl2_sdlrenderer/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_sdlrenderer/) <BR>
175175
SDL2 (Win32, Mac, Linux, etc.) + SDL_Renderer (most graphics backends are supported underneath) <BR>
176-
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_sdlrenderer.cpp <BR>
176+
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer.cpp <BR>
177177
This requires SDL 2.0.18+ (released November 2021) <BR>
178178
We do not really recommend using SDL_Renderer as it is a rather primitive API.
179179
180-
[example_sdl_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl_vulkan/) <BR>
180+
[example_sdl2_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_vulkan/) <BR>
181181
SDL2 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
182-
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_vulkan.cpp <BR>
182+
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_vulkan.cpp <BR>
183183
This is quite long and tedious, because: Vulkan. <BR>
184184
For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
185185

examples/example_apple_metal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
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.
66

7-
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.
7+
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.
88

99

1010

0 commit comments

Comments
 (0)