├── .gitignore ├── LICENSE.TXT ├── README.md ├── demo ├── CMakeLists.txt ├── data │ ├── .gitignore │ ├── force_working_directory.cpp │ ├── output │ │ └── _placeholder_.txt │ └── pencils.jpg ├── developer │ ├── CMakeLists.txt │ ├── README.md │ └── scripts │ │ ├── bootstrap.sh │ │ └── windows │ │ └── cmake.bat └── main.cpp ├── docs └── vis_debug_screenshot.png ├── include └── debug-api.h ├── src ├── amalg │ ├── amalg-c.c │ ├── amalg-cpp.cpp │ └── amalg-m.m ├── debug-api.cpp ├── halide-image-io.cpp ├── halide-image-io.h ├── imconfig.h ├── imgui_main.cpp ├── io-broadcast.hpp ├── io-redirect.hpp ├── system.cpp ├── system.hpp ├── treedump.cpp └── utils.h └── third-party ├── .gitignore ├── CMakeLists.txt ├── VERSION.TXT ├── amalgs └── glfw │ ├── glfw-amalg.c │ └── glfw-amalg.m ├── glfw ├── .appveyor.yml ├── .gitattributes ├── .gitignore ├── .travis.yml ├── CMake │ ├── GenerateMappings.cmake │ ├── MacOSXBundleInfo.plist.in │ ├── amd64-mingw32msvc.cmake │ ├── i586-mingw32msvc.cmake │ ├── i686-pc-mingw32.cmake │ ├── i686-w64-mingw32.cmake │ ├── modules │ │ ├── FindEpollShim.cmake │ │ ├── FindMir.cmake │ │ ├── FindOSMesa.cmake │ │ ├── FindVulkan.cmake │ │ ├── FindWaylandProtocols.cmake │ │ └── FindXKBCommon.cmake │ └── x86_64-w64-mingw32.cmake ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── cmake_uninstall.cmake.in ├── deps │ ├── KHR │ │ └── khrplatform.h │ ├── getopt.c │ ├── getopt.h │ ├── glad.c │ ├── glad │ │ └── glad.h │ ├── linmath.h │ ├── mingw │ │ ├── _mingw_dxhelper.h │ │ ├── dinput.h │ │ └── xinput.h │ ├── nuklear.h │ ├── nuklear_glfw_gl2.h │ ├── stb_image_write.h │ ├── tinycthread.c │ ├── tinycthread.h │ ├── vs2008 │ │ └── stdint.h │ └── vulkan │ │ ├── vk_platform.h │ │ ├── vulkan.h │ │ └── vulkan_core.h ├── docs │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── Doxyfile.in │ ├── DoxygenLayout.xml │ ├── build.dox │ ├── compat.dox │ ├── compile.dox │ ├── context.dox │ ├── extra.css │ ├── extra.less │ ├── footer.html │ ├── header.html │ ├── input.dox │ ├── internal.dox │ ├── intro.dox │ ├── main.dox │ ├── monitor.dox │ ├── moving.dox │ ├── news.dox │ ├── quick.dox │ ├── spaces.svg │ ├── vulkan.dox │ └── window.dox ├── examples │ ├── CMakeLists.txt │ ├── boing.c │ ├── gears.c │ ├── glfw.icns │ ├── glfw.ico │ ├── glfw.rc │ ├── heightmap.c │ ├── offscreen.c │ ├── particles.c │ ├── sharing.c │ ├── simple.c │ ├── splitview.c │ └── wave.c ├── include │ └── GLFW │ │ ├── glfw3.h │ │ └── glfw3native.h └── src │ ├── CMakeLists.txt │ ├── cocoa_init.m │ ├── cocoa_joystick.h │ ├── cocoa_joystick.m │ ├── cocoa_monitor.m │ ├── cocoa_platform.h │ ├── cocoa_time.c │ ├── cocoa_window.m │ ├── context.c │ ├── egl_context.c │ ├── egl_context.h │ ├── glfw3.pc.in │ ├── glfw3Config.cmake.in │ ├── glfw_config.h.in │ ├── glx_context.c │ ├── glx_context.h │ ├── init.c │ ├── input.c │ ├── internal.h │ ├── linux_joystick.c │ ├── linux_joystick.h │ ├── mappings.h │ ├── mappings.h.in │ ├── mir_init.c │ ├── mir_monitor.c │ ├── mir_platform.h │ ├── mir_window.c │ ├── monitor.c │ ├── nsgl_context.h │ ├── nsgl_context.m │ ├── null_init.c │ ├── null_joystick.c │ ├── null_joystick.h │ ├── null_monitor.c │ ├── null_platform.h │ ├── null_window.c │ ├── osmesa_context.c │ ├── osmesa_context.h │ ├── posix_thread.c │ ├── posix_thread.h │ ├── posix_time.c │ ├── posix_time.h │ ├── vulkan.c │ ├── wgl_context.c │ ├── wgl_context.h │ ├── win32_init.c │ ├── win32_joystick.c │ ├── win32_joystick.h │ ├── win32_monitor.c │ ├── win32_platform.h │ ├── win32_thread.c │ ├── win32_time.c │ ├── win32_window.c │ ├── window.c │ ├── wl_init.c │ ├── wl_monitor.c │ ├── wl_platform.h │ ├── wl_window.c │ ├── x11_init.c │ ├── x11_monitor.c │ ├── x11_platform.h │ ├── x11_window.c │ ├── xkb_unicode.c │ └── xkb_unicode.h ├── imgui ├── .github │ ├── CONTRIBUTING.md │ ├── issue_template.md │ └── pull_request_template.md ├── .travis.yml ├── CHANGELOG.txt ├── LICENSE.txt ├── README.md ├── TODO.txt ├── examples │ ├── .gitignore │ ├── README.txt │ ├── example_allegro5 │ │ ├── README.md │ │ ├── example_allegro5.vcxproj │ │ ├── example_allegro5.vcxproj.filters │ │ ├── imconfig_allegro5.h │ │ └── main.cpp │ ├── example_apple_metal │ │ ├── README.md │ │ ├── Shared │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Renderer.h │ │ │ ├── Renderer.mm │ │ │ ├── ViewController.h │ │ │ ├── ViewController.mm │ │ │ └── main.m │ │ ├── example_apple_metal.xcodeproj │ │ │ └── project.pbxproj │ │ ├── iOS │ │ │ ├── Base.lproj │ │ │ │ └── Main.storyboard │ │ │ ├── Default-568h@2x.png │ │ │ ├── Info-iOS.plist │ │ │ └── Launch Screen.storyboard │ │ └── macOS │ │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ │ └── Info-macOS.plist │ ├── example_apple_opengl2 │ │ ├── example_apple_opengl2.xcodeproj │ │ │ └── project.pbxproj │ │ └── main.mm │ ├── example_freeglut_opengl2 │ │ ├── example_freeglut_opengl2.vcxproj │ │ ├── example_freeglut_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_glfw_opengl2 │ │ ├── Makefile │ │ ├── build_win32.bat │ │ ├── example_glfw_opengl2.vcxproj │ │ ├── example_glfw_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_glfw_opengl3 │ │ ├── Makefile │ │ ├── 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 │ │ ├── gen_spv.sh │ │ ├── glsl_shader.frag │ │ ├── glsl_shader.vert │ │ └── main.cpp │ ├── example_marmalade │ │ ├── data │ │ │ └── app.icf │ │ ├── main.cpp │ │ └── marmalade_example.mkb │ ├── example_null │ │ ├── build_win32.bat │ │ └── main.cpp │ ├── example_sdl_opengl2 │ │ ├── Makefile │ │ ├── README.md │ │ ├── build_win32.bat │ │ ├── example_sdl_opengl2.vcxproj │ │ ├── example_sdl_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_sdl_opengl3 │ │ ├── Makefile │ │ ├── README.md │ │ ├── build_win32.bat │ │ ├── example_sdl_opengl3.vcxproj │ │ ├── example_sdl_opengl3.vcxproj.filters │ │ └── main.cpp │ ├── example_sdl_vulkan │ │ ├── example_sdl_vulkan.vcxproj │ │ ├── example_sdl_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 │ ├── imgui_examples.sln │ ├── imgui_impl_allegro5.cpp │ ├── imgui_impl_allegro5.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_freeglut.cpp │ ├── imgui_impl_freeglut.h │ ├── imgui_impl_glfw.cpp │ ├── imgui_impl_glfw.h │ ├── imgui_impl_marmalade.cpp │ ├── imgui_impl_marmalade.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_osx.h │ ├── imgui_impl_osx.mm │ ├── imgui_impl_sdl.cpp │ ├── imgui_impl_sdl.h │ ├── imgui_impl_vulkan.cpp │ ├── imgui_impl_vulkan.h │ ├── imgui_impl_win32.cpp │ ├── imgui_impl_win32.h │ └── libs │ │ ├── gl3w │ │ └── GL │ │ │ ├── gl3w.c │ │ │ ├── gl3w.h │ │ │ └── glcorearb.h │ │ ├── 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 ├── misc │ ├── fonts │ │ ├── Cousine-Regular.ttf │ │ ├── DroidSans.ttf │ │ ├── Karla-Regular.ttf │ │ ├── ProggyClean.ttf │ │ ├── ProggyTiny.ttf │ │ ├── README.txt │ │ ├── Roboto-Medium.ttf │ │ └── binary_to_compressed_c.cpp │ ├── freetype │ │ ├── README.md │ │ ├── imgui_freetype.cpp │ │ └── imgui_freetype.h │ └── natvis │ │ ├── README.txt │ │ └── imgui.natvis ├── stb_rect_pack.h ├── stb_textedit.h └── stb_truetype.h ├── imguifilesystem ├── AUTHOR.TXT ├── dirent_portable.h ├── imguifilesystem.cpp └── imguifilesystem.h └── stb ├── .github ├── CONTRIBUTING.md └── PULL_REQUEST_TEMPLATE.md ├── .travis.yml ├── README.md ├── data ├── atari_8bit_font_revised.png ├── easy_font_raw.png ├── herringbone │ ├── license.txt │ ├── template_caves_limit_connectivity.png │ ├── template_caves_tiny_corridors.png │ ├── template_corner_caves.png │ ├── template_horizontal_corridors_v1.png │ ├── template_horizontal_corridors_v2.png │ ├── template_horizontal_corridors_v3.png │ ├── template_limit_connectivity_fat.png │ ├── template_limited_connectivity.png │ ├── template_maze_2_wide.png │ ├── template_maze_plus_2_wide.png │ ├── template_open_areas.png │ ├── template_ref2_corner_caves.png │ ├── template_rooms_and_corridors.png │ ├── template_rooms_and_corridors_2_wide_diagonal_bias.png │ ├── template_rooms_limit_connectivity.png │ ├── template_round_rooms_diagonal_corridors.png │ ├── template_sean_dungeon.png │ ├── template_simple_caves_2_wide.png │ └── template_square_rooms_with_random_rects.png ├── map_01.png ├── map_02.png └── map_03.png ├── deprecated ├── rrsprintf.h ├── stb_image.c └── stretchy_buffer.txt ├── docs ├── other_libs.md ├── stb_howto.txt ├── stb_voxel_render_interview.md └── why_public_domain.md ├── stb.h ├── stb_c_lexer.h ├── stb_connected_components.h ├── stb_divide.h ├── stb_dxt.h ├── stb_easy_font.h ├── stb_herringbone_wang_tile.h ├── stb_image.h ├── stb_image_resize.h ├── stb_image_write.h ├── stb_leakcheck.h ├── stb_perlin.h ├── stb_rect_pack.h ├── stb_sprintf.h ├── stb_textedit.h ├── stb_tilemap_editor.h ├── stb_truetype.h ├── stb_vorbis.c ├── stb_voxel_render.h ├── stretchy_buffer.h └── tools ├── README.footer.md ├── README.header.md ├── README.list ├── easy_font_maker.c ├── make_readme.c ├── make_readme.dsp ├── mr.bat ├── unicode.c └── unicode └── unicode.dsp /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | 3 | build/ 4 | 5 | imgui.ini 6 | -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Adobe Systems Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT CMAKING_WHOLE_SOLUTION) 2 | cmake_minimum_required(VERSION 3.0) 3 | set(CMAKE_CXX_STANDARD 11) 4 | project(visdbg-demo-amalg) 5 | # locate and configure third-party dependencies: 6 | include(../third-party/CMakeLists.txt) 7 | endif() 8 | 9 | 10 | 11 | # check for dependencies 12 | 13 | if (NOT LLVM_INCLUDE_DIRS) 14 | message( FATAL_ERROR "LLVM include directories have not been specified (LLVM_INCLUDE_DIRS)" ) 15 | endif() 16 | if (NOT HALIDE_INCLUDE_DIR) 17 | message( FATAL_ERROR "Halide include directories have not been specified (HALIDE_INCLUDE_DIR)" ) 18 | endif() 19 | if (NOT WIN32 AND NOT OPENGL_INCLUDE_DIR) 20 | message( FATAL_ERROR "OpenGL include directories have not been specified (OPENGL_INCLUDE_DIR)" ) 21 | endif() 22 | if (LINUX AND NOT X11_INCLUDE_DIR) 23 | message( FATAL_ERROR "X11 include directories have not been specified (X11_INCLUDE_DIR)" ) 24 | endif() 25 | 26 | if (NOT LLVM_DEFINITIONS) 27 | message( FATAL_ERROR "LLVM definitions have not been specified (LLVM_DEFINITIONS)" ) 28 | endif() 29 | if (NOT HALIDE_LIBRARY) 30 | message( FATAL_ERROR "Halide library has not been specified (HALIDE_LIBRARY)" ) 31 | endif() 32 | if (APPLE AND NOT GLFW_DEPENDENCIES) 33 | message( FATAL_ERROR "GLFW MacOS dependencies have not been specified (GLFW_DEPENDENCIES)" ) 34 | endif() 35 | if (NOT OPENGL_LIBRARIES) 36 | message( FATAL_ERROR "OpenGL libraries have not been specified (OPENGL_LIBRARIES)" ) 37 | endif() 38 | if (LINUX AND NOT X11_LIBRARIES) 39 | message( FATAL_ERROR "X11 libraries have not been specified (X11_LIBRARIES)" ) 40 | endif() 41 | 42 | 43 | 44 | add_executable( 45 | demo-amalg 46 | 47 | ./main.cpp 48 | 49 | ./data/force_working_directory.cpp 50 | 51 | ../src/amalg/amalg-c.c 52 | ../src/amalg/amalg-cpp.cpp 53 | 54 | ../include/debug-api.h 55 | ) 56 | 57 | 58 | 59 | # configure third-party dependencies: 60 | 61 | target_include_directories( 62 | demo-amalg PUBLIC 63 | ${OPENGL_INCLUDE_DIR} 64 | ${HALIDE_INCLUDE_DIR} 65 | ${LLVM_INCLUDE_DIRS} 66 | ) 67 | 68 | if (APPLE) 69 | target_sources( 70 | demo-amalg PUBLIC 71 | ../src/amalg/amalg-m.m 72 | ) 73 | endif() 74 | 75 | llvm_map_components_to_libnames(llvm_libs support core irreader) 76 | 77 | target_link_libraries( 78 | demo-amalg 79 | ${GLFW_DEPENDENCIES} 80 | ${OPENGL_LIBRARIES} 81 | ${HALIDE_LIBRARY} 82 | ${llvm_libs} 83 | ) 84 | 85 | target_compile_definitions( 86 | demo-amalg PUBLIC 87 | ${LLVM_DEFINITIONS} 88 | ) 89 | 90 | 91 | 92 | # dependency: X11 93 | if (LINUX) 94 | target_include_directories( 95 | demo-amalg PUBLIC 96 | ${X11_INCLUDE_DIR} 97 | ) 98 | target_link_libraries( 99 | demo-amalg 100 | ${X11_LIBRARIES} 101 | ) 102 | endif() 103 | 104 | # dependency: pthread 105 | if (LINUX) 106 | target_link_libraries( 107 | demo-amalg 108 | pthread 109 | dl 110 | ) 111 | endif() 112 | 113 | 114 | if (NOT MSVC) 115 | target_compile_options(demo-amalg PUBLIC -fno-rtti) 116 | endif() 117 | -------------------------------------------------------------------------------- /demo/data/.gitignore: -------------------------------------------------------------------------------- 1 | output/ 2 | -------------------------------------------------------------------------------- /demo/data/force_working_directory.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #ifdef _MSC_VER 11 | #include 12 | #define chdir _chdir 13 | #define getcwd _getcwd 14 | #define strcat strcat_s 15 | #else 16 | #include 17 | #endif//_MSC_VER 18 | 19 | static bool Init(void) 20 | { 21 | // initialization = switching working directory to the data directory 22 | 23 | // set working directory using a relative path: 24 | // (this is a handy hack to get a path relative to the location of this source file) 25 | char path [] = __FILE__ "/../../"; 26 | 27 | // regrettably, simply calling chdir() with the path above may not work on 28 | // some implementations of the standard library... instead, it is best to 29 | // manipulate it first to ensure that only directory names are in the path: 30 | auto this_file = __FILE__; 31 | auto slash = strrchr(this_file, '/'); 32 | #ifdef _WIN32 33 | // Windows also accepts backslashes, which can even be mixed with forward 34 | // slashes in path strings! the correct choice is whichever is right-most: 35 | auto backslash = strrchr(this_file, '\\'); 36 | if (backslash > slash) 37 | { 38 | slash = backslash; 39 | } 40 | #endif//_WIN32 41 | assert(slash); 42 | auto slash_pos = slash - this_file; 43 | path[slash_pos] = '\0'; 44 | strcat(path, "/../"); 45 | 46 | if (chdir(path) != 0) 47 | { 48 | fprintf(stderr, "ERROR: unable to auto-locate the assets directory.\n"); 49 | exit(-9); 50 | } 51 | 52 | // retrieve new working directory as an absolute path: 53 | // (sizeof(path) bytes should be always enough to hold the absolute path) 54 | char cwd [sizeof(path)-1] = { }; 55 | auto ret = getcwd(cwd, sizeof(cwd)); 56 | assert(ret == cwd); 57 | fprintf(stdout, "Switched working directory to the assets directory:\n\t'%s'\n", cwd); 58 | return true; 59 | } 60 | 61 | 62 | 63 | // This will change the working directory at program startup, prior to main(): 64 | static bool initialized = Init(); 65 | -------------------------------------------------------------------------------- /demo/data/output/_placeholder_.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/demo/data/output/_placeholder_.txt -------------------------------------------------------------------------------- /demo/data/pencils.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/demo/data/pencils.jpg -------------------------------------------------------------------------------- /demo/developer/README.md: -------------------------------------------------------------------------------- 1 | # Demo (for developers) 2 | 3 | Use the convenience [scripts/bootstrap.sh](scripts/bootstrap.sh) script to configure and build LLVM and Halide from scratch at a predefined location. Once that's done, run `cmake` here at this location to have the visual debugger developer demo built. 4 | 5 | ## Side-effects of the bootstrap script 6 | 7 | The bootstrap script will clone LLVM, clang and Halide to `visual_debugger/third-party` and checkout specific worktrees to `visual_debugger/build/source`. The script will then build LLVM (with clang) and Halide into `visual_debugger/build`. The cmake file contained in this folder will look for LLVM and Halide at these predetermined build locations in order to build the demo. 8 | 9 | ## Settings 10 | 11 | The user might need to tweak the following settings in `scripts/bootstrap.sh`: 12 | 13 | - location of the necessary tools: 14 | ``` 15 | GIT=git 16 | CMAKE=cmake 17 | PYTHON=$(which python) 18 | ``` 19 | 20 | - Windows build settings: 21 | ``` 22 | if windows_host; then 23 | # Visual Studio version selection: 24 | # 14 -> VS 2015 ; 15 -> VS 2017 25 | VISUAL_STUDIO_VERSION=15 26 | WINDOWS_MINGW_BUILD=0 27 | fi 28 | ``` 29 | > NOTE: if `WINDOWS_MINGW_BUILD` is set, the build will proceed with MinGW make (`VISUAL_STUDIO_VERSION` will be ignored). 30 | 31 | - LLVM/Halide branch selection: 32 | ``` 33 | LLVM_VERSION=60 34 | LLVM_CHECKOUT_VERSION=origin/release_60 35 | CLANG_CHECKOUT_VERSION=origin/release_60 36 | HALIDE_CHECKOUT_VERSION=cc65b9961cb4f5f9ad76c04b0082698557af6681 37 | ``` 38 | 39 | ## Advanced settings 40 | 41 | By default, the script will build both LLVM and Halide only in Release mode, but it is possible to override it by editing: 42 | ``` 43 | # overrides 44 | #platforms='Win32 Win64' 45 | #configurations='Debug Release' 46 | ``` 47 | -------------------------------------------------------------------------------- /demo/developer/scripts/windows/cmake.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | PUSHD . 4 | CALL "%VSTOOLCHAIN%" 5 | POPD 6 | 7 | :: skip CMake if the solution already exists: 8 | IF EXIST "%VSSOLUTION%" GOTO BUILD 9 | 10 | :: https://cmake.org/cmake/help/v3.8/generator/Visual%20Studio%2015%202017.html 11 | SET CMAKE_ARGS=%* 12 | :: ECHO %CMAKE_ARGS% 13 | "%CMAKE%" %CMAKE_ARGS% 14 | 15 | :BUILD 16 | :: NOTE(marcos): nerfing the number of cpus allowed during the build to prevent 17 | :: throttling the system since LLVM and Halide are comprised of a 18 | :: bazillion projects... 19 | :: msbuild "%VSSOLUTION%" /property:Configuration=%VSCONFIGURATION% /property:Platform=%VSPLATFORM% /maxcpucount:2 20 | :: devenv "%VSSOLUTION%" /Build "%VSCONFIGURATION%|%VSPLATFORM%" 21 | 22 | "%CMAKE%" --build . --config "%VSCONFIGURATION%" 23 | -------------------------------------------------------------------------------- /docs/vis_debug_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/docs/vis_debug_screenshot.png -------------------------------------------------------------------------------- /include/debug-api.h: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef HALIDE_VISDBG_DEBUG_API_H 6 | #define HALIDE_VISDBG_DEBUG_API_H 7 | 8 | #include 9 | 10 | namespace Halide 11 | { 12 | 13 | struct DebugFunc 14 | { 15 | Func f; 16 | 17 | void realize(Pipeline::RealizationArg outputs, const Target &target = Target(), 18 | const ParamMap ¶m_map = ParamMap::empty_map()); 19 | 20 | Realization realize(std::vector sizes, const Target &target = Target(), 21 | const ParamMap ¶m_map = ParamMap::empty_map()); 22 | 23 | Realization realize(int x_size, int y_size, int z_size, int w_size, const Target &target = Target(), 24 | const ParamMap ¶m_map = ParamMap::empty_map()); 25 | 26 | Realization realize(int x_size, int y_size, int z_size, const Target &target = Target(), 27 | const ParamMap ¶m_map = ParamMap::empty_map()); 28 | 29 | Realization realize(int x_size, int y_size, const Target &target = Target(), 30 | const ParamMap ¶m_map = ParamMap::empty_map()); 31 | 32 | Realization realize(Buffer<> input, int x_size, const Target &target = Target(), 33 | const ParamMap ¶m_map = ParamMap::empty_map()); 34 | 35 | Realization realize(const Target &target = Target(), 36 | const ParamMap ¶m_map = ParamMap::empty_map()); 37 | }; 38 | 39 | DebugFunc debug(Func f); 40 | 41 | 42 | 43 | struct ReplayableFunc 44 | { 45 | Func f; 46 | Pipeline::RealizationArg outputs; 47 | Target target; 48 | ParamMap param_map; 49 | 50 | ReplayableFunc(Func f = Func()); 51 | 52 | ReplayableFunc&& realize(Pipeline::RealizationArg outputs, const Target &target = Target(), 53 | const ParamMap ¶m_map = ParamMap::empty_map()); 54 | }; 55 | 56 | void replay(std::vector &rpfuncs); 57 | 58 | } 59 | 60 | #endif//HALIDE_VISDBG_DEBUG_API_H 61 | -------------------------------------------------------------------------------- /src/amalg/amalg-c.c: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #include "../../third-party/amalgs/glfw/glfw-amalg.c" 6 | -------------------------------------------------------------------------------- /src/amalg/amalg-cpp.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #include "../halide-image-io.cpp" 6 | #include "../imgui_main.cpp" 7 | #include "../treedump.cpp" 8 | #include "../system.cpp" 9 | #include "../debug-api.cpp" 10 | 11 | #include "../../third-party/imgui/imgui.h" 12 | #include "../../third-party/imgui/imgui.cpp" 13 | #include "../../third-party/imgui/imgui_draw.cpp" 14 | 15 | #include "../../third-party/glfw/include/GLFW/glfw3.h" 16 | #ifdef _WIN32 17 | #define GLFW_EXPOSE_NATIVE_WIN32 18 | #include "../../third-party/glfw/include/GLFW/glfw3native.h" // for glfwGetWin32Window 19 | #endif 20 | #include "../../third-party/imgui/examples/imgui_impl_glfw.cpp" 21 | #include "../../third-party/imgui/examples/imgui_impl_opengl2.cpp" 22 | 23 | #include "../../third-party/imguifilesystem/imguifilesystem.cpp" 24 | -------------------------------------------------------------------------------- /src/amalg/amalg-m.m: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #include "../../third-party/amalgs/glfw/glfw-amalg.m" 6 | -------------------------------------------------------------------------------- /src/halide-image-io.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifdef _MSC_VER 6 | #ifndef _CRT_SECURE_NO_WARNINGS 7 | #define _CRT_SECURE_NO_WARNINGS 8 | #endif//_CRT_SECURE_NO_WARNINGS 9 | #endif//_MSC_VER 10 | 11 | #include "halide-image-io.h" 12 | 13 | #define STB_IMAGE_IMPLEMENTATION 14 | #define STB_IMAGE_WRITE_IMPLEMENTATION 15 | #include "../third-party/stb/stb_image.h" 16 | #include "../third-party/stb/stb_image_write.h" 17 | 18 | Halide::Buffer<> LoadImage(const char* filename) 19 | { 20 | // load image from disk: 21 | int imgWidth(0), imgHeight(0), imgChannels(0); 22 | auto imgPixels = stbi_load(filename, &imgWidth, &imgHeight, &imgChannels, 3); 23 | if (nullptr == imgPixels) 24 | { 25 | return Halide::Buffer<>(); 26 | } 27 | imgChannels = 3; 28 | 29 | // prepare a Buffer from a Runtime::Buffer using interleaved pixel format: 30 | Halide::Buffer image = Halide::Runtime::Buffer::make_interleaved((uint8_t*)imgPixels, imgWidth, imgHeight, imgChannels); 31 | return(image); 32 | } 33 | 34 | const bool SaveImage(const char* filename, Halide::Buffer<>& image) 35 | { 36 | auto imgPixels = image.data(); 37 | auto imgWidth = image.width(); 38 | auto imgHeight = image.height(); 39 | auto imgChannels = image.channels(); 40 | 41 | auto type = image.type(); 42 | 43 | // find image extension and save it to disk: 44 | int ret = 0; 45 | auto ext = strrchr(filename, '.'); 46 | if (strstr(ext, ".jpg") || strstr(ext, ".jpeg")) 47 | { 48 | const int jpeg_quality = 95; // from 0 (worst) to 100 (best) 49 | ret = stbi_write_jpg(filename, imgWidth, imgHeight, imgChannels, (stbi_uc*)imgPixels, jpeg_quality); 50 | } 51 | if (strstr(ext, ".png")) 52 | { 53 | int stride = imgChannels*imgWidth; 54 | ret = stbi_write_png(filename, imgWidth, imgHeight, imgChannels, (stbi_uc*)imgPixels, stride); 55 | } 56 | if (strstr(ext, ".bmp")) 57 | { 58 | ret = stbi_write_bmp(filename, imgWidth, imgHeight, imgChannels, (stbi_uc*)imgPixels); 59 | } 60 | if (strstr(ext, ".tga")) 61 | { 62 | ret = stbi_write_tga(filename, imgWidth, imgHeight, imgChannels, (stbi_uc*)imgPixels); 63 | } 64 | if (strstr(ext, ".hdr")) 65 | { 66 | assert(type.is_float()); 67 | assert(type.bits() == 32); 68 | ret = stbi_write_hdr(filename, imgWidth, imgHeight, imgChannels, (float*)imgPixels); 69 | } 70 | if(strstr(ext, ".pfm")) 71 | { 72 | assert(type.is_float()); 73 | assert(type.bits() == 32); 74 | ret = stbi_write_pfm(filename, imgWidth, imgHeight, imgChannels, (float*)imgPixels); 75 | } 76 | 77 | bool saved = (ret != 0); 78 | return saved; 79 | } 80 | -------------------------------------------------------------------------------- /src/halide-image-io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef HALIDE_VISDBG_IMAGE_IO_H 6 | #define HALIDE_VISDBG_IMAGE_IO_H 7 | 8 | #include 9 | 10 | Halide::Buffer<> LoadImage(const char* filename); 11 | 12 | const bool SaveImage(const char* filename, Halide::Buffer<>& image); 13 | 14 | #endif//HALIDE_VISDBG_IMAGE_IO_H 15 | -------------------------------------------------------------------------------- /src/io-redirect.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef IO_STREAM_REDIRECT_H 6 | #define IO_STREAM_REDIRECT_H 7 | 8 | #include 9 | 10 | #ifdef _MSC_VER 11 | #include 12 | #define fileno _fileno 13 | #define close _close 14 | #define dup _dup 15 | #define dup2 _dup2 16 | #else // UNIX/POSIX 17 | #include 18 | #endif 19 | 20 | bool redirect_permanently(FILE* before, FILE* after) 21 | { 22 | // this routine will permanently redirect writes to the 'before' stream to 23 | // the 'after' stream, such that both become the same thing; there will be 24 | // NO WAY to reverse/restore the original 'before' stream! 25 | 26 | // NOTE(marcos): could use 'freopen' here instead of 'dup2' but that would 27 | // requires passing the correct 'mode' argument to the call... 28 | 29 | // from there on, writing to either stream will have the same effect as to 30 | // writing to the 'after' stream (NOTE: dup2 will silently close 'before') 31 | fflush(before); 32 | fflush(after); 33 | int fd_before = fileno(before); 34 | int fd_after = fileno(after); 35 | int ret = dup2(fd_after, fd_before); 36 | return (ret != -1); 37 | } 38 | 39 | int redirect_temporarily(FILE* before, FILE* after) 40 | { 41 | // clone the original file descriptor to keep the original stream alive: 42 | int fd_before = fileno(before); 43 | int fd_cloned = dup(fd_before); 44 | 45 | // even though 'redirect_permanently()' gets called here, it is all right 46 | // since the original file descriptor has been cloned, making the 'before' 47 | // stream remain alive in 'fd_cloned' 48 | if (!redirect_permanently(before, after)) 49 | { 50 | close(fd_cloned); 51 | return -1; 52 | } 53 | return fd_cloned; 54 | } 55 | 56 | bool redirect_restore(FILE* stream, int fd) 57 | { 58 | // this routine will restore the 'stream' to its original behavior prior to 59 | // the redirection started by 'redirect_temporarily()'; note that 'fd' must 60 | // be the value returned by the call to 'redirect_temporarily()' 61 | fflush(stream); 62 | int fd_stream = fileno(stream); 63 | int ret = dup2(fd, fd_stream); 64 | return (ret != -1); 65 | } 66 | 67 | #endif//IO_STREAM_REDIRECT_H 68 | -------------------------------------------------------------------------------- /src/system.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef SYSTEM_INTROSPECTION_H 6 | #define SYSTEM_INTROSPECTION_H 7 | 8 | #include 9 | 10 | struct SystemInfo 11 | { 12 | Halide::Target host; 13 | 14 | bool cuda; 15 | bool opencl; 16 | bool metal; 17 | bool d3d12; 18 | 19 | SystemInfo(); 20 | 21 | bool Supports(Halide::Target::Feature feature) const; 22 | 23 | bool Supports(Halide::Target::Arch architecture, int bits=0) const; 24 | }; 25 | 26 | #endif//SYSTEM_INTROSPECTION_H 27 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef HALIDE_VISDBG_UTILS_H 6 | #define HALIDE_VISDBG_UTILS_H 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | struct expr_node { 17 | std::string name; 18 | std::vector children; 19 | int node_id = 0; 20 | }; 21 | 22 | struct expr_tree 23 | { 24 | expr_node* root = nullptr; 25 | std::deque nodes; 26 | std::vector parents; //keep track of depth/parents 27 | 28 | expr_node* new_expr_node() 29 | { 30 | nodes.emplace_back(); 31 | auto& node = nodes.back(); 32 | return &node; 33 | } 34 | 35 | void enter(expr_node* node) 36 | { 37 | if(!parents.empty()) 38 | { 39 | parents.back()->children.push_back(node); 40 | } 41 | else 42 | { 43 | assert(root == nullptr); 44 | root = node; 45 | } 46 | assert(node->children.empty()); 47 | parents.push_back(node); 48 | } 49 | 50 | void leave(expr_node* node) 51 | { 52 | assert(!parents.empty()); 53 | assert(parents.back() == node); 54 | parents.pop_back(); 55 | } 56 | }; 57 | 58 | // NOTE(marcos): implementation in 'treedump.cpp' 59 | expr_tree get_tree(Halide::Func f); 60 | 61 | struct Profiling 62 | { 63 | double jit_time; 64 | double upl_time; 65 | double run_time; 66 | }; 67 | 68 | struct Work 69 | { 70 | std::vector< Halide::Buffer<> > input_buffers; 71 | Halide::Buffer<> output_raw; 72 | Halide::Buffer<> output_viz; 73 | Halide::Func f_raw; 74 | Halide::Func f_viz; 75 | Halide::Target target; 76 | }; 77 | 78 | struct Result 79 | { 80 | Halide::Buffer<> output_raw; 81 | Halide::Buffer<> output_viz; 82 | Profiling times; 83 | }; 84 | 85 | struct ViewTransform 86 | { 87 | int view_transform_value, min_val, max_val; 88 | ViewTransform() : view_transform_value(1), min_val(0), max_val(0) {}; 89 | }; 90 | 91 | 92 | #endif//HALIDE_VISDBG_UTILS_H 93 | -------------------------------------------------------------------------------- /third-party/.gitignore: -------------------------------------------------------------------------------- 1 | llvm 2 | clang 3 | Halide 4 | llvm/tools/clang 5 | -------------------------------------------------------------------------------- /third-party/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Linux detection: 2 | if(UNIX AND NOT APPLE) 3 | set(LINUX TRUE) 4 | endif() 5 | 6 | set(THIRD_PARTY_DIR ${CMAKE_CURRENT_LIST_DIR}) 7 | 8 | 9 | 10 | # dependency: glfw 11 | # -- GLFW_INCLUDE_DIR 12 | # -- GLFW_SOURCE_AMALGAMATION 13 | # -- GLFW_DEPENDENCIES 14 | set(GLFW_INCLUDE_DIR 15 | ${CMAKE_CURRENT_LIST_DIR}/glfw/include) 16 | 17 | set(GLFW_SOURCE_AMALGAMATION 18 | ${CMAKE_CURRENT_LIST_DIR}/amalgs/glfw/glfw-amalg.c) 19 | if (APPLE) 20 | set(GLFW_SOURCE_AMALGAMATION 21 | ${GLFW_SOURCE_AMALGAMATION} 22 | ${CMAKE_CURRENT_LIST_DIR}/amalgs/glfw/glfw-amalg.m) 23 | endif() 24 | 25 | set(GLFW_DEPENDENCIES) 26 | if (APPLE) 27 | find_library(COCOA_LIBRARY Cocoa) 28 | find_library(IOKIT_LIBRARY IOKit) 29 | find_library(CORE_VIDEO_LIBRARY CoreVideo) 30 | set(GLFW_DEPENDENCIES 31 | ${COCOA_LIBRARY} 32 | ${IOKIT_LIBRARY} 33 | ${CORE_VIDEO_LIBRARY} 34 | ) 35 | endif() 36 | 37 | 38 | # dependency: imgui 39 | set(IMGUI_INCLUDE_DIR 40 | ${CMAKE_CURRENT_LIST_DIR}/imgui 41 | ${CMAKE_CURRENT_LIST_DIR}/imgui/examples 42 | ) 43 | set(IMGUI_SOURCE_AMALGAMATION 44 | ${CMAKE_CURRENT_LIST_DIR}/imgui/imgui.cpp 45 | ${CMAKE_CURRENT_LIST_DIR}/imgui/imgui_draw.cpp 46 | ${CMAKE_CURRENT_LIST_DIR}/imgui/examples/imgui_impl_glfw.cpp 47 | ${CMAKE_CURRENT_LIST_DIR}/imgui/examples/imgui_impl_opengl2.cpp 48 | ) 49 | set(IMGUI_FILESYSTEN_SOURCE_AMALGAMATION 50 | ${CMAKE_CURRENT_LIST_DIR}/imguifilesystem/dirent_portable.h 51 | ${CMAKE_CURRENT_LIST_DIR}/imguifilesystem/imguifilesystem.h 52 | ${CMAKE_CURRENT_LIST_DIR}/imguifilesystem/imguifilesystem.cpp 53 | ) 54 | 55 | 56 | 57 | # dependency: OpenGL 58 | find_package(OpenGL REQUIRED) 59 | 60 | 61 | 62 | # dependency: X11 63 | if (LINUX) 64 | find_package(X11 REQUIRED) 65 | endif() 66 | -------------------------------------------------------------------------------- /third-party/VERSION.TXT: -------------------------------------------------------------------------------- 1 | version tag/branch commit hash commit date notes 2 | Halide (none) [master] 1d471591077939fda9d9cbb77f92c6322cf28206 Oct. 26, 2018 3 | LLVM 7.0.0 release_70 4c946b7981db07c0108f8ea6c539a5611f754923 Oct. 26, 2018 4 | clang 7.0.0 release_70 a007b984aefa2192b58a534ce3087f43cd21fb27 Oct. 26, 2018 5 | stb (none) [master] e6afb9cbae4064da8c3e69af3ff5c4629579c1d2 Feb. 11, 2018 6 | glfw 3.2.1+ [master] 0be4f3f75aebd9d24583ee86590a38e741db0904 May 29, 2018 7 | imgui 1.62+ [master] 59fb3274a796220081746c5f04b709a060fa89aa June 11, 2018 8 | imguifs (none) [master] dfb0c50c28472050b63e042f001b186657b66400 Feb. 17, 2018 9 | -------------------------------------------------------------------------------- /third-party/amalgs/glfw/glfw-amalg.c: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifdef _MSC_VER 6 | #ifndef _CRT_SECURE_NO_WARNINGS 7 | #define _CRT_SECURE_NO_WARNINGS 8 | #endif//_CRT_SECURE_NO_WARNINGS 9 | #endif//_MSC_VER 10 | 11 | //#undef _GLFW_BUILD_DLL 12 | //#undef GLFW_DLL 13 | 14 | #ifdef _WIN32 15 | #define _GLFW_WIN32 16 | #elif defined(__APPLE__) 17 | #define _GLFW_COCOA 18 | #else 19 | #define _GLFW_UNIX 20 | #define _GLFW_X11 21 | //#define _GLFW_WAYLAND // untested 22 | //#define _GLFW_MIR // untested 23 | //#define _GLFW_OSMESA // Off-screen Mesa (software renderer); untested 24 | #endif 25 | 26 | #ifdef _GLFW_UNIX 27 | #include "../../glfw/src/glx_context.c" 28 | #include "../../glfw/src/linux_joystick.c" 29 | #include "../../glfw/src/posix_thread.c" 30 | #include "../../glfw/src/posix_time.c" 31 | #include "../../glfw/src/xkb_unicode.c" 32 | 33 | #ifdef _GLFW_X11 34 | #include "../../glfw/src/x11_init.c" 35 | #include "../../glfw/src/x11_monitor.c" 36 | #include "../../glfw/src/x11_window.c" 37 | #endif//_GLFW_X11 38 | 39 | #ifdef _GLFW_WAYLAND 40 | // untested 41 | #include "../../glfw/src/wl_init.c" 42 | #include "../../glfw/src/wl_monitor.c" 43 | #include "../../glfw/src/wl_window.c" 44 | #endif//_GLFW_WAYLAND 45 | 46 | #ifdef _GLFW_MIR 47 | // untested 48 | #include "../../glfw/src/mir_init.c" 49 | #include "../../glfw/src/mir_monitor.c" 50 | #include "../../glfw/src/mir_window.c" 51 | #endif//_GLFW_MIR 52 | 53 | #ifdef _GLFW_OSMESA 54 | // untested 55 | // OSMesa: Off-screen Mesa (software renderer) 56 | #include "../../glfw/src/null_init.c" 57 | #include "../../glfw/src/null_joystick.c" 58 | #include "../../glfw/src/null_monitor.c" 59 | #include "../../glfw/src/null_window.c" 60 | #endif//_GLFW_OSMESA 61 | 62 | #endif//_GLFW_UNIX 63 | 64 | // Windows: 65 | #ifdef _GLFW_WIN32 66 | #include "../../glfw/src/wgl_context.c" 67 | #include "../../glfw/src/win32_init.c" 68 | #include "../../glfw/src/win32_joystick.c" 69 | #include "../../glfw/src/win32_monitor.c" 70 | #include "../../glfw/src/win32_thread.c" 71 | #include "../../glfw/src/win32_time.c" 72 | #include "../../glfw/src/win32_window.c" 73 | #endif//_GLFW_WIN32 74 | 75 | // MacOS: 76 | #ifdef _GLFW_COCOA 77 | #include "../../glfw/src/cocoa_time.c" 78 | #include "../../glfw/src/posix_thread.c" 79 | // the remaining source files are written in objective-c; 80 | // make sure to compile 'glfw-amalg.m' as well. 81 | #endif//_GLFW_COCOA 82 | 83 | // Core: 84 | #include "../../glfw/src/context.c" 85 | #include "../../glfw/src/init.c" 86 | #include "../../glfw/src/input.c" 87 | #include "../../glfw/src/monitor.c" 88 | #include "../../glfw/src/vulkan.c" 89 | #include "../../glfw/src/window.c" 90 | // are these really core? 91 | #include "../../glfw/src/egl_context.c" 92 | #include "../../glfw/src/osmesa_context.c" 93 | -------------------------------------------------------------------------------- /third-party/amalgs/glfw/glfw-amalg.m: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed under the MIT License. See LICENSE.TXT file in the project root for full license information. 3 | // 4 | 5 | #ifndef __APPLE__ 6 | #error 'glfw-amalg.m' is only used by MacOS builds. 7 | #endif 8 | 9 | #define _GLFW_COCOA 10 | 11 | // MacOS: 12 | #ifdef _GLFW_COCOA 13 | #include "../../glfw/src/cocoa_init.m" 14 | #include "../../glfw/src/cocoa_joystick.m" 15 | #include "../../glfw/src/cocoa_monitor.m" 16 | #include "../../glfw/src/cocoa_window.m" 17 | #include "../../glfw/src/nsgl_context.m" 18 | #endif//_GLFW_COCOA 19 | -------------------------------------------------------------------------------- /third-party/glfw/.appveyor.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - ci 4 | - master 5 | skip_tags: true 6 | environment: 7 | CFLAGS: /WX 8 | matrix: 9 | - BUILD_SHARED_LIBS: ON 10 | - BUILD_SHARED_LIBS: OFF 11 | matrix: 12 | fast_finish: true 13 | build_script: 14 | - mkdir build 15 | - cd build 16 | - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% .. 17 | - cmake --build . 18 | notifications: 19 | - provider: Email 20 | to: 21 | - ci@glfw.org 22 | on_build_failure: true 23 | on_build_success: false 24 | -------------------------------------------------------------------------------- /third-party/glfw/.gitattributes: -------------------------------------------------------------------------------- 1 | *.m linguist-language=Objective-C 2 | -------------------------------------------------------------------------------- /third-party/glfw/.gitignore: -------------------------------------------------------------------------------- 1 | # External junk 2 | .DS_Store 3 | _ReSharper* 4 | *.opensdf 5 | *.sdf 6 | *.suo 7 | *.dir 8 | *.vcxproj* 9 | *.sln 10 | Win32 11 | x64 12 | Debug 13 | Release 14 | MinSizeRel 15 | RelWithDebInfo 16 | *.xcodeproj 17 | 18 | # CMake files 19 | Makefile 20 | CMakeCache.txt 21 | CMakeFiles 22 | CMakeScripts 23 | cmake_install.cmake 24 | cmake_uninstall.cmake 25 | 26 | # Generated files 27 | docs/Doxyfile 28 | docs/html 29 | docs/warnings.txt 30 | docs/doxygen_sqlite3.db 31 | src/glfw_config.h 32 | src/glfw3.pc 33 | src/glfw3Config.cmake 34 | src/glfw3ConfigVersion.cmake 35 | src/wayland-pointer-constraints-unstable-v1-client-protocol.h 36 | src/wayland-pointer-constraints-unstable-v1-protocol.c 37 | src/wayland-relative-pointer-unstable-v1-client-protocol.h 38 | src/wayland-relative-pointer-unstable-v1-protocol.c 39 | 40 | # Compiled binaries 41 | src/libglfw.so 42 | src/libglfw.so.3 43 | src/libglfw.so.3.3 44 | src/libglfw.dylib 45 | src/libglfw.dylib 46 | src/libglfw.3.dylib 47 | src/libglfw.3.3.dylib 48 | src/libglfw3.a 49 | src/glfw3.lib 50 | src/glfw3.dll 51 | src/glfw3dll.lib 52 | src/libglfw3dll.a 53 | examples/*.app 54 | examples/*.exe 55 | examples/boing 56 | examples/gears 57 | examples/heightmap 58 | examples/offscreen 59 | examples/particles 60 | examples/splitview 61 | examples/sharing 62 | examples/simple 63 | examples/wave 64 | tests/*.app 65 | tests/*.exe 66 | tests/clipboard 67 | tests/cursor 68 | tests/empty 69 | tests/events 70 | tests/gamma 71 | tests/glfwinfo 72 | tests/icon 73 | tests/iconify 74 | tests/joysticks 75 | tests/monitors 76 | tests/msaa 77 | tests/reopen 78 | tests/tearing 79 | tests/threads 80 | tests/timeout 81 | tests/title 82 | tests/vulkan 83 | tests/windows 84 | 85 | -------------------------------------------------------------------------------- /third-party/glfw/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: clang 3 | branches: 4 | only: 5 | - ci 6 | - master 7 | sudo: false 8 | dist: trusty 9 | addons: 10 | apt: 11 | packages: 12 | - cmake 13 | - libxrandr-dev 14 | - libxinerama-dev 15 | - libxcursor-dev 16 | - libxi-dev 17 | matrix: 18 | include: 19 | - os: linux 20 | env: 21 | - BUILD_SHARED_LIBS=ON 22 | - CFLAGS=-Werror 23 | - os: linux 24 | env: 25 | - BUILD_SHARED_LIBS=OFF 26 | - CFLAGS=-Werror 27 | - os: linux 28 | sudo: required 29 | addons: 30 | apt: 31 | packages: 32 | - libwayland-dev 33 | - libxkbcommon-dev 34 | - libegl1-mesa-dev 35 | env: 36 | - USE_WAYLAND=ON 37 | - BUILD_SHARED_LIBS=ON 38 | - CFLAGS=-Werror 39 | - os: linux 40 | sudo: required 41 | addons: 42 | apt: 43 | packages: 44 | - libwayland-dev 45 | - libxkbcommon-dev 46 | - libegl1-mesa-dev 47 | env: 48 | - USE_WAYLAND=ON 49 | - BUILD_SHARED_LIBS=OFF 50 | - CFLAGS=-Werror 51 | - os: osx 52 | env: 53 | - BUILD_SHARED_LIBS=ON 54 | - CFLAGS=-Werror 55 | - os: osx 56 | env: 57 | - BUILD_SHARED_LIBS=OFF 58 | - CFLAGS=-Werror 59 | script: 60 | - if grep -Inr '\s$' src include docs tests examples CMake *.md .gitattributes .gitignore; then echo Trailing whitespace found, aborting.; exit 1; fi 61 | - mkdir build 62 | - cd build 63 | - if test -n "${USE_WAYLAND}"; 64 | then wget https://mirrors.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb; 65 | sudo dpkg -i extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb; 66 | git clone git://anongit.freedesktop.org/wayland/wayland-protocols; 67 | pushd wayland-protocols; 68 | git checkout 1.12 && ./autogen.sh --prefix=/usr && make && sudo make install; 69 | popd; 70 | fi 71 | - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DGLFW_USE_WAYLAND=${USE_WAYLAND} .. 72 | - cmake --build . 73 | notifications: 74 | email: 75 | recipients: 76 | - ci@glfw.org 77 | on_success: never 78 | on_failure: always 79 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/GenerateMappings.cmake: -------------------------------------------------------------------------------- 1 | # Usage: 2 | # cmake -P GenerateMappings.cmake 3 | 4 | set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt") 5 | set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt") 6 | set(template_path "${CMAKE_ARGV3}") 7 | set(target_path "${CMAKE_ARGV4}") 8 | 9 | if (NOT EXISTS "${template_path}") 10 | message(FATAL_ERROR "Failed to find template file ${template_path}") 11 | endif() 12 | 13 | file(DOWNLOAD "${source_url}" "${source_path}" 14 | STATUS download_status 15 | TLS_VERIFY on) 16 | 17 | list(GET download_status 0 status_code) 18 | list(GET download_status 1 status_message) 19 | 20 | if (status_code) 21 | message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}") 22 | endif() 23 | 24 | file(STRINGS "${source_path}" lines) 25 | foreach(line ${lines}) 26 | if ("${line}" MATCHES "^[0-9a-fA-F].*$") 27 | set(GLFW_GAMEPAD_MAPPINGS "${GLFW_GAMEPAD_MAPPINGS}\"${line}\",\n") 28 | endif() 29 | endforeach() 30 | 31 | configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX) 32 | file(REMOVE "${source_path}") 33 | 34 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/MacOSXBundleInfo.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/amd64-mingw32msvc.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win64 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc") 5 | SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++") 6 | SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres") 7 | SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/i586-mingw32msvc.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc") 5 | SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++") 6 | SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres") 7 | SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/i686-pc-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-pc-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-pc-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-pc-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-pc-mingw32-ranlib") 8 | 9 | #Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/opt/mingw/usr/i686-pc-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindEpollShim.cmake: -------------------------------------------------------------------------------- 1 | # Find EpollShim 2 | # Once done, this will define 3 | # 4 | # EPOLLSHIM_FOUND - System has EpollShim 5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories 6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim 7 | 8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) 9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) 10 | 11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 12 | set(EPOLLSHIM_FOUND TRUE) 13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) 17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) 18 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindMir.cmake: -------------------------------------------------------------------------------- 1 | # FindMir 2 | # ------- 3 | # Finds the Mir library 4 | # 5 | # This will will define the following variables:: 6 | # 7 | # MIR_FOUND - the system has Mir 8 | # MIR_INCLUDE_DIRS - the Mir include directory 9 | # MIR_LIBRARIES - the Mir libraries 10 | # MIR_DEFINITIONS - the Mir definitions 11 | 12 | 13 | find_package (PkgConfig) 14 | if(PKG_CONFIG_FOUND) 15 | pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET) 16 | 17 | find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h 18 | PATHS ${PC_MIR_INCLUDE_DIRS}) 19 | 20 | find_library(MIR_LIBRARY NAMES mirclient 21 | PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS}) 22 | 23 | include (FindPackageHandleStandardArgs) 24 | find_package_handle_standard_args (MIR 25 | REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR) 26 | 27 | if (MIR_FOUND) 28 | set(MIR_LIBRARIES ${MIR_LIBRARY}) 29 | set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS}) 30 | set(MIR_DEFINITIONS -DHAVE_MIR=1) 31 | endif() 32 | 33 | mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR) 34 | endif() 35 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindOSMesa.cmake: -------------------------------------------------------------------------------- 1 | # Try to find OSMesa on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # OSMESA_LIBRARIES - Link these to use OSMesa 6 | # OSMESA_INCLUDE_DIR - Include directory for OSMesa 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_OSMESA QUIET osmesa) 14 | 15 | set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS}) 16 | set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindVulkan.cmake: -------------------------------------------------------------------------------- 1 | # Find Vulkan 2 | # 3 | # VULKAN_INCLUDE_DIR 4 | # VULKAN_LIBRARY 5 | # VULKAN_FOUND 6 | 7 | if (WIN32) 8 | find_path(VULKAN_INCLUDE_DIR NAMES vulkan/vulkan.h HINTS 9 | "$ENV{VULKAN_SDK}/Include" 10 | "$ENV{VK_SDK_PATH}/Include") 11 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) 12 | find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS 13 | "$ENV{VULKAN_SDK}/Lib" 14 | "$ENV{VULKAN_SDK}/Bin" 15 | "$ENV{VK_SDK_PATH}/Bin") 16 | find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS 17 | "$ENV{VULKAN_SDK}/Lib" 18 | "$ENV{VULKAN_SDK}/Bin" 19 | "$ENV{VK_SDK_PATH}/Bin") 20 | else() 21 | find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS 22 | "$ENV{VULKAN_SDK}/Lib32" 23 | "$ENV{VULKAN_SDK}/Bin32" 24 | "$ENV{VK_SDK_PATH}/Bin32") 25 | find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS 26 | "$ENV{VULKAN_SDK}/Lib32" 27 | "$ENV{VULKAN_SDK}/Bin32" 28 | "$ENV{VK_SDK_PATH}/Bin32") 29 | endif() 30 | else() 31 | find_path(VULKAN_INCLUDE_DIR NAMES vulkan/vulkan.h HINTS 32 | "$ENV{VULKAN_SDK}/include") 33 | find_library(VULKAN_LIBRARY NAMES vulkan HINTS 34 | "$ENV{VULKAN_SDK}/lib") 35 | endif() 36 | 37 | include(FindPackageHandleStandardArgs) 38 | find_package_handle_standard_args(Vulkan DEFAULT_MSG VULKAN_LIBRARY VULKAN_INCLUDE_DIR) 39 | 40 | mark_as_advanced(VULKAN_INCLUDE_DIR VULKAN_LIBRARY VULKAN_STATIC_LIBRARY) 41 | 42 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindWaylandProtocols.cmake: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | 3 | pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION}) 4 | 5 | execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols 6 | OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR 7 | RESULT_VARIABLE _pkgconfig_failed) 8 | if (_pkgconfig_failed) 9 | message(FATAL_ERROR "Missing wayland-protocols pkgdatadir") 10 | endif() 11 | 12 | string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}") 13 | 14 | find_package_handle_standard_args(WaylandProtocols 15 | FOUND_VAR 16 | WaylandProtocols_FOUND 17 | REQUIRED_VARS 18 | WaylandProtocols_PKGDATADIR 19 | VERSION_VAR 20 | WaylandProtocols_VERSION 21 | HANDLE_COMPONENTS 22 | ) 23 | 24 | set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND}) 25 | set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR}) 26 | set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION}) 27 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/modules/FindXKBCommon.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find XKBCommon 2 | # Once done, this will define 3 | # 4 | # XKBCOMMON_FOUND - System has XKBCommon 5 | # XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories 6 | # XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon 7 | # XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon 8 | 9 | find_package(PkgConfig) 10 | pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon) 11 | set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER}) 12 | 13 | find_path(XKBCOMMON_INCLUDE_DIR 14 | NAMES xkbcommon/xkbcommon.h 15 | HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS} 16 | ) 17 | 18 | find_library(XKBCOMMON_LIBRARY 19 | NAMES xkbcommon 20 | HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS} 21 | ) 22 | 23 | set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY}) 24 | set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS}) 25 | set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR}) 26 | 27 | include(FindPackageHandleStandardArgs) 28 | find_package_handle_standard_args(XKBCommon DEFAULT_MSG 29 | XKBCOMMON_LIBRARY 30 | XKBCOMMON_INCLUDE_DIR 31 | ) 32 | 33 | mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR) 34 | 35 | -------------------------------------------------------------------------------- /third-party/glfw/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /third-party/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2016 Camilla Löwy 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 | -------------------------------------------------------------------------------- /third-party/glfw/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /third-party/glfw/deps/getopt.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, Kim Gräsman 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright notice, 7 | * this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright notice, 9 | * this list of conditions and the following disclaimer in the documentation 10 | * and/or other materials provided with the distribution. 11 | * * Neither the name of Kim Gräsman nor the names of contributors may be used 12 | * to endorse or promote products derived from this software without specific 13 | * prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT, 19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef INCLUDED_GETOPT_PORT_H 28 | #define INCLUDED_GETOPT_PORT_H 29 | 30 | #if defined(__cplusplus) 31 | extern "C" { 32 | #endif 33 | 34 | extern const int no_argument; 35 | extern const int required_argument; 36 | extern const int optional_argument; 37 | 38 | extern char* optarg; 39 | extern int optind, opterr, optopt; 40 | 41 | struct option { 42 | const char* name; 43 | int has_arg; 44 | int* flag; 45 | int val; 46 | }; 47 | 48 | int getopt(int argc, char* const argv[], const char* optstring); 49 | 50 | int getopt_long(int argc, char* const argv[], 51 | const char* optstring, const struct option* longopts, int* longindex); 52 | 53 | #if defined(__cplusplus) 54 | } 55 | #endif 56 | 57 | #endif // INCLUDED_GETOPT_PORT_H 58 | -------------------------------------------------------------------------------- /third-party/glfw/deps/vulkan/vulkan.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_H_ 2 | #define VULKAN_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2018 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | #include "vk_platform.h" 21 | #include "vulkan_core.h" 22 | 23 | #ifdef VK_USE_PLATFORM_ANDROID_KHR 24 | #include "vulkan_android.h" 25 | #endif 26 | 27 | 28 | #ifdef VK_USE_PLATFORM_IOS_MVK 29 | #include "vulkan_ios.h" 30 | #endif 31 | 32 | 33 | #ifdef VK_USE_PLATFORM_MACOS_MVK 34 | #include "vulkan_macos.h" 35 | #endif 36 | 37 | 38 | #ifdef VK_USE_PLATFORM_MIR_KHR 39 | #include 40 | #include "vulkan_mir.h" 41 | #endif 42 | 43 | 44 | #ifdef VK_USE_PLATFORM_VI_NN 45 | #include "vulkan_vi.h" 46 | #endif 47 | 48 | 49 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR 50 | #include 51 | #include "vulkan_wayland.h" 52 | #endif 53 | 54 | 55 | #ifdef VK_USE_PLATFORM_WIN32_KHR 56 | #include 57 | #include "vulkan_win32.h" 58 | #endif 59 | 60 | 61 | #ifdef VK_USE_PLATFORM_XCB_KHR 62 | #include 63 | #include "vulkan_xcb.h" 64 | #endif 65 | 66 | 67 | #ifdef VK_USE_PLATFORM_XLIB_KHR 68 | #include 69 | #include "vulkan_xlib.h" 70 | #endif 71 | 72 | 73 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT 74 | #include 75 | #include 76 | #include "vulkan_xlib_xrandr.h" 77 | #endif 78 | 79 | #endif // VULKAN_H_ 80 | -------------------------------------------------------------------------------- /third-party/glfw/docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(glfw_DOCS_SOURCES 3 | "${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h" 4 | "${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h" 5 | "${GLFW_SOURCE_DIR}/docs/main.dox" 6 | "${GLFW_SOURCE_DIR}/docs/news.dox" 7 | "${GLFW_SOURCE_DIR}/docs/moving.dox" 8 | "${GLFW_SOURCE_DIR}/docs/quick.dox" 9 | "${GLFW_SOURCE_DIR}/docs/compile.dox" 10 | "${GLFW_SOURCE_DIR}/docs/build.dox" 11 | "${GLFW_SOURCE_DIR}/docs/intro.dox" 12 | "${GLFW_SOURCE_DIR}/docs/context.dox" 13 | "${GLFW_SOURCE_DIR}/docs/monitor.dox" 14 | "${GLFW_SOURCE_DIR}/docs/window.dox" 15 | "${GLFW_SOURCE_DIR}/docs/input.dox" 16 | "${GLFW_SOURCE_DIR}/docs/vulkan.dox" 17 | "${GLFW_SOURCE_DIR}/docs/compat.dox" 18 | "${GLFW_SOURCE_DIR}/docs/internal.dox") 19 | 20 | foreach(arg ${glfw_DOCS_SOURCES}) 21 | set(GLFW_DOCS_SOURCES "${GLFW_DOCS_SOURCES} \\\n\"${arg}\"") 22 | endforeach() 23 | 24 | configure_file(Doxyfile.in Doxyfile @ONLY) 25 | 26 | add_custom_target(docs ALL "${DOXYGEN_EXECUTABLE}" 27 | WORKING_DIRECTORY "${GLFW_BINARY_DIR}/docs" 28 | COMMENT "Generating HTML documentation" VERBATIM) 29 | 30 | -------------------------------------------------------------------------------- /third-party/glfw/docs/footer.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /third-party/glfw/docs/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | $projectname: $title 8 | $title 9 | 10 | 11 | 12 | $treeview 13 | $search 14 | $mathjax 15 | 16 | $extrastylesheet 17 | 18 | 19 |
20 | 21 | 22 |
23 |
24 | GLFW 25 | 30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /third-party/glfw/docs/main.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @mainpage notitle 4 | 5 | @section main_intro Introduction 6 | 7 | GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and 8 | Vulkan application development. It provides a simple, platform-independent API 9 | for creating windows, contexts and surfaces, reading input, handling events, etc. 10 | 11 | See @ref news_33 for highlights or the 12 | [version history](http://www.glfw.org/changelog.html) for details. 13 | 14 | @ref quick_guide is a guide for users new to GLFW. It takes you through how to 15 | write a small but complete program. 16 | 17 | There are guides for each section of the API: 18 | 19 | - @ref intro_guide – initialization, error handling and high-level design 20 | - @ref window_guide – creating and working with windows and framebuffers 21 | - @ref context_guide – working with OpenGL and OpenGL ES contexts 22 | - @ref vulkan_guide - working with Vulkan objects and extensions 23 | - @ref monitor_guide – enumerating and working with monitors and video modes 24 | - @ref input_guide – receiving events, polling and processing input 25 | 26 | Once you have written a program, see @ref compile_guide and @ref build_guide. 27 | 28 | The [reference documentation](modules.html) provides more detailed information 29 | about specific functions. 30 | 31 | @ref moving_guide explains what has changed and how to update existing code to 32 | use the new API. 33 | 34 | There is a section on @ref guarantees_limitations for pointer lifetimes, 35 | reentrancy, thread safety, event order and backward and forward compatibility. 36 | 37 | The [FAQ](http://www.glfw.org/faq.html) answers many common questions about the 38 | design, implementation and use of GLFW. 39 | 40 | Finally, @ref compat_guide explains what APIs, standards and protocols GLFW uses 41 | and what happens when they are not present on a given machine. 42 | 43 | This documentation was generated with Doxygen. The sources for it are available 44 | in both the [source distribution](http://www.glfw.org/download.html) and 45 | [GitHub repository](https://github.com/glfw/glfw). 46 | 47 | */ 48 | -------------------------------------------------------------------------------- /third-party/glfw/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | link_libraries(glfw) 3 | 4 | include_directories(${glfw_INCLUDE_DIRS} "${GLFW_SOURCE_DIR}/deps") 5 | 6 | if (MATH_LIBRARY) 7 | link_libraries("${MATH_LIBRARY}") 8 | endif() 9 | 10 | if (MSVC) 11 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 12 | endif() 13 | 14 | if (GLFW_USE_OSMESA) 15 | add_definitions(-DUSE_NATIVE_OSMESA) 16 | endif() 17 | 18 | if (WIN32) 19 | set(ICON glfw.rc) 20 | elseif (APPLE) 21 | set(ICON glfw.icns) 22 | set_source_files_properties(glfw.icns PROPERTIES 23 | MACOSX_PACKAGE_LOCATION "Resources") 24 | endif() 25 | 26 | set(GLAD "${GLFW_SOURCE_DIR}/deps/glad/glad.h" 27 | "${GLFW_SOURCE_DIR}/deps/glad.c") 28 | set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h" 29 | "${GLFW_SOURCE_DIR}/deps/getopt.c") 30 | set(TINYCTHREAD "${GLFW_SOURCE_DIR}/deps/tinycthread.h" 31 | "${GLFW_SOURCE_DIR}/deps/tinycthread.c") 32 | 33 | add_executable(boing WIN32 MACOSX_BUNDLE boing.c ${ICON} ${GLAD}) 34 | add_executable(gears WIN32 MACOSX_BUNDLE gears.c ${ICON} ${GLAD}) 35 | add_executable(heightmap WIN32 MACOSX_BUNDLE heightmap.c ${ICON} ${GLAD}) 36 | add_executable(offscreen offscreen.c ${ICON} ${GLAD}) 37 | add_executable(particles WIN32 MACOSX_BUNDLE particles.c ${ICON} ${TINYCTHREAD} ${GETOPT} ${GLAD}) 38 | add_executable(sharing WIN32 MACOSX_BUNDLE sharing.c ${ICON} ${GLAD}) 39 | add_executable(simple WIN32 MACOSX_BUNDLE simple.c ${ICON} ${GLAD}) 40 | add_executable(splitview WIN32 MACOSX_BUNDLE splitview.c ${ICON} ${GLAD}) 41 | add_executable(wave WIN32 MACOSX_BUNDLE wave.c ${ICON} ${GLAD}) 42 | 43 | target_link_libraries(particles "${CMAKE_THREAD_LIBS_INIT}") 44 | if (RT_LIBRARY) 45 | target_link_libraries(particles "${RT_LIBRARY}") 46 | endif() 47 | 48 | set(WINDOWS_BINARIES boing gears heightmap particles sharing simple splitview wave) 49 | set(CONSOLE_BINARIES offscreen) 50 | 51 | set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES 52 | FOLDER "GLFW3/Examples") 53 | 54 | if (MSVC) 55 | # Tell MSVC to use main instead of WinMain for Windows subsystem executables 56 | set_target_properties(${WINDOWS_BINARIES} PROPERTIES 57 | LINK_FLAGS "/ENTRY:mainCRTStartup") 58 | endif() 59 | 60 | if (APPLE) 61 | set_target_properties(boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Boing") 62 | set_target_properties(gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Gears") 63 | set_target_properties(heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Heightmap") 64 | set_target_properties(particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Particles") 65 | set_target_properties(sharing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Sharing") 66 | set_target_properties(simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple") 67 | set_target_properties(splitview PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "SplitView") 68 | set_target_properties(wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave") 69 | 70 | set_target_properties(${WINDOWS_BINARIES} PROPERTIES 71 | RESOURCE glfw.icns 72 | MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION} 73 | MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION_FULL} 74 | MACOSX_BUNDLE_ICON_FILE glfw.icns 75 | MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/MacOSXBundleInfo.plist.in") 76 | endif() 77 | 78 | -------------------------------------------------------------------------------- /third-party/glfw/examples/glfw.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/glfw/examples/glfw.icns -------------------------------------------------------------------------------- /third-party/glfw/examples/glfw.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/glfw/examples/glfw.ico -------------------------------------------------------------------------------- /third-party/glfw/examples/glfw.rc: -------------------------------------------------------------------------------- 1 | 2 | GLFW_ICON ICON "glfw.ico" 3 | 4 | -------------------------------------------------------------------------------- /third-party/glfw/src/cocoa_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Cocoa - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickNS ns 33 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE 34 | 35 | #define _GLFW_PLATFORM_MAPPING_NAME "Mac OS X" 36 | 37 | // Cocoa-specific per-joystick data 38 | // 39 | typedef struct _GLFWjoystickNS 40 | { 41 | IOHIDDeviceRef device; 42 | CFMutableArrayRef axes; 43 | CFMutableArrayRef buttons; 44 | CFMutableArrayRef hats; 45 | } _GLFWjoystickNS; 46 | 47 | 48 | void _glfwInitJoysticksNS(void); 49 | void _glfwTerminateJoysticksNS(void); 50 | 51 | -------------------------------------------------------------------------------- /third-party/glfw/src/cocoa_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #include 30 | 31 | 32 | ////////////////////////////////////////////////////////////////////////// 33 | ////// GLFW internal API ////// 34 | ////////////////////////////////////////////////////////////////////////// 35 | 36 | // Initialise timer 37 | // 38 | void _glfwInitTimerNS(void) 39 | { 40 | mach_timebase_info_data_t info; 41 | mach_timebase_info(&info); 42 | 43 | _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer; 44 | } 45 | 46 | 47 | ////////////////////////////////////////////////////////////////////////// 48 | ////// GLFW platform API ////// 49 | ////////////////////////////////////////////////////////////////////////// 50 | 51 | uint64_t _glfwPlatformGetTimerValue(void) 52 | { 53 | return mach_absolute_time(); 54 | } 55 | 56 | uint64_t _glfwPlatformGetTimerFrequency(void) 57 | { 58 | return _glfw.timer.ns.frequency; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /third-party/glfw/src/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=${prefix}/include 4 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION_FULL@ 9 | URL: http://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_DEPS@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@ 12 | Libs.private: @GLFW_PKG_LIBS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /third-party/glfw/src/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 2 | -------------------------------------------------------------------------------- /third-party/glfw/src/glfw_config.h.in: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2010-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // As glfw_config.h.in, this file is used by CMake to produce the 27 | // glfw_config.h configuration header file. If you are adding a feature 28 | // requiring conditional compilation, this is where to add the macro. 29 | //======================================================================== 30 | // As glfw_config.h, this file defines compile-time option macros for a 31 | // specific platform and development environment. If you are using the 32 | // GLFW CMake files, modify glfw_config.h.in instead of this file. If you 33 | // are using your own build system, make this file define the appropriate 34 | // macros in whatever way is suitable. 35 | //======================================================================== 36 | 37 | // Define this to 1 if building GLFW for X11 38 | #cmakedefine _GLFW_X11 39 | // Define this to 1 if building GLFW for Win32 40 | #cmakedefine _GLFW_WIN32 41 | // Define this to 1 if building GLFW for Cocoa 42 | #cmakedefine _GLFW_COCOA 43 | // Define this to 1 if building GLFW for Wayland 44 | #cmakedefine _GLFW_WAYLAND 45 | // Define this to 1 if building GLFW for Mir 46 | #cmakedefine _GLFW_MIR 47 | // Define this to 1 if building GLFW for OSMesa 48 | #cmakedefine _GLFW_OSMESA 49 | 50 | // Define this to 1 if building as a shared library / dynamic library / DLL 51 | #cmakedefine _GLFW_BUILD_DLL 52 | // Define this to 1 to use Vulkan loader linked statically into application 53 | #cmakedefine _GLFW_VULKAN_STATIC 54 | 55 | // Define this to 1 to force use of high-performance GPU on hybrid systems 56 | #cmakedefine _GLFW_USE_HYBRID_HPG 57 | 58 | // Define this to 1 if xkbcommon supports the compose key 59 | #cmakedefine HAVE_XKBCOMMON_COMPOSE_H 60 | 61 | -------------------------------------------------------------------------------- /third-party/glfw/src/linux_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickLinux linjs 32 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux linjs 33 | 34 | #define _GLFW_PLATFORM_MAPPING_NAME "Linux" 35 | 36 | // Linux-specific joystick data 37 | // 38 | typedef struct _GLFWjoystickLinux 39 | { 40 | int fd; 41 | char path[PATH_MAX]; 42 | int keyMap[KEY_CNT - BTN_MISC]; 43 | int absMap[ABS_CNT]; 44 | struct input_absinfo absInfo[ABS_CNT]; 45 | int hats[4][2]; 46 | } _GLFWjoystickLinux; 47 | 48 | // Linux-specific joystick API data 49 | // 50 | typedef struct _GLFWlibraryLinux 51 | { 52 | int inotify; 53 | int watch; 54 | regex_t regex; 55 | GLFWbool dropped; 56 | } _GLFWlibraryLinux; 57 | 58 | 59 | GLFWbool _glfwInitJoysticksLinux(void); 60 | void _glfwTerminateJoysticksLinux(void); 61 | void _glfwDetectJoystickConnectionLinux(void); 62 | 63 | -------------------------------------------------------------------------------- /third-party/glfw/src/nsgl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl 28 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl 29 | 30 | 31 | // NSGL-specific per-context data 32 | // 33 | typedef struct _GLFWcontextNSGL 34 | { 35 | id pixelFormat; 36 | id object; 37 | 38 | } _GLFWcontextNSGL; 39 | 40 | // NSGL-specific global data 41 | // 42 | typedef struct _GLFWlibraryNSGL 43 | { 44 | // dlopen handle for OpenGL.framework (for glfwGetProcAddress) 45 | CFBundleRef framework; 46 | 47 | } _GLFWlibraryNSGL; 48 | 49 | 50 | GLFWbool _glfwInitNSGL(void); 51 | void _glfwTerminateNSGL(void); 52 | GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, 53 | const _GLFWctxconfig* ctxconfig, 54 | const _GLFWfbconfig* fbconfig); 55 | void _glfwDestroyContextNSGL(_GLFWwindow* window); 56 | 57 | -------------------------------------------------------------------------------- /third-party/glfw/src/null_init.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW platform API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | int _glfwPlatformInit(void) 36 | { 37 | _glfwInitTimerPOSIX(); 38 | return GLFW_TRUE; 39 | } 40 | 41 | void _glfwPlatformTerminate(void) 42 | { 43 | _glfwTerminateOSMesa(); 44 | } 45 | 46 | const char* _glfwPlatformGetVersionString(void) 47 | { 48 | return _GLFW_VERSION_NUMBER " null OSMesa"; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /third-party/glfw/src/null_joystick.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | 30 | ////////////////////////////////////////////////////////////////////////// 31 | ////// GLFW platform API ////// 32 | ////////////////////////////////////////////////////////////////////////// 33 | 34 | int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode) 35 | { 36 | return GLFW_FALSE; 37 | } 38 | 39 | void _glfwPlatformUpdateGamepadGUID(char* guid) 40 | { 41 | } 42 | 43 | -------------------------------------------------------------------------------- /third-party/glfw/src/null_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_JOYSTICK_STATE int nulljs 28 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE int nulljs 29 | 30 | #define _GLFW_PLATFORM_MAPPING_NAME "" 31 | 32 | -------------------------------------------------------------------------------- /third-party/glfw/src/null_monitor.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW platform API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor) 36 | { 37 | } 38 | 39 | void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) 40 | { 41 | } 42 | 43 | void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, 44 | float* xscale, float* yscale) 45 | { 46 | if (xscale) 47 | *xscale = 1.f; 48 | if (yscale) 49 | *yscale = 1.f; 50 | } 51 | 52 | GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) 53 | { 54 | return NULL; 55 | } 56 | 57 | void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) 58 | { 59 | } 60 | 61 | void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) 62 | { 63 | } 64 | 65 | void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) 66 | { 67 | } 68 | 69 | -------------------------------------------------------------------------------- /third-party/glfw/src/null_platform.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include 29 | 30 | #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNull null 31 | 32 | #define _GLFW_PLATFORM_CONTEXT_STATE 33 | #define _GLFW_PLATFORM_MONITOR_STATE 34 | #define _GLFW_PLATFORM_CURSOR_STATE 35 | #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE 36 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE 37 | #define _GLFW_EGL_CONTEXT_STATE 38 | #define _GLFW_EGL_LIBRARY_CONTEXT_STATE 39 | 40 | #include "osmesa_context.h" 41 | #include "posix_time.h" 42 | #include "posix_thread.h" 43 | #include "null_joystick.h" 44 | 45 | #if defined(_GLFW_WIN32) 46 | #define _glfw_dlopen(name) LoadLibraryA(name) 47 | #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle) 48 | #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name) 49 | #else 50 | #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) 51 | #define _glfw_dlclose(handle) dlclose(handle) 52 | #define _glfw_dlsym(handle, name) dlsym(handle, name) 53 | #endif 54 | 55 | // Null-specific per-window data 56 | // 57 | typedef struct _GLFWwindowNull 58 | { 59 | int width; 60 | int height; 61 | } _GLFWwindowNull; 62 | 63 | -------------------------------------------------------------------------------- /third-party/glfw/src/posix_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #include 31 | #include 32 | 33 | 34 | ////////////////////////////////////////////////////////////////////////// 35 | ////// GLFW platform API ////// 36 | ////////////////////////////////////////////////////////////////////////// 37 | 38 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 39 | { 40 | assert(tls->posix.allocated == GLFW_FALSE); 41 | 42 | if (pthread_key_create(&tls->posix.key, NULL) != 0) 43 | { 44 | _glfwInputError(GLFW_PLATFORM_ERROR, 45 | "POSIX: Failed to create context TLS"); 46 | return GLFW_FALSE; 47 | } 48 | 49 | tls->posix.allocated = GLFW_TRUE; 50 | return GLFW_TRUE; 51 | } 52 | 53 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 54 | { 55 | if (tls->posix.allocated) 56 | pthread_key_delete(tls->posix.key); 57 | memset(tls, 0, sizeof(_GLFWtls)); 58 | } 59 | 60 | void* _glfwPlatformGetTls(_GLFWtls* tls) 61 | { 62 | assert(tls->posix.allocated == GLFW_TRUE); 63 | return pthread_getspecific(tls->posix.key); 64 | } 65 | 66 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 67 | { 68 | assert(tls->posix.allocated == GLFW_TRUE); 69 | pthread_setspecific(tls->posix.key, value); 70 | } 71 | 72 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 73 | { 74 | assert(mutex->posix.allocated == GLFW_FALSE); 75 | 76 | if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0) 77 | { 78 | _glfwInputError(GLFW_PLATFORM_ERROR, "POSIX: Failed to create mutex"); 79 | return GLFW_FALSE; 80 | } 81 | 82 | return mutex->posix.allocated = GLFW_TRUE; 83 | } 84 | 85 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 86 | { 87 | if (mutex->posix.allocated) 88 | pthread_mutex_destroy(&mutex->posix.handle); 89 | memset(mutex, 0, sizeof(_GLFWmutex)); 90 | } 91 | 92 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 93 | { 94 | assert(mutex->posix.allocated == GLFW_TRUE); 95 | pthread_mutex_lock(&mutex->posix.handle); 96 | } 97 | 98 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 99 | { 100 | assert(mutex->posix.allocated == GLFW_TRUE); 101 | pthread_mutex_unlock(&mutex->posix.handle); 102 | } 103 | 104 | -------------------------------------------------------------------------------- /third-party/glfw/src/posix_thread.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include 29 | 30 | #define _GLFW_PLATFORM_TLS_STATE _GLFWtlsPOSIX posix 31 | #define _GLFW_PLATFORM_MUTEX_STATE _GLFWmutexPOSIX posix 32 | 33 | 34 | // POSIX-specific thread local storage data 35 | // 36 | typedef struct _GLFWtlsPOSIX 37 | { 38 | GLFWbool allocated; 39 | pthread_key_t key; 40 | 41 | } _GLFWtlsPOSIX; 42 | 43 | // POSIX-specific mutex data 44 | // 45 | typedef struct _GLFWmutexPOSIX 46 | { 47 | GLFWbool allocated; 48 | pthread_mutex_t handle; 49 | 50 | } _GLFWmutexPOSIX; 51 | 52 | -------------------------------------------------------------------------------- /third-party/glfw/src/posix_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #include 31 | #include 32 | 33 | 34 | ////////////////////////////////////////////////////////////////////////// 35 | ////// GLFW internal API ////// 36 | ////////////////////////////////////////////////////////////////////////// 37 | 38 | // Initialise timer 39 | // 40 | void _glfwInitTimerPOSIX(void) 41 | { 42 | #if defined(CLOCK_MONOTONIC) 43 | struct timespec ts; 44 | 45 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) 46 | { 47 | _glfw.timer.posix.monotonic = GLFW_TRUE; 48 | _glfw.timer.posix.frequency = 1000000000; 49 | } 50 | else 51 | #endif 52 | { 53 | _glfw.timer.posix.monotonic = GLFW_FALSE; 54 | _glfw.timer.posix.frequency = 1000000; 55 | } 56 | } 57 | 58 | 59 | ////////////////////////////////////////////////////////////////////////// 60 | ////// GLFW platform API ////// 61 | ////////////////////////////////////////////////////////////////////////// 62 | 63 | uint64_t _glfwPlatformGetTimerValue(void) 64 | { 65 | #if defined(CLOCK_MONOTONIC) 66 | if (_glfw.timer.posix.monotonic) 67 | { 68 | struct timespec ts; 69 | clock_gettime(CLOCK_MONOTONIC, &ts); 70 | return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec; 71 | } 72 | else 73 | #endif 74 | { 75 | struct timeval tv; 76 | gettimeofday(&tv, NULL); 77 | return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec; 78 | } 79 | } 80 | 81 | uint64_t _glfwPlatformGetTimerFrequency(void) 82 | { 83 | return _glfw.timer.posix.frequency; 84 | } 85 | 86 | -------------------------------------------------------------------------------- /third-party/glfw/src/posix_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix 29 | 30 | #include 31 | 32 | 33 | // POSIX-specific global timer data 34 | // 35 | typedef struct _GLFWtimerPOSIX 36 | { 37 | GLFWbool monotonic; 38 | uint64_t frequency; 39 | 40 | } _GLFWtimerPOSIX; 41 | 42 | 43 | void _glfwInitTimerPOSIX(void); 44 | 45 | -------------------------------------------------------------------------------- /third-party/glfw/src/win32_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickWin32 win32 28 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE int dummy 29 | 30 | #define _GLFW_PLATFORM_MAPPING_NAME "Windows" 31 | 32 | // Joystick element (axis, button or slider) 33 | // 34 | typedef struct _GLFWjoyobjectWin32 35 | { 36 | int offset; 37 | int type; 38 | } _GLFWjoyobjectWin32; 39 | 40 | // Win32-specific per-joystick data 41 | // 42 | typedef struct _GLFWjoystickWin32 43 | { 44 | _GLFWjoyobjectWin32* objects; 45 | int objectCount; 46 | IDirectInputDevice8W* device; 47 | DWORD index; 48 | GUID guid; 49 | } _GLFWjoystickWin32; 50 | 51 | 52 | void _glfwInitJoysticksWin32(void); 53 | void _glfwTerminateJoysticksWin32(void); 54 | void _glfwDetectJoystickConnectionWin32(void); 55 | void _glfwDetectJoystickDisconnectionWin32(void); 56 | 57 | -------------------------------------------------------------------------------- /third-party/glfw/src/win32_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #include 31 | 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW platform API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 38 | { 39 | assert(tls->win32.allocated == GLFW_FALSE); 40 | 41 | tls->win32.index = TlsAlloc(); 42 | if (tls->win32.index == TLS_OUT_OF_INDEXES) 43 | { 44 | _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, 45 | "Win32: Failed to allocate TLS index"); 46 | return GLFW_FALSE; 47 | } 48 | 49 | tls->win32.allocated = GLFW_TRUE; 50 | return GLFW_TRUE; 51 | } 52 | 53 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 54 | { 55 | if (tls->win32.allocated) 56 | TlsFree(tls->win32.index); 57 | memset(tls, 0, sizeof(_GLFWtls)); 58 | } 59 | 60 | void* _glfwPlatformGetTls(_GLFWtls* tls) 61 | { 62 | assert(tls->win32.allocated == GLFW_TRUE); 63 | return TlsGetValue(tls->win32.index); 64 | } 65 | 66 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 67 | { 68 | assert(tls->win32.allocated == GLFW_TRUE); 69 | TlsSetValue(tls->win32.index, value); 70 | } 71 | 72 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 73 | { 74 | assert(mutex->win32.allocated == GLFW_FALSE); 75 | InitializeCriticalSection(&mutex->win32.section); 76 | return mutex->win32.allocated = GLFW_TRUE; 77 | } 78 | 79 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 80 | { 81 | if (mutex->win32.allocated) 82 | DeleteCriticalSection(&mutex->win32.section); 83 | memset(mutex, 0, sizeof(_GLFWmutex)); 84 | } 85 | 86 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 87 | { 88 | assert(mutex->win32.allocated == GLFW_TRUE); 89 | EnterCriticalSection(&mutex->win32.section); 90 | } 91 | 92 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 93 | { 94 | assert(mutex->win32.allocated == GLFW_TRUE); 95 | LeaveCriticalSection(&mutex->win32.section); 96 | } 97 | 98 | -------------------------------------------------------------------------------- /third-party/glfw/src/win32_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW internal API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | // Initialise timer 36 | // 37 | void _glfwInitTimerWin32(void) 38 | { 39 | uint64_t frequency; 40 | 41 | if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency)) 42 | { 43 | _glfw.timer.win32.hasPC = GLFW_TRUE; 44 | _glfw.timer.win32.frequency = frequency; 45 | } 46 | else 47 | { 48 | _glfw.timer.win32.hasPC = GLFW_FALSE; 49 | _glfw.timer.win32.frequency = 1000; 50 | } 51 | } 52 | 53 | 54 | ////////////////////////////////////////////////////////////////////////// 55 | ////// GLFW platform API ////// 56 | ////////////////////////////////////////////////////////////////////////// 57 | 58 | uint64_t _glfwPlatformGetTimerValue(void) 59 | { 60 | if (_glfw.timer.win32.hasPC) 61 | { 62 | uint64_t value; 63 | QueryPerformanceCounter((LARGE_INTEGER*) &value); 64 | return value; 65 | } 66 | else 67 | return (uint64_t) timeGetTime(); 68 | } 69 | 70 | uint64_t _glfwPlatformGetTimerFrequency(void) 71 | { 72 | return _glfw.timer.win32.frequency; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /third-party/glfw/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.3 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | long _glfwKeySym2Unicode(unsigned int keysym); 28 | 29 | -------------------------------------------------------------------------------- /third-party/imgui/.github/issue_template.md: -------------------------------------------------------------------------------- 1 | You may use the Issue Tracker to ask for help and submit bug reports, feature requests or suggestions. 2 | 3 | PLEASE CAREFULLY READ THIS DOCUMENT before doing so: 4 | [CONTRIBUTING.md](https://github.com/ocornut/imgui/blob/master/.github/CONTRIBUTING.md). 5 | 6 | SELECT "PREVIEW CHANGES" TO TURN THE URL ABOVE INTO A CLICKABLE LINK. 7 | 8 | (Delete everything above this section before submitting your issue. Please read the CONTRIBUTING.md file!) 9 | 10 | ---- 11 | 12 | **Version/Branch of Dear ImGui:** 13 | 14 | XXX 15 | 16 | **Back-end file/Renderer/OS:** _(if the question is related to inputs/rendering/build, otherwise delete this section)_ 17 | 18 | XXX 19 | 20 | **My Issue/Question:** _(please provide context)_ 21 | 22 | **Standalone, minimal, complete and verifiable example:** _(see CONTRIBUTING.md)_ 23 | ``` 24 | ImGui::Begin("Example Bug"); 25 | MoreCodeToExplainMyIssue(); 26 | ImGui::End(); 27 | ``` 28 | 29 | **Screenshots/Video** _(you can drag files here)_ 30 | -------------------------------------------------------------------------------- /third-party/imgui/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | - If you are adding a feature, please explain the context of the change: what do you need the feature for? 2 | - Try to attach screenshots to clarify the context and demonstrate the feature at a glance. 3 | - Make sure you create a branch for the pull request. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR. 4 | - You can read [CONTRIBUTING.md](https://github.com/ocornut/imgui/blob/master/.github/CONTRIBUTING.md) for more details. 5 | 6 | (Clear this form before submitting your PR) 7 | -------------------------------------------------------------------------------- /third-party/imgui/.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | sudo: required 3 | dist: trusty 4 | 5 | os: 6 | - linux 7 | - osx 8 | 9 | compiler: 10 | - gcc 11 | - clang 12 | 13 | before_install: 14 | - if [ $TRAVIS_OS_NAME == linux ]; then 15 | sudo apt-get update -qq; 16 | sudo apt-get install -y --no-install-recommends libxrandr-dev libxi-dev libxxf86vm-dev libsdl2-dev; 17 | wget https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip; 18 | unzip glfw-3.2.1.zip && cd glfw-3.2.1; 19 | cmake -DBUILD_SHARED_LIBS=true -DGLFW_BUILD_EXAMPLES=false -DGLFW_BUILD_TESTS=false -DGLFW_BUILD_DOCS=false .; 20 | sudo make -j $CPU_NUM install && cd ..; 21 | fi 22 | - if [ $TRAVIS_OS_NAME == osx ]; then 23 | brew update; 24 | brew install glfw3; 25 | brew install sdl2; 26 | fi 27 | 28 | script: 29 | - make -C examples/example_glfw_opengl2 30 | - make -C examples/example_glfw_opengl3 31 | - make -C examples/example_sdl_opengl3 32 | -------------------------------------------------------------------------------- /third-party/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018 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 | -------------------------------------------------------------------------------- /third-party/imgui/examples/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | */Debug/* 3 | */Release/* 4 | */ipch/* 5 | */x64/* 6 | *.opensdf 7 | *.sdf 8 | *.suo 9 | *.user 10 | *.o 11 | *.obj 12 | *.exe 13 | *.log 14 | *.pdb 15 | *.ilk 16 | *.VC.db 17 | *.VC.VC.opendb 18 | 19 | ## Xcode cruft 20 | .DS_Store 21 | project.xcworkspace 22 | xcuserdata 23 | 24 | ## Emscripten output 25 | *.out.js 26 | *.out.wasm 27 | 28 | ## Unix executables 29 | example_glfw_opengl2/example_glfw_opengl2 30 | example_glfw_opengl3/example_glfw_opengl3 31 | example_sdl_opengl2/example_sdl_opengl2 32 | example_sdl_opengl3/example_sdl_opengl3 33 | 34 | ## Dear ImGui Ini files 35 | imgui.ini 36 | -------------------------------------------------------------------------------- /third-party/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 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 back-end 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+ 13 | 14 | ```bash 15 | g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example 16 | ``` 17 | 18 | - On Windows with Visual Studio's CLI 19 | 20 | ``` 21 | set ALLEGRODIR=path_to_your_allegro5_folder 22 | cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib 23 | ``` 24 | -------------------------------------------------------------------------------- /third-party/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 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | 47 | 48 | 49 | sources 50 | 51 | 52 | -------------------------------------------------------------------------------- /third-party/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 | -------------------------------------------------------------------------------- /third-party/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 | (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.) 8 | 9 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/Shared/AppDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | #if TARGET_OS_IPHONE 5 | 6 | #import 7 | 8 | @interface AppDelegate : UIResponder 9 | @property (strong, nonatomic) UIWindow *window; 10 | @end 11 | 12 | #else 13 | 14 | #import 15 | 16 | @interface AppDelegate : NSObject 17 | @end 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/Shared/AppDelegate.m: -------------------------------------------------------------------------------- 1 | 2 | #import "AppDelegate.h" 3 | 4 | @implementation AppDelegate 5 | 6 | #if TARGET_OS_OSX 7 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 8 | return YES; 9 | } 10 | #endif 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/Shared/Renderer.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface Renderer : NSObject 5 | 6 | -(nonnull instancetype)initWithView:(nonnull MTKView *)view; 7 | 8 | @end 9 | 10 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/Shared/ViewController.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import 4 | #import "Renderer.h" 5 | 6 | #if TARGET_OS_IPHONE 7 | 8 | #import 9 | 10 | @interface ViewController : UIViewController 11 | @end 12 | 13 | #else 14 | 15 | #import 16 | 17 | @interface ViewController : NSViewController 18 | @end 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/Shared/main.m: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | #if TARGET_OS_IPHONE 5 | 6 | #import 7 | #import "AppDelegate.h" 8 | 9 | int main(int argc, char * argv[]) { 10 | @autoreleasepool { 11 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 12 | } 13 | } 14 | 15 | #else 16 | 17 | #import 18 | 19 | int main(int argc, const char * argv[]) { 20 | return NSApplicationMain(argc, argv); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/iOS/Base.lproj/Main.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 | 29 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /third-party/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 | Launch Screen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | metal 31 | 32 | UIRequiresFullScreen 33 | 34 | UIStatusBarHidden 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | UIInterfaceOrientationPortraitUpsideDown 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_apple_metal/iOS/Launch Screen.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 | 29 | 30 | -------------------------------------------------------------------------------- /third-party/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 | NSHumanReadableCopyright 26 | Copyright © 2018 Warren Moore. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_freeglut_opengl2/example_freeglut_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 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/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 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl2.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 21 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 22 | 23 | UNAME_S := $(shell uname -s) 24 | 25 | 26 | ifeq ($(UNAME_S), Linux) #LINUX 27 | ECHO_MESSAGE = "Linux" 28 | LIBS = -lGL `pkg-config --static --libs glfw3` 29 | 30 | CXXFLAGS = -I../ -I../../ `pkg-config --cflags glfw3` 31 | CXXFLAGS += -Wall -Wformat 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 38 | #LIBS += -L/usr/local/lib -lglfw3 39 | LIBS += -L/usr/local/lib -lglfw 40 | 41 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 42 | CXXFLAGS += -Wall -Wformat 43 | CFLAGS = $(CXXFLAGS) 44 | endif 45 | 46 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 47 | ECHO_MESSAGE = "Windows" 48 | LIBS = -lglfw3 -lgdi32 -lopengl32 -limm32 49 | 50 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w `pkg-config --cflags glfw3` 51 | CXXFLAGS += -Wall -Wformat 52 | CFLAGS = $(CXXFLAGS) 53 | endif 54 | 55 | 56 | %.o:%.cpp 57 | $(CXX) $(CXXFLAGS) -c -o $@ $< 58 | 59 | %.o:../%.cpp 60 | $(CXX) $(CXXFLAGS) -c -o $@ $< 61 | 62 | %.o:../../%.cpp 63 | $(CXX) $(CXXFLAGS) -c -o $@ $< 64 | 65 | all: $(EXE) 66 | @echo Build complete for $(ECHO_MESSAGE) 67 | 68 | $(EXE): $(OBJS) 69 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 70 | 71 | clean: 72 | rm -f $(EXE) $(OBJS) 73 | 74 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_opengl2.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /third-party/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 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/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 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl3.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 21 | SOURCES += ../libs/gl3w/GL/gl3w.c 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | 24 | UNAME_S := $(shell uname -s) 25 | 26 | 27 | ifeq ($(UNAME_S), Linux) #LINUX 28 | ECHO_MESSAGE = "Linux" 29 | LIBS = -lGL `pkg-config --static --libs glfw3` 30 | 31 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w `pkg-config --cflags glfw3` 32 | CXXFLAGS += -Wall -Wformat 33 | CFLAGS = $(CXXFLAGS) 34 | endif 35 | 36 | ifeq ($(UNAME_S), Darwin) #APPLE 37 | ECHO_MESSAGE = "Mac OS X" 38 | LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo 39 | #LIBS += -L/usr/local/lib -lglfw3 40 | LIBS += -L/usr/local/lib -lglfw 41 | 42 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w -I/usr/local/include 43 | CXXFLAGS += -Wall -Wformat 44 | CFLAGS = $(CXXFLAGS) 45 | endif 46 | 47 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 48 | ECHO_MESSAGE = "Windows" 49 | LIBS = -lglfw3 -lgdi32 -lopengl32 -limm32 50 | 51 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w `pkg-config --cflags glfw3` 52 | CXXFLAGS += -Wall -Wformat 53 | CFLAGS = $(CXXFLAGS) 54 | endif 55 | 56 | 57 | %.o:%.cpp 58 | $(CXX) $(CXXFLAGS) -c -o $@ $< 59 | 60 | %.o:../%.cpp 61 | $(CXX) $(CXXFLAGS) -c -o $@ $< 62 | 63 | %.o:../../%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | %.o:../libs/gl3w/GL/%.c 67 | $(CC) $(CFLAGS) -c -o $@ $< 68 | 69 | all: $(EXE) 70 | @echo Build complete for $(ECHO_MESSAGE) 71 | 72 | $(EXE): $(OBJS) 73 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 74 | 75 | clean: 76 | rm -f $(EXE) $(OBJS) 77 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /third-party/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 | {42f99867-3108-43b8-99d0-fabefaf1f2e3} 13 | 14 | 15 | 16 | 17 | sources 18 | 19 | 20 | imgui 21 | 22 | 23 | gl3w 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 | gl3w 47 | 48 | 49 | gl3w 50 | 51 | 52 | imgui 53 | 54 | 55 | sources 56 | 57 | 58 | sources 59 | 60 | 61 | 62 | 63 | 64 | sources 65 | 66 | 67 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(imgui_example_glfw_vulkan C CXX) 3 | 4 | if(NOT CMAKE_BUILD_TYPE) 5 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 6 | endif() 7 | 8 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 9 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 10 | 11 | # GLFW 12 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 13 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 14 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 15 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 16 | option(GLFW_INSTALL "Generate installation target" OFF) 17 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 18 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 19 | include_directories(${GLFW_DIR}/include) 20 | 21 | # ImGui 22 | set(IMGUI_DIR ../../) 23 | include_directories(${IMGUI_DIR} ..) 24 | 25 | # Libraries 26 | find_library(VULKAN_LIBRARY 27 | NAMES vulkan vulkan-1) 28 | set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 29 | 30 | # Use vulkan headers from glfw: 31 | include_directories(${GLFW_DIR}/deps) 32 | 33 | file(GLOB sources *.cpp) 34 | 35 | add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/examples/imgui_impl_glfw.cpp ${IMGUI_DIR}/examples/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp) 36 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 37 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /third-party/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 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_glfw_vulkan/gen_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 3 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 4 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_glfw_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 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_glfw_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 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_marmalade/data/app.icf: -------------------------------------------------------------------------------- 1 | # This file is for configuration settings for your 2 | # application. 3 | # 4 | # The syntax is similar to windows .ini files ie 5 | # 6 | # [GroupName] 7 | # Setting = Value 8 | # 9 | # Which can be read by your application using 10 | # e.g s3eConfigGetString("GroupName", "Setting", string) 11 | # 12 | # All settings must be documented in .config.txt files. 13 | # New settings specific to this application should be 14 | # documented in app.config.txt 15 | # 16 | # Some conditional operations are also permitted, see the 17 | # S3E documentation for details. 18 | 19 | [S3E] 20 | MemSize=6000000 21 | MemSizeDebug=6000000 22 | DispFixRot=FixedLandscape 23 | 24 | # emulate iphone 5 resolution, change these settings to emulate other display resolution 25 | WinWidth=1136 26 | WinHeight=640 27 | 28 | [GX] 29 | DataCacheSize=131070 30 | 31 | [Util] 32 | #MemoryBreakpoint=1282 33 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_marmalade/marmalade_example.mkb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env mkb 2 | 3 | # ImGui - standalone example application for Marmalade 4 | # Copyright (C) 2015 by Giovanni Zito 5 | # This file is part of ImGui 6 | # https://github.com/ocornut/imgui 7 | 8 | define IMGUI_DISABLE_INCLUDE_IMCONFIG_H 9 | define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS 10 | define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS 11 | define _snprintf=snprintf 12 | 13 | options 14 | { 15 | optimise-speed=1 16 | } 17 | 18 | includepaths 19 | { 20 | .. 21 | ../.. 22 | } 23 | 24 | subprojects 25 | { 26 | iwgx 27 | } 28 | 29 | files 30 | { 31 | (.) 32 | ["imgui"] 33 | ../../imgui.cpp 34 | ../../imgui_demo.cpp 35 | ../../imgui_draw.cpp 36 | ../../imconfig.h 37 | ../../imgui.h 38 | ../../imgui_internal.h 39 | 40 | ["imgui","Marmalade binding"] 41 | ../imgui_impl_marmalade.h 42 | ../imgui_impl_marmalade.cpp 43 | main.cpp 44 | 45 | } 46 | -------------------------------------------------------------------------------- /third-party/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 /I ..\.. *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_null/main.cpp: -------------------------------------------------------------------------------- 1 | // ImGui - null/dummy example application (compile and link imgui with no inputs, no outputs) 2 | #include "imgui.h" 3 | #include 4 | 5 | int main(int, char**) 6 | { 7 | IMGUI_CHECKVERSION(); 8 | ImGui::CreateContext(); 9 | ImGuiIO& io = ImGui::GetIO(); 10 | 11 | // Build atlas 12 | unsigned char* tex_pixels = NULL; 13 | int tex_w, tex_h; 14 | io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); 15 | 16 | for (int n = 0; n < 50; n++) 17 | { 18 | printf("NewFrame() %d\n", n); 19 | io.DisplaySize = ImVec2(1920, 1080); 20 | io.DeltaTime = 1.0f / 60.0f; 21 | ImGui::NewFrame(); 22 | 23 | static float f = 0.0f; 24 | ImGui::Text("Hello, world!"); 25 | ImGui::SliderFloat("float", &f, 0.0f, 1.0f); 26 | ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); 27 | ImGui::ShowDemoWindow(NULL); 28 | 29 | ImGui::Render(); 30 | } 31 | 32 | printf("DestroyContext()\n"); 33 | ImGui::DestroyContext(); 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_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-SDL 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl_opengl2 18 | SOURCES = main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp 19 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 20 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 21 | 22 | UNAME_S := $(shell uname -s) 23 | 24 | 25 | ifeq ($(UNAME_S), Linux) #LINUX 26 | ECHO_MESSAGE = "Linux" 27 | LIBS = -lGL -ldl `sdl2-config --libs` 28 | 29 | CXXFLAGS = -I ../ -I../../ `sdl2-config --cflags` 30 | CXXFLAGS += -Wall -Wformat 31 | CFLAGS = $(CXXFLAGS) 32 | endif 33 | 34 | ifeq ($(UNAME_S), Darwin) #APPLE 35 | ECHO_MESSAGE = "Mac OS X" 36 | LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 37 | 38 | CXXFLAGS = -I ../ -I../../ -I/usr/local/include `sdl2-config --cflags` 39 | CXXFLAGS += -Wall -Wformat 40 | CFLAGS = $(CXXFLAGS) 41 | endif 42 | 43 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 44 | ECHO_MESSAGE = "Windows" 45 | LIBS = -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 46 | 47 | CXXFLAGS = -I ../ -I../../ `pkg-config --cflags sdl2` 48 | CXXFLAGS += -Wall -Wformat 49 | CFLAGS = $(CXXFLAGS) 50 | endif 51 | 52 | 53 | %.o:%.cpp 54 | $(CXX) $(CXXFLAGS) -c -o $@ $< 55 | 56 | %.o:../%.cpp 57 | $(CXX) $(CXXFLAGS) -c -o $@ $< 58 | 59 | %.o:../../%.cpp 60 | $(CXX) $(CXXFLAGS) -c -o $@ $< 61 | 62 | all: $(EXE) 63 | @echo Build complete for $(ECHO_MESSAGE) 64 | 65 | $(EXE): $(OBJS) 66 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 67 | 68 | clean: 69 | rm -f $(EXE) $(OBJS) 70 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I %SDL2DIR%\include /I ..\.. main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /link /LIBPATH:%SDL2DIR%\lib SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | ``` 10 | 11 | - On Linux and similar Unixes 12 | 13 | ``` 14 | c++ `sdl2-config --cflags` -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 15 | ``` 16 | 17 | - On Mac OS X 18 | 19 | ``` 20 | brew install sdl2 21 | c++ `sdl2-config --cflags` -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 22 | ``` 23 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\gl3w /I %SDL2_DIR%\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_sdl.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 4 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_opengl2/example_sdl_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 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_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 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-SDL 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl_opengl3 18 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 21 | SOURCES += ../libs/gl3w/GL/gl3w.c 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | 24 | UNAME_S := $(shell uname -s) 25 | 26 | 27 | ifeq ($(UNAME_S), Linux) #LINUX 28 | ECHO_MESSAGE = "Linux" 29 | LIBS = -lGL -ldl `sdl2-config --libs` 30 | 31 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w `sdl2-config --cflags` 32 | CXXFLAGS += -Wall -Wformat 33 | CFLAGS = $(CXXFLAGS) 34 | endif 35 | 36 | ifeq ($(UNAME_S), Darwin) #APPLE 37 | ECHO_MESSAGE = "Mac OS X" 38 | LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 39 | 40 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w -I/usr/local/include `sdl2-config --cflags` 41 | CXXFLAGS += -Wall -Wformat 42 | CFLAGS = $(CXXFLAGS) 43 | endif 44 | 45 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 46 | ECHO_MESSAGE = "Windows" 47 | LIBS = -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 48 | 49 | CXXFLAGS = -I../ -I../../ -I../libs/gl3w `pkg-config --cflags sdl2` 50 | CXXFLAGS += -Wall -Wformat 51 | CFLAGS = $(CXXFLAGS) 52 | endif 53 | 54 | 55 | %.o:%.cpp 56 | $(CXX) $(CXXFLAGS) -c -o $@ $< 57 | 58 | %.o:../%.cpp 59 | $(CXX) $(CXXFLAGS) -c -o $@ $< 60 | 61 | %.o:../../%.cpp 62 | $(CXX) $(CXXFLAGS) -c -o $@ $< 63 | 64 | %.o:../libs/gl3w/GL/%.c 65 | $(CC) $(CFLAGS) -c -o $@ $< 66 | 67 | all: $(EXE) 68 | @echo Build complete for $(ECHO_MESSAGE) 69 | 70 | $(EXE): $(OBJS) 71 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 72 | 73 | clean: 74 | rm -f $(EXE) $(OBJS) 75 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I ..\.. /I ..\libs\gl3w /I %SDL2DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /link /libpath:%SDL2DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | ``` 10 | 11 | - On Linux and similar Unixes 12 | 13 | ``` 14 | c++ `sdl2-config --cflags` -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -lGL -ldl 15 | ``` 16 | 17 | - On Mac OS X 18 | 19 | ``` 20 | brew install sdl2 21 | c++ `sdl2-config --cflags` -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -framework OpenGl -framework CoreFoundation 22 | ``` 23 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\gl3w /I %SDL2_DIR%\include *.cpp ..\imgui_impl_opengl3.cpp ..\imgui_impl_sdl.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 4 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_opengl3/example_sdl_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 | {f9997b32-5479-4756-9ffc-77793ad3764f} 13 | 14 | 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | gl3w 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 | gl3w 50 | 51 | 52 | gl3w 53 | 54 | 55 | sources 56 | 57 | 58 | sources 59 | 60 | 61 | 62 | 63 | 64 | sources 65 | 66 | 67 | -------------------------------------------------------------------------------- /third-party/imgui/examples/example_sdl_vulkan/example_sdl_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 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_win32.cpp ..\imgui_impl_dx10.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx10.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /third-party/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 | 49 | 50 | 51 | sources 52 | 53 | 54 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx11.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx11.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /third-party/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 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | 49 | 50 | 51 | sources 52 | 53 | 54 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx12.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx12.exe /FoDebug/ /link d3d12.lib d3dcompiler.lib dxgi.lib 4 | 5 | -------------------------------------------------------------------------------- /third-party/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 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /third-party/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 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%DXSDK_DIR%/Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx9.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx9.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 4 | -------------------------------------------------------------------------------- /third-party/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 | 33 | 34 | imgui 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | sources 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_allegro5.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer + Platform Binding 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 in imgui.cpp. 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // Issues: 8 | // [ ] Renderer: The renderer is suboptimal as we need to convert vertices. 9 | // [ ] Platform: Missing clipboard support via al_set_clipboard_text/al_clipboard_has_text. 10 | 11 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 12 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 13 | // https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd 14 | 15 | #pragma once 16 | 17 | struct ALLEGRO_DISPLAY; 18 | union ALLEGRO_EVENT; 19 | 20 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 21 | IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 22 | IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 23 | IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 24 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 25 | 26 | // Use if you want to reset your rendering device without losing ImGui state. 27 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 28 | IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 29 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_dx10.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: DirectX10 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | struct ID3D10Device; 12 | 13 | IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); 14 | IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); 16 | IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); 17 | 18 | // Use if you want to reset your rendering device without losing ImGui state. 19 | IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects(); 20 | IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects(); 21 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: DirectX11 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | struct ID3D11Device; 12 | struct ID3D11DeviceContext; 13 | 14 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 15 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 16 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 17 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 18 | 19 | // Use if you want to reset your rendering device without losing ImGui state. 20 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 21 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 22 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_dx12.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: DirectX12 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | // Issues: 7 | // [ ] 64-bit only for now! (Because sizeof(ImTextureId) == sizeof(void*)). See github.com/ocornut/imgui/pull/301 8 | 9 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 10 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 11 | // https://github.com/ocornut/imgui 12 | 13 | enum DXGI_FORMAT; 14 | struct ID3D12Device; 15 | struct ID3D12GraphicsCommandList; 16 | struct D3D12_CPU_DESCRIPTOR_HANDLE; 17 | struct D3D12_GPU_DESCRIPTOR_HANDLE; 18 | 19 | // cmd_list is the command list that the implementation will use to render imgui draw lists. 20 | // Before calling the render function, caller must prepare cmd_list by resetting it and setting the appropriate 21 | // render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle. 22 | // font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture. 23 | IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, 24 | D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle); 25 | IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown(); 26 | IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame(); 27 | IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list); 28 | 29 | // Use if you want to reset your rendering device without losing ImGui state. 30 | IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects(); 31 | IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects(); 32 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: DirectX9 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | struct IDirect3DDevice9; 12 | 13 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 14 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 16 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 17 | 18 | // Use if you want to reset your rendering device without losing ImGui state. 19 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 20 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 21 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_freeglut.h: -------------------------------------------------------------------------------- 1 | // ImGui Platform Binding for: FreeGLUT 2 | // This needs to be used along with a Renderer (e.g. OpenGL2) 3 | 4 | // Issues: 5 | // [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | IMGUI_IMPL_API bool ImGui_ImplFreeGLUT_Init(); 12 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_InstallFuncs(); 13 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_Shutdown(); 14 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_NewFrame(); 15 | 16 | // You can call ImGui_ImplFreeGLUT_InstallFuncs() to get all those functions installed automatically, 17 | // or call them yourself from your own GLUT handlers. We are using the same weird names as GLUT for consistency.. 18 | //---------------------------------------- GLUT name --------------------------------------------- Decent Name --------- 19 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_ReshapeFunc(int w, int h); // ~ ResizeFunc 20 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MotionFunc(int x, int y); // ~ MouseMoveFunc 21 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MouseFunc(int button, int state, int x, int y); // ~ MouseButtonFunc 22 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MouseWheelFunc(int button, int dir, int x, int y); // ~ MouseWheelFunc 23 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_KeyboardFunc(unsigned char c, int x, int y); // ~ CharPressedFunc 24 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_KeyboardUpFunc(unsigned char c, int x, int y); // ~ CharReleasedFunc 25 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_SpecialFunc(int key, int x, int y); // ~ KeyPressedFunc 26 | IMGUI_IMPL_API void ImGui_ImplFreeGLUT_SpecialUpFunc(int key, int x, int y); // ~ KeyReleasedFunc 27 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_glfw.h: -------------------------------------------------------------------------------- 1 | // ImGui Platform Binding for: GLFW 2 | // This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..) 3 | // (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Clipboard support. 7 | // [X] Platform: Gamepad navigation mapping. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 8 | // [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW. 9 | // [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE). 10 | 11 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 12 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 13 | // https://github.com/ocornut/imgui 14 | 15 | // About GLSL version: 16 | // The 'glsl_version' initialization parameter defaults to "#version 150" if NULL. 17 | // Only override if your GL version doesn't handle this GLSL version. Keep NULL if unsure! 18 | 19 | struct GLFWwindow; 20 | 21 | IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks); 22 | IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks); 23 | IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown(); 24 | IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(); 25 | 26 | // GLFW callbacks (installed by default if you enable 'install_callbacks' during initialization) 27 | // Provided here if you want to chain callbacks. 28 | // You can also handle inputs yourself and use those as a reference. 29 | IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods); 30 | IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset); 31 | IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods); 32 | IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c); 33 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_marmalade.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer + Platform Binding for: Marmalade + IwGx 2 | 3 | // Implemented features: 4 | // [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 5 | 6 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 7 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 8 | // https://github.com/ocornut/imgui 9 | 10 | // Copyright (C) 2015 by Giovanni Zito 11 | // This file is part of ImGui 12 | 13 | IMGUI_IMPL_API bool ImGui_Marmalade_Init(bool install_callbacks); 14 | IMGUI_IMPL_API void ImGui_Marmalade_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_Marmalade_NewFrame(); 16 | IMGUI_IMPL_API void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data); 17 | 18 | // Use if you want to reset your rendering device without losing ImGui state. 19 | IMGUI_IMPL_API void ImGui_Marmalade_InvalidateDeviceObjects(); 20 | IMGUI_IMPL_API bool ImGui_Marmalade_CreateDeviceObjects(); 21 | 22 | // Callbacks (installed by default if you enable 'install_callbacks' during initialization) 23 | // You can also handle inputs yourself and use those as a reference. 24 | IMGUI_IMPL_API int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data); 25 | IMGUI_IMPL_API int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data); 26 | IMGUI_IMPL_API int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data); 27 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_metal.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: Metal 2 | // This needs to be used along with a Platform Binding (e.g. OSX) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | @class MTLRenderPassDescriptor; 12 | @protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder; 13 | 14 | IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id device); 15 | IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown(); 16 | IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor *renderPassDescriptor); 17 | IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, 18 | id commandBuffer, 19 | id commandEncoder); 20 | 21 | // Called by Init/NewFrame/Shutdown 22 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id device); 23 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture(); 24 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id device); 25 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects(); 26 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_opengl2.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: OpenGL2 (legacy OpenGL, fixed pipeline) 2 | // This needs to be used along with a Platform Binding (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 in imgui.cpp. 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** 12 | // **Prefer using the code in imgui_impl_opengl3.cpp** 13 | // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read. 14 | // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more 15 | // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might 16 | // confuse your GPU driver. 17 | // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API. 18 | 19 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init(); 20 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown(); 21 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame(); 22 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data); 23 | 24 | // Called by Init/NewFrame/Shutdown 25 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture(); 26 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture(); 27 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects(); 28 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(); 29 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_opengl3.h: -------------------------------------------------------------------------------- 1 | // ImGui Renderer for: OpenGL3 (modern OpenGL with shaders / programmatic pipeline) 2 | // This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..) 3 | // (Note: We are using GL3W as a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc..) 4 | 5 | // Implemented features: 6 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | // About GLSL version: 13 | // The 'glsl_version' initialization parameter defaults to "#version 130" if NULL. 14 | // Only override if your GL version doesn't handle this GLSL version (see table at the top of imgui_impl_opengl3.cpp). Keep NULL if unsure! 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL); 17 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame(); 19 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data); 20 | 21 | // Called by Init/NewFrame/Shutdown 22 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateFontsTexture(); 23 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyFontsTexture(); 24 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects(); 25 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects(); 26 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_osx.h: -------------------------------------------------------------------------------- 1 | // ImGui Platform Binding for: OSX / Cocoa 2 | // This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..) 3 | // [BETA] Beta bindings, not well tested. If you want a portable application, prefer using the Glfw or SDL platform bindings on Mac. 4 | 5 | // Issues: 6 | // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters].. 7 | // [ ] Platform: Mouse cursor shapes and visibility are not supported (see end of https://github.com/glfw/glfw/issues/427) 8 | 9 | @class NSEvent; 10 | @class NSView; 11 | 12 | IMGUI_API bool ImGui_ImplOSX_Init(); 13 | IMGUI_API void ImGui_ImplOSX_Shutdown(); 14 | IMGUI_API void ImGui_ImplOSX_NewFrame(NSView *_Nonnull view); 15 | IMGUI_API bool ImGui_ImplOSX_HandleEvent(NSEvent *_Nonnull event, NSView *_Nullable view); 16 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_sdl.h: -------------------------------------------------------------------------------- 1 | // ImGui Platform Binding for: SDL2 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Clipboard support. 8 | // [X] Platform: Keyboard arrays indexed using SDL_SCANCODE_* codes, e.g. ImGui::IsKeyPressed(SDL_SCANCODE_SPACE). 9 | // Missing features: 10 | // [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME. 11 | 12 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 13 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 14 | // https://github.com/ocornut/imgui 15 | 16 | struct SDL_Window; 17 | typedef union SDL_Event SDL_Event; 18 | 19 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); 20 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); 21 | IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); 22 | IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window); 23 | IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(SDL_Event* event); 24 | -------------------------------------------------------------------------------- /third-party/imgui/examples/imgui_impl_win32.h: -------------------------------------------------------------------------------- 1 | // ImGui Platform Binding for: Windows (standard windows API for 32 and 64 bits applications) 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | 4 | // Implemented features: 5 | // [X] Platform: Clipboard support (for Win32 this is actually part of core imgui) 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE). 8 | 9 | IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd); 10 | IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown(); 11 | IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame(); 12 | 13 | // Handler for Win32 messages, update mouse/keyboard data. 14 | // You may or not need this for your implementation, but it can serve as reference for handling inputs. 15 | // Intentionally commented out to avoid dragging dependencies on types. You can copy the extern declaration in your code. 16 | /* 17 | IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 18 | */ 19 | -------------------------------------------------------------------------------- /third-party/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 | -------------------------------------------------------------------------------- /third-party/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib -------------------------------------------------------------------------------- /third-party/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib -------------------------------------------------------------------------------- /third-party/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 | -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/imgui/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /third-party/imgui/misc/freetype/imgui_freetype.h: -------------------------------------------------------------------------------- 1 | // Wrapper to use Freetype (instead of stb_truetype) for Dear ImGui 2 | // Get latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype 3 | // Original code by @Vuhdo (Aleksei Skriabin), maintained by @ocornut 4 | 5 | #pragma once 6 | 7 | #include "imgui.h" // IMGUI_API, ImFontAtlas 8 | 9 | namespace ImGuiFreeType 10 | { 11 | // Hinting greatly impacts visuals (and glyph sizes). 12 | // When disabled, FreeType generates blurrier glyphs, more or less matches the stb's output. 13 | // The Default hinting mode usually looks good, but may distort glyphs in an unusual way. 14 | // The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. 15 | 16 | // You can set those flags on a per font basis in ImFontConfig::RasterizerFlags. 17 | // Use the 'extra_flags' parameter of BuildFontAtlas() to force a flag on all your fonts. 18 | enum RasterizerFlags 19 | { 20 | // By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. 21 | NoHinting = 1 << 0, // Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of the anti-aliased modes. 22 | NoAutoHint = 1 << 1, // Disable auto-hinter. 23 | ForceAutoHint = 1 << 2, // Indicates that the auto-hinter is preferred over the font's native hinter. 24 | LightHinting = 1 << 3, // A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text. 25 | MonoHinting = 1 << 4, // Strong hinting algorithm that should only be used for monochrome output. 26 | Bold = 1 << 5, // Styling: Should we artificially embolden the font? 27 | Oblique = 1 << 6 // Styling: Should we slant the font, emulating italic style? 28 | }; 29 | 30 | IMGUI_API bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int extra_flags = 0); 31 | } 32 | -------------------------------------------------------------------------------- /third-party/imgui/misc/natvis/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Natvis file to describe types in Visual Studio debugger. 3 | You can include this in a project file, or install in Visual Studio folder. 4 | -------------------------------------------------------------------------------- /third-party/imgui/misc/natvis/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{Size={Size} Capacity={Capacity}}} 9 | 10 | 11 | Size 12 | Data 13 | 14 | 15 | 16 | 17 | 18 | {{x={x,g} y={y,g}}} 19 | 20 | 21 | 22 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 23 | 24 | 25 | 26 | {{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})}} 27 | 28 | Min 29 | Max 30 | Max.x - Min.x 31 | Max.y - Min.y 32 | 33 | 34 | 35 | 36 | {{Name={Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d}} 37 | 38 | 39 | -------------------------------------------------------------------------------- /third-party/imguifilesystem/AUTHOR.TXT: -------------------------------------------------------------------------------- 1 | Author: Flix (https://github.com/Flix01) 2 | 3 | https://github.com/Flix01/imgui/tree/2015-10-Addons/addons/imguifilesystem 4 | -------------------------------------------------------------------------------- /third-party/stb/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Pull Requests and Issues are both welcome. 2 | 3 | # Responsiveness 4 | 5 | General priority order is: 6 | 7 | * Crashes 8 | * Bugs 9 | * Warnings 10 | * Enhancements (new features, performance improvement, etc) 11 | 12 | Pull requests get priority over Issues. Some pull requests I take 13 | as written; some I modify myself; some I will request changes before 14 | accepting them. Because I've ended up supporting a lot of libraries 15 | (20 as I write this, with more on the way), I am somewhat slow to 16 | address things. Many issues have been around for a long time. 17 | 18 | # Pull requests 19 | 20 | * Do NOT update the version number in the file. (This just causes conflicts.) 21 | * Do add your name to the list of contributors. (Don't worry about the formatting.) I'll try to remember to add it if you don't, but I sometimes forget as it's an extra step. 22 | 23 | # Specific libraries 24 | 25 | I generally do not want new file formats for stb_image because 26 | we are trying to improve its security, so increasing its attack 27 | surface is counter-productive. 28 | 29 | -------------------------------------------------------------------------------- /third-party/stb/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * Delete this list before clicking CREATE PULL REQUEST 2 | * Make sure you're using a special branch just for this pull request. (Sometimes people unknowingly use a default branch, then later update that branch, which updates the pull request with the other changes if it hasn't been merged yet.) 3 | * Do NOT update the version number in the file. (This just causes conflicts.) 4 | * Do add your name to the list of contributors. (Don't worry about the formatting.) I'll try to remember to add it if you don't, but I sometimes forget as it's an extra step. 5 | 6 | If you get something above wrong, don't fret it, it's not the end of the world. 7 | -------------------------------------------------------------------------------- /third-party/stb/.travis.yml: -------------------------------------------------------------------------------- 1 | language: C 2 | install: true 3 | script: 4 | - cd tests 5 | - make all 6 | -------------------------------------------------------------------------------- /third-party/stb/data/atari_8bit_font_revised.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/atari_8bit_font_revised.png -------------------------------------------------------------------------------- /third-party/stb/data/easy_font_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/easy_font_raw.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/license.txt: -------------------------------------------------------------------------------- 1 | All files in this directory are in the public domain. Where 2 | a public domain declaration is not recognized, you are granted 3 | a license to freely use, modify, and redistribute them in 4 | any way you choose. -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_caves_limit_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_caves_limit_connectivity.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_caves_tiny_corridors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_caves_tiny_corridors.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_corner_caves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_corner_caves.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_horizontal_corridors_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_horizontal_corridors_v1.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_horizontal_corridors_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_horizontal_corridors_v2.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_horizontal_corridors_v3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_horizontal_corridors_v3.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_limit_connectivity_fat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_limit_connectivity_fat.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_limited_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_limited_connectivity.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_maze_2_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_maze_2_wide.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_maze_plus_2_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_maze_plus_2_wide.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_open_areas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_open_areas.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_ref2_corner_caves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_ref2_corner_caves.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_rooms_and_corridors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_rooms_and_corridors.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_rooms_and_corridors_2_wide_diagonal_bias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_rooms_and_corridors_2_wide_diagonal_bias.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_rooms_limit_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_rooms_limit_connectivity.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_round_rooms_diagonal_corridors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_round_rooms_diagonal_corridors.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_sean_dungeon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_sean_dungeon.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_simple_caves_2_wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_simple_caves_2_wide.png -------------------------------------------------------------------------------- /third-party/stb/data/herringbone/template_square_rooms_with_random_rects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/herringbone/template_square_rooms_with_random_rects.png -------------------------------------------------------------------------------- /third-party/stb/data/map_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/map_01.png -------------------------------------------------------------------------------- /third-party/stb/data/map_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/map_02.png -------------------------------------------------------------------------------- /third-party/stb/data/map_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/visual_debugger/01647f21eb3a2f97553444c19829d018018625d7/third-party/stb/data/map_03.png -------------------------------------------------------------------------------- /third-party/stb/deprecated/stretchy_buffer.txt: -------------------------------------------------------------------------------- 1 | // stretchy buffer // init: NULL // free: sbfree() // push_back: sbpush() // size: sbcount() // 2 | #define sbfree(a) ((a) ? free(stb__sbraw(a)),0 : 0) 3 | #define sbpush(a,v) (stb__sbmaybegrow(a,1), (a)[stb__sbn(a)++] = (v)) 4 | #define sbcount(a) ((a) ? stb__sbn(a) : 0) 5 | #define sbadd(a,n) (stb__sbmaybegrow(a,n), stb__sbn(a)+=(n), &(a)[stb__sbn(a)-(n)]) 6 | #define sblast(a) ((a)[stb__sbn(a)-1]) 7 | 8 | #include 9 | #define stb__sbraw(a) ((int *) (a) - 2) 10 | #define stb__sbm(a) stb__sbraw(a)[0] 11 | #define stb__sbn(a) stb__sbraw(a)[1] 12 | 13 | #define stb__sbneedgrow(a,n) ((a)==0 || stb__sbn(a)+n >= stb__sbm(a)) 14 | #define stb__sbmaybegrow(a,n) (stb__sbneedgrow(a,(n)) ? stb__sbgrow(a,n) : 0) 15 | #define stb__sbgrow(a,n) stb__sbgrowf((void **) &(a), (n), sizeof(*(a))) 16 | 17 | static void stb__sbgrowf(void **arr, int increment, int itemsize) 18 | { 19 | int m = *arr ? 2*stb__sbm(*arr)+increment : increment+1; 20 | void *p = realloc(*arr ? stb__sbraw(*arr) : 0, itemsize * m + sizeof(int)*2); 21 | assert(p); 22 | if (p) { 23 | if (!*arr) ((int *) p)[1] = 0; 24 | *arr = (void *) ((int *) p + 2); 25 | stb__sbm(*arr) = m; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /third-party/stb/docs/other_libs.md: -------------------------------------------------------------------------------- 1 | Moved to https://github.com/nothings/single_file_libs -------------------------------------------------------------------------------- /third-party/stb/tools/README.header.md: -------------------------------------------------------------------------------- 1 | stb 2 | === 3 | 4 | single-file public domain (or MIT licensed) libraries for C/C++ 5 | 6 | Most libraries by stb, except: stb_dxt by Fabian "ryg" Giesen, stb_image_resize 7 | by Jorge L. "VinoBS" Rodriguez, and stb_sprintf by Jeff Roberts. 8 | 9 | 10 | library | lastest version | category | LoC | description 11 | --------------------- | ---- | -------- | --- | -------------------------------- 12 | -------------------------------------------------------------------------------- /third-party/stb/tools/README.list: -------------------------------------------------------------------------------- 1 | stb_vorbis.c | audio | decode ogg vorbis files from file/memory to float/16-bit signed output 2 | stb_image.h | graphics | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC 3 | stb_truetype.h | graphics | parse, decode, and rasterize characters from truetype fonts 4 | stb_image_write.h | graphics | image writing to disk: PNG, TGA, BMP 5 | stb_image_resize.h | graphics | resize images larger/smaller with good quality 6 | stb_rect_pack.h | graphics | simple 2D rectangle packer with decent quality 7 | stb_sprintf.h | utility | fast sprintf, snprintf for C/C++ 8 | stretchy_buffer.h | utility | typesafe dynamic array for C (i.e. approximation to vector<>), doesn't compile as C++ 9 | stb_textedit.h | user interface | guts of a text editor for games etc implementing them from scratch 10 | stb_voxel_render.h | 3D graphics | Minecraft-esque voxel rendering "engine" with many more features 11 | stb_dxt.h | 3D graphics | Fabian "ryg" Giesen's real-time DXT compressor 12 | stb_perlin.h | 3D graphics | revised Perlin noise (3D input, 1D output) 13 | stb_easy_font.h | 3D graphics | quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc 14 | stb_tilemap_editor.h | game dev | embeddable tilemap editor 15 | stb_herringbone_wang_tile.h | game dev | herringbone Wang tile map generator 16 | stb_c_lexer.h | parsing | simplify writing parsers for C-like languages 17 | stb_divide.h | math | more useful 32-bit modulus e.g. "euclidean divide" 18 | stb_connected_components.h | misc | incrementally compute reachability on grids 19 | stb.h | misc | helper functions for C, mostly redundant in C++; basically author's personal stuff 20 | stb_leakcheck.h | misc | quick-and-dirty malloc/free leak-checking 21 | -------------------------------------------------------------------------------- /third-party/stb/tools/make_readme.c: -------------------------------------------------------------------------------- 1 | #define STB_DEFINE 2 | #include "../stb.h" 3 | 4 | int main(int argc, char **argv) 5 | { 6 | int i; 7 | int hlen, flen, listlen, total_lines = 0; 8 | char *header = stb_file("README.header.md", &hlen); // stb_file - read file into malloc()ed buffer 9 | char *footer = stb_file("README.footer.md", &flen); // stb_file - read file into malloc()ed buffer 10 | char **list = stb_stringfile("README.list", &listlen); // stb_stringfile - read file lines into malloced array of strings 11 | 12 | FILE *f = fopen("../README.md", "wb"); 13 | 14 | fprintf(f, "\n\n"); 15 | fwrite(header, 1, hlen, f); 16 | 17 | for (i=0; i < listlen; ++i) { 18 | int num,j; 19 | char **tokens = stb_tokens_stripwhite(list[i], "|", &num); // stb_tokens -- tokenize string into malloced array of strings 20 | int num_lines; 21 | char **lines = stb_stringfile(stb_sprintf("../%s", tokens[0]), &num_lines); 22 | char *s1, *s2,*s3; 23 | s1 = strchr(lines[0], '-'); 24 | if (!s1) stb_fatal("Couldn't find '-' before version number in %s", tokens[0]); // stb_fatal -- print error message & exit 25 | s2 = strchr(s1+2, '-'); 26 | if (!s2) stb_fatal("Couldn't find '-' after version number in %s", tokens[0]); // stb_fatal -- print error message & exit 27 | *s2 = 0; 28 | s1 += 1; 29 | s1 = stb_trimwhite(s1); // stb_trimwhite -- advance pointer to after whitespace & delete trailing whitespace 30 | if (*s1 == 'v') ++s1; 31 | s3 = tokens[0]; 32 | stb_trimwhite(s3); 33 | fprintf(f, "**["); 34 | if (strlen(s3) < 21) { 35 | fprintf(f, "%s", tokens[0]); 36 | } else { 37 | char buffer[256]; 38 | strncpy(buffer, s3, 18); 39 | buffer[18] = 0; 40 | strcat(buffer, "..."); 41 | fprintf(f, "%s", buffer); 42 | } 43 | fprintf(f, "](%s)**", tokens[0]); 44 | fprintf(f, " | %s", s1); 45 | s1 = stb_trimwhite(tokens[1]); // stb_trimwhite -- advance pointer to after whitespace & delete trailing whitespace 46 | s2 = stb_dupreplace(s1, " ", " "); // stb_dupreplace -- search & replace string and malloc result 47 | fprintf(f, " | %s", s2); 48 | free(s2); 49 | fprintf(f, " | %d", num_lines); 50 | total_lines += num_lines; 51 | for (j=2; j < num; ++j) 52 | fprintf(f, " | %s", tokens[j]); 53 | fprintf(f, "\n"); 54 | } 55 | 56 | fprintf(f, "\n"); 57 | fprintf(f, "Total libraries: %d \n", listlen); 58 | fprintf(f, "Total lines of C code: %d\n\n", total_lines); 59 | 60 | fwrite(footer, 1, flen, f); 61 | fclose(f); 62 | 63 | return 0; 64 | } 65 | -------------------------------------------------------------------------------- /third-party/stb/tools/mr.bat: -------------------------------------------------------------------------------- 1 | debug\make_readme 2 | --------------------------------------------------------------------------------