├── .gitattributes ├── .gitignore ├── assets ├── icebrolite.png └── icons.png ├── img ├── BreakpointView.png ├── CodeView.png ├── GraphicsView.png ├── IceBroLite.png ├── IceBroLite_Drag_Pane.png ├── IceBroLite_Load_Icon.png ├── IceBroLite_ResetLayout.png ├── IceBroLite_WitchRescueService.png ├── IceBroLite_initial.png ├── LocateVICEExeDialog.png ├── MemoryView.png ├── Registers.png ├── ScreenView_Vice3.6.1.png ├── SectionView.png ├── SectionsView_Vice3.6.1.png ├── SymbolView.png ├── Toolbar.png ├── ToolbarDisconnected.png ├── TraceView.png ├── TrackPC.png ├── VICESettingsMenu.png ├── VICESettings_Host_Monitor.png ├── VICE_Connect_Icon.png ├── VICE_Disconnect_Icon.png ├── ViceMonitor.png ├── WatchView.png ├── WatchView_Vice3.6.1.png └── window.png ├── linux.MD ├── mac.MD ├── manual.MD ├── readme.MD ├── src ├── 6510.cpp ├── 6510.h ├── Breakpoints.cpp ├── Breakpoints.h ├── C64Colors.cpp ├── C64Colors.h ├── CodeColoring.cpp ├── CodeColoring.h ├── Commands.cpp ├── Commands.h ├── Config.cpp ├── Config.h ├── Expressions.cpp ├── Expressions.h ├── FileDialog.cpp ├── FileDialog.h ├── Files.cpp ├── Files.h ├── HashTable.h ├── IceBroLite.cpp ├── IceBroLite.ico ├── IceBroLite.rc ├── IceBroLite.sln ├── IceBroLite.vcxproj ├── IceBroLite.vcxproj.filters ├── Icons.cpp ├── ImGui_Helper.cpp ├── ImGui_Helper.h ├── Image.cpp ├── Image.h ├── Makefile ├── Mnemonics.cpp ├── Mnemonics.h ├── Platform.cpp ├── SaveState.cpp ├── SaveState.h ├── SourceDebug.cpp ├── SourceDebug.h ├── StartVice.cpp ├── StartVice.h ├── Sym.cpp ├── Sym.h ├── Traces.cpp ├── Traces.h ├── ViceBinInterface.h ├── ViceInterface.cpp ├── ViceInterface.h ├── ViceMonitorInterface.cpp ├── WindowIcon.inc ├── assets │ └── icons.png ├── data │ ├── C64_Pro_Mono-STYLE.ttf │ ├── C64_Pro_Mono-STYLE.ttf.cpp │ ├── C64_Pro_Mono-STYLE.ttf.h │ └── license.txt ├── framework.h ├── imgui │ ├── .editorconfig │ ├── .gitattributes │ ├── .github │ │ ├── FUNDING.yml │ │ ├── ISSUE_TEMPLATE │ │ │ ├── config.yml │ │ │ └── issue_template.yml │ │ ├── pull_request_template.md │ │ └── workflows │ │ │ ├── build.yml │ │ │ ├── manual.yml │ │ │ ├── scheduled.yml │ │ │ └── static-analysis.yml │ ├── .gitignore │ ├── LICENSE.txt │ ├── backends │ │ ├── imgui_impl_allegro5.cpp │ │ ├── imgui_impl_allegro5.h │ │ ├── imgui_impl_android.cpp │ │ ├── imgui_impl_android.h │ │ ├── imgui_impl_dx10.cpp │ │ ├── imgui_impl_dx10.h │ │ ├── imgui_impl_dx11.cpp │ │ ├── imgui_impl_dx11.h │ │ ├── imgui_impl_dx12.cpp │ │ ├── imgui_impl_dx12.h │ │ ├── imgui_impl_dx9.cpp │ │ ├── imgui_impl_dx9.h │ │ ├── imgui_impl_glfw.cpp │ │ ├── imgui_impl_glfw.h │ │ ├── imgui_impl_glut.cpp │ │ ├── imgui_impl_glut.h │ │ ├── imgui_impl_metal.h │ │ ├── imgui_impl_metal.mm │ │ ├── imgui_impl_opengl2.cpp │ │ ├── imgui_impl_opengl2.h │ │ ├── imgui_impl_opengl3.cpp │ │ ├── imgui_impl_opengl3.h │ │ ├── imgui_impl_opengl3_loader.h │ │ ├── imgui_impl_osx.h │ │ ├── imgui_impl_osx.mm │ │ ├── imgui_impl_sdl2.cpp │ │ ├── imgui_impl_sdl2.h │ │ ├── imgui_impl_sdl3.cpp │ │ ├── imgui_impl_sdl3.h │ │ ├── imgui_impl_sdlrenderer2.cpp │ │ ├── imgui_impl_sdlrenderer2.h │ │ ├── imgui_impl_sdlrenderer3.cpp │ │ ├── imgui_impl_sdlrenderer3.h │ │ ├── imgui_impl_vulkan.cpp │ │ ├── imgui_impl_vulkan.h │ │ ├── imgui_impl_wgpu.cpp │ │ ├── imgui_impl_wgpu.h │ │ ├── imgui_impl_win32.cpp │ │ ├── imgui_impl_win32.h │ │ └── vulkan │ │ │ ├── generate_spv.sh │ │ │ ├── glsl_shader.frag │ │ │ └── glsl_shader.vert │ ├── docs │ │ ├── BACKENDS.md │ │ ├── CHANGELOG.txt │ │ ├── CONTRIBUTING.md │ │ ├── EXAMPLES.md │ │ ├── FAQ.md │ │ ├── FONTS.md │ │ ├── README.md │ │ └── TODO.txt │ ├── examples │ │ ├── README.txt │ │ ├── example_allegro5 │ │ │ ├── README.md │ │ │ ├── example_allegro5.vcxproj │ │ │ ├── example_allegro5.vcxproj.filters │ │ │ ├── imconfig_allegro5.h │ │ │ └── main.cpp │ │ ├── example_android_opengl3 │ │ │ ├── CMakeLists.txt │ │ │ ├── android │ │ │ │ ├── .gitignore │ │ │ │ ├── app │ │ │ │ │ ├── build.gradle │ │ │ │ │ └── src │ │ │ │ │ │ └── main │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ └── java │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ ├── build.gradle │ │ │ │ └── settings.gradle │ │ │ └── main.cpp │ │ ├── example_apple_metal │ │ │ ├── README.md │ │ │ ├── example_apple_metal.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ ├── iOS │ │ │ │ ├── Info-iOS.plist │ │ │ │ └── LaunchScreen.storyboard │ │ │ ├── macOS │ │ │ │ ├── Info-macOS.plist │ │ │ │ └── MainMenu.storyboard │ │ │ └── main.mm │ │ ├── example_apple_opengl2 │ │ │ ├── example_apple_opengl2.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ └── main.mm │ │ ├── example_glfw_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_glfw_opengl2 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl2.vcxproj │ │ │ ├── example_glfw_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_opengl3 │ │ │ ├── Makefile │ │ │ ├── Makefile.emscripten │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl3.vcxproj │ │ │ ├── example_glfw_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_vulkan │ │ │ ├── CMakeLists.txt │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_glfw_vulkan.vcxproj │ │ │ ├── example_glfw_vulkan.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_wgpu │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile.emscripten │ │ │ ├── README.md │ │ │ └── main.cpp │ │ ├── example_glut_opengl2 │ │ │ ├── Makefile │ │ │ ├── example_glut_opengl2.vcxproj │ │ │ ├── example_glut_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_null │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ └── main.cpp │ │ ├── example_sdl2_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl2_directx11.vcxproj │ │ │ ├── example_sdl2_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl2_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_sdl2_opengl2 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl2_opengl2.vcxproj │ │ │ ├── example_sdl2_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl2_opengl3 │ │ │ ├── Makefile │ │ │ ├── Makefile.emscripten │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl2_opengl3.vcxproj │ │ │ ├── example_sdl2_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl2_sdlrenderer2 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl2_sdlrenderer2.vcxproj │ │ │ ├── example_sdl2_sdlrenderer2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl2_vulkan │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_sdl2_vulkan.vcxproj │ │ │ ├── example_sdl2_vulkan.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl3_opengl3 │ │ │ ├── Makefile │ │ │ ├── Makefile.emscripten │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_sdl3_opengl3.vcxproj │ │ │ ├── example_sdl3_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl3_sdlrenderer3 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl3_sdlrenderer3.vcxproj │ │ │ ├── example_sdl3_sdlrenderer3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl3_vulkan │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_sdl3_vulkan.vcxproj │ │ │ ├── example_sdl3_vulkan.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx10 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx10.vcxproj │ │ │ ├── example_win32_directx10.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx11.vcxproj │ │ │ ├── example_win32_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx12 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx12.vcxproj │ │ │ ├── example_win32_directx12.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx9 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx9.vcxproj │ │ │ ├── example_win32_directx9.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_opengl3 │ │ │ ├── build_mingw.bat │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_opengl3.vcxproj │ │ │ ├── example_win32_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── imgui_examples.sln │ │ └── libs │ │ │ ├── emscripten │ │ │ ├── emscripten_mainloop_stub.h │ │ │ └── shell_minimal.html │ │ │ ├── glfw │ │ │ ├── COPYING.txt │ │ │ ├── include │ │ │ │ └── GLFW │ │ │ │ │ ├── glfw3.h │ │ │ │ │ └── glfw3native.h │ │ │ ├── lib-vc2010-32 │ │ │ │ └── glfw3.lib │ │ │ └── lib-vc2010-64 │ │ │ │ └── glfw3.lib │ │ │ └── usynergy │ │ │ ├── README.txt │ │ │ ├── uSynergy.c │ │ │ └── uSynergy.h │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_tables.cpp │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ ├── imstb_truetype.h │ └── misc │ │ ├── README.txt │ │ ├── cpp │ │ ├── README.txt │ │ ├── imgui_stdlib.cpp │ │ └── imgui_stdlib.h │ │ ├── debuggers │ │ ├── README.txt │ │ ├── imgui.gdb │ │ ├── imgui.natstepfilter │ │ └── imgui.natvis │ │ ├── fonts │ │ ├── Cousine-Regular.ttf │ │ ├── DroidSans.ttf │ │ ├── Karla-Regular.ttf │ │ ├── ProggyClean.ttf │ │ ├── ProggyTiny.ttf │ │ ├── Roboto-Medium.ttf │ │ └── binary_to_compressed_c.cpp │ │ ├── freetype │ │ ├── README.md │ │ ├── imgui_freetype.cpp │ │ └── imgui_freetype.h │ │ └── single_file │ │ └── imgui_single_file.h ├── platform.h ├── resource.h ├── resource1.h ├── stb │ └── stb_image.h ├── struse.cpp ├── struse │ ├── LICENSE │ ├── README.md │ ├── struse.h │ ├── struse.natvis │ ├── xml.cpp │ └── xml.h └── views │ ├── BreakpointView.cpp │ ├── BreakpointView.h │ ├── CodeView.cpp │ ├── CodeView.h │ ├── ConsoleView.cpp │ ├── ConsoleView.h │ ├── FilesView.cpp │ ├── FilesView.h │ ├── GfxView.cpp │ ├── GfxView.h │ ├── MemView.cpp │ ├── MemView.h │ ├── PreView.cpp │ ├── PreView.h │ ├── RegView.cpp │ ├── RegView.h │ ├── ScreenView.cpp │ ├── ScreenView.h │ ├── SectionView.cpp │ ├── SectionView.h │ ├── SymbolView.cpp │ ├── SymbolView.h │ ├── ToolBar.cpp │ ├── ToolBar.h │ ├── TraceView.cpp │ ├── TraceView.h │ ├── Views.cpp │ ├── Views.h │ ├── WatchView.cpp │ └── WatchView.h └── themes ├── bright.theme.txt ├── green.theme.txt └── purple.theme.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/icebrolite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/assets/icebrolite.png -------------------------------------------------------------------------------- /assets/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/assets/icons.png -------------------------------------------------------------------------------- /img/BreakpointView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/BreakpointView.png -------------------------------------------------------------------------------- /img/CodeView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/CodeView.png -------------------------------------------------------------------------------- /img/GraphicsView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/GraphicsView.png -------------------------------------------------------------------------------- /img/IceBroLite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite.png -------------------------------------------------------------------------------- /img/IceBroLite_Drag_Pane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite_Drag_Pane.png -------------------------------------------------------------------------------- /img/IceBroLite_Load_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite_Load_Icon.png -------------------------------------------------------------------------------- /img/IceBroLite_ResetLayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite_ResetLayout.png -------------------------------------------------------------------------------- /img/IceBroLite_WitchRescueService.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite_WitchRescueService.png -------------------------------------------------------------------------------- /img/IceBroLite_initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/IceBroLite_initial.png -------------------------------------------------------------------------------- /img/LocateVICEExeDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/LocateVICEExeDialog.png -------------------------------------------------------------------------------- /img/MemoryView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/MemoryView.png -------------------------------------------------------------------------------- /img/Registers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/Registers.png -------------------------------------------------------------------------------- /img/ScreenView_Vice3.6.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/ScreenView_Vice3.6.1.png -------------------------------------------------------------------------------- /img/SectionView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/SectionView.png -------------------------------------------------------------------------------- /img/SectionsView_Vice3.6.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/SectionsView_Vice3.6.1.png -------------------------------------------------------------------------------- /img/SymbolView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/SymbolView.png -------------------------------------------------------------------------------- /img/Toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/Toolbar.png -------------------------------------------------------------------------------- /img/ToolbarDisconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/ToolbarDisconnected.png -------------------------------------------------------------------------------- /img/TraceView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/TraceView.png -------------------------------------------------------------------------------- /img/TrackPC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/TrackPC.png -------------------------------------------------------------------------------- /img/VICESettingsMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/VICESettingsMenu.png -------------------------------------------------------------------------------- /img/VICESettings_Host_Monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/VICESettings_Host_Monitor.png -------------------------------------------------------------------------------- /img/VICE_Connect_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/VICE_Connect_Icon.png -------------------------------------------------------------------------------- /img/VICE_Disconnect_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/VICE_Disconnect_Icon.png -------------------------------------------------------------------------------- /img/ViceMonitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/ViceMonitor.png -------------------------------------------------------------------------------- /img/WatchView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/WatchView.png -------------------------------------------------------------------------------- /img/WatchView_Vice3.6.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/WatchView_Vice3.6.1.png -------------------------------------------------------------------------------- /img/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/img/window.png -------------------------------------------------------------------------------- /linux.MD: -------------------------------------------------------------------------------- 1 | # Linux build instructions for IceBro Lite 2 | 3 | It is trivial to build IceBro Lite for Linux. In order to avoid missing steps I have followed these steps on a fresh Raspberry PI install of Debian. 4 | 5 | --- 6 | ### Get the files 7 | 8 | * Open a terminal 9 | * Go to a, or create a new, development folder such as ~/dev 10 | * clone the repo 11 | 12 | ``` 13 | git clone https://github.com/Sakrac/IceBroLite.git 14 | ``` 15 | 16 | --- 17 | 18 | ### Install dependencies 19 | 20 | ``` 21 | sudo apt-get install libglfw3-dev 22 | sudo apt-get install pkg-config 23 | sudo apt-get install clang 24 | ``` 25 | 26 | ### Build the project 27 | 28 | ``` 29 | cd IceBroLite/src 30 | make 31 | ``` 32 | 33 | If successful IceBroLite is now in the project folder! 34 | 35 | --- 36 | 37 | ### Updating 38 | 39 | To update with the latest at a future time simply go to the project folder and update 40 | 41 | ``` 42 | git pull 43 | make 44 | ``` -------------------------------------------------------------------------------- /mac.MD: -------------------------------------------------------------------------------- 1 | # Build instructions for Mac OSX 2 | 3 | This document is in a research stage. I don't have a working mac so I will have to borrow one at some points to work through the information 4 | 5 | ## Make File 6 | 7 | The makefile included for building Linux versions have been tested 8 | on macs with the same steps as [building the linux version](linux.MD), 9 | but trying to find more straightforward methods 10 | 11 | ## XCode External Build Project 12 | XCode can build makefile projects: 13 | https://developers.google.com/j2objc/guides/external-build-projects, https://acecilia.medium.com/setup-a-c-c-makefile-project-in-xcode-syntax-highlight-autocompletion-jump-to-definition-and-80405bd4542e 14 | 15 | ## Prerequisites 16 | 17 | Install command-line tools: 18 | 19 | ``` 20 | xcode-select --install 21 | ``` 22 | 23 | Install glfw: 24 | 25 | ``` 26 | brew install glfw 27 | ``` 28 | 29 | ## Build 30 | 31 | ``` 32 | cd src 33 | make 34 | ``` 35 | -------------------------------------------------------------------------------- /readme.MD: -------------------------------------------------------------------------------- 1 | # IceBro Lite 2 | 3 | New [manual](https://sakrac.github.io/IceBroLite/) using GitHub Pages! ([previous](manual.md)) 4 | 5 | 6 | Also here are the [linux build instructions](linux.MD). 7 | It should also build fine on Mac using the makefile but I don't have anything to test it with at home. 8 | 9 | Most information below might be outdated, I haven't updated this as I've updated the code. 10 | 11 | ![IceBroLite](img/window.png) 12 | Checking Witch Rescue Service out in IceBro Lite 13 | 14 | # Releases 15 | 16 | Releases have moved to github [releases](https://github.com/Sakrac/IceBroLite/releases/) 17 | 18 | ### Differences from IceBro 19 | 20 | IceBro Lite doesn't contain its own 6502 emulator for debugging "post mortem" which makes it a lot simpler to understand. When it is ready it should function similar to the command line monitor of vice only with a graphical user interface and more visualizations of the current state. 21 | 22 | ### Status 23 | 24 | Finally decided on a release, 1.0. However, did not check with latest VICE (3.6.1) so I will need to update. 25 | 26 | ### Updates 27 | 28 | Release 1.0 fixes lots of minor annoyances from the previous release candidate. 29 | 30 | Upcoming fixes post 1.0 include VICE 3.6.1 support (VICE 3.5 likely not fully compatilble anymore) 31 | 32 | Debugger views improvements: 33 | 34 | ![Watch View](img/WatchView_Vice3.6.1.png) 35 | 36 | Watch View now has keyboard controls while the view is active. A light green rectangle indicates 37 | the current watch, press Enter to modify the expression, Delete to delete it or Insert to insert 38 | a new watch. Press up/down to move between watch slots. 39 | 40 | ![Section View](img/SectionsView_Vice3.6.1.png) 41 | 42 | Added Show All/Hide All buttons to quickly choose the right set of active symbols and source debug sets. 43 | Also saves the selection in icebrolt.ini so it will be active on debugger restart. The hidden sections 44 | are no longer erased whenever the program in reloaded! 45 | 46 | ![Screen View](img/ScreenView_Vice3.6.1.png) 47 | 48 | Added cropping options for showing border, full raster time or just the screen. There is also a raster time 49 | option to illustrate the current cpu clock raster position. 50 | 51 | -------------------------------------------------------------------------------- /src/6510.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "struse/struse.h" 3 | #include "6510.h" 4 | #include "Files.h" 5 | #include 6 | 7 | // for now support 1 CPU 8 | 9 | static CPU6510* sp6510 = nullptr; 10 | 11 | 12 | CPU6510::CPU6510() : space(VICEMemSpaces::MainMemory), memoryChanged(false) 13 | { 14 | IBMutexInit(&memoryUpdateMutex, "CPU memory sync"); 15 | ram = (uint8_t*)calloc(1, 64 * 1024); 16 | } 17 | 18 | void CPU6510::MemoryFromVICE(uint16_t start, uint16_t end, uint8_t *bytes) 19 | { 20 | if (end < start) { return; } 21 | IBMutexLock(&memoryUpdateMutex); 22 | memcpy(ram + start, bytes, (size_t)end - (size_t)start + 1); 23 | memoryChanged = true; 24 | IBMutexRelease(&memoryUpdateMutex); 25 | } 26 | 27 | uint8_t CPU6510::GetByte(uint16_t addr) 28 | { 29 | return ram[addr]; 30 | } 31 | 32 | const uint8_t* CPU6510::GetMem(uint16_t addr) 33 | { 34 | return ram + addr; 35 | } 36 | 37 | void CPU6510::SetByte(uint16_t addr, uint8_t byte) 38 | { 39 | ram[addr] = byte; 40 | memoryChanged = true; 41 | ViceSetMemory(addr, 1, ram + addr, space); 42 | } 43 | 44 | void CPU6510::CopyToRAM(uint16_t address, uint8_t* data, size_t size) 45 | { 46 | uint32_t bytes = 0x10000 - address; 47 | if (size_t(bytes) > size) { bytes = (uint32_t)size; } 48 | memcpy(ram + address, data, bytes); 49 | memoryChanged = true; 50 | ViceSetMemory(address, bytes, ram + address, space); 51 | } 52 | 53 | void CPU6510::ReadPRGToRAM(const char *filename) 54 | { 55 | if (filename) { 56 | size_t size; 57 | if (uint8_t* file = LoadBinary(filename, size)) { 58 | if (size > 2) { 59 | uint16_t addr = file[0] + (((uint16_t)file[1]) << 8); 60 | CopyToRAM(addr, file + 2, size - 2); 61 | free(file); 62 | } 63 | } 64 | } 65 | } 66 | void CPU6510::SetPC(uint16_t pc) 67 | { 68 | regs.PC = pc; 69 | ViceSetRegisters(*this, RM_PC); 70 | } 71 | 72 | void CreateMainCPU() 73 | { 74 | if (sp6510 == nullptr) { 75 | sp6510 = new CPU6510; 76 | } 77 | } 78 | 79 | void ShutdownMainCPU() 80 | { 81 | if (sp6510 != nullptr) { 82 | delete sp6510; 83 | sp6510 = nullptr; 84 | } 85 | } 86 | 87 | CPU6510* GetMainCPU() 88 | { 89 | return sp6510; 90 | } 91 | 92 | CPU6510* GetCurrCPU() 93 | { 94 | return sp6510; 95 | } 96 | 97 | CPU6510* GetCPU(VICEMemSpaces space) 98 | { 99 | return sp6510; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /src/6510.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "ViceInterface.h" 7 | #include "platform.h" 8 | 9 | struct CPU6510 { 10 | 11 | struct Regs { 12 | uint8_t A, X, Y; 13 | uint8_t SP, FL, ZP00, ZP01; 14 | uint16_t PC, LIN, CYC; 15 | Regs() : A(0), X(0), Y(0), SP(0xff), FL(0), ZP00(0), ZP01(0x37), PC(0x0400), LIN(0), CYC(0) {} 16 | }; 17 | 18 | enum RegMask { 19 | RM_A = 0x0001, 20 | RM_X = 0x0002, 21 | RM_Y = 0x0004, 22 | RM_SP = 0x0008, 23 | RM_FL = 0x0010, 24 | RM_ZP00 = 0x0020, 25 | RM_ZP01 = 0x0040, 26 | RM_PC = 0x0080 27 | }; 28 | 29 | Regs regs; 30 | uint8_t *ram; 31 | VICEMemSpaces space; 32 | 33 | CPU6510(); 34 | 35 | void MemoryFromVICE(uint16_t start, uint16_t end, uint8_t* bytes); 36 | 37 | uint8_t GetByte(uint16_t addr); 38 | const uint8_t* GetMem(uint16_t addr); 39 | void SetByte(uint16_t addr, uint8_t byte); 40 | void CopyToRAM(uint16_t address, uint8_t* data, size_t size); 41 | bool MemoryChange() { return memoryChanged; } 42 | void WemoryChangeRefreshed() { memoryChanged = false; } 43 | void ReadPRGToRAM(const char *filename); 44 | void SetPC(uint16_t pc); 45 | 46 | protected: 47 | IBMutex memoryUpdateMutex; 48 | bool memoryChanged; 49 | }; 50 | 51 | enum StatusFlags { 52 | F_C = 1, 53 | F_Z = 2, 54 | F_I = 4, 55 | F_D = 8, 56 | F_B = 16, 57 | F_U = 32, 58 | F_V = 64, 59 | F_N = 128, 60 | }; 61 | 62 | 63 | void CreateMainCPU(); 64 | void ShutdownMainCPU(); 65 | 66 | CPU6510* GetMainCPU(); 67 | CPU6510* GetCurrCPU(); 68 | CPU6510* GetCPU(VICEMemSpaces space); 69 | 70 | -------------------------------------------------------------------------------- /src/Breakpoints.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct Breakpoint { 7 | enum Flags { 8 | Enabled = 0x0001, 9 | Stop = 0x0002, // if clear -> tr 10 | Exec = 0x0004, // traditional breakpoint 11 | Load = 0x0008, // read memory at location 12 | Store = 0x0010, // write memory at location 13 | Current = 0x0020, // true if this breakpoint stopped exec 14 | Temporary = 0x0040 // goes away next time it is hit 15 | }; 16 | 17 | uint32_t number; 18 | uint32_t flags; 19 | uint16_t start; 20 | uint16_t end; 21 | const char* condition; // normally nullptr 22 | }; 23 | 24 | void InitBreakpoints(); 25 | void ShutdownBreakpoints(); 26 | void ClearBreakpoints(); 27 | void AddBreakpoint(uint32_t number, uint32_t flags, uint16_t start, uint16_t end, const char* condition = nullptr); 28 | void RemoveBreakpoint(uint32_t number); 29 | void RemoveAllBreakpoints(); 30 | bool BreakpointCurrent(uint32_t number); 31 | void SetBreakpointHit(uint32_t number); 32 | void ClearBreapointsHit(); 33 | size_t NumBreakpoints(); 34 | Breakpoint GetBreakpoint(size_t index); 35 | bool BreakpointAt(uint16_t address, Breakpoint& bp); 36 | -------------------------------------------------------------------------------- /src/C64Colors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define C64_BLACK ImVec4(0,0,0,1) 4 | #define C64_WHITE ImVec4(1,1,1,1) 5 | #define C64_RED ImVec4(136/255.0f,57/255.0f,50/255.0f,1.0f) 6 | #define C64_CYAN ImVec4(103/255.0f,182/255.0f,189/255.0f,1.0f) 7 | #define C64_PURPLE ImVec4(139/255.0f,63/255.0f,150/255.0f,1.0f) 8 | #define C64_GREEN ImVec4(85/255.0f,160/255.0f,73/255.0f,1.0f) 9 | #define C64_BLUE ImVec4(64/255.0f,49/255.0f,141/255.0f,1.0f) 10 | #define C64_YELLOW ImVec4(191/255.0f,206/255.0f,114/255.0f,1.0f) 11 | #define C64_ORANGE ImVec4(139/255.0f,84/255.0f,41/255.0f,1.0f) 12 | #define C64_BROWN ImVec4(87/255.0f,66/255.0f,0/255.0f,1.0f) 13 | #define C64_PINK ImVec4(184/255.0f,105/255.0f,98/255.0f,1.0f) 14 | #define C64_DGRAY ImVec4(80/255.0f,80/255.0f,80/255.0f,1.0f) 15 | #define C64_MGRAY ImVec4(120/255.0f,120/255.0f,120/255.0f,1.0f) 16 | #define C64_LGREEN ImVec4(148/255.0f,224/255.0f,137/255.0f,1.0f) 17 | #define C64_LBLUE ImVec4(120/255.0f,105/255.0f,196/255.0f,1.0f) 18 | #define C64_LGRAY ImVec4(159/255.0f,159/255.0f,159/255.0f,1.0f) 19 | -------------------------------------------------------------------------------- /src/CodeColoring.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | struct ImVec4; 4 | void ResetCodeColoring(); 5 | ImVec4 GetCodeBytesColor(); 6 | ImVec4 GetCodeAddrColor(); 7 | ImVec4 GetCodeOpCodeColor(); 8 | ImVec4 GetWatchChessColor(); 9 | ImVec4 GetCodeLabelColor(); 10 | ImVec4 GetCodeSourceColor(); 11 | ImVec4 GetCodeParamColor(); 12 | ImVec4 GetCodeCursorColor(); 13 | ImVec4 GetPCHighlightColor(); 14 | int GetPCHighlightStyle(); 15 | void InvalidateBranchTargets(); 16 | ImVec4* GetBranchTargetColor(uint16_t addr); 17 | ImVec4* MakeBranchTargetColor(uint16_t addr); 18 | void LoadCustomTheme(const char* themeFile); 19 | void SaveCustomTheme(const char* themeFile); 20 | void SetCustomTheme(); 21 | bool HasCustomTheme(); 22 | bool CustomThemeActive(); 23 | 24 | void ThemeColorMenu(); 25 | -------------------------------------------------------------------------------- /src/Commands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void CommandPoke(strref param); 4 | void CommandRemember(strref param); 5 | void CommandForget(); 6 | void CommandMatch(strref param, int charSpace); 7 | const char* CommandGfxSave(strref param); 8 | 9 | -------------------------------------------------------------------------------- /src/Config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "struse/struse.h" 4 | 5 | struct ConfigContext { 6 | int depth; 7 | 8 | ConfigContext() : depth( 0 ) {} 9 | }; 10 | 11 | // write the config file 12 | struct UserData { 13 | char* start; 14 | char* curr; 15 | size_t left; 16 | size_t capacity; 17 | int depth; 18 | 19 | UserData() : start( nullptr ), curr( nullptr ), left( 0 ), capacity( 0 ), depth( 0 ) {} 20 | void Append( strref str ); 21 | ~UserData(); 22 | void AppendIndent(); 23 | void AddValue( strref name, strref value ); 24 | void AddValue( strref name, int value ); 25 | void AddArrayValue(strref value); 26 | void BeginStruct( strref name = strref() ); 27 | void EndStruct(); 28 | void BeginArray( strref name = strref() ); 29 | void EndArray(); 30 | strref OnOff( bool on ); 31 | }; 32 | 33 | 34 | enum class ConfigParseType { 35 | CPT_Error, 36 | CPT_Value, 37 | CPT_Struct, 38 | CPT_Array 39 | }; 40 | 41 | // read the config file 42 | struct ConfigParse { 43 | strref parse; 44 | ConfigParse( void* file, size_t size ) : parse( (const char*)file, (strl_t)size ) {} 45 | ConfigParse( strref text ) : parse( text ) {} 46 | bool Empty() { parse.skip_whitespace(); return parse.is_empty(); } 47 | 48 | ConfigParseType Next( strref* name, strref* value ); 49 | strref ArrayElement(); 50 | }; 51 | 52 | -------------------------------------------------------------------------------- /src/Expressions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | uint32_t BuildExpression(const char *Expr, uint8_t *ops, uint32_t max_ops); 4 | int EvalExpression(const uint8_t *RPN); 5 | int ValueFromExpression( const char* exp ); 6 | -------------------------------------------------------------------------------- /src/FileDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void FileDialogPathMenu(); 4 | 5 | void InitStartFolder(); 6 | bool GetCWD(char* dir, uint32_t dir_size); 7 | const char* GetStartFolder(); 8 | void ResetStartFolder(); 9 | bool IsFileDialogOpen(); 10 | const char* LoadProgramReady(); 11 | const char* LoadListingReady(); 12 | const char* GetListingFilename(); 13 | const char* LoadKickDbgReady(); 14 | const char* LoadKickDbgExtraReady(); 15 | const char* GetKickDbgFile(); 16 | const char* LoadSymbolsReady(); 17 | const char* GetSymbolFilename(); 18 | const char* LoadViceCMDReady(); 19 | const char* GetViceCMDFilename(); 20 | const char* ReadPRGToRAMReady(); 21 | const char* LoadThemeReady(); 22 | const char* SaveThemeReady(); 23 | bool LoadViceEXEPathReady(); 24 | void LoadProgramDialog(); 25 | void LoadListingDialog(); 26 | void LoadKickDbgDialog(); 27 | void LoadKickDbgExtraDialog(); 28 | void LoadSymbolsDialog(); 29 | void LoadViceCmdDialog(); 30 | void LoadThemeDialog(); 31 | void SaveThemeDialog(); 32 | void SetViceEXEPathDialog(); 33 | void ReadPRGDialog(); 34 | 35 | const char* ReloadProgramFile(); 36 | const char* ReadPRGFile(); 37 | char* GetViceEXEPath(); 38 | void SetViceEXEPath(strref path); 39 | const char* GetCustomThemePath(); 40 | 41 | -------------------------------------------------------------------------------- /src/Files.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "Files.h" 4 | 5 | bool SaveFile(const char *filename, void* data, size_t size) 6 | { 7 | FILE* f; 8 | #ifdef _WIN32 9 | if (fopen_s(&f, filename, "w") == 0 && f != nullptr) { 10 | #else 11 | f = fopen(filename, "w"); 12 | if (f) { 13 | #endif 14 | fwrite(data, size, 1, f); 15 | fclose(f); 16 | return true; 17 | } 18 | return false; 19 | } 20 | 21 | uint8_t* LoadBinary(const char* name, size_t& size) 22 | { 23 | FILE* f; 24 | #ifdef _WIN32 25 | if (fopen_s(&f, name, "rb") == 0 && f != nullptr) { 26 | #else 27 | f = fopen(name, "rb"); 28 | if (f) { 29 | #endif 30 | fseek(f, 0, SEEK_END); 31 | size_t sizeAdd = ftell(f); 32 | fseek(f, 0, SEEK_SET); 33 | uint8_t* add = (uint8_t*)malloc(sizeAdd); 34 | if (add) { fread(add, sizeAdd, 1, f); } 35 | fclose(f); 36 | size = sizeAdd; 37 | return add; 38 | } 39 | return nullptr; 40 | } 41 | 42 | #ifndef _MSC_VER 43 | int fopen_s(FILE **f, const char* filename, const char* options) 44 | { 45 | *f = fopen(filename, options); 46 | return f!=nullptr; 47 | } 48 | #endif -------------------------------------------------------------------------------- /src/Files.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | bool SaveFile(const char* filename, void* data, size_t size); 5 | uint8_t* LoadBinary(const char* name, size_t& size); 6 | 7 | #ifndef _MSC_VER 8 | int fopen_s(FILE **f, const char* filename, const char *options); 9 | #endif 10 | 11 | #if defined(__APPLE__) || defined(__linux__) 12 | #include 13 | #define PATH_MAX_LEN PATH_MAX 14 | #define sprintf_s(buf, ...) snprintf((buf), sizeof(buf), __VA_ARGS__) 15 | #elif defined(_WIN32) 16 | #define PATH_MAX_LEN _MAX_PATH 17 | #else 18 | #error "Unknown platform" 19 | #endif 20 | -------------------------------------------------------------------------------- /src/IceBroLite.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/IceBroLite.ico -------------------------------------------------------------------------------- /src/IceBroLite.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource1.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "winres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (United States) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 20 | #pragma code_page(1252) 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource1.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_ICON1 ICON "IceBroLite.ico" 56 | 57 | #endif // English (United States) resources 58 | ///////////////////////////////////////////////////////////////////////////// 59 | 60 | 61 | 62 | #ifndef APSTUDIO_INVOKED 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // 65 | // Generated from the TEXTINCLUDE 3 resource. 66 | // 67 | 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | #endif // not APSTUDIO_INVOKED 71 | 72 | -------------------------------------------------------------------------------- /src/IceBroLite.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30406.217 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IceBroLite", "IceBroLite.vcxproj", "{F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Debug|x64.ActiveCfg = Debug|x64 17 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Debug|x64.Build.0 = Debug|x64 18 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Debug|x86.Build.0 = Debug|Win32 20 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Release|x64.ActiveCfg = Release|x64 21 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Release|x64.Build.0 = Release|x64 22 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Release|x86.ActiveCfg = Release|Win32 23 | {F5AF93FB-AD83-4E29-AF8E-5DA5AB84702F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {47D3DC9E-7A37-4DA5-AEF1-09190B177202} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /src/ImGui_Helper.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui.h" 2 | #include "imgui_internal.h" 3 | #include "GLFW/glfw3.h" 4 | 5 | void ForceKeyboardCanvas(const char* label) 6 | { 7 | ImGuiWindow* window = ImGui::GetCurrentWindow(); 8 | if (window->SkipItems) 9 | return; 10 | 11 | ImGuiContext& g = *GImGui; 12 | const ImGuiID id = window->GetID(label); 13 | 14 | if (g.ActiveId!=id) { 15 | ImGui::SetActiveID(id, window); 16 | ImGui::SetFocusID(id, window); 17 | ImGui::FocusWindow(window); 18 | } 19 | } 20 | 21 | static ImGuiID sCanvasID = 0; 22 | 23 | bool KeyboardCanvas( const char* label ) 24 | { 25 | ImGuiWindow* window = ImGui::GetCurrentWindow(); 26 | if( window->SkipItems ) 27 | return false; 28 | 29 | ImGuiContext& g = *GImGui; 30 | const ImGuiIO& io = g.IO; 31 | 32 | const ImGuiID id = window->GetID( label ); 33 | 34 | const bool hovered = ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem); 35 | const bool clicked = io.MouseClicked[0]; 36 | if (clicked) { 37 | if (hovered) { 38 | sCanvasID = id; 39 | } else if (sCanvasID == id) { 40 | sCanvasID = 0; 41 | } 42 | } 43 | 44 | const bool user_focused = sCanvasID == id; 45 | const bool user_clicked = hovered && clicked; 46 | const bool user_nav_input_start = (g.ActiveId != id) && ((g.NavActivatePressedId == id) || (g.NavActivateId == id && g.NavInputSource == ImGuiInputSource_Keyboard)); 47 | 48 | if(user_focused || user_clicked || user_nav_input_start) 49 | { 50 | if( g.ActiveId != id ) 51 | { 52 | ImGui::SetActiveID( id, window ); 53 | ImGui::SetFocusID( id, window ); 54 | ImGui::FocusWindow( window ); 55 | } 56 | } else if (g.ActiveId == id) { 57 | if ((!hovered && io.MouseClicked[0]) || ImGui::IsKeyPressed(ImGuiKey_Escape)) 58 | ImGui::ClearActiveID(); 59 | } 60 | 61 | return g.ActiveId == id; 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/ImGui_Helper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void ForceKeyboardCanvas(const char* label); 4 | bool KeyboardCanvas( const char* label ); 5 | -------------------------------------------------------------------------------- /src/Image.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class ViceMonIcons { 4 | VMI_BreakPoint = 0, 5 | VMI_Reload, 6 | VMI_Load, 7 | VMI_ViceLoaded, 8 | VMI_Reset, 9 | VMI_NMI, 10 | VMI_Interrupt, 11 | VMI_SendToVICE, 12 | VMI_Play, 13 | VMI_ViceNotLoaded, 14 | VMI_Step, 15 | VMI_DisabledBreakPoint, 16 | VMI_Pause, 17 | VMI_Disconnected, 18 | VMI_Sandbox, 19 | VMI_DontSendToVICE, 20 | VMI_WatchPoint, 21 | VMI_WatchPointOf, 22 | VMI_Connected, 23 | VMI_SandboxOff, 24 | VMI_StepOver, 25 | VMI_StepOut, 26 | VMI_TracePoint, 27 | VMI_TracePointOf, 28 | VMI_Count 29 | }; 30 | 31 | void LoadIcons(); 32 | bool DrawTexturedIcon(ViceMonIcons icon, bool flipX = false, float wid = -1.0f, const ImVec4& tint = ImVec4(1, 1, 1, 1), const ImVec4& hover = ImVec4(1, 0.5f, 0.0f, 1.0f)); 33 | bool DrawTexturedIconCenter(ViceMonIcons icon, bool flipX = false, float wid = -1.0f, const ImVec4& tint = ImVec4(1, 1, 1, 1), const ImVec4& hover = ImVec4(1, 0.5f, 0.0f, 1.0f)); 34 | int GetViceMonIconWidth(ViceMonIcons icon); 35 | 36 | ImTextureID CreateTexture(); 37 | void SelectTexture(ImTextureID img); 38 | void UpdateTextureData(int width, int height, const void* data); 39 | //ImTextureID LoadTexture( const char* filename, int* width, int* height ); 40 | 41 | extern uint32_t c64pal[16]; 42 | extern uint32_t vic20pal_sc[16]; 43 | extern uint32_t plus4pal[128]; 44 | -------------------------------------------------------------------------------- /src/Mnemonics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct CPU6510; 4 | 5 | enum AddressModes { 6 | // address mode bit index 7 | 8 | // 6502 9 | 10 | AM_ZP_REL_X, // 0 ($12,x) 11 | AM_ZP, // 1 $12 12 | AM_IMM, // 2 #$12 13 | AM_ABS, // 3 $1234 14 | AM_ZP_Y_REL, // 4 ($12),y 15 | AM_ZP_X, // 5 $12,x 16 | AM_ABS_Y, // 6 $1234,y 17 | AM_ABS_X, // 7 $1234,x 18 | AM_REL, // 8 ($1234) 19 | AM_ACC, // 9 A 20 | AM_NON, // a 21 | AM_BRANCH, // b $1234 22 | AM_ZP_REL_Y, // c 23 | AM_ZP_Y, // d 24 | AM_COUNT, 25 | }; 26 | 27 | enum class InstrRefType : uint8_t { 28 | None, 29 | Flags, 30 | Register, 31 | DataValue, 32 | DataArray, 33 | Code, 34 | }; 35 | 36 | int Disassemble(CPU6510* cpu, uint16_t addr, char* dest, int left, int& argOffs, int& branchTrg, bool showBytes, bool illegals, bool showLabels, bool showDis); 37 | int Assemble(CPU6510* cpu, char* cmd, uint16_t addr); 38 | bool GetWatchRef(CPU6510* cpu, uint16_t addr, int style, char* buf, size_t bufCap); 39 | InstrRefType GetRefType(CPU6510* cpu, uint16_t addr); 40 | uint16_t InstrRefAddr(CPU6510* cpu, uint16_t addr); 41 | int InstrRef(CPU6510* cpu, uint16_t pc, char* buf, size_t bufSize); 42 | int InstructionBytes(CPU6510* cpu, uint16_t addr, bool illegals = true); 43 | int ValidInstructionBytes(CPU6510* cpu, uint16_t addr, bool illegals = true); 44 | -------------------------------------------------------------------------------- /src/SaveState.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "Config.h" 4 | #include "imgui/imgui.h" 5 | #include "Files.h" 6 | #include "FileDialog.h" 7 | #include "Sym.h" 8 | #include "SaveState.h" 9 | 10 | void StateLoadFilenames(strref filenames); 11 | void StateSaveFilenames(UserData& conf); 12 | const char* GetCustomThemePath(); 13 | void StateLoadViews(strref conf); 14 | void StateSaveViews(UserData& conf); 15 | void SaveStateWindow(UserData& conf); 16 | void ImGuiStateLoaded(); 17 | 18 | static const char* sSaveStateFile = "icebrolt.ini"; 19 | 20 | SaveStateFile ReadState() { 21 | size_t size; 22 | uint8_t* data = LoadBinary(sSaveStateFile, size); 23 | SaveStateFile ret = { data, size }; 24 | return ret; 25 | } 26 | 27 | void ReleaseState(SaveStateFile file) { 28 | if (file.data && file.size) { free(file.data); } 29 | } 30 | 31 | void ParseState(SaveStateFile file) 32 | { 33 | size_t size = file.size; 34 | uint8_t* data = file.data; 35 | if(data) { 36 | ConfigParse config(data, size); 37 | while (!config.Empty()) { 38 | strref name, value; 39 | ConfigParseType type = config.Next(&name, &value); 40 | if (name.same_str("Filenames") && type == ConfigParseType::CPT_Struct) { 41 | StateLoadFilenames(value); 42 | } else if (name.same_str("Views") && type == ConfigParseType::CPT_Struct) { 43 | StateLoadViews(value); 44 | } else if (name.same_str("HiddenSections") && type == ConfigParseType::CPT_Array) { 45 | StateLoadHiddenSections(value); 46 | } else if (name.same_str("DearImGui") && type == ConfigParseType::CPT_Struct) { 47 | ImGui::LoadIniSettingsFromMemory(value.get(), value.get_len()); 48 | ImGuiStateLoaded(); 49 | } 50 | } 51 | } 52 | } 53 | 54 | 55 | 56 | 57 | void SaveState() 58 | { 59 | UserData conf; 60 | strown<128> arg; 61 | 62 | SaveStateWindow(conf); 63 | 64 | conf.BeginStruct("Filenames"); 65 | StateSaveFilenames(conf); 66 | conf.EndStruct(); 67 | 68 | conf.BeginStruct(strref("Views")); 69 | StateSaveViews(conf); 70 | conf.EndStruct(); 71 | 72 | conf.BeginArray(strref("HiddenSections")); 73 | StateSaveHiddenSections(conf); 74 | conf.EndArray(); 75 | 76 | conf.BeginStruct(strref("DearImGui")); 77 | size_t ImGuiSize; 78 | const char* ImGuiData = ImGui::SaveIniSettingsToMemory(&ImGuiSize); 79 | conf.Append(strref(ImGuiData, (strl_t)ImGuiSize)); 80 | conf.EndStruct(); 81 | 82 | SaveFile(sSaveStateFile, conf.start, conf.curr - conf.start); 83 | } 84 | 85 | static bool saveLayoutNow = false; 86 | 87 | void UserSaveLayout() 88 | { 89 | saveLayoutNow = true; 90 | } 91 | 92 | void UserSaveLayoutUpdate() 93 | { 94 | if (saveLayoutNow) { 95 | saveLayoutNow = false; 96 | SaveState(); 97 | } 98 | } 99 | 100 | -------------------------------------------------------------------------------- /src/SaveState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef struct { 4 | uint8_t* data; 5 | size_t size; 6 | } SaveStateFile; 7 | 8 | SaveStateFile ReadState(); 9 | void ReleaseState(SaveStateFile file); 10 | void ParseState(SaveStateFile file); 11 | void SaveState(); 12 | void UserSaveLayoutUpdate(); 13 | -------------------------------------------------------------------------------- /src/SourceDebug.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool ReadC64DbgSrcExtra(const char* filename); 4 | 5 | bool ReadC64DbgSrc(const char* filename); 6 | bool ReadListingFile(const char* filename); 7 | strref GetSourceAt(uint16_t addr, int &spaces); 8 | strref GetListingFile(); 9 | void ListingToSrcDebug(int column); 10 | void InitSourceDebug(); 11 | void ShutdownSourceDebug(); 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/StartVice.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool LoadViceEXE(); 4 | void WaitForViceEXEPath(); 5 | -------------------------------------------------------------------------------- /src/Sym.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserData; 4 | class strref; 5 | 6 | bool ReadSymbols(const char *binname); 7 | bool ReadViceCommandFile(const char *symFile); 8 | void ReadSymbolsForBinary(const char *binname); 9 | bool ReadSymbolsFile(const char* symbols); 10 | void ClearSymbols(); 11 | bool GetAddress(const char *name, size_t chars, uint16_t &addr); 12 | bool SymbolsLoaded(); 13 | const char* GetSymbol(uint16_t address); 14 | void AddSymbol(uint32_t address, const char* symbol, size_t symbolLen, const char* section, size_t sectionLen); 15 | void FilterSectionSymbols(); 16 | const char* NearestLabel(uint16_t addr, uint16_t& offs); 17 | 18 | struct SymbolDragDrop { 19 | uint32_t address; 20 | char symbol[128]; 21 | }; 22 | void SortSymbols(bool up, bool name); 23 | size_t NumSymbolSearchMatches(); 24 | const char* GetSymbolSearchMatch(size_t i, uint32_t* address, const char** section); 25 | void SearchSymbols(const char* pattern, bool case_sensitive); 26 | 27 | size_t NumHiddenSections(); 28 | uint64_t GetHiddenSection(size_t index); 29 | void HideSection(uint64_t section, bool hide); 30 | void HideAllSections(); 31 | void ShowAllSections(); 32 | size_t NumSections(); 33 | const char* GetSectionName(size_t index); 34 | bool IsSectionVisible(uint64_t section); 35 | 36 | void StateSaveHiddenSections(UserData& conf); 37 | void StateLoadHiddenSections(strref conf); 38 | 39 | void InitSymbols(); 40 | void ShutdownSymbols(); 41 | -------------------------------------------------------------------------------- /src/Traces.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct TraceHit { 4 | uint32_t sw; 5 | uint32_t frame; 6 | uint16_t pc; 7 | uint16_t addr; 8 | uint16_t line; 9 | uint8_t cycle; 10 | uint8_t a, x, y, sp, fl; 11 | }; 12 | 13 | strref CaptureVICELine(strref line); 14 | size_t NumTracePointIds(); 15 | int GetTracePointId(size_t id); 16 | size_t NumTraceHits(size_t id); 17 | TraceHit GetTraceHit(int traceId, size_t index); 18 | void ClearTrace(size_t id); 19 | 20 | void InitTraces(); 21 | void ShutdownTraces(); 22 | -------------------------------------------------------------------------------- /src/ViceInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct CPU6510; 4 | 5 | enum class VICEMemSpaces { 6 | MainMemory, 7 | Drive8, 8 | Drive9, 9 | Drive10, 10 | Drive11 11 | }; 12 | 13 | enum class VICEEmuType { 14 | C64, 15 | Vic20, 16 | Plus4 17 | }; 18 | 19 | VICEEmuType ViceGetEmuType(); 20 | void ViceSetEmuType(VICEEmuType value); 21 | 22 | bool ViceConnected(); 23 | bool ViceRunning(); 24 | 25 | void ViceDisconnect(); 26 | void ViceConnect(const char* ip, uint32_t port); 27 | void ViceQuit(); 28 | 29 | void ViceBreak(); 30 | void ViceGo(); 31 | void ViceStep(); 32 | void ViceStepOver(); 33 | void ViceStepOut(); 34 | void ViceRunTo(uint16_t addr); 35 | bool ViceGetMemory(uint16_t start, uint16_t end, VICEMemSpaces mem); 36 | bool ViceSetMemory(uint16_t start, uint16_t len, uint8_t* bytes, VICEMemSpaces mem); 37 | bool ViceSetRegisters(const CPU6510& cpu, uint32_t regMask); 38 | void ViceStartProgram(const char* loadPrg); 39 | void ViceReset(uint8_t resetType); 40 | void ViceRemoveBreakpoint(uint32_t number); 41 | void ViceToggleBreakpoint(uint32_t number, bool enable); 42 | void ViceAddCheckpoint(uint16_t start, uint16_t end, bool stop, bool load, bool store, bool exec); 43 | void ViceAddBreakpoint(uint16_t address); 44 | void ViceSetCondition(int checkPoint, strref condition); 45 | void ViceRemoveBreakpointNoList(uint32_t number); 46 | 47 | void ViceWaiting(); 48 | void ViceTickMessage(); 49 | 50 | void ViceLog(strref msg); 51 | typedef void (*ViceLogger)(void*, const char* text, size_t len); 52 | void ViceAddLogger(ViceLogger logger, void* user); 53 | -------------------------------------------------------------------------------- /src/assets/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/assets/icons.png -------------------------------------------------------------------------------- /src/data/C64_Pro_Mono-STYLE.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/data/C64_Pro_Mono-STYLE.ttf -------------------------------------------------------------------------------- /src/data/C64_Pro_Mono-STYLE.ttf.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | int GetC64FontSize(); 3 | const unsigned int* GetC64FontData(); 4 | -------------------------------------------------------------------------------- /src/data/license.txt: -------------------------------------------------------------------------------- 1 | 2 | Fonts in this package are (c) 2010-2014 Style. 3 | 4 | This license is applicable to each font file included in this package in all their variants (ttf, eot, woff, woff2, svg). 5 | 6 | You MAY NOT: 7 | sell this font; include/redistribute the font in any font collection regardless of pricing; 8 | provide the font for direct download from any web site, modify or rename the font. 9 | 10 | You MAY: 11 | link to "http://style64.org/c64-truetype" in order for others to download and install the font; 12 | embed the font (without any modification or file renaming) for display on any web site using @font-face rules; 13 | use this font in static images and vector art; 14 | include this font (without any modification or file renaming) as part of a software package but ONLY if said software package is freely provided to end users. 15 | You may also contact us to negotiate a (possibly commercial) license for your use outside of these guidelines at "http://style64.org/contact-style". 16 | 17 | At all times the most recent version of this license can be found at "http://style64.org/c64-truetype/license". 18 | -------------------------------------------------------------------------------- /src/framework.h: -------------------------------------------------------------------------------- 1 | // header.h : include file for standard system include files, 2 | // or project specific include files 3 | // 4 | 5 | #pragma once 6 | 7 | //#include "targetver.h" 8 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 9 | // Windows Header Files 10 | #include 11 | -------------------------------------------------------------------------------- /src/imgui/.editorconfig: -------------------------------------------------------------------------------- 1 | # See http://editorconfig.org to read about the EditorConfig format. 2 | # - In theory automatically supported by VS2017+ and most common IDE or text editors. 3 | # - In practice VS2019-VS2022 stills don't trim trailing whitespaces correctly :( 4 | # - Suggest installing this to trim whitespaces: 5 | # GitHub https://github.com/madskristensen/TrailingWhitespace 6 | # VS2019 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer 7 | # VS2022 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespace64 8 | # (in spite of its name doesn't only visualize but also trims) 9 | # - Alternative for older VS2010 to VS2015: https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig 10 | 11 | # top-most EditorConfig file 12 | root = true 13 | 14 | # Default settings: 15 | # Use 4 spaces as indentation 16 | [*] 17 | indent_style = space 18 | indent_size = 4 19 | insert_final_newline = true 20 | trim_trailing_whitespace = true 21 | 22 | [imstb_*] 23 | indent_size = 3 24 | trim_trailing_whitespace = false 25 | 26 | [Makefile] 27 | indent_style = tab 28 | indent_size = 4 29 | -------------------------------------------------------------------------------- /src/imgui/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /src/imgui/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://github.com/ocornut/imgui/wiki/Funding'] 2 | -------------------------------------------------------------------------------- /src/imgui/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /src/imgui/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any http URL into a clickable link) 2 | 3 | 1. PLEASE CAREFULLY READ: [Contributing Guidelines](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md) 4 | 5 | 2. Clear this template before submitting your PR. 6 | 7 | -------------------------------------------------------------------------------- /src/imgui/.github/workflows/manual.yml: -------------------------------------------------------------------------------- 1 | # 2 | # This is a dummy workflow used to trigger full builds manually. 3 | # 4 | name: manual 5 | 6 | on: workflow_dispatch 7 | 8 | jobs: 9 | manual: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - run: exit 0 13 | -------------------------------------------------------------------------------- /src/imgui/.github/workflows/scheduled.yml: -------------------------------------------------------------------------------- 1 | # 2 | # This is a dummy workflow used to trigger scheduled builds. Forked repositories most likely should disable this 3 | # workflow to avoid daily builds of inactive repositories. 4 | # 5 | name: scheduled 6 | 7 | on: 8 | schedule: 9 | - cron: '0 9 * * *' 10 | 11 | jobs: 12 | scheduled: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - run: exit 0 16 | -------------------------------------------------------------------------------- /src/imgui/.github/workflows/static-analysis.yml: -------------------------------------------------------------------------------- 1 | name: static-analysis 2 | 3 | on: 4 | workflow_run: 5 | # Perform static analysis together with build workflow. Build triggers of "build" workflow do not need to be repeated here. 6 | workflows: 7 | - build 8 | types: 9 | - requested 10 | 11 | jobs: 12 | PVS-Studio: 13 | runs-on: ubuntu-22.04 14 | steps: 15 | - uses: actions/checkout@v4 16 | with: 17 | fetch-depth: 1 18 | 19 | - name: Install Dependencies 20 | env: 21 | # The Secret variable setup in GitHub must be in format: "name_or_email key", on a single line 22 | PVS_STUDIO_LICENSE: ${{ secrets.PVS_STUDIO_LICENSE }} 23 | run: | 24 | if [[ "$PVS_STUDIO_LICENSE" != "" ]]; 25 | then 26 | wget -q https://files.viva64.com/etc/pubkey.txt 27 | sudo apt-key add pubkey.txt 28 | sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list 29 | sudo apt-get update 30 | sudo apt-get install -y pvs-studio 31 | pvs-studio-analyzer credentials -o pvs-studio.lic $PVS_STUDIO_LICENSE 32 | fi 33 | 34 | - name: PVS-Studio static analysis 35 | run: | 36 | if [[ ! -f pvs-studio.lic ]]; 37 | then 38 | echo "PVS Studio license is missing. No analysis will be performed." 39 | echo "If you have a PVS Studio license please create a project secret named PVS_STUDIO_LICENSE with your license." 40 | echo "You may use a free license. More information at https://www.viva64.com/en/b/0457/" 41 | exit 0 42 | fi 43 | cd examples/example_null 44 | pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1 45 | pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log 46 | plog-converter -a 'GA:1,2;OP:1' -d V1071 -t errorfile -w pvs-studio.log 47 | -------------------------------------------------------------------------------- /src/imgui/.gitignore: -------------------------------------------------------------------------------- 1 | ## OSX artifacts 2 | .DS_Store 3 | 4 | ## Dear ImGui artifacts 5 | imgui.ini 6 | imgui*.ini 7 | 8 | ## General build artifacts 9 | *.o 10 | *.obj 11 | *.exe 12 | examples/*/Debug/* 13 | examples/*/Release/* 14 | examples/*/x64/* 15 | 16 | ## Visual Studio artifacts 17 | .vs 18 | ipch 19 | *.opensdf 20 | *.log 21 | *.pdb 22 | *.ilk 23 | *.user 24 | *.sdf 25 | *.suo 26 | *.VC.db 27 | *.VC.VC.opendb 28 | 29 | ## Getting files created in JSON/Schemas/Catalog/ from a VS2022 update 30 | JSON/ 31 | 32 | ## Commonly used CMake directories 33 | build*/ 34 | 35 | ## Xcode artifacts 36 | project.xcworkspace 37 | xcuserdata 38 | 39 | ## Emscripten artifacts 40 | examples/*.o.tmp 41 | examples/*.out.js 42 | examples/*.out.wasm 43 | examples/example_glfw_opengl3/web/* 44 | examples/example_glfw_wgpu/web/* 45 | examples/example_glfw_wgpu/external/* 46 | examples/example_sdl2_opengl3/web/* 47 | 48 | ## JetBrains IDE artifacts 49 | .idea 50 | cmake-build-* 51 | 52 | ## Unix executables from our example Makefiles 53 | examples/example_glfw_metal/example_glfw_metal 54 | examples/example_glfw_opengl2/example_glfw_opengl2 55 | examples/example_glfw_opengl3/example_glfw_opengl3 56 | examples/example_glut_opengl2/example_glut_opengl2 57 | examples/example_null/example_null 58 | examples/example_sdl2_metal/example_sdl2_metal 59 | examples/example_sdl2_opengl2/example_sdl2_opengl2 60 | examples/example_sdl2_opengl3/example_sdl2_opengl3 61 | examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer 62 | -------------------------------------------------------------------------------- /src/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2024 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_allegro5.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Backend for Allegro 5 2 | // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [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] 7 | // [X] Platform: Clipboard support (from Allegro 5.1.12). 8 | // [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 9 | // Missing features or Issues: 10 | // [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually. 11 | // [ ] Platform: Missing gamepad support. 12 | // [ ] Renderer: Multi-viewport support (multiple windows). 13 | 14 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 15 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 16 | // Learn about Dear ImGui: 17 | // - FAQ https://dearimgui.com/faq 18 | // - Getting Started https://dearimgui.com/getting-started 19 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 20 | // - Introduction, links and more at the top of imgui.cpp 21 | 22 | #pragma once 23 | #include "imgui.h" // IMGUI_IMPL_API 24 | #ifndef IMGUI_DISABLE 25 | 26 | struct ALLEGRO_DISPLAY; 27 | union ALLEGRO_EVENT; 28 | 29 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 30 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 31 | IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 32 | IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 33 | IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 34 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 35 | 36 | // Use if you want to reset your rendering device without losing Dear ImGui state. 37 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 38 | IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 39 | 40 | #endif // #ifndef IMGUI_DISABLE 41 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_android.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for Android native app 2 | // This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3) 3 | 4 | // Implemented features: 5 | // [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] 6 | // [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen. 7 | // Missing features or Issues: 8 | // [ ] Platform: Clipboard support. 9 | // [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 10 | // [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android. 11 | // [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android. 12 | // Important: 13 | // - Consider using SDL or GLFW backend on Android, which will be more full-featured than this. 14 | // - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446) 15 | // - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446) 16 | 17 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 18 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 19 | // Learn about Dear ImGui: 20 | // - FAQ https://dearimgui.com/faq 21 | // - Getting Started https://dearimgui.com/getting-started 22 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 23 | // - Introduction, links and more at the top of imgui.cpp 24 | 25 | #pragma once 26 | #include "imgui.h" // IMGUI_IMPL_API 27 | #ifndef IMGUI_DISABLE 28 | 29 | struct ANativeWindow; 30 | struct AInputEvent; 31 | 32 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 33 | IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window); 34 | IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event); 35 | IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown(); 36 | IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame(); 37 | 38 | #endif // #ifndef IMGUI_DISABLE 39 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_dx10.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX10 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 7 | // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. 8 | 9 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 10 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 11 | // Learn about Dear ImGui: 12 | // - FAQ https://dearimgui.com/faq 13 | // - Getting Started https://dearimgui.com/getting-started 14 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 15 | // - Introduction, links and more at the top of imgui.cpp 16 | 17 | #pragma once 18 | #include "imgui.h" // IMGUI_IMPL_API 19 | #ifndef IMGUI_DISABLE 20 | 21 | struct ID3D10Device; 22 | 23 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 24 | IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); 25 | IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); 26 | IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); 27 | IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); 28 | 29 | // Use if you want to reset your rendering device without losing Dear ImGui state. 30 | IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects(); 31 | IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects(); 32 | 33 | #endif // #ifndef IMGUI_DISABLE 34 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX11 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 7 | // [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'. 8 | // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. 9 | 10 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 11 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 12 | // Learn about Dear ImGui: 13 | // - FAQ https://dearimgui.com/faq 14 | // - Getting Started https://dearimgui.com/getting-started 15 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 16 | // - Introduction, links and more at the top of imgui.cpp 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | #ifndef IMGUI_DISABLE 21 | 22 | struct ID3D11Device; 23 | struct ID3D11DeviceContext; 24 | struct ID3D11SamplerState; 25 | 26 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 27 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 28 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 29 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 30 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 31 | 32 | // Use if you want to reset your rendering device without losing Dear ImGui state. 33 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 34 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 35 | 36 | // [BETA] Selected render state data shared with callbacks. 37 | // This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplDX11_RenderDrawData() call. 38 | // (Please open an issue if you feel you need access to more data) 39 | struct ImGui_ImplDX11_RenderState 40 | { 41 | ID3D11Device* Device; 42 | ID3D11DeviceContext* DeviceContext; 43 | ID3D11SamplerState* SamplerDefault; 44 | }; 45 | 46 | #endif // #ifndef IMGUI_DISABLE 47 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX9 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 7 | // [X] Renderer: IMGUI_USE_BGRA_PACKED_COLOR support, as this is the optimal color encoding for DirectX9. 8 | // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. 9 | 10 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 11 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 12 | // Learn about Dear ImGui: 13 | // - FAQ https://dearimgui.com/faq 14 | // - Getting Started https://dearimgui.com/getting-started 15 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 16 | // - Introduction, links and more at the top of imgui.cpp 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | #ifndef IMGUI_DISABLE 21 | 22 | struct IDirect3DDevice9; 23 | 24 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 25 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 26 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 27 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 28 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 29 | 30 | // Use if you want to reset your rendering device without losing Dear ImGui state. 31 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 32 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 33 | 34 | #endif // #ifndef IMGUI_DISABLE 35 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_opengl2.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for OpenGL2 (legacy OpenGL, fixed pipeline) 2 | // This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. 7 | // Missing features or Issues: 8 | // [ ] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 9 | 10 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 11 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 12 | // Learn about Dear ImGui: 13 | // - FAQ https://dearimgui.com/faq 14 | // - Getting Started https://dearimgui.com/getting-started 15 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 16 | // - Introduction, links and more at the top of imgui.cpp 17 | 18 | // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** 19 | // **Prefer using the code in imgui_impl_opengl3.cpp** 20 | // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read. 21 | // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more 22 | // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might 23 | // confuse your GPU driver. 24 | // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API. 25 | 26 | #pragma once 27 | #include "imgui.h" // IMGUI_IMPL_API 28 | #ifndef IMGUI_DISABLE 29 | 30 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 31 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init(); 32 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown(); 33 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame(); 34 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data); 35 | 36 | // Called by Init/NewFrame/Shutdown 37 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture(); 38 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture(); 39 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects(); 40 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(); 41 | 42 | #endif // #ifndef IMGUI_DISABLE 43 | -------------------------------------------------------------------------------- /src/imgui/backends/imgui_impl_sdlrenderer2.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for SDL_Renderer for SDL2 2 | // (Requires: SDL 2.0.17+) 3 | 4 | // Note how SDL_Renderer is an _optional_ component of SDL2. 5 | // For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX. 6 | // If your application will want to render any non trivial amount of graphics other than UI, 7 | // please be aware that SDL_Renderer currently offers a limited graphic API to the end-user and 8 | // it might be difficult to step out of those boundaries. 9 | 10 | // Implemented features: 11 | // [X] Renderer: User texture binding. Use 'SDL_Texture*' as ImTextureID. Read the FAQ about ImTextureID! 12 | // [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 13 | // [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)GetPlatformIO().Renderer_RenderState'. 14 | // Missing features: 15 | // [ ] Renderer: Multi-viewport support (multiple windows). 16 | 17 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 18 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 19 | // Learn about Dear ImGui: 20 | // - FAQ https://dearimgui.com/faq 21 | // - Getting Started https://dearimgui.com/getting-started 22 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 23 | // - Introduction, links and more at the top of imgui.cpp 24 | 25 | #pragma once 26 | #ifndef IMGUI_DISABLE 27 | #include "imgui.h" // IMGUI_IMPL_API 28 | 29 | struct SDL_Renderer; 30 | 31 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 32 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer2_Init(SDL_Renderer* renderer); 33 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_Shutdown(); 34 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_NewFrame(); 35 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data, SDL_Renderer* renderer); 36 | 37 | // Called by Init/NewFrame/Shutdown 38 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer2_CreateFontsTexture(); 39 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_DestroyFontsTexture(); 40 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer2_CreateDeviceObjects(); 41 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_DestroyDeviceObjects(); 42 | 43 | // [BETA] Selected render state data shared with callbacks. 44 | // This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplSDLRenderer2_RenderDrawData() call. 45 | // (Please open an issue if you feel you need access to more data) 46 | struct ImGui_ImplSDLRenderer2_RenderState 47 | { 48 | SDL_Renderer* Renderer; 49 | }; 50 | 51 | #endif // #ifndef IMGUI_DISABLE 52 | -------------------------------------------------------------------------------- /src/imgui/backends/vulkan/generate_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## -V: create SPIR-V binary 3 | ## -x: save binary output as text-based 32-bit hexadecimal numbers 4 | ## -o: output file 5 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 6 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 7 | -------------------------------------------------------------------------------- /src/imgui/backends/vulkan/glsl_shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=0, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct { 7 | vec4 Color; 8 | vec2 UV; 9 | } In; 10 | 11 | void main() 12 | { 13 | fColor = In.Color * texture(sTexture, In.UV.st); 14 | } 15 | -------------------------------------------------------------------------------- /src/imgui/backends/vulkan/glsl_shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(push_constant) uniform uPushConstant { 7 | vec2 uScale; 8 | vec2 uTranslate; 9 | } pc; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | layout(location = 0) out struct { 16 | vec4 Color; 17 | vec2 UV; 18 | } Out; 19 | 20 | void main() 21 | { 22 | Out.Color = aColor; 23 | Out.UV = aUV; 24 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 25 | } 26 | -------------------------------------------------------------------------------- /src/imgui/examples/README.txt: -------------------------------------------------------------------------------- 1 | See BACKENDS and EXAMPLES files in the docs/ folder, or on the web at: https://github.com/ocornut/imgui/tree/master/docs 2 | 3 | Backends = Helper code to facilitate integration with platforms/graphics api (used by Examples + should be used by your app). 4 | Examples = Standalone applications showcasing integration with platforms/graphics api. 5 | 6 | Some Examples have extra README files in their respective directory, please check them too! 7 | 8 | Once Dear ImGui is running (in either examples or your own application/game/engine), 9 | run and refer to ImGui::ShowDemoWindow() in imgui_demo.cpp for the end-user API. 10 | -------------------------------------------------------------------------------- /src/imgui/examples/example_allegro5/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | 4 | Dear ImGui outputs 16-bit vertex indices by default. 5 | 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. 6 | 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. 7 | We are providing `imconfig_allegro5.h` that enables 32-bit indices. 8 | 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. 9 | 10 | # How to Build 11 | 12 | ### On Ubuntu 14.04+ and macOS 13 | 14 | ```bash 15 | 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 16 | ``` 17 | 18 | On macOS, install Allegro with homebrew: `brew install allegro`. 19 | 20 | ### On Windows with Visual Studio's CLI 21 | 22 | You may install Allegro using vcpkg: 23 | ``` 24 | git clone https://github.com/Microsoft/vcpkg 25 | cd vcpkg 26 | bootstrap-vcpkg.bat 27 | vcpkg install allegro5 --triplet=x86-windows ; for win32 28 | vcpkg install allegro5 --triplet=x64-windows ; for win64 29 | vcpkg integrate install ; register include / libs in Visual Studio 30 | ``` 31 | 32 | Build: 33 | ``` 34 | set ALLEGRODIR=path_to_your_allegro5_folder 35 | 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 36 | ``` 37 | -------------------------------------------------------------------------------- /src/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | imgui 56 | 57 | 58 | imgui 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/imgui/examples/example_allegro5/imconfig_allegro5.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE 3 | // See imconfig.h for the full template 4 | // Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | // Use 32-bit vertex indices because Allegro doesn't support 16-bit ones 10 | // This allows us to avoid converting vertices format at runtime 11 | #define ImDrawIdx int 12 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(ImGuiExample) 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | add_library(${CMAKE_PROJECT_NAME} SHARED 10 | ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp 11 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui.cpp 12 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_demo.cpp 13 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_draw.cpp 14 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_tables.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_widgets.cpp 16 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_android.cpp 17 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_opengl3.cpp 18 | ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c 19 | ) 20 | 21 | set(CMAKE_SHARED_LINKER_FLAGS 22 | "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate" 23 | ) 24 | 25 | target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE 26 | IMGUI_IMPL_OPENGL_ES3 27 | ) 28 | 29 | target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE 30 | ${CMAKE_CURRENT_SOURCE_DIR}/../.. 31 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends 32 | ${ANDROID_NDK}/sources/android/native_app_glue 33 | ) 34 | 35 | target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE 36 | android 37 | EGL 38 | GLESv3 39 | log 40 | ) 41 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/.gitignore: -------------------------------------------------------------------------------- 1 | .cxx 2 | .externalNativeBuild 3 | build/ 4 | *.iml 5 | 6 | .idea 7 | .gradle 8 | local.properties 9 | 10 | # Android Studio puts a Gradle wrapper here, that we don't want: 11 | gradle/ 12 | gradlew* 13 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | compileSdkVersion 33 6 | buildToolsVersion "33.0.2" 7 | ndkVersion "25.2.9519653" 8 | 9 | defaultConfig { 10 | applicationId "imgui.example.android" 11 | namespace "imgui.example.android" 12 | minSdkVersion 24 13 | targetSdkVersion 33 14 | versionCode 1 15 | versionName "1.0" 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') 22 | } 23 | } 24 | 25 | compileOptions { 26 | sourceCompatibility JavaVersion.VERSION_11 27 | targetCompatibility JavaVersion.VERSION_11 28 | } 29 | 30 | kotlinOptions { 31 | jvmTarget="11" 32 | } 33 | 34 | externalNativeBuild { 35 | cmake { 36 | path "../../CMakeLists.txt" 37 | version '3.22.1' 38 | } 39 | } 40 | } 41 | repositories { 42 | mavenCentral() 43 | } 44 | dependencies { 45 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 46 | } 47 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package imgui.example.android 2 | 3 | import android.app.NativeActivity 4 | import android.os.Bundle 5 | import android.content.Context 6 | import android.view.inputmethod.InputMethodManager 7 | import android.view.KeyEvent 8 | import java.util.concurrent.LinkedBlockingQueue 9 | 10 | class MainActivity : NativeActivity() { 11 | public override fun onCreate(savedInstanceState: Bundle?) { 12 | super.onCreate(savedInstanceState) 13 | } 14 | 15 | fun showSoftInput() { 16 | val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager 17 | inputMethodManager.showSoftInput(this.window.decorView, 0) 18 | } 19 | 20 | fun hideSoftInput() { 21 | val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager 22 | inputMethodManager.hideSoftInputFromWindow(this.window.decorView.windowToken, 0) 23 | } 24 | 25 | // Queue for the Unicode characters to be polled from native code (via pollUnicodeChar()) 26 | private var unicodeCharacterQueue: LinkedBlockingQueue = LinkedBlockingQueue() 27 | 28 | // We assume dispatchKeyEvent() of the NativeActivity is actually called for every 29 | // KeyEvent and not consumed by any View before it reaches here 30 | override fun dispatchKeyEvent(event: KeyEvent): Boolean { 31 | if (event.action == KeyEvent.ACTION_DOWN) { 32 | unicodeCharacterQueue.offer(event.getUnicodeChar(event.metaState)) 33 | } 34 | return super.dispatchKeyEvent(event) 35 | } 36 | 37 | fun pollUnicodeChar(): Int { 38 | return unicodeCharacterQueue.poll() ?: 0 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } 25 | -------------------------------------------------------------------------------- /src/imgui/examples/example_android_opengl3/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /src/imgui/examples/example_apple_metal/README.md: -------------------------------------------------------------------------------- 1 | # iOS / OSX Metal example 2 | 3 | ## Introduction 4 | 5 | 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. 6 | 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. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/imgui/examples/example_apple_metal/iOS/Info-iOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | imgui 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | metal 29 | 30 | UIRequiresFullScreen 31 | 32 | UIStatusBarHidden 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | UIInterfaceOrientationPortraitUpsideDown 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/imgui/examples/example_apple_metal/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/imgui/examples/example_apple_metal/macOS/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | imgui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSMainStoryboardFile 26 | MainMenu 27 | NSPrincipalClass 28 | NSApplication 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need GLFW (http://www.glfw.org): 3 | # brew install glfw 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_glfw_metal 10 | IMGUI_DIR = ../.. 11 | SOURCES = main.mm 12 | 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 13 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm 14 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 15 | 16 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 17 | LIBS += -L/usr/local/lib -L/opt/homebrew/lib -L/opt/local/lib 18 | LIBS += -lglfw 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include -I/opt/local/include 21 | CXXFLAGS += -Wall -Wformat 22 | CFLAGS = $(CXXFLAGS) 23 | 24 | %.o:%.cpp 25 | $(CXX) $(CXXFLAGS) -c -o $@ $< 26 | 27 | %.o:$(IMGUI_DIR)/%.cpp 28 | $(CXX) $(CXXFLAGS) -c -o $@ $< 29 | 30 | %.o:$(IMGUI_DIR)/backends/%.cpp 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< 32 | 33 | %.o:%.mm 34 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 35 | 36 | %.o:$(IMGUI_DIR)/backends/%.mm 37 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 38 | 39 | all: $(EXE) 40 | @echo Build complete 41 | 42 | $(EXE): $(OBJS) 43 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 44 | 45 | clean: 46 | rm -f $(EXE) $(OBJS) 47 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need GLFW (http://www.glfw.org): 6 | # Linux: 7 | # apt-get install libglfw-dev 8 | # Mac OS X: 9 | # brew install glfw 10 | # MSYS2: 11 | # pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_glfw_opengl2 18 | IMGUI_DIR = ../.. 19 | SOURCES = main.cpp 20 | 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 21 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | UNAME_S := $(shell uname -s) 24 | 25 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 26 | CXXFLAGS += -g -Wall -Wformat 27 | LIBS = 28 | 29 | ##--------------------------------------------------------------------- 30 | ## BUILD FLAGS PER PLATFORM 31 | ##--------------------------------------------------------------------- 32 | 33 | ifeq ($(UNAME_S), Linux) #LINUX 34 | ECHO_MESSAGE = "Linux" 35 | LIBS += -lGL `pkg-config --static --libs glfw3` 36 | 37 | CXXFLAGS += `pkg-config --cflags glfw3` 38 | CFLAGS = $(CXXFLAGS) 39 | endif 40 | 41 | ifeq ($(UNAME_S), Darwin) #APPLE 42 | ECHO_MESSAGE = "Mac OS X" 43 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo 44 | LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib 45 | #LIBS += -lglfw3 46 | LIBS += -lglfw 47 | 48 | CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include 49 | CFLAGS = $(CXXFLAGS) 50 | endif 51 | 52 | ifeq ($(OS), Windows_NT) 53 | ECHO_MESSAGE = "MinGW" 54 | LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32 55 | 56 | CXXFLAGS += `pkg-config --cflags glfw3` 57 | CFLAGS = $(CXXFLAGS) 58 | endif 59 | 60 | ##--------------------------------------------------------------------- 61 | ## BUILD RULES 62 | ##--------------------------------------------------------------------- 63 | 64 | %.o:%.cpp 65 | $(CXX) $(CXXFLAGS) -c -o $@ $< 66 | 67 | %.o:$(IMGUI_DIR)/%.cpp 68 | $(CXX) $(CXXFLAGS) -c -o $@ $< 69 | 70 | %.o:$(IMGUI_DIR)/backends/%.cpp 71 | $(CXX) $(CXXFLAGS) -c -o $@ $< 72 | 73 | all: $(EXE) 74 | @echo Build complete for $(ECHO_MESSAGE) 75 | 76 | $(EXE): $(OBJS) 77 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 78 | 79 | clean: 80 | rm -f $(EXE) $(OBJS) 81 | 82 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_glfw_opengl2 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} 6 | 7 | 8 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need GLFW (http://www.glfw.org): 6 | # Linux: 7 | # apt-get install libglfw-dev 8 | # Mac OS X: 9 | # brew install glfw 10 | # MSYS2: 11 | # pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_glfw_opengl3 18 | IMGUI_DIR = ../.. 19 | SOURCES = main.cpp 20 | 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 21 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | UNAME_S := $(shell uname -s) 24 | LINUX_GL_LIBS = -lGL 25 | 26 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 27 | CXXFLAGS += -g -Wall -Wformat 28 | LIBS = 29 | 30 | ##--------------------------------------------------------------------- 31 | ## OPENGL ES 32 | ##--------------------------------------------------------------------- 33 | 34 | ## This assumes a GL ES library available in the system, e.g. libGLESv2.so 35 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2 36 | # LINUX_GL_LIBS = -lGLESv2 37 | 38 | ##--------------------------------------------------------------------- 39 | ## BUILD FLAGS PER PLATFORM 40 | ##--------------------------------------------------------------------- 41 | 42 | ifeq ($(UNAME_S), Linux) #LINUX 43 | ECHO_MESSAGE = "Linux" 44 | LIBS += $(LINUX_GL_LIBS) `pkg-config --static --libs glfw3` 45 | 46 | CXXFLAGS += `pkg-config --cflags glfw3` 47 | CFLAGS = $(CXXFLAGS) 48 | endif 49 | 50 | ifeq ($(UNAME_S), Darwin) #APPLE 51 | ECHO_MESSAGE = "Mac OS X" 52 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo 53 | LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib 54 | #LIBS += -lglfw3 55 | LIBS += -lglfw 56 | 57 | CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include 58 | CFLAGS = $(CXXFLAGS) 59 | endif 60 | 61 | ifeq ($(OS), Windows_NT) 62 | ECHO_MESSAGE = "MinGW" 63 | LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32 64 | 65 | CXXFLAGS += `pkg-config --cflags glfw3` 66 | CFLAGS = $(CXXFLAGS) 67 | endif 68 | 69 | ##--------------------------------------------------------------------- 70 | ## BUILD RULES 71 | ##--------------------------------------------------------------------- 72 | 73 | %.o:%.cpp 74 | $(CXX) $(CXXFLAGS) -c -o $@ $< 75 | 76 | %.o:$(IMGUI_DIR)/%.cpp 77 | $(CXX) $(CXXFLAGS) -c -o $@ $< 78 | 79 | %.o:$(IMGUI_DIR)/backends/%.cpp 80 | $(CXX) $(CXXFLAGS) -c -o $@ $< 81 | 82 | all: $(EXE) 83 | @echo Build complete for $(ECHO_MESSAGE) 84 | 85 | $(EXE): $(OBJS) 86 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 87 | 88 | clean: 89 | rm -f $(EXE) $(OBJS) 90 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_glfw_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | sources 56 | 57 | 58 | 59 | 60 | 61 | imgui 62 | 63 | 64 | imgui 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Example usage: 2 | # mkdir build 3 | # cd build 4 | # cmake -g "Visual Studio 14 2015" .. 5 | 6 | cmake_minimum_required(VERSION 2.8) 7 | project(imgui_example_glfw_vulkan C CXX) 8 | 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 11 | endif() 12 | 13 | set(CMAKE_CXX_STANDARD 11) 14 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 15 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 16 | 17 | # GLFW 18 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 19 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 20 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 21 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 22 | option(GLFW_INSTALL "Generate installation target" OFF) 23 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 24 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 25 | include_directories(${GLFW_DIR}/include) 26 | 27 | # Dear ImGui 28 | set(IMGUI_DIR ../../) 29 | include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends ..) 30 | 31 | # Libraries 32 | find_package(Vulkan REQUIRED) 33 | #find_library(VULKAN_LIBRARY 34 | #NAMES vulkan vulkan-1) 35 | #set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 36 | set(LIBRARIES "glfw;Vulkan::Vulkan") 37 | 38 | # Use vulkan headers from glfw: 39 | include_directories(${GLFW_DIR}/deps) 40 | 41 | file(GLOB sources *.cpp) 42 | 43 | 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) 44 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 45 | 46 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_glfw_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 11 | 12 | @set OUT_DIR=Release 13 | mkdir %OUT_DIR% 14 | cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup 64-bit command-line compiler. 2 | 3 | @set OUT_EXE=example_glfw_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 11 | 12 | @set OUT_DIR=Release 13 | mkdir %OUT_DIR% 14 | cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glfw_wgpu/README.md: -------------------------------------------------------------------------------- 1 | ## How to Build 2 | 3 | - 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 4 | 5 | - 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. 6 | 7 | - You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup. 8 | 9 | - Then build using `make -f Makefile.emscripten` while in the `example_glfw_wgpu/` directory. 10 | 11 | - Requires recent Emscripten as WGPU is still a work-in-progress API. 12 | 13 | ## How to Run 14 | 15 | To run on a local machine: 16 | - Make sure your browse supports WGPU and it is enabled. WGPU is still WIP not enabled by default in most browser. 17 | - `make serve` will use Python3 to spawn a local webserver, you can then browse http://localhost:8000 to access your build. 18 | - Otherwise, generally you will need a local webserver: 19 | - Quoting [https://emscripten.org/docs/getting_started](https://emscripten.org/docs/getting_started/Tutorial.html#generating-html):
20 | _"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."_ 21 | - 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. 22 | - You may use Python 3 builtin webserver: `python -m http.server -d web` (this is what `make serve` uses). 23 | - You may use Python 2 builtin webserver: `cd web && python -m SimpleHTTPServer`. 24 | - 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). 25 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glut_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # Linux: 6 | # apt-get install freeglut3-dev 7 | # 8 | 9 | #CXX = g++ 10 | #CXX = clang++ 11 | 12 | EXE = example_glut_opengl2 13 | IMGUI_DIR = ../.. 14 | SOURCES = main.cpp 15 | 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 16 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glut.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp 17 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 18 | UNAME_S := $(shell uname -s) 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 21 | CXXFLAGS += -g -Wall -Wformat 22 | LIBS = 23 | 24 | ##--------------------------------------------------------------------- 25 | ## BUILD FLAGS PER PLATFORM 26 | ##--------------------------------------------------------------------- 27 | 28 | ifeq ($(UNAME_S), Linux) #LINUX 29 | ECHO_MESSAGE = "Linux" 30 | LIBS += -lGL -lglut 31 | CFLAGS = $(CXXFLAGS) 32 | endif 33 | 34 | ifeq ($(UNAME_S), Darwin) #APPLE 35 | ECHO_MESSAGE = "Mac OS X" 36 | LIBS += -framework OpenGL -framework GLUT 37 | LIBS += -L/usr/local/lib -L/opt/local/lib 38 | 39 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 40 | CFLAGS = $(CXXFLAGS) 41 | endif 42 | 43 | ifeq ($(OS), Windows_NT) 44 | ECHO_MESSAGE = "MinGW" 45 | LIBS += -lgdi32 -lopengl32 -limm32 46 | ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes) 47 | CXXFLAGS += $(shell pkg-config freeglut --cflags) 48 | LIBS += $(shell pkg-config freeglut --libs) 49 | else 50 | LIBS += -lglut 51 | endif 52 | CFLAGS = $(CXXFLAGS) 53 | endif 54 | 55 | ##--------------------------------------------------------------------- 56 | ## BUILD RULES 57 | ##--------------------------------------------------------------------- 58 | 59 | %.o:%.cpp 60 | $(CXX) $(CXXFLAGS) -c -o $@ $< 61 | 62 | %.o:$(IMGUI_DIR)/%.cpp 63 | $(CXX) $(CXXFLAGS) -c -o $@ $< 64 | 65 | %.o:$(IMGUI_DIR)/backends/%.cpp 66 | $(CXX) $(CXXFLAGS) -c -o $@ $< 67 | 68 | all: $(EXE) 69 | @echo Build complete for $(ECHO_MESSAGE) 70 | 71 | $(EXE): $(OBJS) 72 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 73 | 74 | clean: 75 | rm -f $(EXE) $(OBJS) 76 | -------------------------------------------------------------------------------- /src/imgui/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} 6 | 7 | 8 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_null/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib 4 | -------------------------------------------------------------------------------- /src/imgui/examples/example_null/main.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: "null" example application 2 | // (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) 3 | // This is useful to test building, but you cannot interact with anything here! 4 | #include "imgui.h" 5 | #include 6 | 7 | int main(int, char**) 8 | { 9 | IMGUI_CHECKVERSION(); 10 | ImGui::CreateContext(); 11 | ImGuiIO& io = ImGui::GetIO(); 12 | 13 | // Build atlas 14 | unsigned char* tex_pixels = nullptr; 15 | int tex_w, tex_h; 16 | io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); 17 | 18 | for (int n = 0; n < 20; n++) 19 | { 20 | printf("NewFrame() %d\n", n); 21 | io.DisplaySize = ImVec2(1920, 1080); 22 | io.DeltaTime = 1.0f / 60.0f; 23 | ImGui::NewFrame(); 24 | 25 | static float f = 0.0f; 26 | ImGui::Text("Hello, world!"); 27 | ImGui::SliderFloat("float", &f, 0.0f, 1.0f); 28 | ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); 29 | ImGui::ShowDemoWindow(nullptr); 30 | 31 | ImGui::Render(); 32 | } 33 | 34 | printf("DestroyContext()\n"); 35 | ImGui::DestroyContext(); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_directx11 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | imgui 46 | 47 | 48 | sources 49 | 50 | 51 | sources 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL2 (http://www.libsdl.org): 3 | # brew install sdl2 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl2_metal 10 | IMGUI_DIR = ../.. 11 | SOURCES = main.mm 12 | 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 13 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm 14 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 15 | 16 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 17 | LIBS += `sdl2-config --libs` 18 | LIBS += -L/usr/local/lib 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include 21 | CXXFLAGS += `sdl2-config --cflags` 22 | CXXFLAGS += -Wall -Wformat 23 | CFLAGS = $(CXXFLAGS) 24 | 25 | %.o:%.cpp 26 | $(CXX) $(CXXFLAGS) -c -o $@ $< 27 | 28 | %.o:$(IMGUI_DIR)/%.cpp 29 | $(CXX) $(CXXFLAGS) -c -o $@ $< 30 | 31 | %.o:$(IMGUI_DIR)/backends/%.cpp 32 | $(CXX) $(CXXFLAGS) -c -o $@ $< 33 | 34 | %.o:%.mm 35 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 36 | 37 | %.o:$(IMGUI_DIR)/backends/%.mm 38 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 39 | 40 | all: $(EXE) 41 | @echo Build complete 42 | 43 | $(EXE): $(OBJS) 44 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 45 | 46 | clean: 47 | rm -f $(EXE) $(OBJS) 48 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL2 (http://www.libsdl.org): 6 | # Linux: 7 | # apt-get install libsdl2-dev 8 | # Mac OS X: 9 | # brew install sdl2 10 | # MSYS2: 11 | # pacman -S mingw-w64-i686-SDL2 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl2_opengl2 18 | IMGUI_DIR = ../.. 19 | SOURCES = main.cpp 20 | 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 21 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | UNAME_S := $(shell uname -s) 24 | 25 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 26 | CXXFLAGS += -g -Wall -Wformat 27 | LIBS = 28 | 29 | ##--------------------------------------------------------------------- 30 | ## BUILD FLAGS PER PLATFORM 31 | ##--------------------------------------------------------------------- 32 | 33 | ifeq ($(UNAME_S), Linux) #LINUX 34 | ECHO_MESSAGE = "Linux" 35 | LIBS += -lGL -ldl `sdl2-config --libs` 36 | 37 | CXXFLAGS += `sdl2-config --cflags` 38 | CFLAGS = $(CXXFLAGS) 39 | endif 40 | 41 | ifeq ($(UNAME_S), Darwin) #APPLE 42 | ECHO_MESSAGE = "Mac OS X" 43 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 44 | LIBS += -L/usr/local/lib -L/opt/local/lib 45 | 46 | CXXFLAGS += `sdl2-config --cflags` 47 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 48 | CFLAGS = $(CXXFLAGS) 49 | endif 50 | 51 | ifeq ($(OS), Windows_NT) 52 | ECHO_MESSAGE = "MinGW" 53 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 54 | 55 | CXXFLAGS += `pkg-config --cflags sdl2` 56 | CFLAGS = $(CXXFLAGS) 57 | endif 58 | 59 | ##--------------------------------------------------------------------- 60 | ## BUILD RULES 61 | ##--------------------------------------------------------------------- 62 | 63 | %.o:%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | %.o:$(IMGUI_DIR)/%.cpp 67 | $(CXX) $(CXXFLAGS) -c -o $@ $< 68 | 69 | %.o:$(IMGUI_DIR)/backends/%.cpp 70 | $(CXX) $(CXXFLAGS) -c -o $@ $< 71 | 72 | all: $(EXE) 73 | @echo Build complete for $(ECHO_MESSAGE) 74 | 75 | $(EXE): $(OBJS) 76 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 77 | 78 | clean: 79 | rm -f $(EXE) $(OBJS) 80 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's IDE 5 | 6 | Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. 7 | 8 | - On Windows with Visual Studio's CLI 9 | 10 | ``` 11 | set SDL2_DIR=path_to_your_sdl2_folder 12 | 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 13 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 14 | # or for 64-bit: 15 | 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 16 | ``` 17 | 18 | - On Linux and similar Unixes 19 | 20 | ``` 21 | 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 22 | ``` 23 | 24 | - On Mac OS X 25 | 26 | ``` 27 | brew install sdl2 28 | 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 29 | ``` 30 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_opengl2 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | sources 56 | 57 | 58 | 59 | 60 | 61 | imgui 62 | 63 | 64 | imgui 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_sdlrenderer2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL2 (http://www.libsdl.org): 6 | # Linux: 7 | # apt-get install libsdl2-dev 8 | # Mac OS X: 9 | # brew install sdl2 10 | # MSYS2: 11 | # pacman -S mingw-w64-i686-SDL2 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl2_sdlrenderer2 18 | IMGUI_DIR = ../.. 19 | SOURCES = main.cpp 20 | 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 21 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlrenderer2.cpp 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | UNAME_S := $(shell uname -s) 24 | 25 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 26 | CXXFLAGS += -g -Wall -Wformat 27 | LIBS = 28 | 29 | ##--------------------------------------------------------------------- 30 | ## BUILD FLAGS PER PLATFORM 31 | ##--------------------------------------------------------------------- 32 | 33 | ifeq ($(UNAME_S), Linux) #LINUX 34 | ECHO_MESSAGE = "Linux" 35 | LIBS += -lGL -ldl `sdl2-config --libs` 36 | 37 | CXXFLAGS += `sdl2-config --cflags` 38 | CFLAGS = $(CXXFLAGS) 39 | endif 40 | 41 | ifeq ($(UNAME_S), Darwin) #APPLE 42 | ECHO_MESSAGE = "Mac OS X" 43 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 44 | LIBS += -L/usr/local/lib -L/opt/local/lib 45 | 46 | CXXFLAGS += `sdl2-config --cflags` 47 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 48 | CFLAGS = $(CXXFLAGS) 49 | endif 50 | 51 | ifeq ($(OS), Windows_NT) 52 | ECHO_MESSAGE = "MinGW" 53 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 54 | 55 | CXXFLAGS += `pkg-config --cflags sdl2` 56 | CFLAGS = $(CXXFLAGS) 57 | endif 58 | 59 | ##--------------------------------------------------------------------- 60 | ## BUILD RULES 61 | ##--------------------------------------------------------------------- 62 | 63 | %.o:%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | %.o:$(IMGUI_DIR)/%.cpp 67 | $(CXX) $(CXXFLAGS) -c -o $@ $< 68 | 69 | %.o:$(IMGUI_DIR)/backends/%.cpp 70 | $(CXX) $(CXXFLAGS) -c -o $@ $< 71 | 72 | all: $(EXE) 73 | @echo Build complete for $(ECHO_MESSAGE) 74 | 75 | $(EXE): $(OBJS) 76 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 77 | 78 | clean: 79 | rm -f $(EXE) $(OBJS) 80 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_sdlrenderer2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | 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 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | 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 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | 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 25 | ``` 26 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_sdlrenderer2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_sdlrenderer_ 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl2_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl2_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_opengl3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged. 6 | 7 | #CXX = g++ 8 | #CXX = clang++ 9 | 10 | EXE = example_sdl3_opengl3 11 | IMGUI_DIR = ../.. 12 | SOURCES = main.cpp 13 | 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 14 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp 15 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 16 | UNAME_S := $(shell uname -s) 17 | LINUX_GL_LIBS = -lGL 18 | 19 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 20 | CXXFLAGS += -g -Wall -Wformat 21 | LIBS = 22 | 23 | ##--------------------------------------------------------------------- 24 | ## OPENGL ES 25 | ##--------------------------------------------------------------------- 26 | 27 | ## This assumes a GL ES library available in the system, e.g. libGLESv2.so 28 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2 29 | # LINUX_GL_LIBS = -lGLESv2 30 | ## If you're on a Raspberry Pi and want to use the legacy drivers, 31 | ## use the following instead: 32 | # LINUX_GL_LIBS = -L/opt/vc/lib -lbrcmGLESv2 33 | 34 | ##--------------------------------------------------------------------- 35 | ## BUILD FLAGS PER PLATFORM 36 | ##--------------------------------------------------------------------- 37 | 38 | ifeq ($(UNAME_S), Linux) #LINUX 39 | ECHO_MESSAGE = "Linux" 40 | LIBS += $(LINUX_GL_LIBS) -ldl `pkg-config sdl3 --libs` 41 | 42 | CXXFLAGS += `pkg-config sdl3 --cflags` 43 | CFLAGS = $(CXXFLAGS) 44 | endif 45 | 46 | ifeq ($(UNAME_S), Darwin) #APPLE 47 | ECHO_MESSAGE = "Mac OS X" 48 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl3-config --libs` 49 | LIBS += -L/usr/local/lib -L/opt/local/lib 50 | 51 | CXXFLAGS += `pkg-config sdl3 --cflags` 52 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 53 | CFLAGS = $(CXXFLAGS) 54 | endif 55 | 56 | ifeq ($(OS), Windows_NT) 57 | ECHO_MESSAGE = "MinGW" 58 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl3` 59 | 60 | CXXFLAGS += `pkg-config --cflags sdl3` 61 | CFLAGS = $(CXXFLAGS) 62 | endif 63 | 64 | ##--------------------------------------------------------------------- 65 | ## BUILD RULES 66 | ##--------------------------------------------------------------------- 67 | 68 | %.o:%.cpp 69 | $(CXX) $(CXXFLAGS) -c -o $@ $< 70 | 71 | %.o:$(IMGUI_DIR)/%.cpp 72 | $(CXX) $(CXXFLAGS) -c -o $@ $< 73 | 74 | %.o:$(IMGUI_DIR)/backends/%.cpp 75 | $(CXX) $(CXXFLAGS) -c -o $@ $< 76 | 77 | all: $(EXE) 78 | @echo Build complete for $(ECHO_MESSAGE) 79 | 80 | $(EXE): $(OBJS) 81 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 82 | 83 | clean: 84 | rm -f $(EXE) $(OBJS) 85 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | ## Windows with Visual Studio's IDE 5 | 6 | Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. 7 | 8 | ## Windows with Visual Studio's CLI 9 | 10 | Use build_win32.bat or directly: 11 | ``` 12 | set SDL3_DIR=path_to_your_sdl3_folder 13 | 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 14 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 15 | # or for 64-bit: 16 | 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 17 | ``` 18 | 19 | ## Linux and similar Unixes 20 | 21 | Use our Makefile or directly: 22 | ``` 23 | c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends 24 | main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp 25 | `sdl3-config --libs` -lGL -ldl 26 | ``` 27 | 28 | ## macOS 29 | 30 | Use our Makefile or directly: 31 | ``` 32 | brew install sdl3 33 | c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends 34 | main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp 35 | `sdl3-config --libs` -framework OpenGl -framework CoreFoundation 36 | ``` 37 | 38 | ## Emscripten 39 | 40 | As of 2023-05-30 Emscripten doesn't support SDL3 yet. 41 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib shell32.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_opengl3/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 SDL3.lib opengl32.lib shell32.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | sources 56 | 57 | 58 | 59 | 60 | 61 | imgui 62 | 63 | 64 | imgui 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_sdlrenderer3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged. 6 | 7 | #CXX = g++ 8 | #CXX = clang++ 9 | 10 | EXE = example_sdl3_sdlrenderer3 11 | IMGUI_DIR = ../.. 12 | SOURCES = main.cpp 13 | 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 14 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlrenderer3.cpp 15 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 16 | UNAME_S := $(shell uname -s) 17 | LINUX_GL_LIBS = -lGL 18 | 19 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 20 | CXXFLAGS += -g -Wall -Wformat 21 | LIBS = 22 | 23 | ##--------------------------------------------------------------------- 24 | ## BUILD FLAGS PER PLATFORM 25 | ##--------------------------------------------------------------------- 26 | 27 | ifeq ($(UNAME_S), Linux) #LINUX 28 | ECHO_MESSAGE = "Linux" 29 | LIBS += -ldl `pkg-config sdl3 --libs` 30 | 31 | CXXFLAGS += `pkg-config sdl3 --cflags` 32 | CFLAGS = $(CXXFLAGS) 33 | endif 34 | 35 | ifeq ($(UNAME_S), Darwin) #APPLE 36 | ECHO_MESSAGE = "Mac OS X" 37 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl3-config --libs` 38 | LIBS += -L/usr/local/lib -L/opt/local/lib 39 | 40 | CXXFLAGS += `pkg-config sdl3 --cflags` 41 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 42 | CFLAGS = $(CXXFLAGS) 43 | endif 44 | 45 | ifeq ($(OS), Windows_NT) 46 | ECHO_MESSAGE = "MinGW" 47 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl3` 48 | 49 | CXXFLAGS += `pkg-config --cflags sdl3` 50 | CFLAGS = $(CXXFLAGS) 51 | endif 52 | 53 | ##--------------------------------------------------------------------- 54 | ## BUILD RULES 55 | ##--------------------------------------------------------------------- 56 | 57 | %.o:%.cpp 58 | $(CXX) $(CXXFLAGS) -c -o $@ $< 59 | 60 | %.o:$(IMGUI_DIR)/%.cpp 61 | $(CXX) $(CXXFLAGS) -c -o $@ $< 62 | 63 | %.o:$(IMGUI_DIR)/backends/%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | all: $(EXE) 67 | @echo Build complete for $(ECHO_MESSAGE) 68 | 69 | $(EXE): $(OBJS) 70 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 71 | 72 | clean: 73 | rm -f $(EXE) $(OBJS) 74 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_sdlrenderer3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl3_sdlrenderer3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlrenderer3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | imgui 30 | 31 | 32 | imgui 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL3.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL3.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /src/imgui/examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx10/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx10 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\backends\imgui_impl_dx10.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx11 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | 10 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | sources 46 | 47 | 48 | sources 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx12/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx12 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx12.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=d3d12.lib d3dcompiler.lib dxgi.lib 7 | mkdir Debug 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fb3d294f-51ec-478e-a627-25831c80fefd} 6 | 7 | 8 | {4f33ddea-9910-456d-b868-4267eb3c2b19} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | 61 | 62 | imgui 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx9/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx9 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%DXSDK_DIR%/Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx9.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {a82cba23-9de0-45c2-b1e3-2eb1666702de} 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | 56 | 57 | 58 | imgui 59 | 60 | 61 | imgui 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_opengl3/build_mingw.bat: -------------------------------------------------------------------------------- 1 | @REM Build for MINGW64 or 32 from MSYS2. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_opengl3 4 | @set INCLUDES=-I../.. -I../../backends 5 | @set SOURCES=main.cpp ../../backends/imgui_impl_opengl3.cpp ../../backends/imgui_impl_win32.cpp ../../imgui*.cpp 6 | @set LIBS=-lopengl32 -lgdi32 -ldwmapi 7 | mkdir %OUT_DIR% 8 | g++ -DUNICODE %INCLUDES% %SOURCES% -o %OUT_DIR%/%OUT_EXE%.exe --static -mwindows %LIBS% %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /src/imgui/examples/example_win32_opengl3/example_win32_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {a82cba23-9de0-45c2-b1e3-2eb1666702de} 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | sources 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | sources 53 | 54 | 55 | sources 56 | 57 | 58 | 59 | 60 | 61 | sources 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/imgui/examples/libs/emscripten/emscripten_mainloop_stub.h: -------------------------------------------------------------------------------- 1 | // What does this file solves? 2 | // - Since Dear ImGui 1.00 we took pride that most of our examples applications had their entire 3 | // main-loop inside the main() function. That's because: 4 | // - It makes the examples easier to read, keeping the code sequential. 5 | // - It permit the use of local variables, making it easier to try things and perform quick 6 | // changes when someone needs to quickly test something (vs having to structure the example 7 | // in order to pass data around). This is very important because people use those examples 8 | // to craft easy-to-past repro when they want to discuss features or report issues. 9 | // - It conveys at a glance that this is a no-BS framework, it won't take your main loop away from you. 10 | // - It is generally nice and elegant. 11 | // - However, comes Emscripten... it is a wonderful and magical tech but it requires a "main loop" function. 12 | // - Only some of our examples would run on Emscripten. Typically the ones rendering with GL or WGPU ones. 13 | // - I tried to refactor those examples but felt it was problematic that other examples didn't follow the 14 | // same layout. Why would the SDL+GL example be structured one way and the SGL+DX11 be structured differently? 15 | // Especially as we are trying hard to convey that using a Dear ImGui backend in an *existing application* 16 | // should requires only a few dozens lines of code, and this should be consistent and symmetrical for all backends. 17 | // - So the next logical step was to refactor all examples to follow that layout of using a "main loop" function. 18 | // This worked, but it made us lose all the nice things we had... 19 | 20 | // Since only about 4 examples really need to run with Emscripten, here's our solution: 21 | // - Use some weird macros and capturing lambda to turn a loop in main() into a function. 22 | // - Hide all that crap in this file so it doesn't make our examples unusually ugly. 23 | // As a stance and principle of Dear ImGui development we don't use C++ headers and we don't 24 | // want to suggest to the newcomer that we would ever use C++ headers as this would affect 25 | // the initial judgment of many of our target audience. 26 | // - Technique is based on this idea: https://github.com/ocornut/imgui/pull/2492/ 27 | // - The do { } while (0) is to allow our code calling continue in the main loop. 28 | #ifdef __EMSCRIPTEN__ 29 | #include 30 | #include 31 | static std::function MainLoopForEmscriptenP; 32 | static void MainLoopForEmscripten() { MainLoopForEmscriptenP(); } 33 | #define EMSCRIPTEN_MAINLOOP_BEGIN MainLoopForEmscriptenP = [&]() { do 34 | #define EMSCRIPTEN_MAINLOOP_END while (0); }; emscripten_set_main_loop(MainLoopForEmscripten, 0, true) 35 | #else 36 | #define EMSCRIPTEN_MAINLOOP_BEGIN 37 | #define EMSCRIPTEN_MAINLOOP_END 38 | #endif 39 | -------------------------------------------------------------------------------- /src/imgui/examples/libs/emscripten/shell_minimal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dear ImGui Emscripten example 7 | 30 | 31 | 32 | 33 | 63 | {{{ SCRIPT }}} 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/imgui/examples/libs/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /src/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib -------------------------------------------------------------------------------- /src/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib -------------------------------------------------------------------------------- /src/imgui/examples/libs/usynergy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | uSynergy client -- Implementation for the embedded Synergy client library 3 | version 1.0.0, July 7th, 2012 4 | Copyright (c) 2012 Alex Evans 5 | 6 | This is a copy of the files once found at: 7 | https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro 8 | 9 | -------------------------------------------------------------------------------- /src/imgui/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/debuggers/ 7 | Helper files for popular debuggers. 8 | With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger. 9 | 10 | misc/fonts/ 11 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 12 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 13 | Suggested fonts and links. 14 | 15 | misc/freetype/ 16 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 17 | Benefit from better FreeType rasterization, in particular for small fonts. 18 | 19 | misc/single_file/ 20 | Single-file header stub. 21 | We use this to validate compiling all *.cpp files in a same compilation unit. 22 | Users of that technique (also called "Unity builds") can generally provide this themselves, 23 | so we don't really recommend you use this in your projects. 24 | -------------------------------------------------------------------------------- /src/imgui/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | 12 | See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki: 13 | https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness 14 | -------------------------------------------------------------------------------- /src/imgui/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) 2 | // This is also an example of how you may wrap your own similar types. 3 | 4 | // Changelog: 5 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 6 | 7 | // See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki: 8 | // https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | namespace ImGui 15 | { 16 | // ImGui::InputText() with std::string 17 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 18 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 19 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 20 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 21 | } 22 | -------------------------------------------------------------------------------- /src/imgui/misc/debuggers/README.txt: -------------------------------------------------------------------------------- 1 | 2 | HELPER FILES FOR POPULAR DEBUGGERS 3 | 4 | imgui.gdb 5 | GDB: disable stepping into trivial functions. 6 | (read comments inside file for details) 7 | 8 | imgui.natstepfilter 9 | Visual Studio Debugger: disable stepping into trivial functions. 10 | (read comments inside file for details) 11 | 12 | imgui.natvis 13 | Visual Studio Debugger: describe Dear ImGui types for better display. 14 | With this, types like ImVector<> will be displayed nicely in the debugger. 15 | (read comments inside file for details) 16 | 17 | -------------------------------------------------------------------------------- /src/imgui/misc/debuggers/imgui.gdb: -------------------------------------------------------------------------------- 1 | # GDB configuration to aid debugging experience 2 | 3 | # To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add: 4 | # add-auto-load-safe-path /path/to/imgui.gdb 5 | # source /path/to/imgui.gdb 6 | # 7 | # More Information at: 8 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html 9 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory 10 | 11 | # Disable stepping into trivial functions 12 | skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+ 13 | -------------------------------------------------------------------------------- /src/imgui/misc/debuggers/imgui.natstepfilter: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | (ImVec2|ImVec4|ImStrv)::.+ 24 | NoStepInto 25 | 26 | 27 | (ImVector|ImSpan).*::operator.+ 28 | NoStepInto 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/imgui/misc/debuggers/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | {{Size={Size} Capacity={Capacity}}} 18 | 19 | 20 | Size 21 | Data 22 | 23 | 24 | 25 | 26 | 27 | {{Size={DataEnd-Data} }} 28 | 29 | 30 | DataEnd-Data 31 | Data 32 | 33 | 34 | 35 | 36 | 37 | {{x={x,g} y={y,g}}} 38 | 39 | 40 | 41 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 42 | 43 | 44 | 45 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} 46 | 47 | Min 48 | Max 49 | Max.x - Min.x 50 | Max.y - Min.y 51 | 52 | 53 | 54 | 55 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} 56 | 57 | 58 | 59 | {{ID {ID,x} Pos=({Pos.x,g} {Pos.y,g}) Size=({Size.x,g} {Size.y,g}) Parent {(ParentNode==0)?0:ParentNode->ID,x} Childs {(ChildNodes[0] != 0)+(ChildNodes[1] != 0)} Windows {Windows.Size} } 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/imgui/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /src/imgui/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /src/imgui/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /src/imgui/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /src/imgui/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /src/imgui/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/imgui/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/imgui/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // dear imgui: single-file wrapper include 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | 11 | #ifdef IMGUI_IMPLEMENTATION 12 | #define IMGUI_DEFINE_MATH_OPERATORS 13 | #endif 14 | 15 | #include "../../imgui.h" 16 | #ifdef IMGUI_ENABLE_FREETYPE 17 | #include "../../misc/freetype/imgui_freetype.h" 18 | #endif 19 | 20 | #ifdef IMGUI_IMPLEMENTATION 21 | #include "../../imgui.cpp" 22 | #include "../../imgui_demo.cpp" 23 | #include "../../imgui_draw.cpp" 24 | #include "../../imgui_tables.cpp" 25 | #include "../../imgui_widgets.cpp" 26 | #ifdef IMGUI_ENABLE_FREETYPE 27 | #include "../../misc/freetype/imgui_freetype.cpp" 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /src/platform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef _WIN32 3 | #ifndef WIN32_LEAN_AND_MEAN 4 | #define WIN32_LEAN_AND_MEAN 5 | #endif 6 | #include 7 | #else 8 | #include "pthread.h" 9 | #endif 10 | 11 | #ifdef _WIN32 12 | 13 | #define IBMutex_Clear INVALID_HANDLE_VALUE 14 | #define IBThread_Clear INVALID_HANDLE_VALUE 15 | typedef DWORD IBThreadRet; 16 | typedef HANDLE IBMutex; 17 | typedef HANDLE IBThread; 18 | typedef IBThreadRet(WINAPI* IBThreadFunc)(void* data); 19 | 20 | #elif defined(__linux__) || defined(__APPLE__) 21 | 22 | #define IBMutex_Clear 0 23 | #define IBThread_Clear 0 24 | typedef void* IBThreadRet; 25 | typedef pthread_mutex_t IBMutex; 26 | typedef pthread_t IBThread; 27 | typedef IBThreadRet(*IBThreadFunc)(void* data); 28 | #else 29 | 30 | #endif 31 | 32 | void IBMutexInit(IBMutex* mutex, const char* name); 33 | bool IBMutexDestroy(IBMutex* mutex); 34 | int IBMutexLock(IBMutex* mutex); 35 | bool IBMutexRelease(IBMutex* mutex); 36 | bool IBCreateThread(IBThread* thread, size_t stackSize, IBThreadFunc func, void* param); 37 | bool IBDestroyThread(IBThread* thread); 38 | 39 | void CopyBitmapToClipboard(void* bitmap, int width, int height); 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by IceBroLite.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /src/resource1.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by IceBroLite.rc 4 | // 5 | #define IDI_ICON1 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/struse.cpp: -------------------------------------------------------------------------------- 1 | #define STRUSE_IMPLEMENTATION 2 | #include "struse/struse.h" 3 | -------------------------------------------------------------------------------- /src/struse/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Carl-Henrik Skårstedt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /src/struse/struse.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {string,[length]s} 5 | 6 | 7 | {string,[length]s} 8 | 9 | 10 | {string_ptr,[string_length]s} 11 | 12 | -------------------------------------------------------------------------------- /src/struse/xml.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sakrac/IceBroLite/ac5e77a5b1ae858b607ef90eac6c3ec740ee59f2/src/struse/xml.h -------------------------------------------------------------------------------- /src/views/BreakpointView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct UserData; 3 | 4 | struct BreakpointView { 5 | size_t selected_row; 6 | int addCheckpointType; 7 | char checkStartEdit[64]; 8 | char checkEndEdit[64]; 9 | char conditionEdit[64]; 10 | bool open; 11 | 12 | BreakpointView(); 13 | void WriteConfig(UserData& config); 14 | void ReadConfig(strref config); 15 | void Draw(); 16 | void SetSelected(int index); 17 | }; 18 | -------------------------------------------------------------------------------- /src/views/CodeView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "../struse/struse.h" 4 | 5 | struct UserData; 6 | struct CPU6510; 7 | 8 | struct CodeView 9 | { 10 | char address[64]; 11 | char editAsmStr[64]; 12 | 13 | uint16_t addrValue; 14 | uint16_t addrCursor; 15 | uint16_t lastShownPC; 16 | uint16_t lastShownAddress; 17 | 18 | CodeView(); 19 | 20 | void SetAddr( uint16_t addr ); 21 | 22 | void WriteConfig( UserData & config ); 23 | 24 | void ReadConfig( strref config ); 25 | 26 | int editAsmAddr; 27 | int cursor[ 2 ]; 28 | int contextAddr; 29 | int lastShownPCRow; 30 | int srcColDif, srcColDif0; 31 | float srcColDrag; 32 | float cursorTime; 33 | float mouseWheelDiff; 34 | float mouseDragY, dragDiff; 35 | 36 | bool showAddress; 37 | bool showBytes; 38 | bool showDisAsm; 39 | bool showRefs; 40 | bool showSrc; 41 | bool showLabels; 42 | bool fixedAddress; 43 | bool trackPC; 44 | bool open; 45 | bool evalAddress; 46 | bool showPCAddress; 47 | bool focusPC; 48 | bool editAsmFocusRequested; 49 | bool dragging; 50 | bool editingAsm; 51 | 52 | void Draw( int index ); 53 | 54 | protected: 55 | bool EditAssembly(); 56 | void CodeContextMenu(CPU6510* cpu, int index); 57 | void UpdateTrackPC(CPU6510* cpu, int& dY, int lines); 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /src/views/ConsoleView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../imgui/imgui.h" 3 | #include "../struse/struse.h" 4 | #include 5 | struct UserData; 6 | 7 | struct IceConsole 8 | { 9 | char InputBuf[ 256 ]; 10 | int HistoryPos; // -1: new line, 0..History.Size-1 browsing history. 11 | bool ScrollToBottom; 12 | bool open; 13 | ImVector Items; 14 | ImVector History; 15 | ImVector safeItems; 16 | // ImVector Commands; 17 | 18 | IceConsole(); 19 | ~IceConsole(); 20 | 21 | void Init(); 22 | 23 | void WriteConfig( UserData & config ); 24 | 25 | // Portable helpers 26 | static int Stricmp( const char* str1, const char* str2 ) { int d; while( (d = strref::toupper( *str2 ) - strref::toupper( *str1 )) == 0 && *str1 ) { str1++; str2++; } return d; } 27 | static int Strnicmp( const char* str1, const char* str2, int n ) { int d = 0; while( n > 0 && (d = strref::toupper( *str2 ) - strref::toupper( *str1 )) == 0 && *str1 ) { str1++; str2++; n--; } return d; } 28 | static char* Strdup( const char *str ) { size_t len = strlen( str ) + 1; void* buff = malloc( len ); return buff ? (char*)memcpy( buff, (const void*)str, len ) : nullptr; } 29 | static void Strtrim( char* str ) { char* str_end = str + strlen( str ); while( str_end > str && str_end[ -1 ] == ' ' ) str_end--; *str_end = 0; } 30 | 31 | void ReadConfig( strref config ); 32 | 33 | void ClearLog(); 34 | void AddLog( const char* fmt, ... ) IM_FMTARGS( 2 ); 35 | void AddLog( strref line ); 36 | void AddLogSafe( strref line ); 37 | void FlushLogSafe(); 38 | void Draw(); 39 | void ExecCommand( const char* command_line ); 40 | static int TextEditCallbackStub( ImGuiInputTextCallbackData* data ); // In C++11 you are better off using lambdas for this sort of forwarding callbacks 41 | int TextEditCallback( ImGuiInputTextCallbackData* data ); 42 | 43 | static void LogCB( void* user, const char* text, size_t len ); 44 | 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /src/views/FilesView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #if defined(__linux__) || defined(__APPLE__) 5 | #include 6 | #define PATH_MAX_LEN PATH_MAX 7 | #elif _WIN32 8 | #define PATH_MAX_LEN _MAX_PATH 9 | #endif 10 | 11 | struct FVFileInfo { 12 | enum type { 13 | none, 14 | file, 15 | dir 16 | }; 17 | char *name; 18 | uint64_t size; 19 | type fileType; 20 | void Free(); 21 | }; 22 | 23 | struct FVFileList { 24 | std::vector files; 25 | char *filter; 26 | char *path; 27 | void ReadDir(const char *full_path, const char *filter = nullptr); 28 | void Clear(); 29 | void InsertAlphabetically(FVFileInfo& info); 30 | 31 | FVFileList() : filter(nullptr), path(nullptr) {} 32 | }; 33 | 34 | class FVFileView : protected FVFileList { 35 | public: 36 | void Draw(const char *title); 37 | void Show(const char *folder, bool *setWhenDone = nullptr, char *pathWhenDone = nullptr, int pathWhenDoneSize = 0, const char *filter = nullptr); 38 | void SetSave() { save = true; } 39 | bool IsOpen() const { return open; } 40 | const char* GetSelectedFile() const { return selectedFile; } 41 | FVFileView() : open(false), selected(nullptr), pathTarget(nullptr), pathTargetSize(0), selectIndex(0xffffffff) { 42 | userPath[0] = 0; userFile[0] = 0; selectedFile[0] = 0; 43 | } 44 | protected: 45 | bool Enter(strref newPath); 46 | bool open; 47 | bool save; 48 | bool *selected; 49 | char *pathTarget; 50 | int pathTargetSize; 51 | int selectIndex; 52 | char userPath[PATH_MAX_LEN]; 53 | char userFile[PATH_MAX_LEN]; 54 | char selectedFile[PATH_MAX_LEN]; 55 | }; 56 | -------------------------------------------------------------------------------- /src/views/MemView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "../struse/struse.h" 4 | struct UserData; 5 | 6 | struct MemView { 7 | char address[128]; 8 | char span[16]; 9 | 10 | uint32_t addrValue; 11 | uint32_t spanValue; 12 | 13 | int cursor[2]; 14 | 15 | MemView(); 16 | 17 | float cursorTime; 18 | float mouseWheelDiff; 19 | 20 | float mouseDragY, dragDiff; 21 | 22 | bool showAddress; 23 | bool showHex; 24 | bool showText; 25 | 26 | bool forceKeyboardInput; 27 | bool wasActive; 28 | bool fixedAddress; 29 | 30 | bool open; 31 | bool evalAddress; 32 | bool textLowercase; 33 | 34 | bool dragging; 35 | 36 | void SetAddr(uint16_t addr); 37 | void Draw(int index); 38 | void WriteConfig(UserData& config); 39 | void ReadConfig(strref config); 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /src/views/PreView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class strref; 3 | struct PreView { 4 | public: 5 | enum class Mode { 6 | Hidden, 7 | Listing, 8 | SourceContext 9 | }; 10 | 11 | void Draw(); 12 | bool IsOpen() const { return open; } 13 | void ShowListing(strref listing); 14 | PreView() : open(false), mode(Mode::Hidden) 15 | { 16 | listingAddrColumn = 0; 17 | listingCodeColumn = 40; 18 | currFileTopOffs = 0; 19 | currFileLine = 0; 20 | currFileNumLines = 0; 21 | } 22 | protected: 23 | bool open; 24 | Mode mode; 25 | 26 | int listingAddrColumn; 27 | int listingCodeColumn; 28 | strref currFile; 29 | uint32_t currFileTopOffs; 30 | uint32_t currFileLine; 31 | uint32_t currFileNumLines; 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /src/views/RegView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "../struse/struse.h" 4 | struct UserData; 5 | 6 | struct RegisterView 7 | { 8 | RegisterView(); 9 | void WriteConfig( UserData & config ); 10 | void ReadConfig( strref config ); 11 | void Draw(); 12 | 13 | 14 | int cursor; 15 | float cursorTime; 16 | bool open; 17 | bool editing; 18 | bool wasActive; 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /src/views/ScreenView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "../struse/struse.h" 4 | #include "../imgui/imgui.h" 5 | 6 | struct UserData; 7 | 8 | struct ScreenView { 9 | uint8_t* bitmap; 10 | size_t bitmapSize; 11 | 12 | enum class BorderMode { 13 | Full, 14 | Borders, 15 | Screen 16 | }; 17 | 18 | int width, height; 19 | int offs_x, offs_y, scrn_w, scrn_h; 20 | int borderMode; 21 | 22 | ImTextureID texture; 23 | bool open; 24 | bool refresh; 25 | bool drawRasterTime; 26 | 27 | void WriteConfig(UserData& config); 28 | void ReadConfig(strref config); 29 | void Draw(); 30 | ~ScreenView(); 31 | void Refresh(uint8_t* img, uint16_t w, uint16_t h, 32 | uint16_t sx, uint16_t sy, uint16_t sw, uint16_t sh); 33 | 34 | ScreenView(); 35 | }; 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/views/SectionView.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../imgui/imgui.h" 3 | #include "../Sym.h" 4 | #include "../struse/struse.h" 5 | #include "../Config.h" 6 | #include "Views.h" 7 | #include "SectionView.h" 8 | 9 | SectionView::SectionView() : open(false) 10 | { 11 | } 12 | 13 | void SectionView::WriteConfig(UserData& config) 14 | { 15 | config.AddValue(strref("open"), config.OnOff(open)); 16 | } 17 | 18 | void SectionView::ReadConfig(strref config) 19 | { 20 | ConfigParse conf(config); 21 | while (!conf.Empty()) { 22 | strref name, value; 23 | ConfigParseType type = conf.Next(&name, &value); 24 | if (name.same_str("open") && type == ConfigParseType::CPT_Value) { 25 | open = !value.same_str("Off"); 26 | } 27 | } 28 | } 29 | 30 | #define kMaxHiddenSections 128 31 | 32 | void SectionView::Draw() 33 | { 34 | if (!open) { return; } 35 | ImGui::SetNextWindowPos(ImVec2(400, 150), ImGuiCond_FirstUseEver); 36 | ImGui::SetNextWindowSize(ImVec2(520, 400), ImGuiCond_FirstUseEver); 37 | if (!ImGui::Begin("Sections", &open)) { 38 | ImGui::End(); 39 | return; 40 | } 41 | 42 | if (ImGui::Button("Hide All")) { 43 | HideAllSections(); 44 | } 45 | ImGui::SameLine(); 46 | if (ImGui::Button("Show All")) { 47 | ShowAllSections(); 48 | } 49 | 50 | size_t nSections = NumSections(); 51 | for (size_t s = 0; s < nSections; ++s) { 52 | const char* name = GetSectionName(s); 53 | uint64_t hash = strref(name).fnv1a_64(); 54 | bool enabled = true; 55 | for (size_t h = 0, nh = NumHiddenSections(); h < nh; ++h) { 56 | if (hash == GetHiddenSection(h)) { enabled = false; break; } 57 | } 58 | if (ImGui::Checkbox(name[0] ? name : "", &enabled)) { 59 | HideSection(hash, !enabled); 60 | } 61 | } 62 | 63 | ImGui::End(); 64 | } -------------------------------------------------------------------------------- /src/views/SectionView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct UserData; 3 | 4 | struct SectionView { 5 | bool open; 6 | 7 | SectionView(); 8 | void WriteConfig(UserData& config); 9 | void ReadConfig(strref config); 10 | void Draw(); 11 | }; 12 | -------------------------------------------------------------------------------- /src/views/SymbolView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct UserData; 3 | 4 | struct SymbolView { 5 | 6 | enum { kSearchFieldSize = 256, kContextSymbolSize = 64 }; 7 | 8 | bool open; 9 | bool case_sensitive; 10 | uint32_t start, end; 11 | 12 | char searchField[kSearchFieldSize]; 13 | char contextLabel[kContextSymbolSize]; 14 | char startStr[32]; 15 | char endStr[32]; 16 | 17 | SymbolView(); 18 | void WriteConfig(UserData& config); 19 | void ReadConfig(strref config); 20 | void Draw(); 21 | }; 22 | -------------------------------------------------------------------------------- /src/views/ToolBar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct UserData; 3 | 4 | struct ToolBar { 5 | bool open; 6 | 7 | ToolBar(); 8 | void WriteConfig(UserData& config); 9 | void ReadConfig(strref config); 10 | void Draw(); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /src/views/TraceView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct UserData; 3 | 4 | struct TraceView { 5 | size_t tracePointNum; 6 | int lastDrawnRows; 7 | int row; 8 | float mouseWheelDiff; 9 | float mouseYLast; 10 | bool open; 11 | bool mouseDrag; 12 | 13 | TraceView(); 14 | void WriteConfig(UserData& config); 15 | void ReadConfig(strref config); 16 | void Draw(); 17 | }; 18 | -------------------------------------------------------------------------------- /src/views/Views.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class FVFileView; 4 | 5 | void CheckCustomThemeAfterStateLoad(); 6 | 7 | void InitViews(); 8 | void ShowViews(); 9 | void BeginViews(); 10 | void EndViews(); 11 | void SetCodeViewAddr(uint16_t addr, int view = -1); 12 | void SetMemoryViewAddr(uint16_t addr, int view = -1); 13 | bool SaveLayoutOnExit(); 14 | void ReviewListing(); 15 | 16 | void AddWatch(int watch, const char* expr); 17 | 18 | void SetCodeAddr(int code, uint16_t addr); 19 | 20 | float CurrFontSize(); 21 | uint8_t InputHex(); 22 | void SelectFont(int size); 23 | void RefreshScreen(uint8_t* img, uint16_t w, uint16_t h, 24 | uint16_t sx, uint16_t sy, uint16_t sw, uint16_t sh); 25 | bool LoadUserFont(const char* file, int size); 26 | void CheckUserFont(); 27 | bool UseCustomFont(); 28 | void SetInitialFont(); 29 | 30 | void ForceUserFont(strref file, int size); 31 | 32 | int PetsciiFont(); 33 | void ViewPushFont(int font); 34 | void ViewPopFont(); 35 | 36 | FVFileView* GetFileView(); 37 | uint8_t DrawPaletteMenu(uint8_t col); 38 | //int GetPCHighlightStyle(); 39 | //uint32_t GetPCHighlightColor(); 40 | -------------------------------------------------------------------------------- /src/views/WatchView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | struct UserData; 5 | 6 | struct WatchView { 7 | enum class WatchType : uint8_t { 8 | WT_NORMAL, 9 | WT_BYTES, 10 | WT_DISASM 11 | }; 12 | 13 | enum class WatchShow : uint8_t { 14 | WS_HEX, 15 | WS_DEC, 16 | WS_BIN 17 | }; 18 | 19 | enum { 20 | MaxExp = 128 21 | }; 22 | 23 | strown<128> expressions[MaxExp]; 24 | strown<128> rpnExp[MaxExp]; 25 | strown<64> results[MaxExp]; 26 | int numExpressions; 27 | int editExpression; 28 | int prevWidth; 29 | int activeIndex; 30 | int contextIndex; 31 | int values[MaxExp]; 32 | WatchType types[MaxExp]; 33 | WatchShow show[MaxExp]; 34 | bool open; 35 | bool rebuildAll; 36 | bool recalcAll; 37 | bool forceEdit; 38 | 39 | 40 | WatchView(); 41 | 42 | void Evaluate(int index); 43 | 44 | void AddWatch(const char* expression); 45 | 46 | void EvaluateItem(int index); 47 | 48 | void WriteConfig(UserData& config); 49 | 50 | void ReadConfig(strref config); 51 | 52 | void Draw(int index); 53 | }; 54 | 55 | 56 | -------------------------------------------------------------------------------- /themes/bright.theme.txt: -------------------------------------------------------------------------------- 1 | CodeColoring = 1 2 | SourceColor = #4993d9ff 3 | OpCodeColor = #af62b2ff 4 | AddrColor = #527293ff 5 | ByteColor = #578d68ff 6 | CodeCursorColor = #a8d77cff 7 | PCHighlightColor = #3d4074ff 8 | WatchChessColor = #f8dfb2ff 9 | CodeLabelColor = #652f92ff 10 | BranchTargetSaturation = 0.780 11 | BranchTargetBrightness = 0.590 12 | BranchTargetHue = 0.553 13 | BranchTargetAvoid = 0.200 14 | PCHighlightStyle = 1 15 | Text = #346f9aff 16 | TextDisabled = #89a8c9ff 17 | WindowBg = #f4f9c3ff 18 | ChildBg = #caeefeff 19 | Border = #5f79b84c 20 | BorderShadow = #00000000 21 | Button = #84deff66 22 | ButtonHovered = #55c5deff 23 | ButtonActive = #4b8eb5ff 24 | PopupBg = #fffffff9 25 | FrameBg = #fad1ffff 26 | FrameBgHovered = #e6dafc66 27 | FrameBgActive = #f88fffaa 28 | TitleBg = #cff7c0ff 29 | TitleBgActive = #a6e195ff 30 | TitleBgCollapsed = #ffffff82 31 | Tab = #c2cbd5ed 32 | TabHovered = #4296f9cc 33 | TabActive = #ffffffff 34 | TabUnfocused = #7aceb9fb 35 | TabUnfocusedActive = #c8def8ff 36 | CheckMark = #3ed562ff 37 | MenuBarBg = #ffdab8ff 38 | Header = #7967c84f 39 | HeaderHovered = #e4a4ffcc 40 | HeaderActive = #e03bebff 41 | TableHeaderBg = #a8dfe3ff 42 | ScrollbarBg = #617fff60 43 | ScrollbarGrab = #afafafcc 44 | ScrollbarGrabHovered = #7c7c7ccc 45 | ScrollbarGrabActive = #7c7c7cff 46 | SliderGrab = #4296f9c6 47 | SliderGrabActive = #7589cc99 48 | Separator = #6363639e 49 | SeparatorHovered = #2370ccc6 50 | SeparatorActive = #2370ccff 51 | ResizeGrip = #5959592b 52 | ResizeGripHovered = #4296f9aa 53 | ResizeGripActive = #4296f9f2 54 | ModalWindowDimBg = #33333359 55 | -------------------------------------------------------------------------------- /themes/green.theme.txt: -------------------------------------------------------------------------------- 1 | CodeColoring = 1 2 | SourceColor = #546337ff 3 | OpCodeColor = #55a049ff 4 | AddrColor = #487940ff 5 | ByteColor = #2c5925ff 6 | CodeCursorColor = #406b86ff 7 | PCHighlightColor = #41a58eff 8 | WatchChessColor = #183e22ff 9 | CodeLabelColor = #e0b289ff 10 | BranchTargetSaturation = 0.370 11 | BranchTargetBrightness = 0.810 12 | BranchTargetHue = 0.393 13 | BranchTargetAvoid = 0.000 14 | PCHighlightStyle = 1 15 | Text = #55a049ff 16 | TextDisabled = #5f7563ff 17 | WindowBg = #18280bff 18 | ChildBg = #0c2214ff 19 | Border = #6ba962ff 20 | BorderShadow = #221616ff 21 | Button = #1c342bff 22 | ButtonHovered = #246f37ff 23 | ButtonActive = #7da67cff 24 | PopupBg = #1d3c4fff 25 | FrameBg = #00471eff 26 | FrameBgHovered = #3d6740ff 27 | FrameBgActive = #94e089ff 28 | TitleBg = #273715ff 29 | TitleBgActive = #487034ff 30 | TitleBgCollapsed = #000000ff 31 | Tab = #2e4c44db 32 | TabHovered = #377773cc 33 | TabActive = #1a373fff 34 | TabUnfocused = #1e4b52f7 35 | TabUnfocusedActive = #0e282bff 36 | CheckMark = #22ff00ff 37 | MenuBarBg = #1e431dff 38 | Header = #3b4f16ff 39 | HeaderHovered = #137259ff 40 | HeaderActive = #ffffffff 41 | TableHeaderBg = #0b4d46ff 42 | ScrollbarBg = #000000ff 43 | ScrollbarGrab = #9f9f9fff 44 | ScrollbarGrabHovered = #55a049ff 45 | ScrollbarGrabActive = #94e089ff 46 | SliderGrab = #9f9f9fff 47 | SliderGrabActive = #94e089ff 48 | Separator = #000000ff 49 | SeparatorHovered = #ffffffff 50 | SeparatorActive = #8b5429ff 51 | ResizeGrip = #ffffffff 52 | ResizeGripHovered = #94e089ff 53 | ResizeGripActive = #55a049ff 54 | ModalWindowDimBg = #37743059 55 | -------------------------------------------------------------------------------- /themes/purple.theme.txt: -------------------------------------------------------------------------------- 1 | CodeColoring = 1 2 | SourceColor = #79492cff 3 | OpCodeColor = #b29cd1ff 4 | AddrColor = #976531ff 5 | ByteColor = #652a66ff 6 | CodeCursorColor = #5d3b73ff 7 | PCHighlightColor = #f842f9ff 8 | WatchChessColor = #3e1821ff 9 | CodeLabelColor = #e0b289ff 10 | BranchTargetSaturation = 0.540 11 | BranchTargetBrightness = 0.820 12 | BranchTargetHue = 0.935 13 | BranchTargetAvoid = 0.120 14 | PCHighlightStyle = 1 15 | Text = #a48039ff 16 | TextDisabled = #7a502fff 17 | WindowBg = #2d1503ff 18 | ChildBg = #27112aa0 19 | Border = #3c8262ff 20 | BorderShadow = #565f1bff 21 | Button = #380839ff 22 | ButtonHovered = #5f1051ff 23 | ButtonActive = #7869c4ff 24 | PopupBg = #252c50ff 25 | FrameBg = #53220fff 26 | FrameBgHovered = #8b5429ff 27 | FrameBgActive = #710e05ff 28 | TitleBg = #52193aff 29 | TitleBgActive = #5a3a6eff 30 | TitleBgCollapsed = #000000ff 31 | Tab = #5a3759db 32 | TabHovered = #af852acc 33 | TabActive = #441b47ff 34 | TabUnfocused = #52331ef7 35 | TabUnfocusedActive = #322510ff 36 | CheckMark = #71ce7bff 37 | MenuBarBg = #40318dff 38 | Header = #365569ff 39 | HeaderHovered = #357b6eff 40 | HeaderActive = #7869c4ff 41 | TableHeaderBg = #732929ff 42 | ScrollbarBg = #000000ff 43 | ScrollbarGrab = #9f9f9fff 44 | ScrollbarGrabHovered = #55a049ff 45 | ScrollbarGrabActive = #94e089ff 46 | SliderGrab = #9f9f9fff 47 | SliderGrabActive = #94e089ff 48 | Separator = #614529ff 49 | SeparatorHovered = #ffcfa3ff 50 | SeparatorActive = #dc9a40ff 51 | ResizeGrip = #ffffffff 52 | ResizeGripHovered = #94e089ff 53 | ResizeGripActive = #55a049ff 54 | ModalWindowDimBg = #cccccc59 55 | --------------------------------------------------------------------------------