├── .gitignore ├── CMakeLists.txt ├── README.md ├── deps ├── glad │ ├── include │ │ ├── KHR │ │ │ └── khrplatform.h │ │ └── glad │ │ │ └── glad.h │ └── src │ │ └── glad.c ├── glfw │ ├── .appveyor.yml │ ├── .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 │ ├── COPYING.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 │ │ ├── html │ │ │ ├── annotated.html │ │ │ ├── arrowdown.png │ │ │ ├── arrowright.png │ │ │ ├── bc_s.png │ │ │ ├── bdwn.png │ │ │ ├── bug.html │ │ │ ├── build_8dox.html │ │ │ ├── build_guide.html │ │ │ ├── classes.html │ │ │ ├── closed.png │ │ │ ├── compat_8dox.html │ │ │ ├── compat_guide.html │ │ │ ├── compile_8dox.html │ │ │ ├── compile_guide.html │ │ │ ├── context_8dox.html │ │ │ ├── context_guide.html │ │ │ ├── dir_1f12d41534b9d9c99a183e145b58d6f3.html │ │ │ ├── dir_351f617146de9499414a6c099ebbe0ca.html │ │ │ ├── dir_4bcf8e981abe5adb811ce4f57d70c9af.html │ │ │ ├── doc.png │ │ │ ├── doxygen.css │ │ │ ├── doxygen.png │ │ │ ├── dynsections.js │ │ │ ├── extra.css │ │ │ ├── files.html │ │ │ ├── folderclosed.png │ │ │ ├── folderopen.png │ │ │ ├── functions.html │ │ │ ├── functions_vars.html │ │ │ ├── glfw3_8h.html │ │ │ ├── glfw3_8h_source.html │ │ │ ├── glfw3native_8h.html │ │ │ ├── glfw3native_8h_source.html │ │ │ ├── globals.html │ │ │ ├── globals_b.html │ │ │ ├── globals_c.html │ │ │ ├── globals_d.html │ │ │ ├── globals_defs.html │ │ │ ├── globals_defs_b.html │ │ │ ├── globals_defs_c.html │ │ │ ├── globals_defs_d.html │ │ │ ├── globals_defs_e.html │ │ │ ├── globals_defs_f.html │ │ │ ├── globals_defs_g.html │ │ │ ├── globals_defs_h.html │ │ │ ├── globals_defs_i.html │ │ │ ├── globals_defs_j.html │ │ │ ├── globals_defs_k.html │ │ │ ├── globals_defs_l.html │ │ │ ├── globals_defs_m.html │ │ │ ├── globals_defs_n.html │ │ │ ├── globals_defs_o.html │ │ │ ├── globals_defs_p.html │ │ │ ├── globals_defs_r.html │ │ │ ├── globals_defs_s.html │ │ │ ├── globals_defs_t.html │ │ │ ├── globals_defs_v.html │ │ │ ├── globals_e.html │ │ │ ├── globals_f.html │ │ │ ├── globals_func.html │ │ │ ├── globals_g.html │ │ │ ├── globals_h.html │ │ │ ├── globals_i.html │ │ │ ├── globals_j.html │ │ │ ├── globals_k.html │ │ │ ├── globals_l.html │ │ │ ├── globals_m.html │ │ │ ├── globals_n.html │ │ │ ├── globals_o.html │ │ │ ├── globals_p.html │ │ │ ├── globals_r.html │ │ │ ├── globals_s.html │ │ │ ├── globals_t.html │ │ │ ├── globals_type.html │ │ │ ├── globals_v.html │ │ │ ├── globals_w.html │ │ │ ├── group__buttons.html │ │ │ ├── group__context.html │ │ │ ├── group__errors.html │ │ │ ├── group__init.html │ │ │ ├── group__input.html │ │ │ ├── group__joysticks.html │ │ │ ├── group__keys.html │ │ │ ├── group__mods.html │ │ │ ├── group__monitor.html │ │ │ ├── group__native.html │ │ │ ├── group__shapes.html │ │ │ ├── group__vulkan.html │ │ │ ├── group__window.html │ │ │ ├── index.html │ │ │ ├── input_8dox.html │ │ │ ├── input_guide.html │ │ │ ├── intro_8dox.html │ │ │ ├── intro_guide.html │ │ │ ├── jquery.js │ │ │ ├── main_8dox.html │ │ │ ├── modules.html │ │ │ ├── monitor_8dox.html │ │ │ ├── monitor_guide.html │ │ │ ├── moving_8dox.html │ │ │ ├── moving_guide.html │ │ │ ├── nav_f.png │ │ │ ├── nav_g.png │ │ │ ├── nav_h.png │ │ │ ├── news.html │ │ │ ├── news_8dox.html │ │ │ ├── open.png │ │ │ ├── pages.html │ │ │ ├── quick_8dox.html │ │ │ ├── quick_guide.html │ │ │ ├── search │ │ │ │ ├── all_0.html │ │ │ │ ├── all_0.js │ │ │ │ ├── all_1.html │ │ │ │ ├── all_1.js │ │ │ │ ├── all_2.html │ │ │ │ ├── all_2.js │ │ │ │ ├── all_3.html │ │ │ │ ├── all_3.js │ │ │ │ ├── all_4.html │ │ │ │ ├── all_4.js │ │ │ │ ├── all_5.html │ │ │ │ ├── all_5.js │ │ │ │ ├── all_6.html │ │ │ │ ├── all_6.js │ │ │ │ ├── all_7.html │ │ │ │ ├── all_7.js │ │ │ │ ├── all_8.html │ │ │ │ ├── all_8.js │ │ │ │ ├── all_9.html │ │ │ │ ├── all_9.js │ │ │ │ ├── all_a.html │ │ │ │ ├── all_a.js │ │ │ │ ├── all_b.html │ │ │ │ ├── all_b.js │ │ │ │ ├── all_c.html │ │ │ │ ├── all_c.js │ │ │ │ ├── all_d.html │ │ │ │ ├── all_d.js │ │ │ │ ├── all_e.html │ │ │ │ ├── all_e.js │ │ │ │ ├── all_f.html │ │ │ │ ├── all_f.js │ │ │ │ ├── classes_0.html │ │ │ │ ├── classes_0.js │ │ │ │ ├── close.png │ │ │ │ ├── defines_0.html │ │ │ │ ├── defines_0.js │ │ │ │ ├── files_0.html │ │ │ │ ├── files_0.js │ │ │ │ ├── files_1.html │ │ │ │ ├── files_1.js │ │ │ │ ├── files_2.html │ │ │ │ ├── files_2.js │ │ │ │ ├── files_3.html │ │ │ │ ├── files_3.js │ │ │ │ ├── files_4.html │ │ │ │ ├── files_4.js │ │ │ │ ├── files_5.html │ │ │ │ ├── files_5.js │ │ │ │ ├── files_6.html │ │ │ │ ├── files_6.js │ │ │ │ ├── files_7.html │ │ │ │ ├── files_7.js │ │ │ │ ├── files_8.html │ │ │ │ ├── files_8.js │ │ │ │ ├── functions_0.html │ │ │ │ ├── functions_0.js │ │ │ │ ├── groups_0.html │ │ │ │ ├── groups_0.js │ │ │ │ ├── groups_1.html │ │ │ │ ├── groups_1.js │ │ │ │ ├── groups_2.html │ │ │ │ ├── groups_2.js │ │ │ │ ├── groups_3.html │ │ │ │ ├── groups_3.js │ │ │ │ ├── groups_4.html │ │ │ │ ├── groups_4.js │ │ │ │ ├── groups_5.html │ │ │ │ ├── groups_5.js │ │ │ │ ├── groups_6.html │ │ │ │ ├── groups_6.js │ │ │ │ ├── groups_7.html │ │ │ │ ├── groups_7.js │ │ │ │ ├── groups_8.html │ │ │ │ ├── groups_8.js │ │ │ │ ├── groups_9.html │ │ │ │ ├── groups_9.js │ │ │ │ ├── mag_sel.png │ │ │ │ ├── nomatches.html │ │ │ │ ├── pages_0.html │ │ │ │ ├── pages_0.js │ │ │ │ ├── pages_1.html │ │ │ │ ├── pages_1.js │ │ │ │ ├── pages_2.html │ │ │ │ ├── pages_2.js │ │ │ │ ├── pages_3.html │ │ │ │ ├── pages_3.js │ │ │ │ ├── pages_4.html │ │ │ │ ├── pages_4.js │ │ │ │ ├── pages_5.html │ │ │ │ ├── pages_5.js │ │ │ │ ├── pages_6.html │ │ │ │ ├── pages_6.js │ │ │ │ ├── pages_7.html │ │ │ │ ├── pages_7.js │ │ │ │ ├── pages_8.html │ │ │ │ ├── pages_8.js │ │ │ │ ├── search.css │ │ │ │ ├── search.js │ │ │ │ ├── search_l.png │ │ │ │ ├── search_m.png │ │ │ │ ├── search_r.png │ │ │ │ ├── searchdata.js │ │ │ │ ├── typedefs_0.html │ │ │ │ ├── typedefs_0.js │ │ │ │ ├── variables_0.html │ │ │ │ ├── variables_0.js │ │ │ │ ├── variables_1.html │ │ │ │ ├── variables_1.js │ │ │ │ ├── variables_2.html │ │ │ │ ├── variables_2.js │ │ │ │ ├── variables_3.html │ │ │ │ ├── variables_3.js │ │ │ │ ├── variables_4.html │ │ │ │ ├── variables_4.js │ │ │ │ ├── variables_5.html │ │ │ │ ├── variables_5.js │ │ │ │ ├── variables_6.html │ │ │ │ └── variables_6.js │ │ │ ├── spaces.svg │ │ │ ├── splitbar.png │ │ │ ├── structGLFWgammaramp.html │ │ │ ├── structGLFWimage.html │ │ │ ├── structGLFWvidmode.html │ │ │ ├── sync_off.png │ │ │ ├── sync_on.png │ │ │ ├── tab_a.png │ │ │ ├── tab_b.png │ │ │ ├── tab_h.png │ │ │ ├── tab_s.png │ │ │ ├── tabs.css │ │ │ ├── vulkan_8dox.html │ │ │ ├── vulkan_guide.html │ │ │ ├── window_8dox.html │ │ │ └── window_guide.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 │ │ ├── posix_tls.c │ │ ├── posix_tls.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_tls.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 │ └── tests │ │ ├── CMakeLists.txt │ │ ├── clipboard.c │ │ ├── cursor.c │ │ ├── empty.c │ │ ├── events.c │ │ ├── gamma.c │ │ ├── glfwinfo.c │ │ ├── icon.c │ │ ├── iconify.c │ │ ├── inputlag.c │ │ ├── joysticks.c │ │ ├── monitors.c │ │ ├── msaa.c │ │ ├── opacity.c │ │ ├── reopen.c │ │ ├── sharing.c │ │ ├── tearing.c │ │ ├── threads.c │ │ ├── timeout.c │ │ ├── title.c │ │ ├── vulkan.c │ │ └── windows.c ├── lodepng │ ├── lodepng.c │ └── lodepng.h └── miniz │ ├── ChangeLog.md │ ├── LICENSE │ ├── examples │ ├── example1.c │ ├── example2.c │ ├── example3.c │ ├── example4.c │ ├── example5.c │ └── example6.c │ ├── miniz.c │ ├── miniz.h │ └── readme.md ├── res ├── shaders │ ├── blocks.fsh │ ├── blocks.vsh │ ├── gui.fsh │ ├── gui.vsh │ ├── lines.fsh │ └── lines.vsh └── textures │ ├── ascii.png │ ├── terrain.png │ └── widgets.png └── src ├── block.h ├── block_data.c ├── block_data.h ├── bounding_box.c ├── bounding_box.h ├── chunk.c ├── chunk.h ├── entity.c ├── entity.h ├── game.c ├── game.h ├── glmath.c ├── glmath.h ├── gui.c ├── gui.h ├── input.c ├── input.h ├── main.c ├── mesh.c ├── mesh.h ├── server ├── main.c ├── server.c └── server.h ├── shader.h ├── sockets.h ├── util.c ├── util.h ├── world.c └── world.h /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | 3 | build/ -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(CCraft C) 4 | 5 | add_executable( 6 | CCraft 7 | src/glmath.c 8 | src/util.c 9 | src/bounding_box.c 10 | src/mesh.c 11 | src/block_data.c 12 | src/chunk.c 13 | src/entity.c 14 | src/world.c 15 | src/gui.c 16 | src/game.c 17 | src/input.c 18 | src/main.c 19 | deps/miniz/miniz.c 20 | deps/glad/src/glad.c 21 | deps/lodepng/lodepng.c) 22 | 23 | add_executable( 24 | CCraftServer 25 | src/server/server.c 26 | src/server/main.c 27 | deps/miniz/miniz.c) 28 | 29 | set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs" FORCE) 30 | set(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs" FORCE) 31 | set(GLFW_INSTALL OFF "Generate installation target" FORCE) 32 | set(BUILD_EXAMPLES OFF CACHE BOOL "Build example apps" FORCE) 33 | 34 | add_subdirectory(deps/glfw) 35 | include_directories(deps/miniz) 36 | include_directories(deps/glad/include) 37 | include_directories(deps/glfw/include) 38 | include_directories(deps/lodepng) 39 | 40 | if(WIN32) 41 | target_link_libraries(CCraft wsock32 ws2_32 opengl32) 42 | target_link_libraries(CCraftServer wsock32 ws2_32) 43 | elseif(APPLE) 44 | target_link_libraries(CCraft 45 | "-framework Cocoa" 46 | "-framework IOKit" 47 | "-framework CoreVideo" 48 | "-framework OpenGL" 49 | ) 50 | elseif(UNIX) 51 | target_link_libraries(CCraft GL) 52 | target_link_libraries(CCraftServer m) 53 | endif() 54 | 55 | target_link_libraries(CCraft glfw ${GLFW_LIBRARIES}) 56 | 57 | add_custom_command(TARGET CCraft POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/res $/res) 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## CCraft 2 | 3 | ### Build 4 | 5 | #### Windows (MinGW) 6 | 7 | mkdir build && cd build 8 | cmake .. -G "MinGW Makefiles" 9 | mingw32-make 10 | 11 | #### Linux and MacOS 12 | 13 | mkdir build && cd build 14 | cmake .. 15 | make 16 | 17 | ### Run 18 | 19 | #### Client 20 | 21 | ./CCraft 22 | 23 | Connect to a server by specifying its IP address and optionally its port (the default is 25565). You can also set your nickname (if not set, you will be seen as "Unnamed") 24 | 25 | ./CCraft --ip --port --nick 26 | 27 | #### Server 28 | 29 | You can optionally specify the server's port (the default is 25565) 30 | 31 | ./CCraftServer --port -------------------------------------------------------------------------------- /deps/glfw/.appveyor.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - ci 4 | - master 5 | skip_tags: true 6 | environment: 7 | matrix: 8 | - BUILD_SHARED_LIBS: ON 9 | - BUILD_SHARED_LIBS: OFF 10 | matrix: 11 | fast_finish: true 12 | build_script: 13 | - mkdir build 14 | - cd build 15 | - cmake -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% .. 16 | - cmake --build . 17 | notifications: 18 | - provider: Email 19 | to: 20 | - ci@glfw.org 21 | - on_build_failure: true 22 | - on_build_success: false 23 | -------------------------------------------------------------------------------- /deps/glfw/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: clang 3 | branches: 4 | only: 5 | - ci 6 | - master 7 | os: 8 | - linux 9 | - osx 10 | sudo: false 11 | addons: 12 | apt: 13 | sources: 14 | - kubuntu-backports 15 | packages: 16 | - cmake 17 | env: 18 | - BUILD_SHARED_LIBS=ON 19 | - BUILD_SHARED_LIBS=OFF 20 | script: 21 | - mkdir build 22 | - cd build 23 | - cmake -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} .. 24 | - cmake --build . 25 | notifications: 26 | email: 27 | recipients: 28 | - ci@glfw.org 29 | on_success: never 30 | on_failure: always 31 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/CMake/modules/FindMir.cmake: -------------------------------------------------------------------------------- 1 | # Try to find Mir on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # MIR_LIBRARIES - Link these to use Wayland 6 | # MIR_INCLUDE_DIR - Include directory for Wayland 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_MIR QUIET mirclient) 14 | 15 | set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS}) 16 | set (MIR_LIBRARIES ${PKG_MIR_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2016 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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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_VI_NN 39 | #include "vulkan_vi.h" 40 | #endif 41 | 42 | 43 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR 44 | #include 45 | #include "vulkan_wayland.h" 46 | #endif 47 | 48 | 49 | #ifdef VK_USE_PLATFORM_WIN32_KHR 50 | #include 51 | #include "vulkan_win32.h" 52 | #endif 53 | 54 | 55 | #ifdef VK_USE_PLATFORM_XCB_KHR 56 | #include 57 | #include "vulkan_xcb.h" 58 | #endif 59 | 60 | 61 | #ifdef VK_USE_PLATFORM_XLIB_KHR 62 | #include 63 | #include "vulkan_xlib.h" 64 | #endif 65 | 66 | 67 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT 68 | #include 69 | #include 70 | #include "vulkan_xlib_xrandr.h" 71 | #endif 72 | 73 | #endif // VULKAN_H_ 74 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/docs/DoxygenLayout.xml: -------------------------------------------------------------------------------- 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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /deps/glfw/docs/footer.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/arrowdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/arrowdown.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/arrowright.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/bc_s.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/bdwn.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/closed.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/doc.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/doxygen.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/dynsections.js: -------------------------------------------------------------------------------- 1 | function toggleVisibility(linkObj) 2 | { 3 | var base = $(linkObj).attr('id'); 4 | var summary = $('#'+base+'-summary'); 5 | var content = $('#'+base+'-content'); 6 | var trigger = $('#'+base+'-trigger'); 7 | var src=$(trigger).attr('src'); 8 | if (content.is(':visible')===true) { 9 | content.hide(); 10 | summary.show(); 11 | $(linkObj).addClass('closed').removeClass('opened'); 12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 13 | } else { 14 | content.show(); 15 | summary.hide(); 16 | $(linkObj).removeClass('closed').addClass('opened'); 17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 18 | } 19 | return false; 20 | } 21 | 22 | function updateStripes() 23 | { 24 | $('table.directory tr'). 25 | removeClass('even').filter(':visible:even').addClass('even'); 26 | } 27 | 28 | function toggleLevel(level) 29 | { 30 | $('table.directory tr').each(function() { 31 | var l = this.id.split('_').length-1; 32 | var i = $('#img'+this.id.substring(3)); 33 | var a = $('#arr'+this.id.substring(3)); 34 | if (l 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['blue',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]], 4 | ['bluebits',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]], 5 | ['bug_20list',['Bug List',['../bug.html',1,'']]], 6 | ['build_2edox',['build.dox',['../build_8dox.html',1,'']]], 7 | ['building_20applications',['Building applications',['../build_guide.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compat_2edox',['compat.dox',['../compat_8dox.html',1,'']]], 4 | ['compile_2edox',['compile.dox',['../compile_8dox.html',1,'']]], 5 | ['compiling_20glfw',['Compiling GLFW',['../compile_guide.html',1,'']]], 6 | ['context_20reference',['Context reference',['../group__context.html',1,'']]], 7 | ['context_2edox',['context.dox',['../context_8dox.html',1,'']]], 8 | ['context_20guide',['Context guide',['../context_guide.html',1,'']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['error_20codes',['Error codes',['../group__errors.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['height',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialization_2c_20version_20and_20error_20reference',['Initialization, version and error reference',['../group__init.html',1,'']]], 4 | ['input_20reference',['Input reference',['../group__input.html',1,'']]], 5 | ['input_2edox',['input.dox',['../input_8dox.html',1,'']]], 6 | ['input_20guide',['Input guide',['../input_guide.html',1,'']]], 7 | ['intro_2edox',['intro.dox',['../intro_8dox.html',1,'']]], 8 | ['introduction_20to_20the_20api',['Introduction to the API',['../intro_guide.html',1,'']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['joysticks',['Joysticks',['../group__joysticks.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['keyboard_20keys',['Keyboard keys',['../group__keys.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mouse_20buttons',['Mouse buttons',['../group__buttons.html',1,'']]], 4 | ['main_2edox',['main.dox',['../main_8dox.html',1,'']]], 5 | ['modifier_20key_20flags',['Modifier key flags',['../group__mods.html',1,'']]], 6 | ['monitor_20reference',['Monitor reference',['../group__monitor.html',1,'']]], 7 | ['monitor_2edox',['monitor.dox',['../monitor_8dox.html',1,'']]], 8 | ['monitor_20guide',['Monitor guide',['../monitor_guide.html',1,'']]], 9 | ['moving_2edox',['moving.dox',['../moving_8dox.html',1,'']]], 10 | ['moving_20from_20glfw_202_20to_203',['Moving from GLFW 2 to 3',['../moving_guide.html',1,'']]] 11 | ]; 12 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['notitle',['notitle',['../index.html',1,'']]], 4 | ['native_20access',['Native access',['../group__native.html',1,'']]], 5 | ['new_20features',['New features',['../news.html',1,'']]], 6 | ['news_2edox',['news.dox',['../news_8dox.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pixels',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['quick_2edox',['quick.dox',['../quick_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['red',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]], 4 | ['redbits',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]], 5 | ['refreshrate',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standards_20conformance',['Standards conformance',['../compat_guide.html',1,'']]], 4 | ['standard_20cursor_20shapes',['Standard cursor shapes',['../group__shapes.html',1,'']]], 5 | ['size',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vulkan_20reference',['Vulkan reference',['../group__vulkan.html',1,'']]], 4 | ['vulkan_2edox',['vulkan.dox',['../vulkan_8dox.html',1,'']]], 5 | ['vulkan_20guide',['Vulkan guide',['../vulkan_guide.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/all_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['width',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]], 4 | ['window_20reference',['Window reference',['../group__window.html',1,'']]], 5 | ['window_2edox',['window.dox',['../window_8dox.html',1,'']]], 6 | ['window_20guide',['Window guide',['../window_guide.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfwgammaramp',['GLFWgammaramp',['../structGLFWgammaramp.html',1,'']]], 4 | ['glfwimage',['GLFWimage',['../structGLFWimage.html',1,'']]], 5 | ['glfwvidmode',['GLFWvidmode',['../structGLFWvidmode.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/search/close.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/defines_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['build_2edox',['build.dox',['../build_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compat_2edox',['compat.dox',['../compat_8dox.html',1,'']]], 4 | ['compile_2edox',['compile.dox',['../compile_8dox.html',1,'']]], 5 | ['context_2edox',['context.dox',['../context_8dox.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfw3_2eh',['glfw3.h',['../glfw3_8h.html',1,'']]], 4 | ['glfw3native_2eh',['glfw3native.h',['../glfw3native_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['input_2edox',['input.dox',['../input_8dox.html',1,'']]], 4 | ['intro_2edox',['intro.dox',['../intro_8dox.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['main_2edox',['main.dox',['../main_8dox.html',1,'']]], 4 | ['monitor_2edox',['monitor.dox',['../monitor_8dox.html',1,'']]], 5 | ['moving_2edox',['moving.dox',['../moving_8dox.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['news_2edox',['news.dox',['../news_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['quick_2edox',['quick.dox',['../quick_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vulkan_2edox',['vulkan.dox',['../vulkan_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/files_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_2edox',['window.dox',['../window_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['context_20reference',['Context reference',['../group__context.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['error_20codes',['Error codes',['../group__errors.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialization_2c_20version_20and_20error_20reference',['Initialization, version and error reference',['../group__init.html',1,'']]], 4 | ['input_20reference',['Input reference',['../group__input.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['joysticks',['Joysticks',['../group__joysticks.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['keyboard_20keys',['Keyboard keys',['../group__keys.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mouse_20buttons',['Mouse buttons',['../group__buttons.html',1,'']]], 4 | ['modifier_20key_20flags',['Modifier key flags',['../group__mods.html',1,'']]], 5 | ['monitor_20reference',['Monitor reference',['../group__monitor.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['native_20access',['Native access',['../group__native.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standard_20cursor_20shapes',['Standard cursor shapes',['../group__shapes.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vulkan_20reference',['Vulkan reference',['../group__vulkan.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/groups_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_20reference',['Window reference',['../group__window.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/search/mag_sel.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bug_20list',['Bug List',['../bug.html',1,'']]], 4 | ['building_20applications',['Building applications',['../build_guide.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compiling_20glfw',['Compiling GLFW',['../compile_guide.html',1,'']]], 4 | ['context_20guide',['Context guide',['../context_guide.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getting_20started',['Getting started',['../quick_guide.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['input_20guide',['Input guide',['../input_guide.html',1,'']]], 4 | ['introduction_20to_20the_20api',['Introduction to the API',['../intro_guide.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['monitor_20guide',['Monitor guide',['../monitor_guide.html',1,'']]], 4 | ['moving_20from_20glfw_202_20to_203',['Moving from GLFW 2 to 3',['../moving_guide.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['notitle',['notitle',['../index.html',1,'']]], 4 | ['new_20features',['New features',['../news.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standards_20conformance',['Standards conformance',['../compat_guide.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vulkan_20guide',['Vulkan guide',['../vulkan_guide.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/pages_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_20guide',['Window guide',['../window_guide.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/search/search_l.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/search/search_m.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/search/search_r.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "bceghijkmnpqrsvw", 4 | 1: "g", 5 | 2: "bcgimnqvw", 6 | 3: "g", 7 | 4: "bghprsw", 8 | 5: "g", 9 | 6: "g", 10 | 7: "ceijkmnsvw", 11 | 8: "bcgimnsvw" 12 | }; 13 | 14 | var indexSectionNames = 15 | { 16 | 0: "all", 17 | 1: "classes", 18 | 2: "files", 19 | 3: "functions", 20 | 4: "variables", 21 | 5: "typedefs", 22 | 6: "defines", 23 | 7: "groups", 24 | 8: "pages" 25 | }; 26 | 27 | var indexSectionLabels = 28 | { 29 | 0: "All", 30 | 1: "Data Structures", 31 | 2: "Files", 32 | 3: "Functions", 33 | 4: "Variables", 34 | 5: "Typedefs", 35 | 6: "Macros", 36 | 7: "Modules", 37 | 8: "Pages" 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/typedefs_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfwcharfun',['GLFWcharfun',['../group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f',1,'glfw3.h']]], 4 | ['glfwcharmodsfun',['GLFWcharmodsfun',['../group__input.html#gae36fb6897d2b7df9b128900c8ce9c507',1,'glfw3.h']]], 5 | ['glfwcursor',['GLFWcursor',['../glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4',1,'glfw3.h']]], 6 | ['glfwcursorenterfun',['GLFWcursorenterfun',['../group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840',1,'glfw3.h']]], 7 | ['glfwcursorposfun',['GLFWcursorposfun',['../group__input.html#ga4cfad918fa836f09541e7b9acd36686c',1,'glfw3.h']]], 8 | ['glfwdropfun',['GLFWdropfun',['../group__input.html#gab71f4ca80b651462852e601caf308c4a',1,'glfw3.h']]], 9 | ['glfwerrorfun',['GLFWerrorfun',['../group__init.html#ga6b8a2639706d5c409fc1287e8f55e928',1,'glfw3.h']]], 10 | ['glfwframebuffersizefun',['GLFWframebuffersizefun',['../group__window.html#ga3e218ef9ff826129c55a7d5f6971a285',1,'glfw3.h']]], 11 | ['glfwgammaramp',['GLFWgammaramp',['../group__monitor.html#gaec0bd37af673be8813592849f13e02f0',1,'glfw3.h']]], 12 | ['glfwglproc',['GLFWglproc',['../group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c',1,'glfw3.h']]], 13 | ['glfwimage',['GLFWimage',['../glfw3_8h.html#ac81c32f4437de7b3aa58ab62c3d9e5b1',1,'glfw3.h']]], 14 | ['glfwjoystickfun',['GLFWjoystickfun',['../group__input.html#gaa67aa597e974298c748bfe4fb17d406d',1,'glfw3.h']]], 15 | ['glfwkeyfun',['GLFWkeyfun',['../group__input.html#ga0192a232a41e4e82948217c8ba94fdfd',1,'glfw3.h']]], 16 | ['glfwmonitor',['GLFWmonitor',['../group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3',1,'glfw3.h']]], 17 | ['glfwmonitorfun',['GLFWmonitorfun',['../group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63',1,'glfw3.h']]], 18 | ['glfwmousebuttonfun',['GLFWmousebuttonfun',['../group__input.html#ga39893a4a7e7c3239c98d29c9e084350c',1,'glfw3.h']]], 19 | ['glfwscrollfun',['GLFWscrollfun',['../group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9',1,'glfw3.h']]], 20 | ['glfwvidmode',['GLFWvidmode',['../group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb',1,'glfw3.h']]], 21 | ['glfwvkproc',['GLFWvkproc',['../group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af',1,'glfw3.h']]], 22 | ['glfwwindow',['GLFWwindow',['../group__window.html#ga3c96d80d363e67d13a41b5d1821f3242',1,'glfw3.h']]], 23 | ['glfwwindowclosefun',['GLFWwindowclosefun',['../group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e',1,'glfw3.h']]], 24 | ['glfwwindowfocusfun',['GLFWwindowfocusfun',['../group__window.html#ga58be2061828dd35080bb438405d3a7e2',1,'glfw3.h']]], 25 | ['glfwwindowiconifyfun',['GLFWwindowiconifyfun',['../group__window.html#gad2d4e4c3d28b1242e742e8268b9528af',1,'glfw3.h']]], 26 | ['glfwwindowposfun',['GLFWwindowposfun',['../group__window.html#gafd8db81fdb0e850549dc6bace5ed697a',1,'glfw3.h']]], 27 | ['glfwwindowrefreshfun',['GLFWwindowrefreshfun',['../group__window.html#ga7a56f9e0227e2cd9470d80d919032e08',1,'glfw3.h']]], 28 | ['glfwwindowsizefun',['GLFWwindowsizefun',['../group__window.html#gae49ee6ebc03fa2da024b89943a331355',1,'glfw3.h']]] 29 | ]; 30 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['blue',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]], 4 | ['bluebits',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['green',['green',['../structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a',1,'GLFWgammaramp']]], 4 | ['greenbits',['greenBits',['../structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa',1,'GLFWvidmode']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['height',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pixels',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['red',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]], 4 | ['redbits',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]], 5 | ['refreshrate',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['size',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/search/variables_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['width',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /deps/glfw/docs/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/splitbar.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/sync_off.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/sync_on.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/tab_a.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/tab_b.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/tab_h.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/docs/html/tab_s.png -------------------------------------------------------------------------------- /deps/glfw/docs/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 7 | } 8 | 9 | .tabs2 { 10 | font-size: 10px; 11 | } 12 | .tabs3 { 13 | font-size: 9px; 14 | } 15 | 16 | .tablist { 17 | margin: 0; 18 | padding: 0; 19 | display: table; 20 | } 21 | 22 | .tablist li { 23 | float: left; 24 | display: table-cell; 25 | background-image: url('tab_b.png'); 26 | line-height: 36px; 27 | list-style: none; 28 | } 29 | 30 | .tablist a { 31 | display: block; 32 | padding: 0 20px; 33 | font-weight: bold; 34 | background-image:url('tab_s.png'); 35 | background-repeat:no-repeat; 36 | background-position:right; 37 | color: #283A5D; 38 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 39 | text-decoration: none; 40 | outline: none; 41 | } 42 | 43 | .tabs3 .tablist a { 44 | padding: 0 10px; 45 | } 46 | 47 | .tablist a:hover { 48 | background-image: url('tab_h.png'); 49 | background-repeat:repeat-x; 50 | color: #fff; 51 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 52 | text-decoration: none; 53 | } 54 | 55 | .tablist li.current a { 56 | background-image: url('tab_a.png'); 57 | background-repeat:repeat-x; 58 | color: #fff; 59 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 60 | } 61 | -------------------------------------------------------------------------------- /deps/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](https://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](https://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](https://www.glfw.org/download.html) and 45 | [GitHub repository](https://github.com/glfw/glfw). 46 | 47 | */ 48 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/examples/glfw.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/examples/glfw.icns -------------------------------------------------------------------------------- /deps/glfw/examples/glfw.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/deps/glfw/examples/glfw.ico -------------------------------------------------------------------------------- /deps/glfw/examples/glfw.rc: -------------------------------------------------------------------------------- 1 | 2 | GLFW_ICON ICON "glfw.ico" 3 | 4 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/src/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 4 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION_FULL@ 9 | URL: https://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 | -------------------------------------------------------------------------------- /deps/glfw/src/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 2 | -------------------------------------------------------------------------------- /deps/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 OSMesa 46 | #cmakedefine _GLFW_OSMESA 47 | 48 | // Define this to 1 if building as a shared library / dynamic library / DLL 49 | #cmakedefine _GLFW_BUILD_DLL 50 | // Define this to 1 to use Vulkan loader linked statically into application 51 | #cmakedefine _GLFW_VULKAN_STATIC 52 | 53 | // Define this to 1 to force use of high-performance GPU on hybrid systems 54 | #cmakedefine _GLFW_USE_HYBRID_HPG 55 | 56 | // Define this to 1 if xkbcommon supports the compose key 57 | #cmakedefine HAVE_XKBCOMMON_COMPOSE_H 58 | // Define this to 1 if the libc supports memfd_create() 59 | #cmakedefine HAVE_MEMFD_CREATE 60 | 61 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) 62 | { 63 | return GLFW_FALSE; 64 | } 65 | 66 | void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) 67 | { 68 | } 69 | 70 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/src/posix_tls.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.2 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Berglund 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 | GLFWbool _glfwInitThreadLocalStoragePOSIX(void) 36 | { 37 | if (pthread_key_create(&_glfw.posix_tls.context, NULL) != 0) 38 | { 39 | _glfwInputError(GLFW_PLATFORM_ERROR, 40 | "POSIX: Failed to create context TLS"); 41 | return GLFW_FALSE; 42 | } 43 | 44 | _glfw.posix_tls.allocated = GLFW_TRUE; 45 | return GLFW_TRUE; 46 | } 47 | 48 | void _glfwTerminateThreadLocalStoragePOSIX(void) 49 | { 50 | if (_glfw.posix_tls.allocated) 51 | pthread_key_delete(_glfw.posix_tls.context); 52 | } 53 | 54 | 55 | ////////////////////////////////////////////////////////////////////////// 56 | ////// GLFW platform API ////// 57 | ////////////////////////////////////////////////////////////////////////// 58 | 59 | void _glfwPlatformSetCurrentContext(_GLFWwindow* context) 60 | { 61 | pthread_setspecific(_glfw.posix_tls.context, context); 62 | } 63 | 64 | _GLFWwindow* _glfwPlatformGetCurrentContext(void) 65 | { 66 | return pthread_getspecific(_glfw.posix_tls.context); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /deps/glfw/src/posix_tls.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.2 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Berglund 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 | #ifndef _glfw3_posix_tls_h_ 29 | #define _glfw3_posix_tls_h_ 30 | 31 | #include 32 | 33 | #define _GLFW_PLATFORM_LIBRARY_TLS_STATE _GLFWtlsPOSIX posix_tls 34 | 35 | 36 | // POSIX-specific global TLS data 37 | // 38 | typedef struct _GLFWtlsPOSIX 39 | { 40 | GLFWbool allocated; 41 | pthread_key_t context; 42 | 43 | } _GLFWtlsPOSIX; 44 | 45 | 46 | GLFWbool _glfwInitThreadLocalStoragePOSIX(void); 47 | void _glfwTerminateThreadLocalStoragePOSIX(void); 48 | 49 | #endif // _glfw3_posix_tls_h_ 50 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/src/win32_tls.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.2 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2016 Camilla Berglund 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 | GLFWbool _glfwInitThreadLocalStorageWin32(void) 36 | { 37 | _glfw.win32_tls.context = TlsAlloc(); 38 | if (_glfw.win32_tls.context == TLS_OUT_OF_INDEXES) 39 | { 40 | _glfwInputError(GLFW_PLATFORM_ERROR, 41 | "Win32: Failed to allocate TLS index"); 42 | return GLFW_FALSE; 43 | } 44 | 45 | _glfw.win32_tls.allocated = GLFW_TRUE; 46 | return GLFW_TRUE; 47 | } 48 | 49 | void _glfwTerminateThreadLocalStorageWin32(void) 50 | { 51 | if (_glfw.win32_tls.allocated) 52 | TlsFree(_glfw.win32_tls.context); 53 | } 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////// 57 | ////// GLFW platform API ////// 58 | ////////////////////////////////////////////////////////////////////////// 59 | 60 | void _glfwPlatformSetCurrentContext(_GLFWwindow* context) 61 | { 62 | TlsSetValue(_glfw.win32_tls.context, context); 63 | } 64 | 65 | _GLFWwindow* _glfwPlatformGetCurrentContext(void) 66 | { 67 | return TlsGetValue(_glfw.win32_tls.context); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /deps/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 | -------------------------------------------------------------------------------- /deps/glfw/tests/timeout.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // Event wait timeout test 3 | // Copyright (c) Camilla Löwy 4 | // 5 | // This software is provided 'as-is', without any express or implied 6 | // warranty. In no event will the authors be held liable for any damages 7 | // arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software 15 | // in a product, an acknowledgment in the product documentation would 16 | // be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not 19 | // be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source 22 | // distribution. 23 | // 24 | //======================================================================== 25 | // 26 | // This test is intended to verify that waiting for events with timeout works 27 | // 28 | //======================================================================== 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | static void error_callback(int error, const char* description) 39 | { 40 | fprintf(stderr, "Error: %s\n", description); 41 | } 42 | 43 | static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) 44 | { 45 | if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) 46 | glfwSetWindowShouldClose(window, GLFW_TRUE); 47 | } 48 | 49 | static float nrand(void) 50 | { 51 | return (float) rand() / (float) RAND_MAX; 52 | } 53 | 54 | int main(void) 55 | { 56 | GLFWwindow* window; 57 | 58 | srand((unsigned int) time(NULL)); 59 | 60 | glfwSetErrorCallback(error_callback); 61 | 62 | if (!glfwInit()) 63 | exit(EXIT_FAILURE); 64 | 65 | window = glfwCreateWindow(640, 480, "Event Wait Timeout Test", NULL, NULL); 66 | if (!window) 67 | { 68 | glfwTerminate(); 69 | exit(EXIT_FAILURE); 70 | } 71 | 72 | glfwMakeContextCurrent(window); 73 | gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); 74 | glfwSetKeyCallback(window, key_callback); 75 | 76 | while (!glfwWindowShouldClose(window)) 77 | { 78 | int width, height; 79 | float r = nrand(), g = nrand(), b = nrand(); 80 | float l = (float) sqrt(r * r + g * g + b * b); 81 | 82 | glfwGetFramebufferSize(window, &width, &height); 83 | 84 | glViewport(0, 0, width, height); 85 | glClearColor(r / l, g / l, b / l, 1.f); 86 | glClear(GL_COLOR_BUFFER_BIT); 87 | glfwSwapBuffers(window); 88 | 89 | glfwWaitEventsTimeout(1.0); 90 | } 91 | 92 | glfwDestroyWindow(window); 93 | 94 | glfwTerminate(); 95 | exit(EXIT_SUCCESS); 96 | } 97 | 98 | -------------------------------------------------------------------------------- /deps/glfw/tests/title.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // UTF-8 window title test 3 | // Copyright (c) Camilla Löwy 4 | // 5 | // This software is provided 'as-is', without any express or implied 6 | // warranty. In no event will the authors be held liable for any damages 7 | // arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software 15 | // in a product, an acknowledgment in the product documentation would 16 | // be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not 19 | // be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source 22 | // distribution. 23 | // 24 | //======================================================================== 25 | // 26 | // This test sets a UTF-8 window title 27 | // 28 | //======================================================================== 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | 36 | static void error_callback(int error, const char* description) 37 | { 38 | fprintf(stderr, "Error: %s\n", description); 39 | } 40 | 41 | int main(void) 42 | { 43 | GLFWwindow* window; 44 | 45 | glfwSetErrorCallback(error_callback); 46 | 47 | if (!glfwInit()) 48 | exit(EXIT_FAILURE); 49 | 50 | window = glfwCreateWindow(400, 400, "English 日本語 русский язык 官話", NULL, NULL); 51 | if (!window) 52 | { 53 | glfwTerminate(); 54 | exit(EXIT_FAILURE); 55 | } 56 | 57 | glfwMakeContextCurrent(window); 58 | gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); 59 | glfwSwapInterval(1); 60 | 61 | while (!glfwWindowShouldClose(window)) 62 | { 63 | glClear(GL_COLOR_BUFFER_BIT); 64 | glfwSwapBuffers(window); 65 | glfwWaitEvents(); 66 | } 67 | 68 | glfwTerminate(); 69 | exit(EXIT_SUCCESS); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /deps/miniz/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013-2014 RAD Game Tools and Valve Software 2 | Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC 3 | 4 | All Rights Reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /deps/miniz/examples/example4.c: -------------------------------------------------------------------------------- 1 | // example4.c - Uses tinfl.c to decompress a zlib stream in memory to an output file 2 | // Public domain, May 15 2011, Rich Geldreich, richgel99@gmail.com. See "unlicense" statement at the end of tinfl.c. 3 | #include "miniz_tinfl.h" 4 | #include 5 | #include 6 | 7 | typedef unsigned char uint8; 8 | typedef unsigned short uint16; 9 | typedef unsigned int uint; 10 | 11 | #define my_max(a,b) (((a) > (b)) ? (a) : (b)) 12 | #define my_min(a,b) (((a) < (b)) ? (a) : (b)) 13 | 14 | static int tinfl_put_buf_func(const void* pBuf, int len, void *pUser) 15 | { 16 | return len == (int)fwrite(pBuf, 1, len, (FILE*)pUser); 17 | } 18 | 19 | int main(int argc, char *argv[]) 20 | { 21 | int status; 22 | FILE *pInfile, *pOutfile; 23 | uint infile_size, outfile_size; 24 | size_t in_buf_size; 25 | uint8 *pCmp_data; 26 | long file_loc; 27 | 28 | if (argc != 3) 29 | { 30 | printf("Usage: example4 infile outfile\n"); 31 | printf("Decompresses zlib stream in file infile to file outfile.\n"); 32 | printf("Input file must be able to fit entirely in memory.\n"); 33 | printf("example3 can be used to create compressed zlib streams.\n"); 34 | return EXIT_FAILURE; 35 | } 36 | 37 | // Open input file. 38 | pInfile = fopen(argv[1], "rb"); 39 | if (!pInfile) 40 | { 41 | printf("Failed opening input file!\n"); 42 | return EXIT_FAILURE; 43 | } 44 | 45 | // Determine input file's size. 46 | fseek(pInfile, 0, SEEK_END); 47 | file_loc = ftell(pInfile); 48 | fseek(pInfile, 0, SEEK_SET); 49 | 50 | if ((file_loc < 0) || (file_loc > INT_MAX)) 51 | { 52 | // This is not a limitation of miniz or tinfl, but this example. 53 | printf("File is too large to be processed by this example.\n"); 54 | return EXIT_FAILURE; 55 | } 56 | 57 | infile_size = (uint)file_loc; 58 | 59 | pCmp_data = (uint8 *)malloc(infile_size); 60 | if (!pCmp_data) 61 | { 62 | printf("Out of memory!\n"); 63 | return EXIT_FAILURE; 64 | } 65 | if (fread(pCmp_data, 1, infile_size, pInfile) != infile_size) 66 | { 67 | printf("Failed reading input file!\n"); 68 | return EXIT_FAILURE; 69 | } 70 | 71 | // Open output file. 72 | pOutfile = fopen(argv[2], "wb"); 73 | if (!pOutfile) 74 | { 75 | printf("Failed opening output file!\n"); 76 | return EXIT_FAILURE; 77 | } 78 | 79 | printf("Input file size: %u\n", infile_size); 80 | 81 | in_buf_size = infile_size; 82 | status = tinfl_decompress_mem_to_callback(pCmp_data, &in_buf_size, tinfl_put_buf_func, pOutfile, TINFL_FLAG_PARSE_ZLIB_HEADER); 83 | if (!status) 84 | { 85 | printf("tinfl_decompress_mem_to_callback() failed with status %i!\n", status); 86 | return EXIT_FAILURE; 87 | } 88 | 89 | outfile_size = ftell(pOutfile); 90 | 91 | fclose(pInfile); 92 | if (EOF == fclose(pOutfile)) 93 | { 94 | printf("Failed writing to output file!\n"); 95 | return EXIT_FAILURE; 96 | } 97 | 98 | printf("Total input bytes: %u\n", (uint)in_buf_size); 99 | printf("Total output bytes: %u\n", outfile_size); 100 | printf("Success.\n"); 101 | return EXIT_SUCCESS; 102 | } 103 | -------------------------------------------------------------------------------- /res/shaders/blocks.fsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | in float pass_brightness; 4 | in vec2 pass_tex_coord; 5 | 6 | uniform sampler2D blocks_texture; 7 | 8 | out vec4 out_color; 9 | 10 | void main() 11 | { 12 | vec4 tex_color = texture(blocks_texture, pass_tex_coord); 13 | if (tex_color.a == 0.0) 14 | discard; 15 | out_color = vec4(tex_color.xyz * pass_brightness, tex_color.a); 16 | } 17 | -------------------------------------------------------------------------------- /res/shaders/blocks.vsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | in vec3 position; 4 | in vec3 normal; 5 | in vec2 tex_coord; 6 | 7 | uniform mat4 model; 8 | uniform mat4 view; 9 | uniform mat4 projection; 10 | 11 | out float pass_brightness; 12 | out vec2 pass_tex_coord; 13 | 14 | void main() 15 | { 16 | gl_Position = projection * view * model * vec4(position, 1.0); 17 | vec3 normal = normalize(mat3(transpose(inverse(model))) * normal); 18 | pass_brightness = 0.6; 19 | pass_brightness += clamp(dot(vec3(-0.5, 0.4, 0.0), normal), -0.15, 1.0) * 0.5; 20 | pass_brightness += clamp(dot(vec3(0.5, 0.4, 0.0), normal), -0.15, 1.0) * 0.5; 21 | pass_brightness = clamp(pass_brightness, 0.0, 1.0); 22 | pass_tex_coord = tex_coord; 23 | } 24 | -------------------------------------------------------------------------------- /res/shaders/gui.fsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | in vec2 pass_tex_coord; 4 | in float pass_tex_id; 5 | in vec3 pass_color; 6 | 7 | uniform sampler2D gui_textures[2]; 8 | 9 | out vec4 out_color; 10 | 11 | void main() 12 | { 13 | vec4 texture_color; 14 | if (pass_tex_id == 0.0) 15 | texture_color = texture(gui_textures[0], pass_tex_coord); 16 | else 17 | texture_color = texture(gui_textures[1], pass_tex_coord); 18 | out_color = vec4(texture_color.rgb * pass_color, texture_color.a); 19 | if (out_color.a == 0.0) 20 | discard; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /res/shaders/gui.vsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | in vec2 position; 4 | in vec2 tex_coord; 5 | in float tex_id; 6 | in vec3 color; 7 | 8 | uniform mat4 projection; 9 | uniform mat4 model; 10 | 11 | out vec2 pass_tex_coord; 12 | out float pass_tex_id; 13 | out vec3 pass_color; 14 | 15 | void main() 16 | { 17 | gl_Position = projection * model * vec4(position, 0.0, 1.0); 18 | pass_tex_coord = tex_coord; 19 | pass_tex_id = tex_id; 20 | pass_color = color; 21 | } 22 | -------------------------------------------------------------------------------- /res/shaders/lines.fsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | out vec4 out_color; 4 | 5 | void main() 6 | { 7 | out_color = vec4(0.0, 0.0, 0.0, 0.7); 8 | } 9 | -------------------------------------------------------------------------------- /res/shaders/lines.vsh: -------------------------------------------------------------------------------- 1 | #version 150 core 2 | 3 | in vec3 position; 4 | 5 | uniform mat4 view; 6 | uniform mat4 projection; 7 | 8 | void main() 9 | { 10 | gl_Position = projection * view * vec4(position, 1.0); 11 | gl_Position.z -= 0.0006; 12 | } 13 | -------------------------------------------------------------------------------- /res/textures/ascii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/res/textures/ascii.png -------------------------------------------------------------------------------- /res/textures/terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/res/textures/terrain.png -------------------------------------------------------------------------------- /res/textures/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knicked/CCraft/64d182fb071a74be3e0304c0e8d87461aa021156/res/textures/widgets.png -------------------------------------------------------------------------------- /src/block.h: -------------------------------------------------------------------------------- 1 | #ifndef BLOCK_H 2 | #define BLOCK_H 3 | 4 | #define AIR 0 5 | #define STONE 1 6 | #define GRASS 2 7 | #define DIRT 3 8 | #define COBBLESTONE 4 9 | #define WOOD_PLANKS 5 10 | #define SAPLING 6 11 | #define BEDROCK 7 12 | #define FLOWING_WATER 8 13 | #define STILL_WATER 9 14 | #define FLOWING_LAVA 10 15 | #define STILL_LAVA 11 16 | #define SAND 12 17 | #define GRAVEL 13 18 | #define GOLD_ORE 14 19 | #define IRON_ORE 15 20 | #define COAL_ORE 16 21 | #define WOOD 17 22 | #define LEAVES 18 23 | #define SPONGE 19 24 | #define GLASS 20 25 | 26 | typedef unsigned char block_id; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/block_data.c: -------------------------------------------------------------------------------- 1 | #include "block_data.h" 2 | 3 | const block_data blocks[256] = { 4 | {0, 0, 0, 0, 0, 0}, 5 | {1, 1, 1, 1, 1, 1}, //stone 6 | {3, 3, 3, 3, 0, 2}, //grass 7 | {2, 2, 2, 2, 2, 2}, //dirt 8 | {16, 16, 16, 16, 16, 16}, //cobblestone 9 | {4, 4, 4, 4, 4, 4}, //wooden planks 10 | {15, 15, 15, 15, 15, 15}, //sapling 11 | {17, 17, 17, 17, 17, 17}, //bedrock 12 | {205, 205, 205, 205, 205, 205}, //water 13 | {205, 205, 205, 205, 205, 205}, //also water 14 | {237, 237, 237, 237, 237, 237}, //lava 15 | {237, 237, 237, 237, 237, 237}, //also lava 16 | {18, 18, 18, 18, 18, 18}, //sand 17 | {19, 19, 19, 19, 19, 19}, //gravel 18 | {32, 32, 32, 32, 32, 32}, //gold ore 19 | {33, 33, 33, 33, 33, 33}, //iron ore 20 | {34, 34, 34, 34, 34, 34}, //coal ore 21 | {20, 20, 20, 20, 21, 21}, //wood 22 | {52, 52, 52, 52, 52, 52}, //leaves 23 | {48, 48, 48, 48, 48, 48}, //sponge 24 | {49, 49, 49, 49, 49, 49}, //glass 25 | }; 26 | 27 | bounding_box block_box = {{1.0f, 1.0f, 1.0f}}; 28 | 29 | int block_is_opaque(block_id block) 30 | { 31 | switch (block) 32 | { 33 | case AIR: 34 | case FLOWING_WATER: 35 | case STILL_WATER: 36 | case LEAVES: 37 | case SAPLING: 38 | case GLASS: 39 | return 0; 40 | default: 41 | return 1; 42 | } 43 | } 44 | 45 | int block_is_obstacle(block_id block) 46 | { 47 | switch (block) 48 | { 49 | case AIR: 50 | case FLOWING_WATER: 51 | case STILL_WATER: 52 | case FLOWING_LAVA: 53 | case STILL_LAVA: 54 | case SAPLING: 55 | return 0; 56 | default: 57 | return 1; 58 | } 59 | } 60 | 61 | int block_connects(block_id block) 62 | { 63 | switch (block) 64 | { 65 | case FLOWING_WATER: 66 | case STILL_WATER: 67 | case GLASS: 68 | return 1; 69 | default: 70 | return 0; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/block_data.h: -------------------------------------------------------------------------------- 1 | #ifndef BLOCK_DATA_H 2 | #define BLOCK_DATA_H 3 | 4 | #include "block.h" 5 | #include "bounding_box.h" 6 | 7 | typedef struct 8 | { 9 | int face_tiles[6]; 10 | } block_data; 11 | 12 | extern const block_data blocks[256]; 13 | extern bounding_box block_box; 14 | 15 | int block_is_opaque(block_id block); 16 | int block_is_obstacle(block_id block); 17 | int block_connects(block_id block); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/bounding_box.c: -------------------------------------------------------------------------------- 1 | #include "bounding_box.h" 2 | 3 | int bounding_box_update(bounding_box *box, vec3 *position) 4 | { 5 | box->min.x = position->x - box->size.x * 0.5f; 6 | box->min.y = position->y; 7 | box->min.z = position->z - box->size.z * 0.5f; 8 | box->max.x = position->x + box->size.x * 0.5f; 9 | box->max.y = position->y + box->size.y; 10 | box->max.z = position->z + box->size.z * 0.5f; 11 | } 12 | 13 | int is_colliding(bounding_box *b1, bounding_box *b2) 14 | { 15 | return b1->max.x > b2->min.x && b1->max.z > b2->min.z && b1->max.y > b2->min.y 16 | && b1->min.x < b2->max.x && b1->min.z < b2->max.z && b1->min.y < b2->max.y; 17 | } 18 | 19 | int is_touching(bounding_box *b1, bounding_box *b2) 20 | { 21 | return b1->max.x >= b2->min.x && b1->max.z >= b2->min.z && b1->max.y >= b2->min.y 22 | && b1->min.x <= b2->max.x && b1->min.z <= b2->max.z && b1->min.y <= b2->max.y; 23 | } 24 | -------------------------------------------------------------------------------- /src/bounding_box.h: -------------------------------------------------------------------------------- 1 | #ifndef BOUNDING_BOX_H 2 | #define BOUNDING_BOX_H 3 | 4 | #include "glmath.h" 5 | 6 | typedef struct 7 | { 8 | vec3 size; 9 | vec3 max; 10 | vec3 min; 11 | } bounding_box; 12 | 13 | int bounding_box_update(bounding_box *box, vec3 *position); 14 | 15 | int is_colliding(bounding_box *b1, bounding_box *b2); 16 | int is_touching(bounding_box *b1, bounding_box *b2); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/chunk.h: -------------------------------------------------------------------------------- 1 | #ifndef CHUNK_H 2 | #define CHUNK_H 3 | 4 | #include "block.h" 5 | #include "mesh.h" 6 | #include "shader.h" 7 | 8 | #include 9 | 10 | #define CHUNK_SIZE 16 11 | #define WORLD_HEIGHT 128 12 | 13 | typedef struct 14 | { 15 | block_id blocks[CHUNK_SIZE][WORLD_HEIGHT][CHUNK_SIZE]; 16 | int x; 17 | int z; 18 | int dirty; 19 | GLuint vao; 20 | GLuint vbo; 21 | GLuint vert_count; 22 | GLint water_offset; 23 | GLuint water_count; 24 | } chunk; 25 | 26 | void chunk_build_buffer(chunk *c, void *w, block_vertex *data_buffer); 27 | void chunk_init(chunk *c, int x, int z, shader *blocks_shader); 28 | void chunk_destroy(chunk *c); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/entity.h: -------------------------------------------------------------------------------- 1 | #ifndef ENTITY_H 2 | #define ENTITY_H 3 | 4 | #include "bounding_box.h" 5 | 6 | typedef struct 7 | { 8 | vec3 position; 9 | vec3 velocity; 10 | vec3 move_direction; 11 | int jumping; 12 | int on_ground; 13 | bounding_box box; 14 | } entity; 15 | 16 | void entity_move(entity *e, void *w, vec3 *delta_pos); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/game.h: -------------------------------------------------------------------------------- 1 | #ifndef GAME_H 2 | #define GAME_H 3 | 4 | #include "world.h" 5 | #include "gui.h" 6 | #include "miniz.h" 7 | 8 | typedef struct 9 | { 10 | GLFWwindow *window; 11 | float window_width; 12 | float window_height; 13 | 14 | world w; 15 | gui gui; 16 | 17 | gui_text *debug_text; 18 | 19 | int online; 20 | char *buffer; 21 | z_stream inf_stream; 22 | struct sockaddr_in server_addr; 23 | SOCKET server_socket; 24 | char player_nickname[31]; 25 | fd_set read_fds; 26 | struct timeval tv; 27 | } game; 28 | 29 | void game_init(game *g, GLFWwindow *window); 30 | void game_destroy(game *g); 31 | void game_handle_input(game *g, input *i); 32 | void game_tick(game *g); 33 | void game_draw(game *g, double delta_time, double time_since_tick); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/glmath.h: -------------------------------------------------------------------------------- 1 | #ifndef GLMATH_H 2 | #define GLMATH_H 3 | 4 | #define PI 3.14159265359f 5 | #define DEGREES(radians) ((radians) * 180.0f / PI) 6 | #define RADIANS(degrees) ((degrees) * PI / 180.0f) 7 | 8 | typedef struct 9 | { 10 | float value[16]; 11 | } mat4; 12 | 13 | typedef struct 14 | { 15 | float x; 16 | float y; 17 | float z; 18 | } vec3; 19 | 20 | typedef struct 21 | { 22 | float x; 23 | float y; 24 | } vec2; 25 | 26 | static vec3 AXIS_UP = {0.0f, 1.0f, 0.0f}; 27 | static vec3 AXIS_RIGHT = {1.0f, 0.0f, 0.0f}; 28 | static vec3 AXIS_FRONT = {0.0f, 0.0f, 1.0f}; 29 | 30 | static vec3 VEC3_ONE = {1.0f, 1.0f, 1.0f}; 31 | 32 | static mat4 TEMP_MAT; 33 | 34 | float lerp(float a, float b, float t); 35 | 36 | void normalize(vec3 *v); 37 | 38 | void identity(mat4 *m); 39 | void translate(mat4 *m, vec3 *v); 40 | void translate_v2(mat4 *m, vec2 *v); 41 | void rotate(mat4 *m, vec3 *axis, float angle); 42 | void scale(mat4 *m, vec3* v); 43 | 44 | void add_v3(vec3 *v, vec3 *v1, vec3 *v2); 45 | void add_v2(vec2 *v, vec2 *v1, vec2 *v2); 46 | 47 | void subtract_v2(vec2 *v, vec2 *v1, vec2 *v2); 48 | 49 | void multiply(mat4 *m, mat4 *m1, mat4 *m2); 50 | void multiply_v3f(vec3 *v, vec3 *v1, float v2); 51 | void multiply_v2f(vec2 *v, vec2 *v1, float v2); 52 | 53 | void lerp_v3(vec3 *v, vec3 *v1, vec3 *v2, float t); 54 | 55 | void frustum(mat4 *m, float left, float right, float bottom, float top, float znear, float zfar); 56 | void perspective(mat4 *m, float fov, float aspect, float znear, float zfar); 57 | void ortho(mat4 *m, float left, float right, float bottom, float top, float near, float far); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/gui.h: -------------------------------------------------------------------------------- 1 | #ifndef GUI_H 2 | #define GUI_H 3 | 4 | #include "world.h" 5 | 6 | typedef struct 7 | { 8 | GLuint vao; 9 | GLuint vbo; 10 | vec2 position; 11 | vec2 size; 12 | } gui_sprite; 13 | 14 | typedef struct 15 | { 16 | GLuint vao; 17 | GLuint vbo; 18 | GLsizei vert_count; 19 | vec2 position; 20 | vec2 size; 21 | char text[256]; 22 | } gui_text; 23 | 24 | typedef struct 25 | { 26 | float window_width; 27 | float window_height; 28 | int scale; 29 | 30 | world *w; 31 | 32 | shader gui_shader; 33 | 34 | GLuint widgets_texture; 35 | GLuint ascii_texture; 36 | 37 | gui_sprite crosshair_sprite; 38 | gui_sprite hotbar_sprite; 39 | gui_sprite hotbar_selection_sprite; 40 | 41 | gui_text *player_id_text; 42 | gui_text texts[32]; 43 | unsigned int num_texts; 44 | 45 | GLuint hotbar_item_vaos[256]; 46 | GLuint hotbar_item_vbos[256]; 47 | } gui; 48 | 49 | void gui_init(gui *g, world* w); 50 | void gui_handle_input(gui *g, input* i); 51 | void gui_draw(gui *g); 52 | void gui_destroy(gui *g); 53 | 54 | gui_text *gui_create_text(gui *g); 55 | void gui_set_text(gui_text *text, const char *s, float scale); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/input.h: -------------------------------------------------------------------------------- 1 | #ifndef INPUT_H 2 | #define INPUT_H 3 | 4 | #include 5 | #include 6 | 7 | #include "glmath.h" 8 | 9 | typedef struct 10 | { 11 | float window_width; 12 | float window_height; 13 | 14 | int keys[512]; 15 | int keys_down[512]; 16 | int keys_up[512]; 17 | 18 | float mouse_sensitivity; 19 | 20 | int mouse_buttons[3]; 21 | int mouse_buttons_down[3]; 22 | int mouse_buttons_up[3]; 23 | int mouse_locked; 24 | double scroll_delta; 25 | 26 | vec2 mouse_pos; 27 | vec2 last_mouse_pos; 28 | vec2 mouse_delta; 29 | } input; 30 | 31 | void input_init(input *i, GLFWwindow *window); 32 | void input_poll_events(input *i); 33 | 34 | void input_lock_mouse(input *i, GLFWwindow *window); 35 | void input_unlock_mouse(input *i, GLFWwindow *window); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/mesh.h: -------------------------------------------------------------------------------- 1 | #ifndef MESH_H 2 | #define MESH_H 3 | 4 | #include "glmath.h" 5 | #include "block_data.h" 6 | 7 | typedef struct 8 | { 9 | vec3 position; 10 | vec3 normal; 11 | vec2 tex_coord; 12 | } block_vertex; 13 | 14 | typedef struct 15 | { 16 | vec2 position; 17 | vec2 tex_coord; 18 | float tex_id; 19 | vec3 color; 20 | } gui_vertex; 21 | 22 | int make_block(block_vertex *data, vec3 position, block_id block, block_id neighbours[6]); 23 | void make_frame(vec3 *data, vec3 *position, bounding_box *box); 24 | int make_text(gui_vertex *data, const char *text, float scale, vec2 *size); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/server/main.c: -------------------------------------------------------------------------------- 1 | #include "server.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int main(int argc, char **argv) 10 | { 11 | printf("[CCraft 0.0.0 Server]\n"); 12 | 13 | server s; 14 | unsigned short port = 25565; 15 | if (argc / 2 >= 1) 16 | { 17 | for (int i = 0; i < argc; i++) 18 | { 19 | if (strcmp(argv[i], "--port") == 0) 20 | { 21 | port = (unsigned short) atoi(argv[i + 1]); 22 | } 23 | } 24 | } 25 | server_init(&s, port); 26 | 27 | struct timeval current_tv; 28 | gettimeofday(¤t_tv, NULL); 29 | 30 | unsigned int last_time = 0; 31 | unsigned int current_time = 0; 32 | unsigned int delta_time = 0; 33 | unsigned int tick_accumulator = 0; 34 | const unsigned int tick_interval = 1000000 / 20; 35 | 36 | int first_tick = 1; 37 | 38 | struct timeval tv; 39 | fd_set read_fds; 40 | 41 | tv.tv_sec = 0; 42 | tv.tv_usec = 0; 43 | 44 | while (1) 45 | { 46 | gettimeofday(¤t_tv, NULL); 47 | current_time = 1000000 * current_tv.tv_sec + current_tv.tv_usec; 48 | if (first_tick) 49 | { 50 | last_time = current_time - tick_interval; 51 | first_tick = 0; 52 | } 53 | delta_time = current_time - last_time; 54 | 55 | if (delta_time < tick_interval && !first_tick) 56 | { 57 | usleep(tick_interval - delta_time); 58 | gettimeofday(¤t_tv, NULL); 59 | current_time = 1000000 * current_tv.tv_sec + current_tv.tv_usec; 60 | delta_time = current_time - last_time; 61 | } 62 | 63 | last_time = current_time; 64 | 65 | tick_accumulator += delta_time; 66 | 67 | server_tick(&s); 68 | 69 | #ifndef _WIN32 70 | FD_ZERO(&read_fds); 71 | FD_SET(0, &read_fds); 72 | 73 | select(1, &read_fds, NULL, NULL, &tv); 74 | 75 | if (FD_ISSET(0, &read_fds)) 76 | break; 77 | #endif 78 | } 79 | 80 | printf("Closing the server...\n"); 81 | server_destroy(&s); 82 | 83 | return 0; 84 | } 85 | -------------------------------------------------------------------------------- /src/server/server.h: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_H 2 | #define SERVER_H 3 | 4 | #include "../sockets.h" 5 | 6 | #include "miniz.h" 7 | 8 | #define CHUNK_SIZE 16 9 | #define WORLD_HEIGHT 128 10 | #define WORLD_SIZE 32 11 | 12 | #define WORLD_TO_CHUNK(x) (x < 0 ? x % CHUNK_SIZE == 0 ? 0 : CHUNK_SIZE + x % CHUNK_SIZE : x % CHUNK_SIZE) 13 | #define CHUNK_FROM_WORLD_COORDS(x) ((x / CHUNK_SIZE < 0 ? x + 1 : x) / CHUNK_SIZE + WORLD_SIZE / 2 - (x < 0 ? 1 : 0)) 14 | 15 | typedef struct 16 | { 17 | block_id blocks[CHUNK_SIZE][WORLD_HEIGHT][CHUNK_SIZE]; 18 | } chunk; 19 | 20 | typedef struct 21 | { 22 | short x; 23 | short y; 24 | short z; 25 | unsigned short chunk_data_sent[WORLD_SIZE][WORLD_SIZE]; 26 | unsigned char id; 27 | char nickname[31]; 28 | SOCKET socket; 29 | } player; 30 | 31 | typedef struct 32 | { 33 | fd_set sockets; 34 | SOCKET listener; 35 | SOCKET max_fd; 36 | 37 | chunk *chunks; 38 | 39 | player players[MAX_PLAYERS]; 40 | unsigned int num_players; 41 | int ids_used[256]; 42 | 43 | char *buffer; 44 | z_stream def_stream; 45 | } server; 46 | 47 | void server_init(server *s, unsigned short port); 48 | void server_tick(server *s); 49 | void server_destroy(server *s); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/shader.h: -------------------------------------------------------------------------------- 1 | #ifndef SHADER_H 2 | #define SHADER_H 3 | 4 | #include 5 | 6 | typedef struct 7 | { 8 | GLuint program; 9 | GLuint position_location; 10 | GLuint normal_location; 11 | GLuint tex_id_location; 12 | GLuint tex_coord_location; 13 | GLuint model_location; 14 | GLuint view_location; 15 | GLuint color_location; 16 | GLuint projection_location; 17 | GLuint texture_location; 18 | } shader; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/sockets.h: -------------------------------------------------------------------------------- 1 | #ifndef SOCKETS_H 2 | #define SOCKETS_H 3 | 4 | #ifdef _WIN32 5 | #if (_WIN32_WINNT < 0x0501) 6 | #define _WIN32_WINNT 0x0501 7 | #endif 8 | #include 9 | #include 10 | #define SOCKET_VALID(s) ((s) != INVALID_SOCKET) 11 | #else 12 | #include 13 | #include 14 | #include 15 | #include 16 | #define SOCKET_VALID(s) ((s) != -1) 17 | typedef int SOCKET; 18 | #endif 19 | 20 | #include "block.h" 21 | 22 | #define MAX_PLAYERS 32 23 | #define DATA_BUFFER_SIZE 32768 24 | 25 | #define SET_BLOCK_ID 0 26 | #define SPAWN_PLAYER_ID 1 27 | #define DESPAWN_PLAYER_ID 2 28 | #define POSITION_UPDATE_ID 3 29 | #define CHUNK_DATA_ID 4 30 | #define PLAYER_IDENTIFICATION_ID 5 31 | 32 | typedef struct 33 | { 34 | unsigned char id; 35 | char nickname[31]; 36 | } player_identification_packet; 37 | 38 | typedef struct 39 | { 40 | unsigned char id; 41 | block_id block; 42 | short x; 43 | short y; 44 | short z; 45 | } set_block_packet; 46 | 47 | typedef struct 48 | { 49 | unsigned char id; 50 | char x; 51 | char z; 52 | unsigned short length; 53 | unsigned short complete; 54 | char data[1024]; 55 | } chunk_data_packet; 56 | 57 | typedef struct 58 | { 59 | unsigned char id; 60 | unsigned char player_id; 61 | char nickname[31]; 62 | } spawn_player_packet; 63 | 64 | typedef struct 65 | { 66 | unsigned char id; 67 | unsigned char player_id; 68 | } despawn_player_packet; 69 | 70 | typedef struct 71 | { 72 | unsigned char id; 73 | unsigned char player_id; 74 | short x; 75 | short y; 76 | short z; 77 | } position_update_packet; 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /src/util.c: -------------------------------------------------------------------------------- 1 | #include "util.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | char *load_file(const char *path) 9 | { 10 | FILE *file = fopen(path, "rb"); 11 | if (!file) 12 | { 13 | fprintf(stderr, "fopen %s failed: %d %s\n", path, errno, strerror(errno)); 14 | exit(1); 15 | } 16 | fseek(file, 0, SEEK_END); 17 | int length = ftell(file); 18 | rewind(file); 19 | char *data = calloc(length + 1, sizeof(char)); 20 | fread(data, 1, length, file); 21 | fclose(file); 22 | return data; 23 | } 24 | 25 | GLuint make_shader(GLenum type, const char *source) 26 | { 27 | GLuint shader = glCreateShader(type); 28 | glShaderSource(shader, 1, &source, NULL); 29 | glCompileShader(shader); 30 | GLint status; 31 | glGetShaderiv(shader, GL_COMPILE_STATUS, &status); 32 | if (status == GL_FALSE) { 33 | GLint length; 34 | glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length); 35 | GLchar *info = calloc(length, sizeof(GLchar)); 36 | glGetShaderInfoLog(shader, length, NULL, info); 37 | fprintf(stderr, "glCompileShader failed:\n%s\n", info); 38 | free(info); 39 | } 40 | return shader; 41 | } 42 | 43 | GLuint load_shader(GLenum type, const char *path) 44 | { 45 | char *data = load_file(path); 46 | GLuint result = make_shader(type, data); 47 | free(data); 48 | return result; 49 | } 50 | 51 | GLuint make_program(GLuint shader1, GLuint shader2) 52 | { 53 | GLuint program = glCreateProgram(); 54 | glAttachShader(program, shader1); 55 | glAttachShader(program, shader2); 56 | glLinkProgram(program); 57 | GLint status; 58 | glGetProgramiv(program, GL_LINK_STATUS, &status); 59 | if (status == GL_FALSE) { 60 | GLint length; 61 | glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length); 62 | GLchar *info = calloc(length, sizeof(GLchar)); 63 | glGetProgramInfoLog(program, length, NULL, info); 64 | fprintf(stderr, "glLinkProgram failed: %s\n", info); 65 | free(info); 66 | } 67 | glDetachShader(program, shader1); 68 | glDetachShader(program, shader2); 69 | glDeleteShader(shader1); 70 | glDeleteShader(shader2); 71 | return program; 72 | } 73 | 74 | GLuint load_program(const char *path1, const char *path2) 75 | { 76 | GLuint shader1 = load_shader(GL_VERTEX_SHADER, path1); 77 | GLuint shader2 = load_shader(GL_FRAGMENT_SHADER, path2); 78 | GLuint program = make_program(shader1, shader2); 79 | return program; 80 | } 81 | 82 | void load_png_texture(const char *file_name) 83 | { 84 | unsigned int error; 85 | unsigned char *data; 86 | unsigned int width, height; 87 | error = lodepng_decode32_file(&data, &width, &height, file_name); 88 | if (error) { 89 | fprintf(stderr, "load_png_texture %s failed, error %u: %s\n", file_name, error, lodepng_error_text(error)); 90 | exit(1); 91 | } 92 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei) width, (GLsizei) height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); 93 | free(data); 94 | } 95 | -------------------------------------------------------------------------------- /src/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #include 5 | #include 6 | 7 | char *load_file(const char *path); 8 | GLuint make_shader(GLenum type, const char *source); 9 | GLuint load_shader(GLenum type, const char *path); 10 | GLuint make_program(GLuint shader1, GLuint shader2); 11 | GLuint load_program(const char *path1, const char *path2); 12 | void load_png_texture(const char *file_name); 13 | 14 | #endif -------------------------------------------------------------------------------- /src/world.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLD_H 2 | #define WORLD_H 3 | 4 | #include "chunk.h" 5 | #include "entity.h" 6 | #include "input.h" 7 | #include "shader.h" 8 | #include "sockets.h" 9 | 10 | #define WORLD_SIZE 32 11 | 12 | #define WORLD_TO_CHUNK(x) (x < 0 ? x % CHUNK_SIZE == 0 ? 0 : CHUNK_SIZE + x % CHUNK_SIZE : x % CHUNK_SIZE) 13 | #define CHUNK_FROM_WORLD_COORDS(x) ((x / CHUNK_SIZE < 0 ? x + 1 : x) / CHUNK_SIZE + WORLD_SIZE / 2 - (x < 0 ? 1 : 0)) 14 | #define GET_CURRENT_HOTBAR(w) (((w)->selected_block - 1) / 9) 15 | 16 | typedef struct 17 | { 18 | vec3 position; 19 | vec3 smoothed_position; 20 | vec3 prev_position; 21 | unsigned char id; 22 | char nickname[31]; 23 | } network_player; 24 | 25 | typedef struct 26 | { 27 | chunk *chunks; 28 | 29 | float window_width; 30 | float window_height; 31 | 32 | network_player players[MAX_PLAYERS]; 33 | unsigned char num_players; 34 | entity player; 35 | int fly_mode; 36 | int noclip_mode; 37 | 38 | vec3 camera_position; 39 | vec2 camera_rotation; 40 | int destroying_block; 41 | int placing_block; 42 | block_id selected_block; 43 | int selected_block_x; 44 | int selected_block_y; 45 | int selected_block_z; 46 | int selected_face_x; 47 | int selected_face_y; 48 | int selected_face_z; 49 | int block_in_range; 50 | 51 | int block_changed; 52 | block_id new_block; 53 | 54 | block_vertex *chunk_data_buffer; 55 | 56 | mat4 blocks_model; 57 | mat4 world_view; 58 | mat4 world_projection; 59 | 60 | GLuint blocks_texture; 61 | shader blocks_shader; 62 | 63 | shader lines_shader; 64 | 65 | GLuint frame_vao; 66 | GLuint frame_vbo; 67 | } world; 68 | 69 | void world_init(world *w); 70 | void world_generate(world *w); 71 | void world_handle_input(world *w, input *i); 72 | void world_tick(world *w); 73 | void world_draw(world *w, double delta_time, double time_since_tick); 74 | void world_destroy(world *w); 75 | 76 | block_id world_get_block(world *w, int x, int y, int z); 77 | void world_set_block(world *w, int x, int y, int z, block_id new_block); 78 | 79 | #endif 80 | --------------------------------------------------------------------------------