Skip to content

Commit 119579a

Browse files
committed
Fix README and remove git diff from main.cpp
1 parent a16f05c commit 119579a

2 files changed

Lines changed: 39 additions & 5 deletions

File tree

examples/example_sdl3_opengl3/README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
# Example SDL3 with OpenGL3
1+
# How to Build
2+
3+
## Windows with Visual Studio's IDE
4+
5+
Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
6+
7+
## Windows with Visual Studio's CLI
8+
9+
Use build_win32.bat or directly:
10+
```
11+
set SDL2_DIR=path_to_your_sdl3_folder
12+
cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console
13+
# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
14+
# or for 64-bit:
15+
cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console
16+
```
17+
18+
## Linux and similar Unixes
19+
20+
Use our Makefile or directly:
21+
```
22+
c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
23+
main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
24+
`sdl3-config --libs` -lGL -ldl
25+
```
26+
27+
## macOS
28+
29+
Use our Makefile or directly:
30+
```
31+
brew install sdl3
32+
c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
33+
main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
34+
`sdl3-config --libs` -framework OpenGl -framework CoreFoundation
35+
```
36+
37+
## Emscripten
38+
39+
As of 2023-05-30 Emscripten doesn't support SDL3 yet.
240

341
## Android
442

examples/example_sdl3_opengl3/main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@
1111
#include "imgui_impl_sdl3.h"
1212
#include "imgui_impl_opengl3.h"
1313
#include <stdio.h>
14-
<<<<<<< HEAD
15-
#include <SDL3/SDL.h>
16-
=======
1714

1815
#include <SDL3/SDL.h>
1916
#include <SDL3/SDL_main.h>
2017

21-
>>>>>>> e54b3b42 (Update CMakeLists.txt to download properly)
2218
#if defined(IMGUI_IMPL_OPENGL_ES2)
2319
#include <SDL3/SDL_opengles2.h>
2420
#else

0 commit comments

Comments
 (0)