| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| Makefile | D | 12-May-2024 | 2 KiB | 80 | 42 | |
| README.md | D | 12-May-2024 | 1.4 KiB | 30 | 20 | |
| build_win32.bat | D | 12-May-2024 | 555 | 9 | 8 | |
| example_sdl_opengl2.vcxproj | D | 12-May-2024 | 9.7 KiB | 181 | 181 | |
| example_sdl_opengl2.vcxproj.filters | D | 12-May-2024 | 2 KiB | 62 | 61 | |
| main.cpp | D | 12-May-2024 | 7.6 KiB | 158 | 88 |
README.md
1 2# How to Build 3 4- On Windows with Visual Studio's IDE 5 6Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. 7 8- On Windows with Visual Studio's CLI 9 10``` 11set SDL2_DIR=path_to_your_sdl2_folder 12cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 13# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 14# or for 64-bit: 15cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 16``` 17 18- On Linux and similar Unixes 19 20``` 21c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 22``` 23 24- On Mac OS X 25 26``` 27brew install sdl2 28c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 29``` 30