diff --git a/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# b/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# deleted file mode 100644 index 308d5d9..0000000 --- a/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# +++ /dev/null @@ -1 +0,0 @@ -,brett,laforge,28.10.2022 15:02,file:///home/brett/.config/libreoffice/4; \ No newline at end of file diff --git a/Step 3/CMakeLists.txt b/Step 3/CMakeLists.txt index 6688337..713a72e 100644 --- a/Step 3/CMakeLists.txt +++ b/Step 3/CMakeLists.txt @@ -4,7 +4,8 @@ project(Step_3) set(CMAKE_CXX_STANDARD 20) option(EnableDebugMenu "Enable the debug utils" OFF) -option(COMPILE_GUI "Enable compilation of the GUI utils" OFF) +option(COMPILE_GUI "Enable compilation of the GUI + utils" OFF) +option(USE_GLFW "Will try to use GLFW instead of X11. If libglfw3 and libglfw3-dev are not installed it will default to X11" ON) option(COMPILE_OPENCL "Enable compilation of the OpenCL GPU Compute." OFF) # used to debug memory related issues @@ -13,20 +14,20 @@ if ((CMAKE_BUILD_TYPE MATCHES Debug)) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g") add_compile_options(-fsanitize=address) add_link_options(-fsanitize=address) - endif() + endif () set(COMPILER_DEBUG_ENABLED true) -else() +else () set(COMPILER_DEBUG_ENABLED false) -endif() +endif () set(COMPILER_DEBUG_ENABLED_BOOL true) -if(EnableDebugMenu MATCHES ON) +if (EnableDebugMenu MATCHES ON) message("debug mode") set(DEBUG_ENABLED true) -else() +else () message("release mode") set(DEBUG_ENABLED false) -endif(EnableDebugMenu MATCHES ON) +endif (EnableDebugMenu MATCHES ON) set(DEBUG_ENABLED_BOOL true) #config stuff @@ -45,30 +46,45 @@ file(GLOB_RECURSE engine_source_files "${engine_source_dir}/*.cpp" "${engine_sou if (COMPILE_GUI MATCHES ON AND UNIX) message("Compiling with GUI.") find_package(OpenGL REQUIRED) - find_package(X11) - if(NOT X11_FOUND) - message("X11 wasn't found on your system. Do you have the development libs? sudo apt install libx11-dev") - endif() + set(SHOULD_FIND_X ON) - include_directories(${X11_INCLUDE_DIR}) + if (USE_GLFW) + find_package(glfw3 3.3) + if (glfw3_FOUND) + message("Found GLFW3!") + set(SHOULD_FIND_X OFF) + else () + message("Unable to find GLFW3. Please install with sudo apt install libglfw3 libglfw3-dev") + endif () + endif () + + if (SHOULD_FIND_X MATCHES ON) + message("Defaulting to X11. Please consider using GLFW as it is consider to be more stable and is what is actively developed. Bugs are to be expected using X11.") + find_package(X11) + if (NOT X11_FOUND) + message("X11 wasn't found on your system. Do you have the development libs? sudo apt install libx11-dev") + endif () + + include_directories(${X11_INCLUDE_DIR}) + endif () set(graphics_source_dir "${PROJECT_SOURCE_DIR}/src/graphics") file(GLOB_RECURSE graphics_source_files "${graphics_source_dir}/*.cpp" "${graphics_source_dir}/*.c") -endif() +endif () # Windows should be able to handle opencl no problem. # i decided that i wanted to use opencl due to it having a much nicer c99 language. if (COMPILE_OPENCL MATCHES ON) find_package(OpenCL) - if(NOT OpenCL_FOUND) + if (NOT OpenCL_FOUND) message("Unable to find OpenCL on your system. Do you have the required libs?") - endif() + endif () include_directories(${OpenCL_INCLUDE_DIRS}) set(opencl_source_dir "${PROJECT_SOURCE_DIR}/src/opencl") file(GLOB_RECURSE opencl_source_files "${opencl_source_dir}/*.cpp" "${opencl_source_dir}/*.c") -endif() +endif () #Setup project header files include_directories(${PROJECT_SOURCE_DIR}/include) @@ -80,8 +96,12 @@ target_link_libraries(${PROJECT_NAME} pthread) if (COMPILE_GUI MATCHES ON AND UNIX) target_link_libraries(${PROJECT_NAME} OpenGL::GL OpenGL::GLU OpenGL::GLX) target_link_libraries(${PROJECT_NAME} ${X11_LIBRARIES}) -endif() +endif () + +if (USE_GLFW MATCHES ON AND glfw3_FOUND) + target_link_libraries(${PROJECT_NAME} glfw) +endif () if (COMPILE_OPENCL MATCHES ON) target_link_libraries(${PROJECT_NAME} ${OpenCL_LIBRARIES}) -endif() +endif () diff --git a/Step 3/Dev Log Week of 2022-10-23.odt b/Step 3/Dev Log Week of 2022-10-23.odt index 6076707..4a4fb93 100644 Binary files a/Step 3/Dev Log Week of 2022-10-23.odt and b/Step 3/Dev Log Week of 2022-10-23.odt differ diff --git a/Step 3/cmake-build-debug/.cmake/api/v1/reply/cache-v2-5fdf2e49722c528a78eb.json b/Step 3/cmake-build-debug/.cmake/api/v1/reply/cache-v2-5fdf2e49722c528a78eb.json deleted file mode 100644 index 046b31a..0000000 --- a/Step 3/cmake-build-debug/.cmake/api/v1/reply/cache-v2-5fdf2e49722c528a78eb.json +++ /dev/null @@ -1,3323 +0,0 @@ -{ - "entries" : - [ - { - "name" : "CMAKE_ADDR2LINE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/addr2line" - }, - { - "name" : "CMAKE_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ar" - }, - { - "name" : "CMAKE_BUILD_TYPE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." - } - ], - "type" : "STRING", - "value" : "Debug" - }, - { - "name" : "CMAKE_CACHEFILE_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "This is the directory where this CMakeCache.txt was created" - } - ], - "type" : "INTERNAL", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" - }, - { - "name" : "CMAKE_CACHE_MAJOR_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Major version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "3" - }, - { - "name" : "CMAKE_CACHE_MINOR_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Minor version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "23" - }, - { - "name" : "CMAKE_CACHE_PATCH_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Patch version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "2" - }, - { - "name" : "CMAKE_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to CMake executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake" - }, - { - "name" : "CMAKE_CPACK_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to cpack program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cpack" - }, - { - "name" : "CMAKE_CTEST_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to ctest program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ctest" - }, - { - "name" : "CMAKE_CXX_COMPILER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "CXX compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/c++" - }, - { - "name" : "CMAKE_CXX_COMPILER_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ar-12" - }, - { - "name" : "CMAKE_CXX_COMPILER_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ranlib-12" - }, - { - "name" : "CMAKE_CXX_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_CXX_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "-g" - }, - { - "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "-Os -DNDEBUG" - }, - { - "name" : "CMAKE_CXX_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "-O3 -DNDEBUG" - }, - { - "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "-O2 -g -DNDEBUG" - }, - { - "name" : "CMAKE_C_COMPILER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "C compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/cc" - }, - { - "name" : "CMAKE_C_COMPILER_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ar-12" - }, - { - "name" : "CMAKE_C_COMPILER_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ranlib-12" - }, - { - "name" : "CMAKE_C_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_C_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "-g" - }, - { - "name" : "CMAKE_C_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "-Os -DNDEBUG" - }, - { - "name" : "CMAKE_C_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "-O3 -DNDEBUG" - }, - { - "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "-O2 -g -DNDEBUG" - }, - { - "name" : "CMAKE_DLLTOOL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "CMAKE_DLLTOOL-NOTFOUND" - }, - { - "name" : "CMAKE_EDIT_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to cache edit program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ccmake" - }, - { - "name" : "CMAKE_EXECUTABLE_FORMAT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Executable file format" - } - ], - "type" : "INTERNAL", - "value" : "ELF" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Enable/Disable output of compile commands during generation." - } - ], - "type" : "BOOL", - "value" : "" - }, - { - "name" : "CMAKE_EXTRA_GENERATOR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of external makefile project generator." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_GENERATOR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator." - } - ], - "type" : "INTERNAL", - "value" : "Ninja" - }, - { - "name" : "CMAKE_GENERATOR_INSTANCE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Generator instance identifier." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_GENERATOR_PLATFORM", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator platform." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_GENERATOR_TOOLSET", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator toolset." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_HAVE_CONNECT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function connect" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_GETHOSTBYNAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function gethostbyname" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_REMOVE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function remove" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_SHMAT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function shmat" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HOME_DIRECTORY", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Source directory with the top level CMakeLists.txt file for this project" - } - ], - "type" : "INTERNAL", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - { - "name" : "CMAKE_INSTALL_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Install path prefix, prepended onto install directories." - } - ], - "type" : "PATH", - "value" : "/usr/local" - }, - { - "name" : "CMAKE_INSTALL_SO_NO_EXE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Install .so files without execute permission." - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have library ICE" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_LINKER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ld" - }, - { - "name" : "CMAKE_MAKE_PROGRAM", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "No help, variable specified on the command line." - } - ], - "type" : "UNINITIALIZED", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/ninja/linux/ninja" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_NM", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/nm" - }, - { - "name" : "CMAKE_NUMBER_OF_MAKEFILES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "number of local generators" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_OBJCOPY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/objcopy" - }, - { - "name" : "CMAKE_OBJDUMP", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/objdump" - }, - { - "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Platform information initialized" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_PROJECT_DESCRIPTION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "" - }, - { - "name" : "CMAKE_PROJECT_HOMEPAGE_URL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "" - }, - { - "name" : "CMAKE_PROJECT_NAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "Step_3" - }, - { - "name" : "CMAKE_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ranlib" - }, - { - "name" : "CMAKE_READELF", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/readelf" - }, - { - "name" : "CMAKE_ROOT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to CMake installation." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SKIP_INSTALL_RPATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." - } - ], - "type" : "BOOL", - "value" : "NO" - }, - { - "name" : "CMAKE_SKIP_RPATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If set, runtime paths are not added when using shared libraries." - } - ], - "type" : "BOOL", - "value" : "NO" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STRIP", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/strip" - }, - { - "name" : "CMAKE_UNAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "uname command" - } - ], - "type" : "INTERNAL", - "value" : "/usr/bin/uname" - }, - { - "name" : "CMAKE_VERBOSE_MAKEFILE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." - } - ], - "type" : "BOOL", - "value" : "FALSE" - }, - { - "name" : "COMPILE_GUI", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable compilation of the GUI utils" - } - ], - "type" : "BOOL", - "value" : "ON" - }, - { - "name" : "COMPILE_OPENCL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable compilation of the OpenCL GPU Compute." - } - ], - "type" : "BOOL", - "value" : "ON" - }, - { - "name" : "EnableDebugMenu", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable the debug utils" - } - ], - "type" : "BOOL", - "value" : "OFF" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_OpenCL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding OpenCL" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/lib/x86_64-linux-gnu/libOpenCL.so][/usr/include][v2.2()]" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_OpenGL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding OpenGL" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/lib/x86_64-linux-gnu/libOpenGL.so][/usr/lib/x86_64-linux-gnu/libGLX.so][/usr/include][c ][v()]" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_X11", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding X11" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/include][/usr/lib/x86_64-linux-gnu/libX11.so][c ][v()]" - }, - { - "name" : "FREETYPE_INCLUDE_DIR_freetype2", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include/freetype2" - }, - { - "name" : "FREETYPE_INCLUDE_DIR_ft2build", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include/freetype2" - }, - { - "name" : "FREETYPE_LIBRARY_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "FREETYPE_LIBRARY_DEBUG-NOTFOUND" - }, - { - "name" : "FREETYPE_LIBRARY_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfreetype.so" - }, - { - "name" : "Fontconfig_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "Fontconfig_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfontconfig.so" - }, - { - "name" : "OPENCL_VERSION_2_2", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_2_2" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "OPENGL_EGL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_GLX_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_egl_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libEGL.so" - }, - { - "name" : "OPENGL_glu_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libGLU.so" - }, - { - "name" : "OPENGL_glx_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libGLX.so" - }, - { - "name" : "OPENGL_opengl_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libOpenGL.so" - }, - { - "name" : "OPENGL_xmesa_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "OPENGL_xmesa_INCLUDE_DIR-NOTFOUND" - }, - { - "name" : "OpenCL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OpenCL_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libOpenCL.so" - }, - { - "name" : "PKG_CONFIG_ARGN", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Arguments to supply to pkg-config" - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "PKG_CONFIG_EXECUTABLE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "pkg-config executable" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/pkg-config" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-I/usr/include/uuid;-I/usr/include/freetype2;-I/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS_I", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_FOUND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "PKG_FONTCONFIG_INCLUDEDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include" - }, - { - "name" : "PKG_FONTCONFIG_INCLUDE_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include/uuid;/usr/include/freetype2;/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_LDFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-L/usr/lib/x86_64-linux-gnu;-lfontconfig;-lfreetype" - }, - { - "name" : "PKG_FONTCONFIG_LDFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_LIBRARIES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig;freetype" - }, - { - "name" : "PKG_FONTCONFIG_LIBRARY_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_LIBS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_L", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_PATHS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_MODULE_NAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig" - }, - { - "name" : "PKG_FONTCONFIG_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-I/usr/include/uuid;-I/usr/include/freetype2;-I/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS_I", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_INCLUDE_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include/uuid;/usr/include/freetype2;/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LDFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-L/usr/lib/x86_64-linux-gnu;-lfontconfig;-luuid;-lexpat;-lm;-lfreetype;-lpng16;-lm;-lz;-lm;-lz;-lbrotlidec;-lbrotlicommon" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LDFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBRARIES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig;uuid;expat;m;freetype;png16;m;z;m;z;brotlidec;brotlicommon" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBRARY_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_L", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_PATHS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "2.13.1" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_INCLUDEDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "Step_3_BINARY_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" - }, - { - "name" : "Step_3_IS_TOP_LEVEL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "ON" - }, - { - "name" : "Step_3_SOURCE_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - { - "name" : "X11_ICE_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_ICE_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libICE.so" - }, - { - "name" : "X11_LIB_X11_SOLO", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have library /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "X11_SM_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_SM_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libSM.so" - }, - { - "name" : "X11_X11_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_X11_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libX11.so" - }, - { - "name" : "X11_X11_xcb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_X11_xcb_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_X11_xcb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_X11_xcb_LIB-NOTFOUND" - }, - { - "name" : "X11_XRes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_XRes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXRes.so" - }, - { - "name" : "X11_XShm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_XSync_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xaccessrules_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xaccessstr_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xau_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xau_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXau.so" - }, - { - "name" : "X11_Xaw_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_Xaw_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_Xaw_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXaw.so" - }, - { - "name" : "X11_Xcomposite_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xcomposite_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXcomposite.so" - }, - { - "name" : "X11_Xcursor_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xcursor_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXcursor.so" - }, - { - "name" : "X11_Xdamage_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xdamage_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXdamage.so" - }, - { - "name" : "X11_Xdmcp_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xdmcp_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXdmcp.so" - }, - { - "name" : "X11_Xext_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xext_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXext.so" - }, - { - "name" : "X11_Xfixes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xfixes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXfixes.so" - }, - { - "name" : "X11_Xft_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xft_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXft.so" - }, - { - "name" : "X11_Xi_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xi_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXi.so" - }, - { - "name" : "X11_Xinerama_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xinerama_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXinerama.so" - }, - { - "name" : "X11_Xkb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xkblib_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xlib_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xmu_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xmu_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXmu.so" - }, - { - "name" : "X11_Xpm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xpm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXpm.so" - }, - { - "name" : "X11_Xrandr_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xrandr_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXrandr.so" - }, - { - "name" : "X11_Xrender_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xrender_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXrender.so" - }, - { - "name" : "X11_Xshape_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xss_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xss_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXss.so" - }, - { - "name" : "X11_Xt_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xt_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXt.so" - }, - { - "name" : "X11_Xtst_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xtst_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXtst.so" - }, - { - "name" : "X11_Xutil_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xv_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xv_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXv.so" - }, - { - "name" : "X11_Xxf86misc_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_Xxf86misc_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_Xxf86misc_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_Xxf86misc_LIB-NOTFOUND" - }, - { - "name" : "X11_Xxf86vm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xxf86vm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXxf86vm.so" - }, - { - "name" : "X11_dpms_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xcb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xcb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxcb.so" - }, - { - "name" : "X11_xcb_icccm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_icccm_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_icccm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_icccm_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_util_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_util_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_util_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_util_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_xfixes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_xfixes_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_xfixes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_xfixes_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_xkb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_xkb_LIB-NOTFOUND" - }, - { - "name" : "X11_xkbcommon_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xkbcommon_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxkbcommon.so" - }, - { - "name" : "X11_xkbcommon_X11_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xkbcommon_X11_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xkbcommon_X11_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xkbcommon_X11_LIB-NOTFOUND" - }, - { - "name" : "X11_xkbfile_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xkbfile_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxkbfile.so" - }, - { - "name" : "__pkg_config_arguments_PKG_FONTCONFIG", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "QUIET;fontconfig" - }, - { - "name" : "__pkg_config_checked_PKG_FONTCONFIG", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "pkgcfg_lib_PKG_FONTCONFIG_fontconfig", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfontconfig.so" - }, - { - "name" : "pkgcfg_lib_PKG_FONTCONFIG_freetype", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfreetype.so" - }, - { - "name" : "prefix_result", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - } - ], - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } -} diff --git a/Step 3/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8856d3a45f872662a860.json b/Step 3/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8856d3a45f872662a860.json deleted file mode 100644 index b8f425b..0000000 --- a/Step 3/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8856d3a45f872662a860.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "inputs" : - [ - { - "path" : "CMakeLists.txt" - }, - { - "isGenerated" : true, - "path" : "cmake-build-debug/CMakeFiles/3.23.2/CMakeSystem.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-debug/CMakeFiles/3.23.2/CMakeCCompiler.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-debug/CMakeFiles/3.23.2/CMakeCXXCompiler.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "path" : "include/engine/config.h.in" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - } - ], - "kind" : "cmakeFiles", - "paths" : - { - "build" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug", - "source" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - "version" : - { - "major" : 1, - "minor" : 0 - } -} diff --git a/Step 3/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-efb0d1357378cbd0a379.json b/Step 3/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-efb0d1357378cbd0a379.json deleted file mode 100644 index b36a983..0000000 --- a/Step 3/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-efb0d1357378cbd0a379.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "configurations" : - [ - { - "directories" : - [ - { - "build" : ".", - "jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json", - "minimumCMakeVersion" : - { - "string" : "3.22" - }, - "projectIndex" : 0, - "source" : ".", - "targetIndexes" : - [ - 0 - ] - } - ], - "name" : "Debug", - "projects" : - [ - { - "directoryIndexes" : - [ - 0 - ], - "name" : "Step_3", - "targetIndexes" : - [ - 0 - ] - } - ], - "targets" : - [ - { - "directoryIndex" : 0, - "id" : "Step_3::@6890427a1f51a3e7e1df", - "jsonFile" : "target-Step_3-Debug-c6b33fab9a47948e599f.json", - "name" : "Step_3", - "projectIndex" : 0 - } - ] - } - ], - "kind" : "codemodel", - "paths" : - { - "build" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug", - "source" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - "version" : - { - "major" : 2, - "minor" : 4 - } -} diff --git a/Step 3/cmake-build-debug/.cmake/api/v1/reply/target-Step_3-Debug-c6b33fab9a47948e599f.json b/Step 3/cmake-build-debug/.cmake/api/v1/reply/target-Step_3-Debug-c6b33fab9a47948e599f.json deleted file mode 100644 index 4f00d99..0000000 --- a/Step 3/cmake-build-debug/.cmake/api/v1/reply/target-Step_3-Debug-c6b33fab9a47948e599f.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "artifacts" : - [ - { - "path" : "Step_3" - } - ], - "backtrace" : 1, - "backtraceGraph" : - { - "commands" : - [ - "add_executable", - "add_link_options", - "target_link_libraries", - "set_target_properties", - "find_package", - "add_compile_options", - "include_directories" - ], - "files" : - [ - "CMakeLists.txt", - "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake" - ], - "nodes" : - [ - { - "file" : 0 - }, - { - "command" : 0, - "file" : 0, - "line" : 76, - "parent" : 0 - }, - { - "command" : 1, - "file" : 0, - "line" : 15, - "parent" : 0 - }, - { - "command" : 2, - "file" : 0, - "line" : 78, - "parent" : 0 - }, - { - "command" : 2, - "file" : 0, - "line" : 81, - "parent" : 0 - }, - { - "command" : 2, - "file" : 0, - "line" : 82, - "parent" : 0 - }, - { - "command" : 2, - "file" : 0, - "line" : 86, - "parent" : 0 - }, - { - "command" : 4, - "file" : 0, - "line" : 47, - "parent" : 0 - }, - { - "file" : 1, - "parent" : 7 - }, - { - "command" : 3, - "file" : 1, - "line" : 510, - "parent" : 8 - }, - { - "command" : 5, - "file" : 0, - "line" : 14, - "parent" : 0 - }, - { - "command" : 6, - "file" : 0, - "line" : 35, - "parent" : 0 - }, - { - "command" : 6, - "file" : 0, - "line" : 74, - "parent" : 0 - } - ] - }, - "compileGroups" : - [ - { - "compileCommandFragments" : - [ - { - "fragment" : " -fsanitize=address -g -march=native -g" - }, - { - "backtrace" : 10, - "fragment" : "-fsanitize=address" - }, - { - "fragment" : "-std=gnu++20" - } - ], - "includes" : - [ - { - "backtrace" : 11, - "path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" - }, - { - "backtrace" : 12, - "path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" - } - ], - "language" : "CXX", - "languageStandard" : - { - "backtraces" : - [ - 1 - ], - "standard" : "20" - }, - "sourceIndexes" : - [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ] - } - ], - "id" : "Step_3::@6890427a1f51a3e7e1df", - "link" : - { - "commandFragments" : - [ - { - "fragment" : "-fsanitize=address -g -march=native -g", - "role" : "flags" - }, - { - "fragment" : "", - "role" : "flags" - }, - { - "backtrace" : 2, - "fragment" : "-fsanitize=address", - "role" : "flags" - }, - { - "backtrace" : 3, - "fragment" : "-lpthread", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLU.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so", - "role" : "libraries" - }, - { - "backtrace" : 5, - "fragment" : "/usr/lib/x86_64-linux-gnu/libSM.so", - "role" : "libraries" - }, - { - "backtrace" : 5, - "fragment" : "/usr/lib/x86_64-linux-gnu/libICE.so", - "role" : "libraries" - }, - { - "backtrace" : 5, - "fragment" : "/usr/lib/x86_64-linux-gnu/libX11.so", - "role" : "libraries" - }, - { - "backtrace" : 5, - "fragment" : "/usr/lib/x86_64-linux-gnu/libXext.so", - "role" : "libraries" - }, - { - "backtrace" : 6, - "fragment" : "/usr/lib/x86_64-linux-gnu/libOpenCL.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so", - "role" : "libraries" - }, - { - "backtrace" : 9, - "fragment" : "/usr/lib/x86_64-linux-gnu/libOpenGL.so", - "role" : "libraries" - } - ], - "language" : "CXX" - }, - "name" : "Step_3", - "nameOnDisk" : "Step_3", - "paths" : - { - "build" : ".", - "source" : "." - }, - "sourceGroups" : - [ - { - "name" : "Source Files", - "sourceIndexes" : - [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ] - } - ], - "sources" : - [ - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/globals.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/image/image.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/main.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/math/colliders.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/raytracing.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/debug.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/models.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/parser.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/world.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/gl/gl.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/gl/shader.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/graphics.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_demo.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_draw.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_impl_glfw.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_impl_opengl3.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_tables.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_widgets.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/input.cpp", - "sourceGroupIndex" : 0 - } - ], - "type" : "EXECUTABLE" -} diff --git a/Step 3/cmake-build-debug/.ninja_deps b/Step 3/cmake-build-debug/.ninja_deps index 388a94f..b484fcd 100644 Binary files a/Step 3/cmake-build-debug/.ninja_deps and b/Step 3/cmake-build-debug/.ninja_deps differ diff --git a/Step 3/cmake-build-debug/.ninja_log b/Step 3/cmake-build-debug/.ninja_log index 318e636..6227611 100644 --- a/Step 3/cmake-build-debug/.ninja_log +++ b/Step 3/cmake-build-debug/.ninja_log @@ -1,23 +1,86 @@ # ninja log v5 -3 2328 1666645817680080118 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o dc4b23b5e01a8208 -2 1997 1666645817348070656 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o cf522ea42b0f8fd3 -2 1620 1666983166449949656 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb -1 979 1666648980885505392 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede -1 1508 1666673054183662428 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2468 4613 1667153960803219513 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o dc4b23b5e01a8208 +1 427 1667154074499589425 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898 +2008 3974 1667153960163194261 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o cf522ea42b0f8fd3 +2 2766 1667153958955146576 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 2008 1667153958199116717 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede +1 2791 1667153958983147681 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2318 3021 1667153959215156841 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o 6f5a39b3d5d543ae 1 1234 1666981302357304642 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa -2 1991 1666645817344070539 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b -2 2283 1666933460283419002 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554 -2 3803 1666645819156122183 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o f152a6b2309aba93 -2088 2309 1666983564938369031 Step_3 50a8b57262a84bea -1 345 1666981453797536430 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 35f01a0bb2fddead +1 2030 1667153958223117664 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b +2 2648 1667153958839141995 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554 +838 5349 1667153961539248544 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o f152a6b2309aba93 +2017 2190 1667154076263655537 Step_3 32fd76f248d1f905 +2041 2317 1667153958511129040 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 35f01a0bb2fddead 4 2331 1666645817684080231 CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o 89b6559e07a1508c -1 1849 1666983376724092088 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 3635 1667153959823180843 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd 4 41 1666933458043351230 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 10752ac78f398bdb -3 3104 1666645818456102230 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o 707f99c685c75a0f -1 1429 1666983376304079808 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 -3 3490 1666645818844113291 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o d81abd5f968f8f53 -2 2699 1666981303821348302 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +2030 5143 1667153961331240340 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o 707f99c685c75a0f +1 1349 1667154075423624061 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +2648 5738 1667153961927263847 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o d81abd5f968f8f53 +1 1982 1667154076055647747 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c 3 375 1666933458379361395 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 45a2ee53269bffeb -1 1377 1666934125123463514 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 -1 2088 1666983564718361404 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 -1 1178 1666549740059765852 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66 +1 1255 1667154075327620463 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +1 2017 1667154076091649095 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2 2041 1667153958231117979 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66 +3 692 1667163382924394018 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898 +2 1184 1667163383420409456 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa +2 1265 1667163383500411946 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 6b49c8b248d04bb6 +2 1555 1667163383792421035 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede +3 1787 1667163384024428255 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +3 1884 1667163384120431243 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +2 1962 1667163384196433608 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 2318 1667163384552444689 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +2 2468 1667163384704449422 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +3 2470 1667163384704449422 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +2470 2670 1667163384904455646 Step_3 7f6959eaebe4da02 +2 495 1667163437354089921 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898 +2 1381 1667163438238117496 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +2 1451 1667163438310119742 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +2 2150 1667163439006141453 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1 2154 1667163439014141702 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2154 2362 1667163439218148065 Step_3 7f6959eaebe4da02 +2 445 1667163512540438339 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898 +2 1290 1667163513388464862 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +2 1341 1667163513436466363 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +2 2092 1667163514188489883 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1 2103 1667163514200490259 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2104 2285 1667163514380495887 Step_3 7f6959eaebe4da02 +2 479 1667164649884505763 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898 +2 1348 1667164650776531271 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +2 1439 1667164650868533902 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +1 1993 1667164651420549688 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 2153 1667164651580554264 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1 2163 1667164651588554493 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 2192 1667164651620555409 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2192 2376 1667164651804560671 Step_3 7f6959eaebe4da02 +1 1918 1667164724182641387 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1919 2099 1667164724362646587 Step_3 7f6959eaebe4da02 +1 1961 1667164796716745795 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1961 2139 1667164796896751037 Step_3 7f6959eaebe4da02 +1 1339 1667166009917251171 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +1 1956 1667166010533266830 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1 1982 1667166010557267438 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1982 2163 1667166010737272014 Step_3 7f6959eaebe4da02 +1 1913 1667166119364084538 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1913 2092 1667166119544089279 Step_3 7f6959eaebe4da02 +1 1415 1667183451634129148 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b +2 1867 1667183452082142894 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554 +2 2017 1667183452234147558 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +2 2122 1667183452338150748 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +1 2299 1667183452514156149 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2 2469 1667183452686161426 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 2552 1667183452766163880 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +2 2832 1667183453046172470 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +1 2944 1667183453158175907 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2944 3143 1667183453358182043 Step_3 7f6959eaebe4da02 +2 1663 1667189508444800726 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b +4 1824 1667189508604805575 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 +3 1977 1667189508760810304 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6 +3 2121 1667189508904814669 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554 +3 2144 1667189508924815274 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 2321 1667189509104820730 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +3 2539 1667189509320827277 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c +3 2588 1667189509368828732 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +2 2604 1667189509384829217 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2604 2792 1667189509572834912 Step_3 7f6959eaebe4da02 diff --git a/Step 3/cmake-build-debug/CMakeCache.txt b/Step 3/cmake-build-debug/CMakeCache.txt index 29da5d0..0803f95 100644 --- a/Step 3/cmake-build-debug/CMakeCache.txt +++ b/Step 3/cmake-build-debug/CMakeCache.txt @@ -206,7 +206,7 @@ CMAKE_STRIP:FILEPATH=/usr/bin/strip // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE -//Enable compilation of the GUI utils +//Enable compilation of the GUI + utils COMPILE_GUI:BOOL=ON //Enable compilation of the OpenCL GPU Compute. @@ -278,6 +278,10 @@ Step_3_IS_TOP_LEVEL:STATIC=ON //Value Computed by CMake Step_3_SOURCE_DIR:STATIC=/home/brett/Documents/Brock/CS 3P93/Project/Step 3 +//Will try to use GLFW instead of X11. If libglfw3 and libglfw3-dev +// are not installed it will default to X11 +USE_GLFW:BOOL=ON + //Path to a file. X11_ICE_INCLUDE_PATH:PATH=/usr/include @@ -509,6 +513,9 @@ X11_xkbfile_INCLUDE_PATH:PATH=/usr/include //Path to a library. X11_xkbfile_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libxkbfile.so +//The directory containing a CMake configuration file for glfw3. +glfw3_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/glfw3 + //Path to a library. pkgcfg_lib_PKG_FONTCONFIG_fontconfig:FILEPATH=/usr/lib/x86_64-linux-gnu/libfontconfig.so diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o index 64e8250..f234a35 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o index ee5f31d..9096ab9 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o index e6e820f..78266d8 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o index eb86332..3310499 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o index 6264026..b2e7343 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o index 5181b61..6630997 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o index b419562..64aa04d 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o index 8962429..be6c0dd 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o index f1872dc..270ddb3 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o index 4020f6e..515d78b 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o index 1722ce7..f5823a3 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o index c3ee1ad..7b951d9 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o index f69905b..0ae259e 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o index 2feecb9..e76381b 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o index ed901b3..ce5fe76 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o index f7557cb..4534af2 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o index 7801f21..090a88b 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o index e6d1388..75989a6 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/clion-log.txt b/Step 3/cmake-build-debug/CMakeFiles/clion-log.txt index 0bbcd16..ac19f24 100644 --- a/Step 3/cmake-build-debug/CMakeFiles/clion-log.txt +++ b/Step 3/cmake-build-debug/CMakeFiles/clion-log.txt @@ -1,6 +1,7 @@ /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/opt/netbrains/clion/clion-2022.1.3/bin/ninja/linux/ninja -DCOMPILE_GUI:BOOL=ON -DCOMPILE_OPENCL:BOOL=ON -G Ninja -S "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" -B "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" release mode Compiling with GUI. +Found GLFW3! -- Configuring done -- Generating done -- Build files have been written to: /home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug diff --git a/Step 3/cmake-build-debug/CMakeFiles/rules.ninja b/Step 3/cmake-build-debug/CMakeFiles/rules.ninja index 1133c01..c01efa2 100644 --- a/Step 3/cmake-build-debug/CMakeFiles/rules.ninja +++ b/Step 3/cmake-build-debug/CMakeFiles/rules.ninja @@ -11,6 +11,16 @@ # ============================================================================= # ============================================================================= +############################################# +# Rule for compiling C files. + +rule C_COMPILER__Step_3_Debug + depfile = $DEP_FILE + deps = gcc + command = /usr/bin/cc $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + ############################################# # Rule for compiling CXX files. diff --git a/Step 3/cmake-build-debug/Step_3 b/Step 3/cmake-build-debug/Step_3 index 6ca3147..0560f96 100755 Binary files a/Step 3/cmake-build-debug/Step_3 and b/Step 3/cmake-build-debug/Step_3 differ diff --git a/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log b/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log index 03d6d99..0f7b84b 100644 --- a/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Oct 28 14:59 EDT +Start testing: Oct 31 00:11 EDT ---------------------------------------------------------- -End testing: Oct 28 14:59 EDT +End testing: Oct 31 00:11 EDT diff --git a/Step 3/cmake-build-debug/build.ninja b/Step 3/cmake-build-debug/build.ninja index 481d87b..1fe5ad7 100644 --- a/Step 3/cmake-build-debug/build.ninja +++ b/Step 3/cmake-build-debug/build.ninja @@ -112,6 +112,20 @@ build CMakeFiles/Step_3.dir/src/engine/world.cpp.o: CXX_COMPILER__Step_3_Debug / OBJECT_DIR = CMakeFiles/Step_3.dir OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine +build CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/debug_gui.cpp || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o.d + FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20 + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics + +build CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o: C_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/gl/gl.c || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o.d + FLAGS = -g -fsanitize=address + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/gl + build CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/gl/gl.cpp || cmake_object_order_depends_target_Step_3 DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o.d FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20 @@ -168,6 +182,13 @@ build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o: CXX_COM OBJECT_DIR = CMakeFiles/Step_3.dir OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/imgui +build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/imgui/imgui_impl_x11.cpp || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o.d + FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20 + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/imgui + build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/imgui/imgui_tables.cpp || cmake_object_order_depends_target_Step_3 DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o.d FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20 @@ -197,10 +218,10 @@ build CMakeFiles/Step_3.dir/src/graphics/input.cpp.o: CXX_COMPILER__Step_3_Debug ############################################# # Link the executable Step_3 -build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Debug CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so +build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Debug CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so FLAGS = -fsanitize=address -g -march=native -g LINK_FLAGS = -fsanitize=address - LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so + LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so OBJECT_DIR = CMakeFiles/Step_3.dir POST_BUILD = : PRE_LINK = : @@ -251,14 +272,14 @@ build all: phony Step_3 ############################################# # Re-run CMake if any of its inputs changed. -build build.ninja: RERUN_CMAKE | ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake +build build.ninja: RERUN_CMAKE | ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Config.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3ConfigVersion.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets-none.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake pool = console ############################################# # A missing CMake input file is not an error. -build ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake: phony +build ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Config.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3ConfigVersion.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets-none.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake: phony ############################################# diff --git a/Step 3/cmake-build-debug/config.h b/Step 3/cmake-build-debug/config.h index 38a8e48..92f9d12 100644 --- a/Step 3/cmake-build-debug/config.h +++ b/Step 3/cmake-build-debug/config.h @@ -14,6 +14,7 @@ #define COMPILE_GUI #define COMPILE_OPENCL +#define USE_GLFW #define CMAKE_CONFIG #endif diff --git a/Step 3/cmake-build-debug/imgui.ini b/Step 3/cmake-build-debug/imgui.ini index 1b2f26e..37f04fc 100644 --- a/Step 3/cmake-build-debug/imgui.ini +++ b/Step 3/cmake-build-debug/imgui.ini @@ -4,12 +4,12 @@ Size=400,400 Collapsed=0 [Window][Dear ImGui Demo] -Pos=650,20 +Pos=828,19 Size=550,680 -Collapsed=0 +Collapsed=1 [Window][Debug] Pos=72,82 -Size=74,100 +Size=326,186 Collapsed=0 diff --git a/Step 3/cmake-build-release/.cmake/api/v1/reply/cache-v2-c116349fbc5b58233d34.json b/Step 3/cmake-build-release/.cmake/api/v1/reply/cache-v2-c116349fbc5b58233d34.json deleted file mode 100644 index 7d81c1a..0000000 --- a/Step 3/cmake-build-release/.cmake/api/v1/reply/cache-v2-c116349fbc5b58233d34.json +++ /dev/null @@ -1,3527 +0,0 @@ -{ - "entries" : - [ - { - "name" : "CMAKE_ADDR2LINE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/addr2line" - }, - { - "name" : "CMAKE_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ar" - }, - { - "name" : "CMAKE_BUILD_TYPE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." - } - ], - "type" : "STRING", - "value" : "Release" - }, - { - "name" : "CMAKE_CACHEFILE_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "This is the directory where this CMakeCache.txt was created" - } - ], - "type" : "INTERNAL", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" - }, - { - "name" : "CMAKE_CACHE_MAJOR_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Major version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "3" - }, - { - "name" : "CMAKE_CACHE_MINOR_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Minor version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "23" - }, - { - "name" : "CMAKE_CACHE_PATCH_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Patch version of cmake used to create the current loaded cache" - } - ], - "type" : "INTERNAL", - "value" : "2" - }, - { - "name" : "CMAKE_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to CMake executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake" - }, - { - "name" : "CMAKE_CPACK_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to cpack program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cpack" - }, - { - "name" : "CMAKE_CTEST_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to ctest program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ctest" - }, - { - "name" : "CMAKE_CXX_COMPILER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "CXX compiler" - } - ], - "type" : "STRING", - "value" : "/usr/bin/c++" - }, - { - "name" : "CMAKE_CXX_COMPILER_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ar-12" - }, - { - "name" : "CMAKE_CXX_COMPILER_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ranlib-12" - }, - { - "name" : "CMAKE_CXX_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_CXX_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "-g" - }, - { - "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "-Os -DNDEBUG" - }, - { - "name" : "CMAKE_CXX_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "-O3 -DNDEBUG" - }, - { - "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "-O2 -g -DNDEBUG" - }, - { - "name" : "CMAKE_C_COMPILER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "C compiler" - } - ], - "type" : "STRING", - "value" : "/usr/bin/cc" - }, - { - "name" : "CMAKE_C_COMPILER_AR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ar-12" - }, - { - "name" : "CMAKE_C_COMPILER_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/gcc-ranlib-12" - }, - { - "name" : "CMAKE_C_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_C_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "-g" - }, - { - "name" : "CMAKE_C_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "-Os -DNDEBUG" - }, - { - "name" : "CMAKE_C_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "-O3 -DNDEBUG" - }, - { - "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "-O2 -g -DNDEBUG" - }, - { - "name" : "CMAKE_DLLTOOL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "CMAKE_DLLTOOL-NOTFOUND" - }, - { - "name" : "CMAKE_EDIT_COMMAND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to cache edit program executable." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ccmake" - }, - { - "name" : "CMAKE_EXECUTABLE_FORMAT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Executable file format" - } - ], - "type" : "INTERNAL", - "value" : "ELF" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Enable/Disable output of compile commands during generation." - } - ], - "type" : "BOOL", - "value" : "" - }, - { - "name" : "CMAKE_EXTRA_GENERATOR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of external makefile project generator." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_FIND_PACKAGE_REDIRECTS_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake." - } - ], - "type" : "STATIC", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release/CMakeFiles/pkgRedirects" - }, - { - "name" : "CMAKE_GENERATOR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator." - } - ], - "type" : "INTERNAL", - "value" : "Ninja" - }, - { - "name" : "CMAKE_GENERATOR_INSTANCE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Generator instance identifier." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_GENERATOR_PLATFORM", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator platform." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_GENERATOR_TOOLSET", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Name of generator toolset." - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "CMAKE_HAVE_CONNECT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function connect" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_GETHOSTBYNAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function gethostbyname" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_REMOVE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function remove" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HAVE_SHMAT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have function shmat" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_HOME_DIRECTORY", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Source directory with the top level CMakeLists.txt file for this project" - } - ], - "type" : "INTERNAL", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - { - "name" : "CMAKE_INSTALL_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Install path prefix, prepended onto install directories." - } - ], - "type" : "PATH", - "value" : "/usr/local" - }, - { - "name" : "CMAKE_INSTALL_SO_NO_EXE", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Install .so files without execute permission." - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have library ICE" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_LINKER", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ld" - }, - { - "name" : "CMAKE_MAKE_PROGRAM", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "No help, variable specified on the command line." - } - ], - "type" : "UNINITIALIZED", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/ninja/linux/ninja" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_NM", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/nm" - }, - { - "name" : "CMAKE_NUMBER_OF_MAKEFILES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "number of local generators" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_OBJCOPY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/objcopy" - }, - { - "name" : "CMAKE_OBJDUMP", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/objdump" - }, - { - "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Platform information initialized" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "CMAKE_PROJECT_DESCRIPTION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "" - }, - { - "name" : "CMAKE_PROJECT_HOMEPAGE_URL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "" - }, - { - "name" : "CMAKE_PROJECT_NAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "Step_3" - }, - { - "name" : "CMAKE_RANLIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/ranlib" - }, - { - "name" : "CMAKE_READELF", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/readelf" - }, - { - "name" : "CMAKE_ROOT", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Path to CMake installation." - } - ], - "type" : "INTERNAL", - "value" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_SKIP_INSTALL_RPATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." - } - ], - "type" : "BOOL", - "value" : "NO" - }, - { - "name" : "CMAKE_SKIP_RPATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If set, runtime paths are not added when using shared libraries." - } - ], - "type" : "BOOL", - "value" : "NO" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during all build types." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "CMAKE_STRIP", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a program." - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/strip" - }, - { - "name" : "CMAKE_UNAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "uname command" - } - ], - "type" : "INTERNAL", - "value" : "/usr/bin/uname" - }, - { - "name" : "CMAKE_VERBOSE_MAKEFILE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." - } - ], - "type" : "BOOL", - "value" : "FALSE" - }, - { - "name" : "COMPILE_GUI", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable compilation of the GUI utils" - } - ], - "type" : "BOOL", - "value" : "ON" - }, - { - "name" : "COMPILE_OPENCL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable compilation of the OpenCL GPU Compute." - } - ], - "type" : "BOOL", - "value" : "ON" - }, - { - "name" : "EnableDebugMenu", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Enable the debug utils" - } - ], - "type" : "BOOL", - "value" : "OFF" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_OpenCL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding OpenCL" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/lib/x86_64-linux-gnu/libOpenCL.so][/usr/include][v()]" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_OpenGL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding OpenGL" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/lib/x86_64-linux-gnu/libOpenGL.so][/usr/lib/x86_64-linux-gnu/libGLX.so][/usr/include][c ][v()]" - }, - { - "name" : "FIND_PACKAGE_MESSAGE_DETAILS_X11", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Details about finding X11" - } - ], - "type" : "INTERNAL", - "value" : "[/usr/include][/usr/lib/x86_64-linux-gnu/libX11.so][c ][v()]" - }, - { - "name" : "FREETYPE_INCLUDE_DIR_freetype2", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include/freetype2" - }, - { - "name" : "FREETYPE_INCLUDE_DIR_ft2build", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include/freetype2" - }, - { - "name" : "FREETYPE_LIBRARY_DEBUG", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "FREETYPE_LIBRARY_DEBUG-NOTFOUND" - }, - { - "name" : "FREETYPE_LIBRARY_RELEASE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfreetype.so" - }, - { - "name" : "Fontconfig_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "Fontconfig_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfontconfig.so" - }, - { - "name" : "OPENCL_VERSION_1_0", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_1_0" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_1_1", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_1_1" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_1_2", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_1_2" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_2_0", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_2_0" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_2_1", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_2_1" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_2_2", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_2_2" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "OPENCL_VERSION_3_0", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have symbol CL_VERSION_3_0" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "OPENGL_EGL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_GLX_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OPENGL_egl_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libEGL.so" - }, - { - "name" : "OPENGL_glu_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libGLU.so" - }, - { - "name" : "OPENGL_glx_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libGLX.so" - }, - { - "name" : "OPENGL_opengl_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libOpenGL.so" - }, - { - "name" : "OPENGL_xmesa_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "OPENGL_xmesa_INCLUDE_DIR-NOTFOUND" - }, - { - "name" : "OpenCL_INCLUDE_DIR", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "OpenCL_LIBRARY", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libOpenCL.so" - }, - { - "name" : "PKG_CONFIG_ARGN", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Arguments to supply to pkg-config" - } - ], - "type" : "STRING", - "value" : "" - }, - { - "name" : "PKG_CONFIG_EXECUTABLE", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "pkg-config executable" - } - ], - "type" : "FILEPATH", - "value" : "/usr/bin/pkg-config" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-I/usr/include/uuid;-I/usr/include/freetype2;-I/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS_I", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_CFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_FOUND", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "PKG_FONTCONFIG_INCLUDEDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include" - }, - { - "name" : "PKG_FONTCONFIG_INCLUDE_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include/uuid;/usr/include/freetype2;/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_LDFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-L/usr/lib/x86_64-linux-gnu;-lfontconfig;-lfreetype" - }, - { - "name" : "PKG_FONTCONFIG_LDFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_LIBRARIES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig;freetype" - }, - { - "name" : "PKG_FONTCONFIG_LIBRARY_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_LIBS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_L", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_LIBS_PATHS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_MODULE_NAME", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig" - }, - { - "name" : "PKG_FONTCONFIG_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-I/usr/include/uuid;-I/usr/include/freetype2;-I/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS_I", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_CFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_INCLUDE_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/include/uuid;/usr/include/freetype2;/usr/include/libpng16" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LDFLAGS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "-L/usr/lib/x86_64-linux-gnu;-lfontconfig;-luuid;-lexpat;-lm;-lfreetype;-lpng16;-lm;-lz;-lm;-lz;-lbrotlidec;-lbrotlicommon" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LDFLAGS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBRARIES", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "fontconfig;uuid;expat;m;freetype;png16;m;z;m;z;brotlidec;brotlicommon" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBRARY_DIRS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_L", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_OTHER", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_STATIC_LIBS_PATHS", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "2.13.1" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_INCLUDEDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_LIBDIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_PREFIX", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "PKG_FONTCONFIG_fontconfig_VERSION", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "" - }, - { - "name" : "Step_3_BINARY_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" - }, - { - "name" : "Step_3_IS_TOP_LEVEL", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "ON" - }, - { - "name" : "Step_3_SOURCE_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Value Computed by CMake" - } - ], - "type" : "STATIC", - "value" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - { - "name" : "X11_ICE_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_ICE_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libICE.so" - }, - { - "name" : "X11_LIB_X11_SOLO", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "Have library /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "X11_SM_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_SM_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libSM.so" - }, - { - "name" : "X11_X11_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_X11_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libX11.so" - }, - { - "name" : "X11_X11_xcb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_X11_xcb_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_X11_xcb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_X11_xcb_LIB-NOTFOUND" - }, - { - "name" : "X11_XRes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_XRes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXRes.so" - }, - { - "name" : "X11_XShm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_XSync_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xaccessrules_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xaccessstr_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xau_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xau_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXau.so" - }, - { - "name" : "X11_Xaw_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_Xaw_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_Xaw_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXaw.so" - }, - { - "name" : "X11_Xcomposite_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xcomposite_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXcomposite.so" - }, - { - "name" : "X11_Xcursor_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xcursor_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXcursor.so" - }, - { - "name" : "X11_Xdamage_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xdamage_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXdamage.so" - }, - { - "name" : "X11_Xdmcp_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xdmcp_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXdmcp.so" - }, - { - "name" : "X11_Xext_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xext_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXext.so" - }, - { - "name" : "X11_Xfixes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xfixes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXfixes.so" - }, - { - "name" : "X11_Xft_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xft_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXft.so" - }, - { - "name" : "X11_Xi_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xi_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXi.so" - }, - { - "name" : "X11_Xinerama_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xinerama_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXinerama.so" - }, - { - "name" : "X11_Xkb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xkblib_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xlib_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xmu_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xmu_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXmu.so" - }, - { - "name" : "X11_Xpm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xpm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXpm.so" - }, - { - "name" : "X11_Xrandr_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xrandr_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXrandr.so" - }, - { - "name" : "X11_Xrender_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xrender_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXrender.so" - }, - { - "name" : "X11_Xshape_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xss_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xss_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXss.so" - }, - { - "name" : "X11_Xt_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xt_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXt.so" - }, - { - "name" : "X11_Xtst_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xtst_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXtst.so" - }, - { - "name" : "X11_Xutil_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xv_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xv_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXv.so" - }, - { - "name" : "X11_Xxf86misc_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_Xxf86misc_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_Xxf86misc_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_Xxf86misc_LIB-NOTFOUND" - }, - { - "name" : "X11_Xxf86vm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_Xxf86vm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libXxf86vm.so" - }, - { - "name" : "X11_dpms_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xcb_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xcb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxcb.so" - }, - { - "name" : "X11_xcb_icccm_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_icccm_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_icccm_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_icccm_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_keysyms_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_keysyms_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_keysyms_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_keysyms_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_randr_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_randr_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_randr_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_randr_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_util_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_util_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_util_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_util_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_xfixes_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_xfixes_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_xfixes_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_xfixes_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_xkb_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_xkb_LIB-NOTFOUND" - }, - { - "name" : "X11_xcb_xtest_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xcb_xtest_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xcb_xtest_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xcb_xtest_LIB-NOTFOUND" - }, - { - "name" : "X11_xkbcommon_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xkbcommon_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxkbcommon.so" - }, - { - "name" : "X11_xkbcommon_X11_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "X11_xkbcommon_X11_INCLUDE_PATH-NOTFOUND" - }, - { - "name" : "X11_xkbcommon_X11_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "X11_xkbcommon_X11_LIB-NOTFOUND" - }, - { - "name" : "X11_xkbfile_INCLUDE_PATH", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a file." - } - ], - "type" : "PATH", - "value" : "/usr/include" - }, - { - "name" : "X11_xkbfile_LIB", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libxkbfile.so" - }, - { - "name" : "_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "linker supports push/pop state" - } - ], - "type" : "INTERNAL", - "value" : "TRUE" - }, - { - "name" : "__pkg_config_arguments_PKG_FONTCONFIG", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "QUIET;fontconfig" - }, - { - "name" : "__pkg_config_checked_PKG_FONTCONFIG", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "1" - }, - { - "name" : "pkgcfg_lib_PKG_FONTCONFIG_fontconfig", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfontconfig.so" - }, - { - "name" : "pkgcfg_lib_PKG_FONTCONFIG_freetype", - "properties" : - [ - { - "name" : "ADVANCED", - "value" : "1" - }, - { - "name" : "HELPSTRING", - "value" : "Path to a library." - } - ], - "type" : "FILEPATH", - "value" : "/usr/lib/x86_64-linux-gnu/libfreetype.so" - }, - { - "name" : "prefix_result", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "" - } - ], - "type" : "INTERNAL", - "value" : "/usr/lib/x86_64-linux-gnu" - }, - { - "name" : "pthreads_DIR", - "properties" : - [ - { - "name" : "HELPSTRING", - "value" : "The directory containing a CMake configuration file for pthreads." - } - ], - "type" : "PATH", - "value" : "pthreads_DIR-NOTFOUND" - } - ], - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } -} diff --git a/Step 3/cmake-build-release/.cmake/api/v1/reply/cmakeFiles-v1-dd3ae7c60de5f194f384.json b/Step 3/cmake-build-release/.cmake/api/v1/reply/cmakeFiles-v1-dd3ae7c60de5f194f384.json deleted file mode 100644 index 01ab32b..0000000 --- a/Step 3/cmake-build-release/.cmake/api/v1/reply/cmakeFiles-v1-dd3ae7c60de5f194f384.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "inputs" : - [ - { - "path" : "CMakeLists.txt" - }, - { - "isGenerated" : true, - "path" : "cmake-build-release/CMakeFiles/3.23.2/CMakeSystem.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-release/CMakeFiles/3.23.2/CMakeCCompiler.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-release/CMakeFiles/3.23.2/CMakeCXXCompiler.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "path" : "include/engine/config.h.in" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake" - } - ], - "kind" : "cmakeFiles", - "paths" : - { - "build" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release", - "source" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - "version" : - { - "major" : 1, - "minor" : 0 - } -} diff --git a/Step 3/cmake-build-release/.cmake/api/v1/reply/codemodel-v2-5f1a984d7825cc4c9ec6.json b/Step 3/cmake-build-release/.cmake/api/v1/reply/codemodel-v2-5f1a984d7825cc4c9ec6.json deleted file mode 100644 index 7a0adef..0000000 --- a/Step 3/cmake-build-release/.cmake/api/v1/reply/codemodel-v2-5f1a984d7825cc4c9ec6.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "configurations" : - [ - { - "directories" : - [ - { - "build" : ".", - "jsonFile" : "directory-.-Release-f5ebdc15457944623624.json", - "minimumCMakeVersion" : - { - "string" : "3.22" - }, - "projectIndex" : 0, - "source" : ".", - "targetIndexes" : - [ - 0 - ] - } - ], - "name" : "Release", - "projects" : - [ - { - "directoryIndexes" : - [ - 0 - ], - "name" : "Step_3", - "targetIndexes" : - [ - 0 - ] - } - ], - "targets" : - [ - { - "directoryIndex" : 0, - "id" : "Step_3::@6890427a1f51a3e7e1df", - "jsonFile" : "target-Step_3-Release-bdebccb789912d5d0f87.json", - "name" : "Step_3", - "projectIndex" : 0 - } - ] - } - ], - "kind" : "codemodel", - "paths" : - { - "build" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release", - "source" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" - }, - "version" : - { - "major" : 2, - "minor" : 4 - } -} diff --git a/Step 3/cmake-build-release/.cmake/api/v1/reply/index-2022-10-28T19-02-54-0409.json b/Step 3/cmake-build-release/.cmake/api/v1/reply/index-2022-10-28T19-02-54-0409.json deleted file mode 100644 index 525c48e..0000000 --- a/Step 3/cmake-build-release/.cmake/api/v1/reply/index-2022-10-28T19-02-54-0409.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cmake" : - { - "generator" : - { - "multiConfig" : false, - "name" : "Ninja" - }, - "paths" : - { - "cmake" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake", - "cpack" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cpack", - "ctest" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ctest", - "root" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23" - }, - "version" : - { - "isDirty" : false, - "major" : 3, - "minor" : 23, - "patch" : 2, - "string" : "3.23.2", - "suffix" : "" - } - }, - "objects" : - [ - { - "jsonFile" : "codemodel-v2-5f1a984d7825cc4c9ec6.json", - "kind" : "codemodel", - "version" : - { - "major" : 2, - "minor" : 4 - } - }, - { - "jsonFile" : "cache-v2-c116349fbc5b58233d34.json", - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } - }, - { - "jsonFile" : "cmakeFiles-v1-dd3ae7c60de5f194f384.json", - "kind" : "cmakeFiles", - "version" : - { - "major" : 1, - "minor" : 0 - } - }, - { - "jsonFile" : "toolchains-v1-a68c232ca45b00aa6bba.json", - "kind" : "toolchains", - "version" : - { - "major" : 1, - "minor" : 0 - } - } - ], - "reply" : - { - "cache-v2" : - { - "jsonFile" : "cache-v2-c116349fbc5b58233d34.json", - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } - }, - "cmakeFiles-v1" : - { - "jsonFile" : "cmakeFiles-v1-dd3ae7c60de5f194f384.json", - "kind" : "cmakeFiles", - "version" : - { - "major" : 1, - "minor" : 0 - } - }, - "codemodel-v2" : - { - "jsonFile" : "codemodel-v2-5f1a984d7825cc4c9ec6.json", - "kind" : "codemodel", - "version" : - { - "major" : 2, - "minor" : 4 - } - }, - "toolchains-v1" : - { - "jsonFile" : "toolchains-v1-a68c232ca45b00aa6bba.json", - "kind" : "toolchains", - "version" : - { - "major" : 1, - "minor" : 0 - } - } - } -} diff --git a/Step 3/cmake-build-release/.cmake/api/v1/reply/target-Step_3-Release-bdebccb789912d5d0f87.json b/Step 3/cmake-build-release/.cmake/api/v1/reply/target-Step_3-Release-bdebccb789912d5d0f87.json deleted file mode 100644 index faae0d6..0000000 --- a/Step 3/cmake-build-release/.cmake/api/v1/reply/target-Step_3-Release-bdebccb789912d5d0f87.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "artifacts" : - [ - { - "path" : "Step_3" - } - ], - "backtrace" : 1, - "backtraceGraph" : - { - "commands" : - [ - "add_executable", - "target_link_libraries", - "set_target_properties", - "find_package", - "include_directories" - ], - "files" : - [ - "CMakeLists.txt", - "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake" - ], - "nodes" : - [ - { - "file" : 0 - }, - { - "command" : 0, - "file" : 0, - "line" : 76, - "parent" : 0 - }, - { - "command" : 1, - "file" : 0, - "line" : 78, - "parent" : 0 - }, - { - "command" : 1, - "file" : 0, - "line" : 81, - "parent" : 0 - }, - { - "command" : 1, - "file" : 0, - "line" : 82, - "parent" : 0 - }, - { - "command" : 1, - "file" : 0, - "line" : 86, - "parent" : 0 - }, - { - "command" : 3, - "file" : 0, - "line" : 47, - "parent" : 0 - }, - { - "file" : 1, - "parent" : 6 - }, - { - "command" : 2, - "file" : 1, - "line" : 510, - "parent" : 7 - }, - { - "command" : 4, - "file" : 0, - "line" : 35, - "parent" : 0 - }, - { - "command" : 4, - "file" : 0, - "line" : 74, - "parent" : 0 - } - ] - }, - "compileGroups" : - [ - { - "compileCommandFragments" : - [ - { - "fragment" : " -march=native -O3 -DNDEBUG" - }, - { - "fragment" : "-std=gnu++20" - } - ], - "includes" : - [ - { - "backtrace" : 9, - "path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" - }, - { - "backtrace" : 10, - "path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" - } - ], - "language" : "CXX", - "languageStandard" : - { - "backtraces" : - [ - 1 - ], - "standard" : "20" - }, - "sourceIndexes" : - [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ] - } - ], - "id" : "Step_3::@6890427a1f51a3e7e1df", - "link" : - { - "commandFragments" : - [ - { - "fragment" : "-march=native -O3 -DNDEBUG", - "role" : "flags" - }, - { - "fragment" : "", - "role" : "flags" - }, - { - "backtrace" : 2, - "fragment" : "-lpthread", - "role" : "libraries" - }, - { - "backtrace" : 3, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLU.so", - "role" : "libraries" - }, - { - "backtrace" : 3, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libSM.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libICE.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libX11.so", - "role" : "libraries" - }, - { - "backtrace" : 4, - "fragment" : "/usr/lib/x86_64-linux-gnu/libXext.so", - "role" : "libraries" - }, - { - "backtrace" : 5, - "fragment" : "/usr/lib/x86_64-linux-gnu/libOpenCL.so", - "role" : "libraries" - }, - { - "backtrace" : 3, - "fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so", - "role" : "libraries" - }, - { - "backtrace" : 8, - "fragment" : "/usr/lib/x86_64-linux-gnu/libOpenGL.so", - "role" : "libraries" - } - ], - "language" : "CXX" - }, - "name" : "Step_3", - "nameOnDisk" : "Step_3", - "paths" : - { - "build" : ".", - "source" : "." - }, - "sourceGroups" : - [ - { - "name" : "Source Files", - "sourceIndexes" : - [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ] - } - ], - "sources" : - [ - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/globals.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/image/image.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/main.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/math/colliders.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/raytracing.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/debug.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/models.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/util/parser.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/engine/world.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/gl/gl.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/gl/shader.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/graphics.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_demo.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_draw.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_impl_glfw.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_impl_opengl3.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_tables.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/imgui/imgui_widgets.cpp", - "sourceGroupIndex" : 0 - }, - { - "backtrace" : 1, - "compileGroupIndex" : 0, - "path" : "src/graphics/input.cpp", - "sourceGroupIndex" : 0 - } - ], - "type" : "EXECUTABLE" -} diff --git a/Step 3/cmake-build-release/.ninja_deps b/Step 3/cmake-build-release/.ninja_deps index fe332ba..a2771c1 100644 Binary files a/Step 3/cmake-build-release/.ninja_deps and b/Step 3/cmake-build-release/.ninja_deps differ diff --git a/Step 3/cmake-build-release/.ninja_log b/Step 3/cmake-build-release/.ninja_log index 2fc5c15..262af24 100644 --- a/Step 3/cmake-build-release/.ninja_log +++ b/Step 3/cmake-build-release/.ninja_log @@ -1,23 +1,48 @@ # ninja log v5 -2 1891 1666585888837654600 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o f6dab204e07e8dcf -1 2520 1666585889465673262 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o 7798aba97da63e31 -1 1301 1666981149056733417 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 -1 893 1666647453395941912 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74 -1 1869 1666672425433732155 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b -1 741 1666980538714543808 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511 -1 775 1666586379624689616 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 39e9f435096d066b -1 1524 1666811808578010855 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072 -1 6680 1666585893625796878 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o 55e7538fd27b47be -1438 1505 1666981290476950363 Step_3 8e1012bfab9235e9 -2 352 1666934238066860228 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 6aef9db88eb3d76d +2 2553 1667058676876977871 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o f6dab204e07e8dcf +2 1734 1667164639612212249 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 30ab06816e8637c1 +2 3277 1667058677601002493 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o 7798aba97da63e31 +2 1715 1667191643475802262 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +2 1199 1667160815556570953 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74 +1 3331 1667190218078401905 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +2 807 1667160815152555289 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 9493619f74acd06a +3 515 1667153528379594224 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o d1e9a2fcb31e2ec8 +1 781 1667160815140554827 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511 +2 1071 1667190215818332921 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 39e9f435096d066b +2 1522 1667190216254346230 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072 +2 6623 1667058680945116176 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o 55e7538fd27b47be +2253 2317 1667191644075820056 Step_3 f055ce2b85635598 +1 168 1667153277796642068 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 6aef9db88eb3d76d 2 1091 1666586379944699493 CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o 25fdf04995cdd7fe -1 1438 1666981290408948337 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +2 1703 1667191643463801906 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca 1 17 1666723625180468244 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 510001b0955ab019 -1 3563 1666585915222438568 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o f89fa3d7b779872a -1 4522 1666585908106227137 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o 84017388bc7af144 -2 1110 1666981148864727693 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d -2 4819 1666981152572838255 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o 330ad35a6abf06c3 +2 4378 1667058678701039897 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o f89fa3d7b779872a +3 1325 1667190216074340733 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d +2 4955 1667058679277059480 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o 84017388bc7af144 +2 4888 1667190219638449522 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o 330ad35a6abf06c3 4 176 1666717766117955862 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 1b5f0fbe3cf8ce4e -1 995 1666934083498211266 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 2553d57dba16057b -1 1924 1666981149676751903 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e -1 1350 1666485932124409891 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o 1007c86c207ac940 +2 1372 1667190216122342199 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 2553d57dba16057b +1 2253 1667191644011818156 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +2 1812 1667058676132952564 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o 1007c86c207ac940 +1 1366 1667191682544961462 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1428 1667191682608963361 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1781 1667191682960973813 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1781 1845 1667191683024975712 Step_3 f055ce2b85635598 +1 1752 1667191737298588205 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1752 1816 1667191737362590108 Step_3 f055ce2b85635598 +1 1569 1667191746314856307 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1636 1667191746382858328 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 2215 1667191746962875577 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +2215 2286 1667191747030877600 Step_3 f055ce2b85635598 +1 1391 1667191773179655501 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1462 1667191773247657524 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1792 1667191773579667404 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1792 1854 1667191773639669189 Step_3 f055ce2b85635598 +1 1781 1667191787604084824 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1781 1845 1667191787668086729 Step_3 f055ce2b85635598 +2 1832 1667191813176846315 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1832 1895 1667191813240848221 Step_3 f055ce2b85635598 +1 1777 1667191829377328950 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1777 1844 1667191829445330975 Step_3 f055ce2b85635598 +1 1795 1667191871242576935 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1795 1858 1667191871306578844 Step_3 f055ce2b85635598 diff --git a/Step 3/cmake-build-release/CMakeCache.txt b/Step 3/cmake-build-release/CMakeCache.txt index 39f2773..b728660 100644 --- a/Step 3/cmake-build-release/CMakeCache.txt +++ b/Step 3/cmake-build-release/CMakeCache.txt @@ -209,7 +209,7 @@ CMAKE_STRIP:FILEPATH=/usr/bin/strip // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE -//Enable compilation of the GUI utils +//Enable compilation of the GUI + utils COMPILE_GUI:BOOL=ON //Enable compilation of the OpenCL GPU Compute. @@ -281,6 +281,10 @@ Step_3_IS_TOP_LEVEL:STATIC=ON //Value Computed by CMake Step_3_SOURCE_DIR:STATIC=/home/brett/Documents/Brock/CS 3P93/Project/Step 3 +//Will try to use GLFW instead of X11. If libglfw3 and libglfw3-dev +// are not installed it will default to X11 +USE_GLFW:BOOL=ON + //Path to a file. X11_ICE_INCLUDE_PATH:PATH=/usr/include @@ -530,6 +534,9 @@ X11_xkbfile_INCLUDE_PATH:PATH=/usr/include //Path to a library. X11_xkbfile_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libxkbfile.so +//The directory containing a CMake configuration file for glfw3. +glfw3_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/glfw3 + //Path to a library. pkgcfg_lib_PKG_FONTCONFIG_fontconfig:FILEPATH=/usr/lib/x86_64-linux-gnu/libfontconfig.so diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o index 1c7b473..9efb788 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o index 5fbfc7d..45556be 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o index 459e882..da67953 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o index 4b00480..fb90a82 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o index 8c905dd..901e6a8 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o index 9f51af5..128a1f3 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o index c2cafaf..1b494cd 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o index 54fe748..798948e 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/world.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/world.cpp.o index 5de888f..a44401b 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/world.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/world.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o index 7f3f1d9..7a2bbc0 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o index 543f867..611502d 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o index 441c48f..00431bb 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o index 3789f3a..710b225 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o index 01a9d59..ab34d22 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o index 76c7208..8087752 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o index 8c7fcfe..063b2dd 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o index ea13621..f9fd847 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o index 0743005..dabb7f2 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/clion-log.txt b/Step 3/cmake-build-release/CMakeFiles/clion-log.txt index fd1b5c0..8c88083 100644 --- a/Step 3/cmake-build-release/CMakeFiles/clion-log.txt +++ b/Step 3/cmake-build-release/CMakeFiles/clion-log.txt @@ -1,6 +1,7 @@ /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/opt/netbrains/clion/clion-2022.1.3/bin/ninja/linux/ninja -DCOMPILE_GUI:BOOL=ON -DCOMPILE_OPENCL:BOOL=ON -G Ninja -S "/home/brett/Documents/Brock/CS 3P93/Project/Step 3" -B "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" release mode Compiling with GUI. +Found GLFW3! -- Configuring done -- Generating done -- Build files have been written to: /home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release diff --git a/Step 3/cmake-build-release/CMakeFiles/rules.ninja b/Step 3/cmake-build-release/CMakeFiles/rules.ninja index 7184089..6b4f683 100644 --- a/Step 3/cmake-build-release/CMakeFiles/rules.ninja +++ b/Step 3/cmake-build-release/CMakeFiles/rules.ninja @@ -11,6 +11,16 @@ # ============================================================================= # ============================================================================= +############################################# +# Rule for compiling C files. + +rule C_COMPILER__Step_3_Release + depfile = $DEP_FILE + deps = gcc + command = /usr/bin/cc $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + ############################################# # Rule for compiling CXX files. diff --git a/Step 3/cmake-build-release/Step_3 b/Step 3/cmake-build-release/Step_3 index 550526b..6574a71 100755 Binary files a/Step 3/cmake-build-release/Step_3 and b/Step 3/cmake-build-release/Step_3 differ diff --git a/Step 3/cmake-build-release/Testing/Temporary/LastTest.log b/Step 3/cmake-build-release/Testing/Temporary/LastTest.log index 22603b7..c0ca913 100644 --- a/Step 3/cmake-build-release/Testing/Temporary/LastTest.log +++ b/Step 3/cmake-build-release/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Oct 28 15:02 EDT +Start testing: Oct 31 00:51 EDT ---------------------------------------------------------- -End testing: Oct 28 15:02 EDT +End testing: Oct 31 00:51 EDT diff --git a/Step 3/cmake-build-release/build.ninja b/Step 3/cmake-build-release/build.ninja index 89b6576..3ca8a8e 100644 --- a/Step 3/cmake-build-release/build.ninja +++ b/Step 3/cmake-build-release/build.ninja @@ -112,6 +112,20 @@ build CMakeFiles/Step_3.dir/src/engine/world.cpp.o: CXX_COMPILER__Step_3_Release OBJECT_DIR = CMakeFiles/Step_3.dir OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine +build CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/debug_gui.cpp || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o.d + FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20 + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics + +build CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o: C_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/gl/gl.c || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o.d + FLAGS = -O3 -DNDEBUG + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/gl + build CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/gl/gl.cpp || cmake_object_order_depends_target_Step_3 DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o.d FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20 @@ -168,6 +182,13 @@ build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o: CXX_COM OBJECT_DIR = CMakeFiles/Step_3.dir OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/imgui +build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/imgui/imgui_impl_x11.cpp || cmake_object_order_depends_target_Step_3 + DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o.d + FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20 + INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include" + OBJECT_DIR = CMakeFiles/Step_3.dir + OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/graphics/imgui + build CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/graphics/imgui/imgui_tables.cpp || cmake_object_order_depends_target_Step_3 DEP_FILE = CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o.d FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20 @@ -197,9 +218,9 @@ build CMakeFiles/Step_3.dir/src/graphics/input.cpp.o: CXX_COMPILER__Step_3_Relea ############################################# # Link the executable Step_3 -build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Release CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so +build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Release CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so FLAGS = -march=native -O3 -DNDEBUG - LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so + LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so OBJECT_DIR = CMakeFiles/Step_3.dir POST_BUILD = : PRE_LINK = : @@ -250,14 +271,14 @@ build all: phony Step_3 ############################################# # Re-run CMake if any of its inputs changed. -build build.ninja: RERUN_CMAKE | ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake +build build.ninja: RERUN_CMAKE | ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Config.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3ConfigVersion.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets-none.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake pool = console ############################################# # A missing CMake input file is not an error. -build ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckFunctionExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckLibraryExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFontconfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindFreetype.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPkgConfig.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindX11.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake: phony +build ../CMakeLists.txt ../include/engine/config.h.in /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCXXInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeCommonLanguageInclude.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeGenericSystem.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeInitializeConfigs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeLanguageInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakePushCheckState.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInformation.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CMakeSystemSpecificInitialize.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/CheckSymbolExists.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/CMakeCommonCompilerMacros.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Compiler/GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenCL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindPackageMessage.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-C.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU-CXX.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux-GNU.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/Linux.cmake /opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/Platform/UnixPaths.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Config.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3ConfigVersion.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets-none.cmake /usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets.cmake CMakeCache.txt CMakeFiles/3.23.2/CMakeCCompiler.cmake CMakeFiles/3.23.2/CMakeCXXCompiler.cmake CMakeFiles/3.23.2/CMakeSystem.cmake: phony ############################################# diff --git a/Step 3/cmake-build-release/config.h b/Step 3/cmake-build-release/config.h index 5ad1493..e925dd1 100644 --- a/Step 3/cmake-build-release/config.h +++ b/Step 3/cmake-build-release/config.h @@ -14,6 +14,7 @@ #define COMPILE_GUI #define COMPILE_OPENCL +#define USE_GLFW #define CMAKE_CONFIG #endif diff --git a/Step 3/cmake-build-release/imgui.ini b/Step 3/cmake-build-release/imgui.ini index b230869..76a0051 100644 --- a/Step 3/cmake-build-release/imgui.ini +++ b/Step 3/cmake-build-release/imgui.ini @@ -4,12 +4,17 @@ Size=95,60 Collapsed=0 [Window][Dear ImGui Demo] -Pos=952,11 +Pos=952,10 Size=550,680 Collapsed=1 [Window][Debug] -Pos=60,60 -Size=74,100 +Pos=59,63 +Size=326,186 +Collapsed=0 + +[Window][Debug Menu] +Pos=14,14 +Size=339,226 Collapsed=0 diff --git a/Step 3/include/engine/config.h.in b/Step 3/include/engine/config.h.in index 0851485..d726cd7 100644 --- a/Step 3/include/engine/config.h.in +++ b/Step 3/include/engine/config.h.in @@ -14,6 +14,7 @@ #cmakedefine COMPILE_GUI #cmakedefine COMPILE_OPENCL +#cmakedefine USE_GLFW #define CMAKE_CONFIG #endif \ No newline at end of file diff --git a/Step 3/include/engine/image/image.h b/Step 3/include/engine/image/image.h index 6ac7b20..db89566 100644 --- a/Step 3/include/engine/image/image.h +++ b/Step 3/include/engine/image/image.h @@ -44,6 +44,18 @@ namespace Raytracing { ~Image(); }; + class ImageInput { + private: + int width, height, channels; + unsigned char* data; + public: + explicit ImageInput(const std::string& image); + unsigned long* getImageAsIconBuffer(); + unsigned char* getImageData(){return data;} + [[nodiscard]] int getImageSize() const{return width;} + ~ImageInput(); + }; + // image writer class used to output the image to a file. class ImageOutput { private: diff --git a/Step 3/include/graphics/gl/stb_image.h b/Step 3/include/engine/image/stb_image.h similarity index 100% rename from Step 3/include/graphics/gl/stb_image.h rename to Step 3/include/engine/image/stb_image.h diff --git a/Step 3/include/engine/image/stb_image_resize.h b/Step 3/include/engine/image/stb_image_resize.h new file mode 100644 index 0000000..9870b71 --- /dev/null +++ b/Step 3/include/engine/image/stb_image_resize.h @@ -0,0 +1,2634 @@ +/* stb_image_resize - v0.97 - public domain image resizing + by Jorge L Rodriguez (@VinoBS) - 2014 + http://github.com/nothings/stb + + Written with emphasis on usability, portability, and efficiency. (No + SIMD or threads, so it be easily outperformed by libs that use those.) + Only scaling and translation is supported, no rotations or shears. + Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation. + + COMPILING & LINKING + In one C/C++ file that #includes this file, do this: + #define STB_IMAGE_RESIZE_IMPLEMENTATION + before the #include. That will create the implementation in that file. + + QUICKSTART + stbir_resize_uint8( input_pixels , in_w , in_h , 0, + output_pixels, out_w, out_h, 0, num_channels) + stbir_resize_float(...) + stbir_resize_uint8_srgb( input_pixels , in_w , in_h , 0, + output_pixels, out_w, out_h, 0, + num_channels , alpha_chan , 0) + stbir_resize_uint8_srgb_edgemode( + input_pixels , in_w , in_h , 0, + output_pixels, out_w, out_h, 0, + num_channels , alpha_chan , 0, STBIR_EDGE_CLAMP) + // WRAP/REFLECT/ZERO + + FULL API + See the "header file" section of the source for API documentation. + + ADDITIONAL DOCUMENTATION + + SRGB & FLOATING POINT REPRESENTATION + The sRGB functions presume IEEE floating point. If you do not have + IEEE floating point, define STBIR_NON_IEEE_FLOAT. This will use + a slower implementation. + + MEMORY ALLOCATION + The resize functions here perform a single memory allocation using + malloc. To control the memory allocation, before the #include that + triggers the implementation, do: + + #define STBIR_MALLOC(size,context) ... + #define STBIR_FREE(ptr,context) ... + + Each resize function makes exactly one call to malloc/free, so to use + temp memory, store the temp memory in the context and return that. + + ASSERT + Define STBIR_ASSERT(boolval) to override assert() and not use assert.h + + OPTIMIZATION + Define STBIR_SATURATE_INT to compute clamp values in-range using + integer operations instead of float operations. This may be faster + on some platforms. + + DEFAULT FILTERS + For functions which don't provide explicit control over what filters + to use, you can change the compile-time defaults with + + #define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_something + #define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_something + + See stbir_filter in the header-file section for the list of filters. + + NEW FILTERS + A number of 1D filter kernels are used. For a list of + supported filters see the stbir_filter enum. To add a new filter, + write a filter function and add it to stbir__filter_info_table. + + PROGRESS + For interactive use with slow resize operations, you can install + a progress-report callback: + + #define STBIR_PROGRESS_REPORT(val) some_func(val) + + The parameter val is a float which goes from 0 to 1 as progress is made. + + For example: + + static void my_progress_report(float progress); + #define STBIR_PROGRESS_REPORT(val) my_progress_report(val) + + #define STB_IMAGE_RESIZE_IMPLEMENTATION + #include "stb_image_resize.h" + + static void my_progress_report(float progress) + { + printf("Progress: %f%%\n", progress*100); + } + + MAX CHANNELS + If your image has more than 64 channels, define STBIR_MAX_CHANNELS + to the max you'll have. + + ALPHA CHANNEL + Most of the resizing functions provide the ability to control how + the alpha channel of an image is processed. The important things + to know about this: + + 1. The best mathematically-behaved version of alpha to use is + called "premultiplied alpha", in which the other color channels + have had the alpha value multiplied in. If you use premultiplied + alpha, linear filtering (such as image resampling done by this + library, or performed in texture units on GPUs) does the "right + thing". While premultiplied alpha is standard in the movie CGI + industry, it is still uncommon in the videogame/real-time world. + + If you linearly filter non-premultiplied alpha, strange effects + occur. (For example, the 50/50 average of 99% transparent bright green + and 1% transparent black produces 50% transparent dark green when + non-premultiplied, whereas premultiplied it produces 50% + transparent near-black. The former introduces green energy + that doesn't exist in the source image.) + + 2. Artists should not edit premultiplied-alpha images; artists + want non-premultiplied alpha images. Thus, art tools generally output + non-premultiplied alpha images. + + 3. You will get best results in most cases by converting images + to premultiplied alpha before processing them mathematically. + + 4. If you pass the flag STBIR_FLAG_ALPHA_PREMULTIPLIED, the + resizer does not do anything special for the alpha channel; + it is resampled identically to other channels. This produces + the correct results for premultiplied-alpha images, but produces + less-than-ideal results for non-premultiplied-alpha images. + + 5. If you do not pass the flag STBIR_FLAG_ALPHA_PREMULTIPLIED, + then the resizer weights the contribution of input pixels + based on their alpha values, or, equivalently, it multiplies + the alpha value into the color channels, resamples, then divides + by the resultant alpha value. Input pixels which have alpha=0 do + not contribute at all to output pixels unless _all_ of the input + pixels affecting that output pixel have alpha=0, in which case + the result for that pixel is the same as it would be without + STBIR_FLAG_ALPHA_PREMULTIPLIED. However, this is only true for + input images in integer formats. For input images in float format, + input pixels with alpha=0 have no effect, and output pixels + which have alpha=0 will be 0 in all channels. (For float images, + you can manually achieve the same result by adding a tiny epsilon + value to the alpha channel of every image, and then subtracting + or clamping it at the end.) + + 6. You can suppress the behavior described in #5 and make + all-0-alpha pixels have 0 in all channels by #defining + STBIR_NO_ALPHA_EPSILON. + + 7. You can separately control whether the alpha channel is + interpreted as linear or affected by the colorspace. By default + it is linear; you almost never want to apply the colorspace. + (For example, graphics hardware does not apply sRGB conversion + to the alpha channel.) + + CONTRIBUTORS + Jorge L Rodriguez: Implementation + Sean Barrett: API design, optimizations + Aras Pranckevicius: bugfix + Nathan Reed: warning fixes + + REVISIONS + 0.97 (2020-02-02) fixed warning + 0.96 (2019-03-04) fixed warnings + 0.95 (2017-07-23) fixed warnings + 0.94 (2017-03-18) fixed warnings + 0.93 (2017-03-03) fixed bug with certain combinations of heights + 0.92 (2017-01-02) fix integer overflow on large (>2GB) images + 0.91 (2016-04-02) fix warnings; fix handling of subpixel regions + 0.90 (2014-09-17) first released version + + LICENSE + See end of file for license information. + + TODO + Don't decode all of the image data when only processing a partial tile + Don't use full-width decode buffers when only processing a partial tile + When processing wide images, break processing into tiles so data fits in L1 cache + Installable filters? + Resize that respects alpha test coverage + (Reference code: FloatImage::alphaTestCoverage and FloatImage::scaleAlphaToCoverage: + https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvimage/FloatImage.cpp ) +*/ + +#ifndef STBIR_INCLUDE_STB_IMAGE_RESIZE_H +#define STBIR_INCLUDE_STB_IMAGE_RESIZE_H + +#ifdef _MSC_VER +typedef unsigned char stbir_uint8; +typedef unsigned short stbir_uint16; +typedef unsigned int stbir_uint32; +#else +#include +typedef uint8_t stbir_uint8; +typedef uint16_t stbir_uint16; +typedef uint32_t stbir_uint32; +#endif + +#ifndef STBIRDEF +#ifdef STB_IMAGE_RESIZE_STATIC +#define STBIRDEF static +#else +#ifdef __cplusplus +#define STBIRDEF extern "C" +#else +#define STBIRDEF extern +#endif +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// Easy-to-use API: +// +// * "input pixels" points to an array of image data with 'num_channels' channels (e.g. RGB=3, RGBA=4) +// * input_w is input image width (x-axis), input_h is input image height (y-axis) +// * stride is the offset between successive rows of image data in memory, in bytes. you can +// specify 0 to mean packed continuously in memory +// * alpha channel is treated identically to other channels. +// * colorspace is linear or sRGB as specified by function name +// * returned result is 1 for success or 0 in case of an error. +// #define STBIR_ASSERT() to trigger an assert on parameter validation errors. +// * Memory required grows approximately linearly with input and output size, but with +// discontinuities at input_w == output_w and input_h == output_h. +// * These functions use a "default" resampling filter defined at compile time. To change the filter, +// you can change the compile-time defaults by #defining STBIR_DEFAULT_FILTER_UPSAMPLE +// and STBIR_DEFAULT_FILTER_DOWNSAMPLE, or you can use the medium-complexity API. + +STBIRDEF int stbir_resize_uint8( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels); + +STBIRDEF int stbir_resize_float( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels); + + +// The following functions interpret image data as gamma-corrected sRGB. +// Specify STBIR_ALPHA_CHANNEL_NONE if you have no alpha channel, +// or otherwise provide the index of the alpha channel. Flags value +// of 0 will probably do the right thing if you're not sure what +// the flags mean. + +#define STBIR_ALPHA_CHANNEL_NONE -1 + +// Set this flag if your texture has premultiplied alpha. Otherwise, stbir will +// use alpha-weighted resampling (effectively premultiplying, resampling, +// then unpremultiplying). +#define STBIR_FLAG_ALPHA_PREMULTIPLIED (1 << 0) +// The specified alpha channel should be handled as gamma-corrected value even +// when doing sRGB operations. +#define STBIR_FLAG_ALPHA_USES_COLORSPACE (1 << 1) + +STBIRDEF int stbir_resize_uint8_srgb(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags); + + +typedef enum +{ + STBIR_EDGE_CLAMP = 1, + STBIR_EDGE_REFLECT = 2, + STBIR_EDGE_WRAP = 3, + STBIR_EDGE_ZERO = 4, +} stbir_edge; + +// This function adds the ability to specify how requests to sample off the edge of the image are handled. +STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode); + +////////////////////////////////////////////////////////////////////////////// +// +// Medium-complexity API +// +// This extends the easy-to-use API as follows: +// +// * Alpha-channel can be processed separately +// * If alpha_channel is not STBIR_ALPHA_CHANNEL_NONE +// * Alpha channel will not be gamma corrected (unless flags&STBIR_FLAG_GAMMA_CORRECT) +// * Filters will be weighted by alpha channel (unless flags&STBIR_FLAG_ALPHA_PREMULTIPLIED) +// * Filter can be selected explicitly +// * uint16 image type +// * sRGB colorspace available for all types +// * context parameter for passing to STBIR_MALLOC + +typedef enum +{ + STBIR_FILTER_DEFAULT = 0, // use same filter type that easy-to-use API chooses + STBIR_FILTER_BOX = 1, // A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios + STBIR_FILTER_TRIANGLE = 2, // On upsampling, produces same results as bilinear texture filtering + STBIR_FILTER_CUBICBSPLINE = 3, // The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque + STBIR_FILTER_CATMULLROM = 4, // An interpolating cubic spline + STBIR_FILTER_MITCHELL = 5, // Mitchell-Netrevalli filter with B=1/3, C=1/3 +} stbir_filter; + +typedef enum +{ + STBIR_COLORSPACE_LINEAR, + STBIR_COLORSPACE_SRGB, + + STBIR_MAX_COLORSPACES, +} stbir_colorspace; + +// The following functions are all identical except for the type of the image data + +STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context); + +STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context); + +STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context); + + + +////////////////////////////////////////////////////////////////////////////// +// +// Full-complexity API +// +// This extends the medium API as follows: +// +// * uint32 image type +// * not typesafe +// * separate filter types for each axis +// * separate edge modes for each axis +// * can specify scale explicitly for subpixel correctness +// * can specify image source tile using texture coordinates + +typedef enum +{ + STBIR_TYPE_UINT8 , + STBIR_TYPE_UINT16, + STBIR_TYPE_UINT32, + STBIR_TYPE_FLOAT , + + STBIR_MAX_TYPES +} stbir_datatype; + +STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context); + +STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context, + float x_scale, float y_scale, + float x_offset, float y_offset); + +STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context, + float s0, float t0, float s1, float t1); +// (s0, t0) & (s1, t1) are the top-left and bottom right corner (uv addressing style: [0, 1]x[0, 1]) of a region of the input image to use. + +// +// +//// end header file ///////////////////////////////////////////////////// +#endif // STBIR_INCLUDE_STB_IMAGE_RESIZE_H + + + + + +#ifdef STB_IMAGE_RESIZE_IMPLEMENTATION + +#ifndef STBIR_ASSERT +#include +#define STBIR_ASSERT(x) assert(x) +#endif + +// For memset +#include + +#include + +#ifndef STBIR_MALLOC +#include +// use comma operator to evaluate c, to avoid "unused parameter" warnings +#define STBIR_MALLOC(size,c) ((void)(c), malloc(size)) +#define STBIR_FREE(ptr,c) ((void)(c), free(ptr)) +#endif + +#ifndef _MSC_VER +#ifdef __cplusplus +#define stbir__inline inline +#else +#define stbir__inline +#endif +#else +#define stbir__inline __forceinline +#endif + + +// should produce compiler error if size is wrong +typedef unsigned char stbir__validate_uint32[sizeof(stbir_uint32) == 4 ? 1 : -1]; + +#ifdef _MSC_VER +#define STBIR__NOTUSED(v) (void)(v) +#else +#define STBIR__NOTUSED(v) (void)sizeof(v) +#endif + +#define STBIR__ARRAY_SIZE(a) (sizeof((a))/sizeof((a)[0])) + +#ifndef STBIR_DEFAULT_FILTER_UPSAMPLE +#define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_CATMULLROM +#endif + +#ifndef STBIR_DEFAULT_FILTER_DOWNSAMPLE +#define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_MITCHELL +#endif + +#ifndef STBIR_PROGRESS_REPORT +#define STBIR_PROGRESS_REPORT(float_0_to_1) +#endif + +#ifndef STBIR_MAX_CHANNELS +#define STBIR_MAX_CHANNELS 64 +#endif + +#if STBIR_MAX_CHANNELS > 65536 +#error "Too many channels; STBIR_MAX_CHANNELS must be no more than 65536." +// because we store the indices in 16-bit variables +#endif + +// This value is added to alpha just before premultiplication to avoid +// zeroing out color values. It is equivalent to 2^-80. If you don't want +// that behavior (it may interfere if you have floating point images with +// very small alpha values) then you can define STBIR_NO_ALPHA_EPSILON to +// disable it. +#ifndef STBIR_ALPHA_EPSILON +#define STBIR_ALPHA_EPSILON ((float)1 / (1 << 20) / (1 << 20) / (1 << 20) / (1 << 20)) +#endif + + + +#ifdef _MSC_VER +#define STBIR__UNUSED_PARAM(v) (void)(v) +#else +#define STBIR__UNUSED_PARAM(v) (void)sizeof(v) +#endif + +// must match stbir_datatype +static unsigned char stbir__type_size[] = { + 1, // STBIR_TYPE_UINT8 + 2, // STBIR_TYPE_UINT16 + 4, // STBIR_TYPE_UINT32 + 4, // STBIR_TYPE_FLOAT +}; + +// Kernel function centered at 0 +typedef float (stbir__kernel_fn)(float x, float scale); +typedef float (stbir__support_fn)(float scale); + +typedef struct +{ + stbir__kernel_fn* kernel; + stbir__support_fn* support; +} stbir__filter_info; + +// When upsampling, the contributors are which source pixels contribute. +// When downsampling, the contributors are which destination pixels are contributed to. +typedef struct +{ + int n0; // First contributing pixel + int n1; // Last contributing pixel +} stbir__contributors; + +typedef struct +{ + const void* input_data; + int input_w; + int input_h; + int input_stride_bytes; + + void* output_data; + int output_w; + int output_h; + int output_stride_bytes; + + float s0, t0, s1, t1; + + float horizontal_shift; // Units: output pixels + float vertical_shift; // Units: output pixels + float horizontal_scale; + float vertical_scale; + + int channels; + int alpha_channel; + stbir_uint32 flags; + stbir_datatype type; + stbir_filter horizontal_filter; + stbir_filter vertical_filter; + stbir_edge edge_horizontal; + stbir_edge edge_vertical; + stbir_colorspace colorspace; + + stbir__contributors* horizontal_contributors; + float* horizontal_coefficients; + + stbir__contributors* vertical_contributors; + float* vertical_coefficients; + + int decode_buffer_pixels; + float* decode_buffer; + + float* horizontal_buffer; + + // cache these because ceil/floor are inexplicably showing up in profile + int horizontal_coefficient_width; + int vertical_coefficient_width; + int horizontal_filter_pixel_width; + int vertical_filter_pixel_width; + int horizontal_filter_pixel_margin; + int vertical_filter_pixel_margin; + int horizontal_num_contributors; + int vertical_num_contributors; + + int ring_buffer_length_bytes; // The length of an individual entry in the ring buffer. The total number of ring buffers is stbir__get_filter_pixel_width(filter) + int ring_buffer_num_entries; // Total number of entries in the ring buffer. + int ring_buffer_first_scanline; + int ring_buffer_last_scanline; + int ring_buffer_begin_index; // first_scanline is at this index in the ring buffer + float* ring_buffer; + + float* encode_buffer; // A temporary buffer to store floats so we don't lose precision while we do multiply-adds. + + int horizontal_contributors_size; + int horizontal_coefficients_size; + int vertical_contributors_size; + int vertical_coefficients_size; + int decode_buffer_size; + int horizontal_buffer_size; + int ring_buffer_size; + int encode_buffer_size; +} stbir__info; + + +static const float stbir__max_uint8_as_float = 255.0f; +static const float stbir__max_uint16_as_float = 65535.0f; +static const double stbir__max_uint32_as_float = 4294967295.0; + + +static stbir__inline int stbir__min(int a, int b) +{ + return a < b ? a : b; +} + +static stbir__inline float stbir__saturate(float x) +{ + if (x < 0) + return 0; + + if (x > 1) + return 1; + + return x; +} + +#ifdef STBIR_SATURATE_INT +static stbir__inline stbir_uint8 stbir__saturate8(int x) +{ + if ((unsigned int) x <= 255) + return x; + + if (x < 0) + return 0; + + return 255; +} + +static stbir__inline stbir_uint16 stbir__saturate16(int x) +{ + if ((unsigned int) x <= 65535) + return x; + + if (x < 0) + return 0; + + return 65535; +} +#endif + +static float stbir__srgb_uchar_to_linear_float[256] = { + 0.000000f, 0.000304f, 0.000607f, 0.000911f, 0.001214f, 0.001518f, 0.001821f, 0.002125f, 0.002428f, 0.002732f, 0.003035f, + 0.003347f, 0.003677f, 0.004025f, 0.004391f, 0.004777f, 0.005182f, 0.005605f, 0.006049f, 0.006512f, 0.006995f, 0.007499f, + 0.008023f, 0.008568f, 0.009134f, 0.009721f, 0.010330f, 0.010960f, 0.011612f, 0.012286f, 0.012983f, 0.013702f, 0.014444f, + 0.015209f, 0.015996f, 0.016807f, 0.017642f, 0.018500f, 0.019382f, 0.020289f, 0.021219f, 0.022174f, 0.023153f, 0.024158f, + 0.025187f, 0.026241f, 0.027321f, 0.028426f, 0.029557f, 0.030713f, 0.031896f, 0.033105f, 0.034340f, 0.035601f, 0.036889f, + 0.038204f, 0.039546f, 0.040915f, 0.042311f, 0.043735f, 0.045186f, 0.046665f, 0.048172f, 0.049707f, 0.051269f, 0.052861f, + 0.054480f, 0.056128f, 0.057805f, 0.059511f, 0.061246f, 0.063010f, 0.064803f, 0.066626f, 0.068478f, 0.070360f, 0.072272f, + 0.074214f, 0.076185f, 0.078187f, 0.080220f, 0.082283f, 0.084376f, 0.086500f, 0.088656f, 0.090842f, 0.093059f, 0.095307f, + 0.097587f, 0.099899f, 0.102242f, 0.104616f, 0.107023f, 0.109462f, 0.111932f, 0.114435f, 0.116971f, 0.119538f, 0.122139f, + 0.124772f, 0.127438f, 0.130136f, 0.132868f, 0.135633f, 0.138432f, 0.141263f, 0.144128f, 0.147027f, 0.149960f, 0.152926f, + 0.155926f, 0.158961f, 0.162029f, 0.165132f, 0.168269f, 0.171441f, 0.174647f, 0.177888f, 0.181164f, 0.184475f, 0.187821f, + 0.191202f, 0.194618f, 0.198069f, 0.201556f, 0.205079f, 0.208637f, 0.212231f, 0.215861f, 0.219526f, 0.223228f, 0.226966f, + 0.230740f, 0.234551f, 0.238398f, 0.242281f, 0.246201f, 0.250158f, 0.254152f, 0.258183f, 0.262251f, 0.266356f, 0.270498f, + 0.274677f, 0.278894f, 0.283149f, 0.287441f, 0.291771f, 0.296138f, 0.300544f, 0.304987f, 0.309469f, 0.313989f, 0.318547f, + 0.323143f, 0.327778f, 0.332452f, 0.337164f, 0.341914f, 0.346704f, 0.351533f, 0.356400f, 0.361307f, 0.366253f, 0.371238f, + 0.376262f, 0.381326f, 0.386430f, 0.391573f, 0.396755f, 0.401978f, 0.407240f, 0.412543f, 0.417885f, 0.423268f, 0.428691f, + 0.434154f, 0.439657f, 0.445201f, 0.450786f, 0.456411f, 0.462077f, 0.467784f, 0.473532f, 0.479320f, 0.485150f, 0.491021f, + 0.496933f, 0.502887f, 0.508881f, 0.514918f, 0.520996f, 0.527115f, 0.533276f, 0.539480f, 0.545725f, 0.552011f, 0.558340f, + 0.564712f, 0.571125f, 0.577581f, 0.584078f, 0.590619f, 0.597202f, 0.603827f, 0.610496f, 0.617207f, 0.623960f, 0.630757f, + 0.637597f, 0.644480f, 0.651406f, 0.658375f, 0.665387f, 0.672443f, 0.679543f, 0.686685f, 0.693872f, 0.701102f, 0.708376f, + 0.715694f, 0.723055f, 0.730461f, 0.737911f, 0.745404f, 0.752942f, 0.760525f, 0.768151f, 0.775822f, 0.783538f, 0.791298f, + 0.799103f, 0.806952f, 0.814847f, 0.822786f, 0.830770f, 0.838799f, 0.846873f, 0.854993f, 0.863157f, 0.871367f, 0.879622f, + 0.887923f, 0.896269f, 0.904661f, 0.913099f, 0.921582f, 0.930111f, 0.938686f, 0.947307f, 0.955974f, 0.964686f, 0.973445f, + 0.982251f, 0.991102f, 1.0f +}; + +static float stbir__srgb_to_linear(float f) +{ + if (f <= 0.04045f) + return f / 12.92f; + else + return (float)pow((f + 0.055f) / 1.055f, 2.4f); +} + +static float stbir__linear_to_srgb(float f) +{ + if (f <= 0.0031308f) + return f * 12.92f; + else + return 1.055f * (float)pow(f, 1 / 2.4f) - 0.055f; +} + +#ifndef STBIR_NON_IEEE_FLOAT +// From https://gist.github.com/rygorous/2203834 + +typedef union +{ + stbir_uint32 u; + float f; +} stbir__FP32; + +static const stbir_uint32 fp32_to_srgb8_tab4[104] = { + 0x0073000d, 0x007a000d, 0x0080000d, 0x0087000d, 0x008d000d, 0x0094000d, 0x009a000d, 0x00a1000d, + 0x00a7001a, 0x00b4001a, 0x00c1001a, 0x00ce001a, 0x00da001a, 0x00e7001a, 0x00f4001a, 0x0101001a, + 0x010e0033, 0x01280033, 0x01410033, 0x015b0033, 0x01750033, 0x018f0033, 0x01a80033, 0x01c20033, + 0x01dc0067, 0x020f0067, 0x02430067, 0x02760067, 0x02aa0067, 0x02dd0067, 0x03110067, 0x03440067, + 0x037800ce, 0x03df00ce, 0x044600ce, 0x04ad00ce, 0x051400ce, 0x057b00c5, 0x05dd00bc, 0x063b00b5, + 0x06970158, 0x07420142, 0x07e30130, 0x087b0120, 0x090b0112, 0x09940106, 0x0a1700fc, 0x0a9500f2, + 0x0b0f01cb, 0x0bf401ae, 0x0ccb0195, 0x0d950180, 0x0e56016e, 0x0f0d015e, 0x0fbc0150, 0x10630143, + 0x11070264, 0x1238023e, 0x1357021d, 0x14660201, 0x156601e9, 0x165a01d3, 0x174401c0, 0x182401af, + 0x18fe0331, 0x1a9602fe, 0x1c1502d2, 0x1d7e02ad, 0x1ed4028d, 0x201a0270, 0x21520256, 0x227d0240, + 0x239f0443, 0x25c003fe, 0x27bf03c4, 0x29a10392, 0x2b6a0367, 0x2d1d0341, 0x2ebe031f, 0x304d0300, + 0x31d105b0, 0x34a80555, 0x37520507, 0x39d504c5, 0x3c37048b, 0x3e7c0458, 0x40a8042a, 0x42bd0401, + 0x44c20798, 0x488e071e, 0x4c1c06b6, 0x4f76065d, 0x52a50610, 0x55ac05cc, 0x5892058f, 0x5b590559, + 0x5e0c0a23, 0x631c0980, 0x67db08f6, 0x6c55087f, 0x70940818, 0x74a007bd, 0x787d076c, 0x7c330723, +}; + +static stbir_uint8 stbir__linear_to_srgb_uchar(float in) +{ + static const stbir__FP32 almostone = { 0x3f7fffff }; // 1-eps + static const stbir__FP32 minval = { (127-13) << 23 }; + stbir_uint32 tab,bias,scale,t; + stbir__FP32 f; + + // Clamp to [2^(-13), 1-eps]; these two values map to 0 and 1, respectively. + // The tests are carefully written so that NaNs map to 0, same as in the reference + // implementation. + if (!(in > minval.f)) // written this way to catch NaNs + in = minval.f; + if (in > almostone.f) + in = almostone.f; + + // Do the table lookup and unpack bias, scale + f.f = in; + tab = fp32_to_srgb8_tab4[(f.u - minval.u) >> 20]; + bias = (tab >> 16) << 9; + scale = tab & 0xffff; + + // Grab next-highest mantissa bits and perform linear interpolation + t = (f.u >> 12) & 0xff; + return (unsigned char) ((bias + scale*t) >> 16); +} + +#else +// sRGB transition values, scaled by 1<<28 +static int stbir__srgb_offset_to_linear_scaled[256] = +{ + 0, 40738, 122216, 203693, 285170, 366648, 448125, 529603, + 611080, 692557, 774035, 855852, 942009, 1033024, 1128971, 1229926, + 1335959, 1447142, 1563542, 1685229, 1812268, 1944725, 2082664, 2226148, + 2375238, 2529996, 2690481, 2856753, 3028870, 3206888, 3390865, 3580856, + 3776916, 3979100, 4187460, 4402049, 4622919, 4850123, 5083710, 5323731, + 5570236, 5823273, 6082892, 6349140, 6622065, 6901714, 7188133, 7481369, + 7781466, 8088471, 8402427, 8723380, 9051372, 9386448, 9728650, 10078021, + 10434603, 10798439, 11169569, 11548036, 11933879, 12327139, 12727857, 13136073, + 13551826, 13975156, 14406100, 14844697, 15290987, 15745007, 16206795, 16676389, + 17153826, 17639142, 18132374, 18633560, 19142734, 19659934, 20185196, 20718552, + 21260042, 21809696, 22367554, 22933648, 23508010, 24090680, 24681686, 25281066, + 25888850, 26505076, 27129772, 27762974, 28404716, 29055026, 29713942, 30381490, + 31057708, 31742624, 32436272, 33138682, 33849884, 34569912, 35298800, 36036568, + 36783260, 37538896, 38303512, 39077136, 39859796, 40651528, 41452360, 42262316, + 43081432, 43909732, 44747252, 45594016, 46450052, 47315392, 48190064, 49074096, + 49967516, 50870356, 51782636, 52704392, 53635648, 54576432, 55526772, 56486700, + 57456236, 58435408, 59424248, 60422780, 61431036, 62449032, 63476804, 64514376, + 65561776, 66619028, 67686160, 68763192, 69850160, 70947088, 72053992, 73170912, + 74297864, 75434880, 76581976, 77739184, 78906536, 80084040, 81271736, 82469648, + 83677792, 84896192, 86124888, 87363888, 88613232, 89872928, 91143016, 92423512, + 93714432, 95015816, 96327688, 97650056, 98982952, 100326408, 101680440, 103045072, + 104420320, 105806224, 107202800, 108610064, 110028048, 111456776, 112896264, 114346544, + 115807632, 117279552, 118762328, 120255976, 121760536, 123276016, 124802440, 126339832, + 127888216, 129447616, 131018048, 132599544, 134192112, 135795792, 137410592, 139036528, + 140673648, 142321952, 143981456, 145652208, 147334208, 149027488, 150732064, 152447968, + 154175200, 155913792, 157663776, 159425168, 161197984, 162982240, 164777968, 166585184, + 168403904, 170234160, 172075968, 173929344, 175794320, 177670896, 179559120, 181458992, + 183370528, 185293776, 187228736, 189175424, 191133888, 193104112, 195086128, 197079968, + 199085648, 201103184, 203132592, 205173888, 207227120, 209292272, 211369392, 213458480, + 215559568, 217672656, 219797792, 221934976, 224084240, 226245600, 228419056, 230604656, + 232802400, 235012320, 237234432, 239468736, 241715280, 243974080, 246245120, 248528464, + 250824112, 253132064, 255452368, 257785040, 260130080, 262487520, 264857376, 267239664, +}; + +static stbir_uint8 stbir__linear_to_srgb_uchar(float f) +{ + int x = (int) (f * (1 << 28)); // has headroom so you don't need to clamp + int v = 0; + int i; + + // Refine the guess with a short binary search. + i = v + 128; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 64; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 32; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 16; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 8; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 4; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 2; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + i = v + 1; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; + + return (stbir_uint8) v; +} +#endif + +static float stbir__filter_trapezoid(float x, float scale) +{ + float halfscale = scale / 2; + float t = 0.5f + halfscale; + STBIR_ASSERT(scale <= 1); + + x = (float)fabs(x); + + if (x >= t) + return 0; + else + { + float r = 0.5f - halfscale; + if (x <= r) + return 1; + else + return (t - x) / scale; + } +} + +static float stbir__support_trapezoid(float scale) +{ + STBIR_ASSERT(scale <= 1); + return 0.5f + scale / 2; +} + +static float stbir__filter_triangle(float x, float s) +{ + STBIR__UNUSED_PARAM(s); + + x = (float)fabs(x); + + if (x <= 1.0f) + return 1 - x; + else + return 0; +} + +static float stbir__filter_cubic(float x, float s) +{ + STBIR__UNUSED_PARAM(s); + + x = (float)fabs(x); + + if (x < 1.0f) + return (4 + x*x*(3*x - 6))/6; + else if (x < 2.0f) + return (8 + x*(-12 + x*(6 - x)))/6; + + return (0.0f); +} + +static float stbir__filter_catmullrom(float x, float s) +{ + STBIR__UNUSED_PARAM(s); + + x = (float)fabs(x); + + if (x < 1.0f) + return 1 - x*x*(2.5f - 1.5f*x); + else if (x < 2.0f) + return 2 - x*(4 + x*(0.5f*x - 2.5f)); + + return (0.0f); +} + +static float stbir__filter_mitchell(float x, float s) +{ + STBIR__UNUSED_PARAM(s); + + x = (float)fabs(x); + + if (x < 1.0f) + return (16 + x*x*(21 * x - 36))/18; + else if (x < 2.0f) + return (32 + x*(-60 + x*(36 - 7*x)))/18; + + return (0.0f); +} + +static float stbir__support_zero(float s) +{ + STBIR__UNUSED_PARAM(s); + return 0; +} + +static float stbir__support_one(float s) +{ + STBIR__UNUSED_PARAM(s); + return 1; +} + +static float stbir__support_two(float s) +{ + STBIR__UNUSED_PARAM(s); + return 2; +} + +static stbir__filter_info stbir__filter_info_table[] = { + { NULL, stbir__support_zero }, + { stbir__filter_trapezoid, stbir__support_trapezoid }, + { stbir__filter_triangle, stbir__support_one }, + { stbir__filter_cubic, stbir__support_two }, + { stbir__filter_catmullrom, stbir__support_two }, + { stbir__filter_mitchell, stbir__support_two }, +}; + +stbir__inline static int stbir__use_upsampling(float ratio) +{ + return ratio > 1; +} + +stbir__inline static int stbir__use_width_upsampling(stbir__info* stbir_info) +{ + return stbir__use_upsampling(stbir_info->horizontal_scale); +} + +stbir__inline static int stbir__use_height_upsampling(stbir__info* stbir_info) +{ + return stbir__use_upsampling(stbir_info->vertical_scale); +} + +// This is the maximum number of input samples that can affect an output sample +// with the given filter +static int stbir__get_filter_pixel_width(stbir_filter filter, float scale) +{ + STBIR_ASSERT(filter != 0); + STBIR_ASSERT(filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); + + if (stbir__use_upsampling(scale)) + return (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2); + else + return (int)ceil(stbir__filter_info_table[filter].support(scale) * 2 / scale); +} + +// This is how much to expand buffers to account for filters seeking outside +// the image boundaries. +static int stbir__get_filter_pixel_margin(stbir_filter filter, float scale) +{ + return stbir__get_filter_pixel_width(filter, scale) / 2; +} + +static int stbir__get_coefficient_width(stbir_filter filter, float scale) +{ + if (stbir__use_upsampling(scale)) + return (int)ceil(stbir__filter_info_table[filter].support(1 / scale) * 2); + else + return (int)ceil(stbir__filter_info_table[filter].support(scale) * 2); +} + +static int stbir__get_contributors(float scale, stbir_filter filter, int input_size, int output_size) +{ + if (stbir__use_upsampling(scale)) + return output_size; + else + return (input_size + stbir__get_filter_pixel_margin(filter, scale) * 2); +} + +static int stbir__get_total_horizontal_coefficients(stbir__info* info) +{ + return info->horizontal_num_contributors + * stbir__get_coefficient_width (info->horizontal_filter, info->horizontal_scale); +} + +static int stbir__get_total_vertical_coefficients(stbir__info* info) +{ + return info->vertical_num_contributors + * stbir__get_coefficient_width (info->vertical_filter, info->vertical_scale); +} + +static stbir__contributors* stbir__get_contributor(stbir__contributors* contributors, int n) +{ + return &contributors[n]; +} + +// For perf reasons this code is duplicated in stbir__resample_horizontal_upsample/downsample, +// if you change it here change it there too. +static float* stbir__get_coefficient(float* coefficients, stbir_filter filter, float scale, int n, int c) +{ + int width = stbir__get_coefficient_width(filter, scale); + return &coefficients[width*n + c]; +} + +static int stbir__edge_wrap_slow(stbir_edge edge, int n, int max) +{ + switch (edge) + { + case STBIR_EDGE_ZERO: + return 0; // we'll decode the wrong pixel here, and then overwrite with 0s later + + case STBIR_EDGE_CLAMP: + if (n < 0) + return 0; + + if (n >= max) + return max - 1; + + return n; // NOTREACHED + + case STBIR_EDGE_REFLECT: + { + if (n < 0) + { + if (n < max) + return -n; + else + return max - 1; + } + + if (n >= max) + { + int max2 = max * 2; + if (n >= max2) + return 0; + else + return max2 - n - 1; + } + + return n; // NOTREACHED + } + + case STBIR_EDGE_WRAP: + if (n >= 0) + return (n % max); + else + { + int m = (-n) % max; + + if (m != 0) + m = max - m; + + return (m); + } + // NOTREACHED + + default: + STBIR_ASSERT(!"Unimplemented edge type"); + return 0; + } +} + +stbir__inline static int stbir__edge_wrap(stbir_edge edge, int n, int max) +{ + // avoid per-pixel switch + if (n >= 0 && n < max) + return n; + return stbir__edge_wrap_slow(edge, n, max); +} + +// What input pixels contribute to this output pixel? +static void stbir__calculate_sample_range_upsample(int n, float out_filter_radius, float scale_ratio, float out_shift, int* in_first_pixel, int* in_last_pixel, float* in_center_of_out) +{ + float out_pixel_center = (float)n + 0.5f; + float out_pixel_influence_lowerbound = out_pixel_center - out_filter_radius; + float out_pixel_influence_upperbound = out_pixel_center + out_filter_radius; + + float in_pixel_influence_lowerbound = (out_pixel_influence_lowerbound + out_shift) / scale_ratio; + float in_pixel_influence_upperbound = (out_pixel_influence_upperbound + out_shift) / scale_ratio; + + *in_center_of_out = (out_pixel_center + out_shift) / scale_ratio; + *in_first_pixel = (int)(floor(in_pixel_influence_lowerbound + 0.5)); + *in_last_pixel = (int)(floor(in_pixel_influence_upperbound - 0.5)); +} + +// What output pixels does this input pixel contribute to? +static void stbir__calculate_sample_range_downsample(int n, float in_pixels_radius, float scale_ratio, float out_shift, int* out_first_pixel, int* out_last_pixel, float* out_center_of_in) +{ + float in_pixel_center = (float)n + 0.5f; + float in_pixel_influence_lowerbound = in_pixel_center - in_pixels_radius; + float in_pixel_influence_upperbound = in_pixel_center + in_pixels_radius; + + float out_pixel_influence_lowerbound = in_pixel_influence_lowerbound * scale_ratio - out_shift; + float out_pixel_influence_upperbound = in_pixel_influence_upperbound * scale_ratio - out_shift; + + *out_center_of_in = in_pixel_center * scale_ratio - out_shift; + *out_first_pixel = (int)(floor(out_pixel_influence_lowerbound + 0.5)); + *out_last_pixel = (int)(floor(out_pixel_influence_upperbound - 0.5)); +} + +static void stbir__calculate_coefficients_upsample(stbir_filter filter, float scale, int in_first_pixel, int in_last_pixel, float in_center_of_out, stbir__contributors* contributor, float* coefficient_group) +{ + int i; + float total_filter = 0; + float filter_scale; + + STBIR_ASSERT(in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. + + contributor->n0 = in_first_pixel; + contributor->n1 = in_last_pixel; + + STBIR_ASSERT(contributor->n1 >= contributor->n0); + + for (i = 0; i <= in_last_pixel - in_first_pixel; i++) + { + float in_pixel_center = (float)(i + in_first_pixel) + 0.5f; + coefficient_group[i] = stbir__filter_info_table[filter].kernel(in_center_of_out - in_pixel_center, 1 / scale); + + // If the coefficient is zero, skip it. (Don't do the <0 check here, we want the influence of those outside pixels.) + if (i == 0 && !coefficient_group[i]) + { + contributor->n0 = ++in_first_pixel; + i--; + continue; + } + + total_filter += coefficient_group[i]; + } + + // NOTE(fg): Not actually true in general, nor is there any reason to expect it should be. + // It would be true in exact math but is at best approximately true in floating-point math, + // and it would not make sense to try and put actual bounds on this here because it depends + // on the image aspect ratio which can get pretty extreme. + //STBIR_ASSERT(stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0); + + STBIR_ASSERT(total_filter > 0.9); + STBIR_ASSERT(total_filter < 1.1f); // Make sure it's not way off. + + // Make sure the sum of all coefficients is 1. + filter_scale = 1 / total_filter; + + for (i = 0; i <= in_last_pixel - in_first_pixel; i++) + coefficient_group[i] *= filter_scale; + + for (i = in_last_pixel - in_first_pixel; i >= 0; i--) + { + if (coefficient_group[i]) + break; + + // This line has no weight. We can skip it. + contributor->n1 = contributor->n0 + i - 1; + } +} + +static void stbir__calculate_coefficients_downsample(stbir_filter filter, float scale_ratio, int out_first_pixel, int out_last_pixel, float out_center_of_in, stbir__contributors* contributor, float* coefficient_group) +{ + int i; + + STBIR_ASSERT(out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. + + contributor->n0 = out_first_pixel; + contributor->n1 = out_last_pixel; + + STBIR_ASSERT(contributor->n1 >= contributor->n0); + + for (i = 0; i <= out_last_pixel - out_first_pixel; i++) + { + float out_pixel_center = (float)(i + out_first_pixel) + 0.5f; + float x = out_pixel_center - out_center_of_in; + coefficient_group[i] = stbir__filter_info_table[filter].kernel(x, scale_ratio) * scale_ratio; + } + + // NOTE(fg): Not actually true in general, nor is there any reason to expect it should be. + // It would be true in exact math but is at best approximately true in floating-point math, + // and it would not make sense to try and put actual bounds on this here because it depends + // on the image aspect ratio which can get pretty extreme. + //STBIR_ASSERT(stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0); + + for (i = out_last_pixel - out_first_pixel; i >= 0; i--) + { + if (coefficient_group[i]) + break; + + // This line has no weight. We can skip it. + contributor->n1 = contributor->n0 + i - 1; + } +} + +static void stbir__normalize_downsample_coefficients(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, int input_size, int output_size) +{ + int num_contributors = stbir__get_contributors(scale_ratio, filter, input_size, output_size); + int num_coefficients = stbir__get_coefficient_width(filter, scale_ratio); + int i, j; + int skip; + + for (i = 0; i < output_size; i++) + { + float scale; + float total = 0; + + for (j = 0; j < num_contributors; j++) + { + if (i >= contributors[j].n0 && i <= contributors[j].n1) + { + float coefficient = *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i - contributors[j].n0); + total += coefficient; + } + else if (i < contributors[j].n0) + break; + } + + STBIR_ASSERT(total > 0.9f); + STBIR_ASSERT(total < 1.1f); + + scale = 1 / total; + + for (j = 0; j < num_contributors; j++) + { + if (i >= contributors[j].n0 && i <= contributors[j].n1) + *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i - contributors[j].n0) *= scale; + else if (i < contributors[j].n0) + break; + } + } + + // Optimize: Skip zero coefficients and contributions outside of image bounds. + // Do this after normalizing because normalization depends on the n0/n1 values. + for (j = 0; j < num_contributors; j++) + { + int range, max, width; + + skip = 0; + while (*stbir__get_coefficient(coefficients, filter, scale_ratio, j, skip) == 0) + skip++; + + contributors[j].n0 += skip; + + while (contributors[j].n0 < 0) + { + contributors[j].n0++; + skip++; + } + + range = contributors[j].n1 - contributors[j].n0 + 1; + max = stbir__min(num_coefficients, range); + + width = stbir__get_coefficient_width(filter, scale_ratio); + for (i = 0; i < max; i++) + { + if (i + skip >= width) + break; + + *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i) = *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i + skip); + } + + continue; + } + + // Using min to avoid writing into invalid pixels. + for (i = 0; i < num_contributors; i++) + contributors[i].n1 = stbir__min(contributors[i].n1, output_size - 1); +} + +// Each scan line uses the same kernel values so we should calculate the kernel +// values once and then we can use them for every scan line. +static void stbir__calculate_filters(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, float shift, int input_size, int output_size) +{ + int n; + int total_contributors = stbir__get_contributors(scale_ratio, filter, input_size, output_size); + + if (stbir__use_upsampling(scale_ratio)) + { + float out_pixels_radius = stbir__filter_info_table[filter].support(1 / scale_ratio) * scale_ratio; + + // Looping through out pixels + for (n = 0; n < total_contributors; n++) + { + float in_center_of_out; // Center of the current out pixel in the in pixel space + int in_first_pixel, in_last_pixel; + + stbir__calculate_sample_range_upsample(n, out_pixels_radius, scale_ratio, shift, &in_first_pixel, &in_last_pixel, &in_center_of_out); + + stbir__calculate_coefficients_upsample(filter, scale_ratio, in_first_pixel, in_last_pixel, in_center_of_out, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0)); + } + } + else + { + float in_pixels_radius = stbir__filter_info_table[filter].support(scale_ratio) / scale_ratio; + + // Looping through in pixels + for (n = 0; n < total_contributors; n++) + { + float out_center_of_in; // Center of the current out pixel in the in pixel space + int out_first_pixel, out_last_pixel; + int n_adjusted = n - stbir__get_filter_pixel_margin(filter, scale_ratio); + + stbir__calculate_sample_range_downsample(n_adjusted, in_pixels_radius, scale_ratio, shift, &out_first_pixel, &out_last_pixel, &out_center_of_in); + + stbir__calculate_coefficients_downsample(filter, scale_ratio, out_first_pixel, out_last_pixel, out_center_of_in, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0)); + } + + stbir__normalize_downsample_coefficients(contributors, coefficients, filter, scale_ratio, input_size, output_size); + } +} + +static float* stbir__get_decode_buffer(stbir__info* stbir_info) +{ + // The 0 index of the decode buffer starts after the margin. This makes + // it okay to use negative indexes on the decode buffer. + return &stbir_info->decode_buffer[stbir_info->horizontal_filter_pixel_margin * stbir_info->channels]; +} + +#define STBIR__DECODE(type, colorspace) ((int)(type) * (STBIR_MAX_COLORSPACES) + (int)(colorspace)) + +static void stbir__decode_scanline(stbir__info* stbir_info, int n) +{ + int c; + int channels = stbir_info->channels; + int alpha_channel = stbir_info->alpha_channel; + int type = stbir_info->type; + int colorspace = stbir_info->colorspace; + int input_w = stbir_info->input_w; + size_t input_stride_bytes = stbir_info->input_stride_bytes; + float* decode_buffer = stbir__get_decode_buffer(stbir_info); + stbir_edge edge_horizontal = stbir_info->edge_horizontal; + stbir_edge edge_vertical = stbir_info->edge_vertical; + size_t in_buffer_row_offset = stbir__edge_wrap(edge_vertical, n, stbir_info->input_h) * input_stride_bytes; + const void* input_data = (char *) stbir_info->input_data + in_buffer_row_offset; + int max_x = input_w + stbir_info->horizontal_filter_pixel_margin; + int decode = STBIR__DECODE(type, colorspace); + + int x = -stbir_info->horizontal_filter_pixel_margin; + + // special handling for STBIR_EDGE_ZERO because it needs to return an item that doesn't appear in the input, + // and we want to avoid paying overhead on every pixel if not STBIR_EDGE_ZERO + if (edge_vertical == STBIR_EDGE_ZERO && (n < 0 || n >= stbir_info->input_h)) + { + for (; x < max_x; x++) + for (c = 0; c < channels; c++) + decode_buffer[x*channels + c] = 0; + return; + } + + switch (decode) + { + case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_LINEAR): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = ((float)((const unsigned char*)input_data)[input_pixel_index + c]) / stbir__max_uint8_as_float; + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_SRGB): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = stbir__srgb_uchar_to_linear_float[((const unsigned char*)input_data)[input_pixel_index + c]]; + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + decode_buffer[decode_pixel_index + alpha_channel] = ((float)((const unsigned char*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint8_as_float; + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_LINEAR): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = ((float)((const unsigned short*)input_data)[input_pixel_index + c]) / stbir__max_uint16_as_float; + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_SRGB): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear(((float)((const unsigned short*)input_data)[input_pixel_index + c]) / stbir__max_uint16_as_float); + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + decode_buffer[decode_pixel_index + alpha_channel] = ((float)((const unsigned short*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint16_as_float; + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_LINEAR): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = (float)(((double)((const unsigned int*)input_data)[input_pixel_index + c]) / stbir__max_uint32_as_float); + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_SRGB): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear((float)(((double)((const unsigned int*)input_data)[input_pixel_index + c]) / stbir__max_uint32_as_float)); + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + decode_buffer[decode_pixel_index + alpha_channel] = (float)(((double)((const unsigned int*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint32_as_float); + } + break; + + case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_LINEAR): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = ((const float*)input_data)[input_pixel_index + c]; + } + break; + + case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_SRGB): + for (; x < max_x; x++) + { + int decode_pixel_index = x * channels; + int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; + for (c = 0; c < channels; c++) + decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear(((const float*)input_data)[input_pixel_index + c]); + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + decode_buffer[decode_pixel_index + alpha_channel] = ((const float*)input_data)[input_pixel_index + alpha_channel]; + } + + break; + + default: + STBIR_ASSERT(!"Unknown type/colorspace/channels combination."); + break; + } + + if (!(stbir_info->flags & STBIR_FLAG_ALPHA_PREMULTIPLIED)) + { + for (x = -stbir_info->horizontal_filter_pixel_margin; x < max_x; x++) + { + int decode_pixel_index = x * channels; + + // If the alpha value is 0 it will clobber the color values. Make sure it's not. + float alpha = decode_buffer[decode_pixel_index + alpha_channel]; +#ifndef STBIR_NO_ALPHA_EPSILON + if (stbir_info->type != STBIR_TYPE_FLOAT) { + alpha += STBIR_ALPHA_EPSILON; + decode_buffer[decode_pixel_index + alpha_channel] = alpha; + } +#endif + for (c = 0; c < channels; c++) + { + if (c == alpha_channel) + continue; + + decode_buffer[decode_pixel_index + c] *= alpha; + } + } + } + + if (edge_horizontal == STBIR_EDGE_ZERO) + { + for (x = -stbir_info->horizontal_filter_pixel_margin; x < 0; x++) + { + for (c = 0; c < channels; c++) + decode_buffer[x*channels + c] = 0; + } + for (x = input_w; x < max_x; x++) + { + for (c = 0; c < channels; c++) + decode_buffer[x*channels + c] = 0; + } + } +} + +static float* stbir__get_ring_buffer_entry(float* ring_buffer, int index, int ring_buffer_length) +{ + return &ring_buffer[index * ring_buffer_length]; +} + +static float* stbir__add_empty_ring_buffer_entry(stbir__info* stbir_info, int n) +{ + int ring_buffer_index; + float* ring_buffer; + + stbir_info->ring_buffer_last_scanline = n; + + if (stbir_info->ring_buffer_begin_index < 0) + { + ring_buffer_index = stbir_info->ring_buffer_begin_index = 0; + stbir_info->ring_buffer_first_scanline = n; + } + else + { + ring_buffer_index = (stbir_info->ring_buffer_begin_index + (stbir_info->ring_buffer_last_scanline - stbir_info->ring_buffer_first_scanline)) % stbir_info->ring_buffer_num_entries; + STBIR_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index); + } + + ring_buffer = stbir__get_ring_buffer_entry(stbir_info->ring_buffer, ring_buffer_index, stbir_info->ring_buffer_length_bytes / sizeof(float)); + memset(ring_buffer, 0, stbir_info->ring_buffer_length_bytes); + + return ring_buffer; +} + + +static void stbir__resample_horizontal_upsample(stbir__info* stbir_info, float* output_buffer) +{ + int x, k; + int output_w = stbir_info->output_w; + int channels = stbir_info->channels; + float* decode_buffer = stbir__get_decode_buffer(stbir_info); + stbir__contributors* horizontal_contributors = stbir_info->horizontal_contributors; + float* horizontal_coefficients = stbir_info->horizontal_coefficients; + int coefficient_width = stbir_info->horizontal_coefficient_width; + + for (x = 0; x < output_w; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int out_pixel_index = x * channels; + int coefficient_group = coefficient_width * x; + int coefficient_counter = 0; + + STBIR_ASSERT(n1 >= n0); + STBIR_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin); + STBIR_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin); + STBIR_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); + STBIR_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); + + switch (channels) { + case 1: + for (k = n0; k <= n1; k++) + { + int in_pixel_index = k * 1; + float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; + STBIR_ASSERT(coefficient != 0); + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + } + break; + case 2: + for (k = n0; k <= n1; k++) + { + int in_pixel_index = k * 2; + float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; + STBIR_ASSERT(coefficient != 0); + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + } + break; + case 3: + for (k = n0; k <= n1; k++) + { + int in_pixel_index = k * 3; + float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; + STBIR_ASSERT(coefficient != 0); + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; + } + break; + case 4: + for (k = n0; k <= n1; k++) + { + int in_pixel_index = k * 4; + float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; + STBIR_ASSERT(coefficient != 0); + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; + output_buffer[out_pixel_index + 3] += decode_buffer[in_pixel_index + 3] * coefficient; + } + break; + default: + for (k = n0; k <= n1; k++) + { + int in_pixel_index = k * channels; + float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; + int c; + STBIR_ASSERT(coefficient != 0); + for (c = 0; c < channels; c++) + output_buffer[out_pixel_index + c] += decode_buffer[in_pixel_index + c] * coefficient; + } + break; + } + } +} + +static void stbir__resample_horizontal_downsample(stbir__info* stbir_info, float* output_buffer) +{ + int x, k; + int input_w = stbir_info->input_w; + int channels = stbir_info->channels; + float* decode_buffer = stbir__get_decode_buffer(stbir_info); + stbir__contributors* horizontal_contributors = stbir_info->horizontal_contributors; + float* horizontal_coefficients = stbir_info->horizontal_coefficients; + int coefficient_width = stbir_info->horizontal_coefficient_width; + int filter_pixel_margin = stbir_info->horizontal_filter_pixel_margin; + int max_x = input_w + filter_pixel_margin * 2; + + STBIR_ASSERT(!stbir__use_width_upsampling(stbir_info)); + + switch (channels) { + case 1: + for (x = 0; x < max_x; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int in_x = x - filter_pixel_margin; + int in_pixel_index = in_x * 1; + int max_n = n1; + int coefficient_group = coefficient_width * x; + + for (k = n0; k <= max_n; k++) + { + int out_pixel_index = k * 1; + float coefficient = horizontal_coefficients[coefficient_group + k - n0]; + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + } + } + break; + + case 2: + for (x = 0; x < max_x; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int in_x = x - filter_pixel_margin; + int in_pixel_index = in_x * 2; + int max_n = n1; + int coefficient_group = coefficient_width * x; + + for (k = n0; k <= max_n; k++) + { + int out_pixel_index = k * 2; + float coefficient = horizontal_coefficients[coefficient_group + k - n0]; + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + } + } + break; + + case 3: + for (x = 0; x < max_x; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int in_x = x - filter_pixel_margin; + int in_pixel_index = in_x * 3; + int max_n = n1; + int coefficient_group = coefficient_width * x; + + for (k = n0; k <= max_n; k++) + { + int out_pixel_index = k * 3; + float coefficient = horizontal_coefficients[coefficient_group + k - n0]; + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; + } + } + break; + + case 4: + for (x = 0; x < max_x; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int in_x = x - filter_pixel_margin; + int in_pixel_index = in_x * 4; + int max_n = n1; + int coefficient_group = coefficient_width * x; + + for (k = n0; k <= max_n; k++) + { + int out_pixel_index = k * 4; + float coefficient = horizontal_coefficients[coefficient_group + k - n0]; + output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; + output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; + output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; + output_buffer[out_pixel_index + 3] += decode_buffer[in_pixel_index + 3] * coefficient; + } + } + break; + + default: + for (x = 0; x < max_x; x++) + { + int n0 = horizontal_contributors[x].n0; + int n1 = horizontal_contributors[x].n1; + + int in_x = x - filter_pixel_margin; + int in_pixel_index = in_x * channels; + int max_n = n1; + int coefficient_group = coefficient_width * x; + + for (k = n0; k <= max_n; k++) + { + int c; + int out_pixel_index = k * channels; + float coefficient = horizontal_coefficients[coefficient_group + k - n0]; + for (c = 0; c < channels; c++) + output_buffer[out_pixel_index + c] += decode_buffer[in_pixel_index + c] * coefficient; + } + } + break; + } +} + +static void stbir__decode_and_resample_upsample(stbir__info* stbir_info, int n) +{ + // Decode the nth scanline from the source image into the decode buffer. + stbir__decode_scanline(stbir_info, n); + + // Now resample it into the ring buffer. + if (stbir__use_width_upsampling(stbir_info)) + stbir__resample_horizontal_upsample(stbir_info, stbir__add_empty_ring_buffer_entry(stbir_info, n)); + else + stbir__resample_horizontal_downsample(stbir_info, stbir__add_empty_ring_buffer_entry(stbir_info, n)); + + // Now it's sitting in the ring buffer ready to be used as source for the vertical sampling. +} + +static void stbir__decode_and_resample_downsample(stbir__info* stbir_info, int n) +{ + // Decode the nth scanline from the source image into the decode buffer. + stbir__decode_scanline(stbir_info, n); + + memset(stbir_info->horizontal_buffer, 0, stbir_info->output_w * stbir_info->channels * sizeof(float)); + + // Now resample it into the horizontal buffer. + if (stbir__use_width_upsampling(stbir_info)) + stbir__resample_horizontal_upsample(stbir_info, stbir_info->horizontal_buffer); + else + stbir__resample_horizontal_downsample(stbir_info, stbir_info->horizontal_buffer); + + // Now it's sitting in the horizontal buffer ready to be distributed into the ring buffers. +} + +// Get the specified scan line from the ring buffer. +static float* stbir__get_ring_buffer_scanline(int get_scanline, float* ring_buffer, int begin_index, int first_scanline, int ring_buffer_num_entries, int ring_buffer_length) +{ + int ring_buffer_index = (begin_index + (get_scanline - first_scanline)) % ring_buffer_num_entries; + return stbir__get_ring_buffer_entry(ring_buffer, ring_buffer_index, ring_buffer_length); +} + + +static void stbir__encode_scanline(stbir__info* stbir_info, int num_pixels, void *output_buffer, float *encode_buffer, int channels, int alpha_channel, int decode) +{ + int x; + int n; + int num_nonalpha; + stbir_uint16 nonalpha[STBIR_MAX_CHANNELS]; + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_PREMULTIPLIED)) + { + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + float alpha = encode_buffer[pixel_index + alpha_channel]; + float reciprocal_alpha = alpha ? 1.0f / alpha : 0; + + // unrolling this produced a 1% slowdown upscaling a large RGBA linear-space image on my machine - stb + for (n = 0; n < channels; n++) + if (n != alpha_channel) + encode_buffer[pixel_index + n] *= reciprocal_alpha; + + // We added in a small epsilon to prevent the color channel from being deleted with zero alpha. + // Because we only add it for integer types, it will automatically be discarded on integer + // conversion, so we don't need to subtract it back out (which would be problematic for + // numeric precision reasons). + } + } + + // build a table of all channels that need colorspace correction, so + // we don't perform colorspace correction on channels that don't need it. + for (x = 0, num_nonalpha = 0; x < channels; ++x) + { + if (x != alpha_channel || (stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE)) + { + nonalpha[num_nonalpha++] = (stbir_uint16)x; + } + } + + #define STBIR__ROUND_INT(f) ((int) ((f)+0.5)) + #define STBIR__ROUND_UINT(f) ((stbir_uint32) ((f)+0.5)) + + #ifdef STBIR__SATURATE_INT + #define STBIR__ENCODE_LINEAR8(f) stbir__saturate8 (STBIR__ROUND_INT((f) * stbir__max_uint8_as_float )) + #define STBIR__ENCODE_LINEAR16(f) stbir__saturate16(STBIR__ROUND_INT((f) * stbir__max_uint16_as_float)) + #else + #define STBIR__ENCODE_LINEAR8(f) (unsigned char ) STBIR__ROUND_INT(stbir__saturate(f) * stbir__max_uint8_as_float ) + #define STBIR__ENCODE_LINEAR16(f) (unsigned short) STBIR__ROUND_INT(stbir__saturate(f) * stbir__max_uint16_as_float) + #endif + + switch (decode) + { + case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_LINEAR): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < channels; n++) + { + int index = pixel_index + n; + ((unsigned char*)output_buffer)[index] = STBIR__ENCODE_LINEAR8(encode_buffer[index]); + } + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_SRGB): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < num_nonalpha; n++) + { + int index = pixel_index + nonalpha[n]; + ((unsigned char*)output_buffer)[index] = stbir__linear_to_srgb_uchar(encode_buffer[index]); + } + + if (!(stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE)) + ((unsigned char *)output_buffer)[pixel_index + alpha_channel] = STBIR__ENCODE_LINEAR8(encode_buffer[pixel_index+alpha_channel]); + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_LINEAR): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < channels; n++) + { + int index = pixel_index + n; + ((unsigned short*)output_buffer)[index] = STBIR__ENCODE_LINEAR16(encode_buffer[index]); + } + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_SRGB): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < num_nonalpha; n++) + { + int index = pixel_index + nonalpha[n]; + ((unsigned short*)output_buffer)[index] = (unsigned short)STBIR__ROUND_INT(stbir__linear_to_srgb(stbir__saturate(encode_buffer[index])) * stbir__max_uint16_as_float); + } + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + ((unsigned short*)output_buffer)[pixel_index + alpha_channel] = STBIR__ENCODE_LINEAR16(encode_buffer[pixel_index + alpha_channel]); + } + + break; + + case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_LINEAR): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < channels; n++) + { + int index = pixel_index + n; + ((unsigned int*)output_buffer)[index] = (unsigned int)STBIR__ROUND_UINT(((double)stbir__saturate(encode_buffer[index])) * stbir__max_uint32_as_float); + } + } + break; + + case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_SRGB): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < num_nonalpha; n++) + { + int index = pixel_index + nonalpha[n]; + ((unsigned int*)output_buffer)[index] = (unsigned int)STBIR__ROUND_UINT(((double)stbir__linear_to_srgb(stbir__saturate(encode_buffer[index]))) * stbir__max_uint32_as_float); + } + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + ((unsigned int*)output_buffer)[pixel_index + alpha_channel] = (unsigned int)STBIR__ROUND_INT(((double)stbir__saturate(encode_buffer[pixel_index + alpha_channel])) * stbir__max_uint32_as_float); + } + break; + + case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_LINEAR): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < channels; n++) + { + int index = pixel_index + n; + ((float*)output_buffer)[index] = encode_buffer[index]; + } + } + break; + + case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_SRGB): + for (x=0; x < num_pixels; ++x) + { + int pixel_index = x*channels; + + for (n = 0; n < num_nonalpha; n++) + { + int index = pixel_index + nonalpha[n]; + ((float*)output_buffer)[index] = stbir__linear_to_srgb(encode_buffer[index]); + } + + if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) + ((float*)output_buffer)[pixel_index + alpha_channel] = encode_buffer[pixel_index + alpha_channel]; + } + break; + + default: + STBIR_ASSERT(!"Unknown type/colorspace/channels combination."); + break; + } +} + +static void stbir__resample_vertical_upsample(stbir__info* stbir_info, int n) +{ + int x, k; + int output_w = stbir_info->output_w; + stbir__contributors* vertical_contributors = stbir_info->vertical_contributors; + float* vertical_coefficients = stbir_info->vertical_coefficients; + int channels = stbir_info->channels; + int alpha_channel = stbir_info->alpha_channel; + int type = stbir_info->type; + int colorspace = stbir_info->colorspace; + int ring_buffer_entries = stbir_info->ring_buffer_num_entries; + void* output_data = stbir_info->output_data; + float* encode_buffer = stbir_info->encode_buffer; + int decode = STBIR__DECODE(type, colorspace); + int coefficient_width = stbir_info->vertical_coefficient_width; + int coefficient_counter; + int contributor = n; + + float* ring_buffer = stbir_info->ring_buffer; + int ring_buffer_begin_index = stbir_info->ring_buffer_begin_index; + int ring_buffer_first_scanline = stbir_info->ring_buffer_first_scanline; + int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); + + int n0,n1, output_row_start; + int coefficient_group = coefficient_width * contributor; + + n0 = vertical_contributors[contributor].n0; + n1 = vertical_contributors[contributor].n1; + + output_row_start = n * stbir_info->output_stride_bytes; + + STBIR_ASSERT(stbir__use_height_upsampling(stbir_info)); + + memset(encode_buffer, 0, output_w * sizeof(float) * channels); + + // I tried reblocking this for better cache usage of encode_buffer + // (using x_outer, k, x_inner), but it lost speed. -- stb + + coefficient_counter = 0; + switch (channels) { + case 1: + for (k = n0; k <= n1; k++) + { + int coefficient_index = coefficient_counter++; + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + for (x = 0; x < output_w; ++x) + { + int in_pixel_index = x * 1; + encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; + } + } + break; + case 2: + for (k = n0; k <= n1; k++) + { + int coefficient_index = coefficient_counter++; + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + for (x = 0; x < output_w; ++x) + { + int in_pixel_index = x * 2; + encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; + encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; + } + } + break; + case 3: + for (k = n0; k <= n1; k++) + { + int coefficient_index = coefficient_counter++; + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + for (x = 0; x < output_w; ++x) + { + int in_pixel_index = x * 3; + encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; + encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; + encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient; + } + } + break; + case 4: + for (k = n0; k <= n1; k++) + { + int coefficient_index = coefficient_counter++; + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + for (x = 0; x < output_w; ++x) + { + int in_pixel_index = x * 4; + encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; + encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; + encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient; + encode_buffer[in_pixel_index + 3] += ring_buffer_entry[in_pixel_index + 3] * coefficient; + } + } + break; + default: + for (k = n0; k <= n1; k++) + { + int coefficient_index = coefficient_counter++; + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + for (x = 0; x < output_w; ++x) + { + int in_pixel_index = x * channels; + int c; + for (c = 0; c < channels; c++) + encode_buffer[in_pixel_index + c] += ring_buffer_entry[in_pixel_index + c] * coefficient; + } + } + break; + } + stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, encode_buffer, channels, alpha_channel, decode); +} + +static void stbir__resample_vertical_downsample(stbir__info* stbir_info, int n) +{ + int x, k; + int output_w = stbir_info->output_w; + stbir__contributors* vertical_contributors = stbir_info->vertical_contributors; + float* vertical_coefficients = stbir_info->vertical_coefficients; + int channels = stbir_info->channels; + int ring_buffer_entries = stbir_info->ring_buffer_num_entries; + float* horizontal_buffer = stbir_info->horizontal_buffer; + int coefficient_width = stbir_info->vertical_coefficient_width; + int contributor = n + stbir_info->vertical_filter_pixel_margin; + + float* ring_buffer = stbir_info->ring_buffer; + int ring_buffer_begin_index = stbir_info->ring_buffer_begin_index; + int ring_buffer_first_scanline = stbir_info->ring_buffer_first_scanline; + int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); + int n0,n1; + + n0 = vertical_contributors[contributor].n0; + n1 = vertical_contributors[contributor].n1; + + STBIR_ASSERT(!stbir__use_height_upsampling(stbir_info)); + + for (k = n0; k <= n1; k++) + { + int coefficient_index = k - n0; + int coefficient_group = coefficient_width * contributor; + float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; + + float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); + + switch (channels) { + case 1: + for (x = 0; x < output_w; x++) + { + int in_pixel_index = x * 1; + ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; + } + break; + case 2: + for (x = 0; x < output_w; x++) + { + int in_pixel_index = x * 2; + ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; + ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; + } + break; + case 3: + for (x = 0; x < output_w; x++) + { + int in_pixel_index = x * 3; + ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; + ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; + ring_buffer_entry[in_pixel_index + 2] += horizontal_buffer[in_pixel_index + 2] * coefficient; + } + break; + case 4: + for (x = 0; x < output_w; x++) + { + int in_pixel_index = x * 4; + ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; + ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; + ring_buffer_entry[in_pixel_index + 2] += horizontal_buffer[in_pixel_index + 2] * coefficient; + ring_buffer_entry[in_pixel_index + 3] += horizontal_buffer[in_pixel_index + 3] * coefficient; + } + break; + default: + for (x = 0; x < output_w; x++) + { + int in_pixel_index = x * channels; + + int c; + for (c = 0; c < channels; c++) + ring_buffer_entry[in_pixel_index + c] += horizontal_buffer[in_pixel_index + c] * coefficient; + } + break; + } + } +} + +static void stbir__buffer_loop_upsample(stbir__info* stbir_info) +{ + int y; + float scale_ratio = stbir_info->vertical_scale; + float out_scanlines_radius = stbir__filter_info_table[stbir_info->vertical_filter].support(1/scale_ratio) * scale_ratio; + + STBIR_ASSERT(stbir__use_height_upsampling(stbir_info)); + + for (y = 0; y < stbir_info->output_h; y++) + { + float in_center_of_out = 0; // Center of the current out scanline in the in scanline space + int in_first_scanline = 0, in_last_scanline = 0; + + stbir__calculate_sample_range_upsample(y, out_scanlines_radius, scale_ratio, stbir_info->vertical_shift, &in_first_scanline, &in_last_scanline, &in_center_of_out); + + STBIR_ASSERT(in_last_scanline - in_first_scanline + 1 <= stbir_info->ring_buffer_num_entries); + + if (stbir_info->ring_buffer_begin_index >= 0) + { + // Get rid of whatever we don't need anymore. + while (in_first_scanline > stbir_info->ring_buffer_first_scanline) + { + if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline) + { + // We just popped the last scanline off the ring buffer. + // Reset it to the empty state. + stbir_info->ring_buffer_begin_index = -1; + stbir_info->ring_buffer_first_scanline = 0; + stbir_info->ring_buffer_last_scanline = 0; + break; + } + else + { + stbir_info->ring_buffer_first_scanline++; + stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir_info->ring_buffer_num_entries; + } + } + } + + // Load in new ones. + if (stbir_info->ring_buffer_begin_index < 0) + stbir__decode_and_resample_upsample(stbir_info, in_first_scanline); + + while (in_last_scanline > stbir_info->ring_buffer_last_scanline) + stbir__decode_and_resample_upsample(stbir_info, stbir_info->ring_buffer_last_scanline + 1); + + // Now all buffers should be ready to write a row of vertical sampling. + stbir__resample_vertical_upsample(stbir_info, y); + + STBIR_PROGRESS_REPORT((float)y / stbir_info->output_h); + } +} + +static void stbir__empty_ring_buffer(stbir__info* stbir_info, int first_necessary_scanline) +{ + int output_stride_bytes = stbir_info->output_stride_bytes; + int channels = stbir_info->channels; + int alpha_channel = stbir_info->alpha_channel; + int type = stbir_info->type; + int colorspace = stbir_info->colorspace; + int output_w = stbir_info->output_w; + void* output_data = stbir_info->output_data; + int decode = STBIR__DECODE(type, colorspace); + + float* ring_buffer = stbir_info->ring_buffer; + int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); + + if (stbir_info->ring_buffer_begin_index >= 0) + { + // Get rid of whatever we don't need anymore. + while (first_necessary_scanline > stbir_info->ring_buffer_first_scanline) + { + if (stbir_info->ring_buffer_first_scanline >= 0 && stbir_info->ring_buffer_first_scanline < stbir_info->output_h) + { + int output_row_start = stbir_info->ring_buffer_first_scanline * output_stride_bytes; + float* ring_buffer_entry = stbir__get_ring_buffer_entry(ring_buffer, stbir_info->ring_buffer_begin_index, ring_buffer_length); + stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, ring_buffer_entry, channels, alpha_channel, decode); + STBIR_PROGRESS_REPORT((float)stbir_info->ring_buffer_first_scanline / stbir_info->output_h); + } + + if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline) + { + // We just popped the last scanline off the ring buffer. + // Reset it to the empty state. + stbir_info->ring_buffer_begin_index = -1; + stbir_info->ring_buffer_first_scanline = 0; + stbir_info->ring_buffer_last_scanline = 0; + break; + } + else + { + stbir_info->ring_buffer_first_scanline++; + stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir_info->ring_buffer_num_entries; + } + } + } +} + +static void stbir__buffer_loop_downsample(stbir__info* stbir_info) +{ + int y; + float scale_ratio = stbir_info->vertical_scale; + int output_h = stbir_info->output_h; + float in_pixels_radius = stbir__filter_info_table[stbir_info->vertical_filter].support(scale_ratio) / scale_ratio; + int pixel_margin = stbir_info->vertical_filter_pixel_margin; + int max_y = stbir_info->input_h + pixel_margin; + + STBIR_ASSERT(!stbir__use_height_upsampling(stbir_info)); + + for (y = -pixel_margin; y < max_y; y++) + { + float out_center_of_in; // Center of the current out scanline in the in scanline space + int out_first_scanline, out_last_scanline; + + stbir__calculate_sample_range_downsample(y, in_pixels_radius, scale_ratio, stbir_info->vertical_shift, &out_first_scanline, &out_last_scanline, &out_center_of_in); + + STBIR_ASSERT(out_last_scanline - out_first_scanline + 1 <= stbir_info->ring_buffer_num_entries); + + if (out_last_scanline < 0 || out_first_scanline >= output_h) + continue; + + stbir__empty_ring_buffer(stbir_info, out_first_scanline); + + stbir__decode_and_resample_downsample(stbir_info, y); + + // Load in new ones. + if (stbir_info->ring_buffer_begin_index < 0) + stbir__add_empty_ring_buffer_entry(stbir_info, out_first_scanline); + + while (out_last_scanline > stbir_info->ring_buffer_last_scanline) + stbir__add_empty_ring_buffer_entry(stbir_info, stbir_info->ring_buffer_last_scanline + 1); + + // Now the horizontal buffer is ready to write to all ring buffer rows. + stbir__resample_vertical_downsample(stbir_info, y); + } + + stbir__empty_ring_buffer(stbir_info, stbir_info->output_h); +} + +static void stbir__setup(stbir__info *info, int input_w, int input_h, int output_w, int output_h, int channels) +{ + info->input_w = input_w; + info->input_h = input_h; + info->output_w = output_w; + info->output_h = output_h; + info->channels = channels; +} + +static void stbir__calculate_transform(stbir__info *info, float s0, float t0, float s1, float t1, float *transform) +{ + info->s0 = s0; + info->t0 = t0; + info->s1 = s1; + info->t1 = t1; + + if (transform) + { + info->horizontal_scale = transform[0]; + info->vertical_scale = transform[1]; + info->horizontal_shift = transform[2]; + info->vertical_shift = transform[3]; + } + else + { + info->horizontal_scale = ((float)info->output_w / info->input_w) / (s1 - s0); + info->vertical_scale = ((float)info->output_h / info->input_h) / (t1 - t0); + + info->horizontal_shift = s0 * info->output_w / (s1 - s0); + info->vertical_shift = t0 * info->output_h / (t1 - t0); + } +} + +static void stbir__choose_filter(stbir__info *info, stbir_filter h_filter, stbir_filter v_filter) +{ + if (h_filter == 0) + h_filter = stbir__use_upsampling(info->horizontal_scale) ? STBIR_DEFAULT_FILTER_UPSAMPLE : STBIR_DEFAULT_FILTER_DOWNSAMPLE; + if (v_filter == 0) + v_filter = stbir__use_upsampling(info->vertical_scale) ? STBIR_DEFAULT_FILTER_UPSAMPLE : STBIR_DEFAULT_FILTER_DOWNSAMPLE; + info->horizontal_filter = h_filter; + info->vertical_filter = v_filter; +} + +static stbir_uint32 stbir__calculate_memory(stbir__info *info) +{ + int pixel_margin = stbir__get_filter_pixel_margin(info->horizontal_filter, info->horizontal_scale); + int filter_height = stbir__get_filter_pixel_width(info->vertical_filter, info->vertical_scale); + + info->horizontal_num_contributors = stbir__get_contributors(info->horizontal_scale, info->horizontal_filter, info->input_w, info->output_w); + info->vertical_num_contributors = stbir__get_contributors(info->vertical_scale , info->vertical_filter , info->input_h, info->output_h); + + // One extra entry because floating point precision problems sometimes cause an extra to be necessary. + info->ring_buffer_num_entries = filter_height + 1; + + info->horizontal_contributors_size = info->horizontal_num_contributors * sizeof(stbir__contributors); + info->horizontal_coefficients_size = stbir__get_total_horizontal_coefficients(info) * sizeof(float); + info->vertical_contributors_size = info->vertical_num_contributors * sizeof(stbir__contributors); + info->vertical_coefficients_size = stbir__get_total_vertical_coefficients(info) * sizeof(float); + info->decode_buffer_size = (info->input_w + pixel_margin * 2) * info->channels * sizeof(float); + info->horizontal_buffer_size = info->output_w * info->channels * sizeof(float); + info->ring_buffer_size = info->output_w * info->channels * info->ring_buffer_num_entries * sizeof(float); + info->encode_buffer_size = info->output_w * info->channels * sizeof(float); + + STBIR_ASSERT(info->horizontal_filter != 0); + STBIR_ASSERT(info->horizontal_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); // this now happens too late + STBIR_ASSERT(info->vertical_filter != 0); + STBIR_ASSERT(info->vertical_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); // this now happens too late + + if (stbir__use_height_upsampling(info)) + // The horizontal buffer is for when we're downsampling the height and we + // can't output the result of sampling the decode buffer directly into the + // ring buffers. + info->horizontal_buffer_size = 0; + else + // The encode buffer is to retain precision in the height upsampling method + // and isn't used when height downsampling. + info->encode_buffer_size = 0; + + return info->horizontal_contributors_size + info->horizontal_coefficients_size + + info->vertical_contributors_size + info->vertical_coefficients_size + + info->decode_buffer_size + info->horizontal_buffer_size + + info->ring_buffer_size + info->encode_buffer_size; +} + +static int stbir__resize_allocated(stbir__info *info, + const void* input_data, int input_stride_in_bytes, + void* output_data, int output_stride_in_bytes, + int alpha_channel, stbir_uint32 flags, stbir_datatype type, + stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace, + void* tempmem, size_t tempmem_size_in_bytes) +{ + size_t memory_required = stbir__calculate_memory(info); + + int width_stride_input = input_stride_in_bytes ? input_stride_in_bytes : info->channels * info->input_w * stbir__type_size[type]; + int width_stride_output = output_stride_in_bytes ? output_stride_in_bytes : info->channels * info->output_w * stbir__type_size[type]; + +#ifdef STBIR_DEBUG_OVERWRITE_TEST +#define OVERWRITE_ARRAY_SIZE 8 + unsigned char overwrite_output_before_pre[OVERWRITE_ARRAY_SIZE]; + unsigned char overwrite_tempmem_before_pre[OVERWRITE_ARRAY_SIZE]; + unsigned char overwrite_output_after_pre[OVERWRITE_ARRAY_SIZE]; + unsigned char overwrite_tempmem_after_pre[OVERWRITE_ARRAY_SIZE]; + + size_t begin_forbidden = width_stride_output * (info->output_h - 1) + info->output_w * info->channels * stbir__type_size[type]; + memcpy(overwrite_output_before_pre, &((unsigned char*)output_data)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE); + memcpy(overwrite_output_after_pre, &((unsigned char*)output_data)[begin_forbidden], OVERWRITE_ARRAY_SIZE); + memcpy(overwrite_tempmem_before_pre, &((unsigned char*)tempmem)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE); + memcpy(overwrite_tempmem_after_pre, &((unsigned char*)tempmem)[tempmem_size_in_bytes], OVERWRITE_ARRAY_SIZE); +#endif + + STBIR_ASSERT(info->channels >= 0); + STBIR_ASSERT(info->channels <= STBIR_MAX_CHANNELS); + + if (info->channels < 0 || info->channels > STBIR_MAX_CHANNELS) + return 0; + + STBIR_ASSERT(info->horizontal_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); + STBIR_ASSERT(info->vertical_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); + + if (info->horizontal_filter >= STBIR__ARRAY_SIZE(stbir__filter_info_table)) + return 0; + if (info->vertical_filter >= STBIR__ARRAY_SIZE(stbir__filter_info_table)) + return 0; + + if (alpha_channel < 0) + flags |= STBIR_FLAG_ALPHA_USES_COLORSPACE | STBIR_FLAG_ALPHA_PREMULTIPLIED; + + if (!(flags&STBIR_FLAG_ALPHA_USES_COLORSPACE) || !(flags&STBIR_FLAG_ALPHA_PREMULTIPLIED)) { + STBIR_ASSERT(alpha_channel >= 0 && alpha_channel < info->channels); + } + + if (alpha_channel >= info->channels) + return 0; + + STBIR_ASSERT(tempmem); + + if (!tempmem) + return 0; + + STBIR_ASSERT(tempmem_size_in_bytes >= memory_required); + + if (tempmem_size_in_bytes < memory_required) + return 0; + + memset(tempmem, 0, tempmem_size_in_bytes); + + info->input_data = input_data; + info->input_stride_bytes = width_stride_input; + + info->output_data = output_data; + info->output_stride_bytes = width_stride_output; + + info->alpha_channel = alpha_channel; + info->flags = flags; + info->type = type; + info->edge_horizontal = edge_horizontal; + info->edge_vertical = edge_vertical; + info->colorspace = colorspace; + + info->horizontal_coefficient_width = stbir__get_coefficient_width (info->horizontal_filter, info->horizontal_scale); + info->vertical_coefficient_width = stbir__get_coefficient_width (info->vertical_filter , info->vertical_scale ); + info->horizontal_filter_pixel_width = stbir__get_filter_pixel_width (info->horizontal_filter, info->horizontal_scale); + info->vertical_filter_pixel_width = stbir__get_filter_pixel_width (info->vertical_filter , info->vertical_scale ); + info->horizontal_filter_pixel_margin = stbir__get_filter_pixel_margin(info->horizontal_filter, info->horizontal_scale); + info->vertical_filter_pixel_margin = stbir__get_filter_pixel_margin(info->vertical_filter , info->vertical_scale ); + + info->ring_buffer_length_bytes = info->output_w * info->channels * sizeof(float); + info->decode_buffer_pixels = info->input_w + info->horizontal_filter_pixel_margin * 2; + +#define STBIR__NEXT_MEMPTR(current, newtype) (newtype*)(((unsigned char*)current) + current##_size) + + info->horizontal_contributors = (stbir__contributors *) tempmem; + info->horizontal_coefficients = STBIR__NEXT_MEMPTR(info->horizontal_contributors, float); + info->vertical_contributors = STBIR__NEXT_MEMPTR(info->horizontal_coefficients, stbir__contributors); + info->vertical_coefficients = STBIR__NEXT_MEMPTR(info->vertical_contributors, float); + info->decode_buffer = STBIR__NEXT_MEMPTR(info->vertical_coefficients, float); + + if (stbir__use_height_upsampling(info)) + { + info->horizontal_buffer = NULL; + info->ring_buffer = STBIR__NEXT_MEMPTR(info->decode_buffer, float); + info->encode_buffer = STBIR__NEXT_MEMPTR(info->ring_buffer, float); + + STBIR_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->encode_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); + } + else + { + info->horizontal_buffer = STBIR__NEXT_MEMPTR(info->decode_buffer, float); + info->ring_buffer = STBIR__NEXT_MEMPTR(info->horizontal_buffer, float); + info->encode_buffer = NULL; + + STBIR_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->ring_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); + } + +#undef STBIR__NEXT_MEMPTR + + // This signals that the ring buffer is empty + info->ring_buffer_begin_index = -1; + + stbir__calculate_filters(info->horizontal_contributors, info->horizontal_coefficients, info->horizontal_filter, info->horizontal_scale, info->horizontal_shift, info->input_w, info->output_w); + stbir__calculate_filters(info->vertical_contributors, info->vertical_coefficients, info->vertical_filter, info->vertical_scale, info->vertical_shift, info->input_h, info->output_h); + + STBIR_PROGRESS_REPORT(0); + + if (stbir__use_height_upsampling(info)) + stbir__buffer_loop_upsample(info); + else + stbir__buffer_loop_downsample(info); + + STBIR_PROGRESS_REPORT(1); + +#ifdef STBIR_DEBUG_OVERWRITE_TEST + STBIR_ASSERT(memcmp(overwrite_output_before_pre, &((unsigned char*)output_data)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE) == 0); + STBIR_ASSERT(memcmp(overwrite_output_after_pre, &((unsigned char*)output_data)[begin_forbidden], OVERWRITE_ARRAY_SIZE) == 0); + STBIR_ASSERT(memcmp(overwrite_tempmem_before_pre, &((unsigned char*)tempmem)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE) == 0); + STBIR_ASSERT(memcmp(overwrite_tempmem_after_pre, &((unsigned char*)tempmem)[tempmem_size_in_bytes], OVERWRITE_ARRAY_SIZE) == 0); +#endif + + return 1; +} + + +static int stbir__resize_arbitrary( + void *alloc_context, + const void* input_data, int input_w, int input_h, int input_stride_in_bytes, + void* output_data, int output_w, int output_h, int output_stride_in_bytes, + float s0, float t0, float s1, float t1, float *transform, + int channels, int alpha_channel, stbir_uint32 flags, stbir_datatype type, + stbir_filter h_filter, stbir_filter v_filter, + stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace) +{ + stbir__info info; + int result; + size_t memory_required; + void* extra_memory; + + stbir__setup(&info, input_w, input_h, output_w, output_h, channels); + stbir__calculate_transform(&info, s0,t0,s1,t1,transform); + stbir__choose_filter(&info, h_filter, v_filter); + memory_required = stbir__calculate_memory(&info); + extra_memory = STBIR_MALLOC(memory_required, alloc_context); + + if (!extra_memory) + return 0; + + result = stbir__resize_allocated(&info, input_data, input_stride_in_bytes, + output_data, output_stride_in_bytes, + alpha_channel, flags, type, + edge_horizontal, edge_vertical, + colorspace, extra_memory, memory_required); + + STBIR_FREE(extra_memory, alloc_context); + + return result; +} + +STBIRDEF int stbir_resize_uint8( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels) +{ + return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,-1,0, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, + STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_LINEAR); +} + +STBIRDEF int stbir_resize_float( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels) +{ + return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,-1,0, STBIR_TYPE_FLOAT, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, + STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_LINEAR); +} + +STBIRDEF int stbir_resize_uint8_srgb(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags) +{ + return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, + STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_SRGB); +} + +STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode) +{ + return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, + edge_wrap_mode, edge_wrap_mode, STBIR_COLORSPACE_SRGB); +} + +STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context) +{ + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, filter, filter, + edge_wrap_mode, edge_wrap_mode, space); +} + +STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context) +{ + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT16, filter, filter, + edge_wrap_mode, edge_wrap_mode, space); +} + + +STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + void *alloc_context) +{ + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_FLOAT, filter, filter, + edge_wrap_mode, edge_wrap_mode, space); +} + + +STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context) +{ + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,NULL,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, + edge_mode_horizontal, edge_mode_vertical, space); +} + + +STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context, + float x_scale, float y_scale, + float x_offset, float y_offset) +{ + float transform[4]; + transform[0] = x_scale; + transform[1] = y_scale; + transform[2] = x_offset; + transform[3] = y_offset; + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + 0,0,1,1,transform,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, + edge_mode_horizontal, edge_mode_vertical, space); +} + +STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_datatype datatype, + int num_channels, int alpha_channel, int flags, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_filter filter_horizontal, stbir_filter filter_vertical, + stbir_colorspace space, void *alloc_context, + float s0, float t0, float s1, float t1) +{ + return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + s0,t0,s1,t1,NULL,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, + edge_mode_horizontal, edge_mode_vertical, space); +} + +#endif // STB_IMAGE_RESIZE_IMPLEMENTATION + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ diff --git a/Step 3/include/engine/math/vectors.h b/Step 3/include/engine/math/vectors.h index 313d94f..ea4fa54 100644 --- a/Step 3/include/engine/math/vectors.h +++ b/Step 3/include/engine/math/vectors.h @@ -426,23 +426,6 @@ namespace Raytracing { // well they do but there isn't much of a reason to use them since this is for opengl class Mat4x4 { protected: - inline float m00(float d) { return data[0] = d; } - inline float m10(float d) { return data[1] = d; } - inline float m20(float d) { return data[2] = d; } - inline float m30(float d) { return data[3] = d; } - inline float m01(float d) { return data[4] = d; } - inline float m11(float d) { return data[5] = d; } - inline float m21(float d) { return data[6] = d; } - inline float m31(float d) { return data[7] = d; } - inline float m02(float d) { return data[8] = d; } - inline float m12(float d) { return data[9] = d; } - inline float m22(float d) { return data[10] = d; } - inline float m32(float d) { return data[11] = d; } - inline float m03(float d) { return data[12] = d; } - inline float m13(float d) { return data[13] = d; } - inline float m23(float d) { return data[14] = d; } - inline float m33(float d) { return data[15] = d; } - inline float m(int i, int j, float d) { return data[i * 16 + j] = d; }; // 4x4 = 16 float data[16]{}; friend Mat4x4 operator+(const Mat4x4& left, const Mat4x4& right); @@ -478,9 +461,9 @@ namespace Raytracing { } inline Mat4x4& translate(const Vec4& vec) { - m03(vec.x()); - m13(vec.y()); - m23(vec.z()); + m03(float(vec.x())); + m13(float(vec.y())); + m23(float(vec.z())); return *this; } @@ -492,9 +475,9 @@ namespace Raytracing { } inline Mat4x4& scale(const Vec4& vec) { - m00(vec.x()); - m11(vec.y()); - m22(vec.z()); + m00(float(vec.x())); + m11(float(vec.y())); + m22(float(vec.z())); return *this; } @@ -518,7 +501,24 @@ namespace Raytracing { [[nodiscard]] inline float m13() const { return data[13]; } [[nodiscard]] inline float m23() const { return data[14]; } [[nodiscard]] inline float m33() const { return data[15]; } - [[nodiscard]] inline float m(int i, int j) const { return data[i * 16 + j]; }; + [[nodiscard]] inline float m(int i, int j) const { return data[i + j * 4]; }; + inline float m00(float d) { return data[0] = d; } + inline float m10(float d) { return data[1] = d; } + inline float m20(float d) { return data[2] = d; } + inline float m30(float d) { return data[3] = d; } + inline float m01(float d) { return data[4] = d; } + inline float m11(float d) { return data[5] = d; } + inline float m21(float d) { return data[6] = d; } + inline float m31(float d) { return data[7] = d; } + inline float m02(float d) { return data[8] = d; } + inline float m12(float d) { return data[9] = d; } + inline float m22(float d) { return data[10] = d; } + inline float m32(float d) { return data[11] = d; } + inline float m03(float d) { return data[12] = d; } + inline float m13(float d) { return data[13] = d; } + inline float m23(float d) { return data[14] = d; } + inline float m33(float d) { return data[15] = d; } + inline float m(int i, int j, float d) { return data[i + j * 4] = d; }; }; // adds the two Mat4x4 left and right diff --git a/Step 3/include/engine/raytracing.h b/Step 3/include/engine/raytracing.h index d2956f2..f5f42a1 100644 --- a/Step 3/include/engine/raytracing.h +++ b/Step 3/include/engine/raytracing.h @@ -30,6 +30,11 @@ namespace Raytracing { PRECISION_TYPE viewportHeight; PRECISION_TYPE viewportWidth; PRECISION_TYPE focalLength = 1.0; + + const PRECISION_TYPE NEAR_PLANE = 0.1; + const PRECISION_TYPE FAR_PLANE = 500; + PRECISION_TYPE tanFovHalf; + PRECISION_TYPE frustumLength; Vec4 position{0, 0, 0}; Vec4 horizontalAxis; @@ -39,9 +44,11 @@ namespace Raytracing { Camera(PRECISION_TYPE fov, const Image& image): image(image), aspectRatio(double(image.getWidth()) / double(image.getHeight())) { // scale the viewport height based on the camera's FOV - viewportHeight = (2.0 * tan(degreeeToRadian(fov) / 2)); + tanFovHalf = tan(degreeeToRadian(fov) / 2); + viewportHeight = (2.0 * tanFovHalf); // with must respect the aspect ratio of the image, otherwise we'd get funky results viewportWidth = (aspectRatio * viewportHeight); + frustumLength = FAR_PLANE - NEAR_PLANE; // horizontal direction from the camera. used to translate the camera horizontalAxis = (Vec4{viewportWidth, 0, 0, 0}); // virtual direction, also used to translate the camera @@ -65,6 +72,87 @@ namespace Raytracing { void setPosition(const Vec4& pos) { this->position = pos; } void setRotation(PRECISION_TYPE yaw, PRECISION_TYPE pitch, PRECISION_TYPE roll); + [[nodiscard]] Mat4x4 project() const { + Mat4x4 project; + + // this should be all it takes to create a mostly correct projection matrix + project.m00(float(1.0 / (aspectRatio * tanFovHalf))); + project.m11(float(1.0 / tanFovHalf)); + project.m22(float(-((FAR_PLANE + NEAR_PLANE) / frustumLength))); + project.m23(-1); + project.m32(float(-((2 * NEAR_PLANE * FAR_PLANE) / frustumLength))); + //project.m33(0); + + return project; + } + Mat4x4 view(const Vec4& lookAtPos, const Vec4& up){ + Mat4x4 view; + auto w = (position - lookAtPos).normalize(); // forward + auto u = (Vec4::cross(up, w)).normalize(); // right + auto v = Vec4::cross(w, u); // up + + view.m00(float(w.x())); + view.m01(float(w.y())); + view.m02(float(w.z())); + view.m03(float(w.w())); + + view.m10(float(u.x())); + view.m11(float(u.y())); + view.m12(float(u.z())); + view.m13(float(u.w())); + + view.m20(float(v.x())); + view.m21(float(v.y())); + view.m22(float(v.z())); + view.m23(float(v.w())); + + // view matrix are inverted, dot product to simulate translate matrix multiplication + view.m30(-float(Vec4::dot(u, position))); + view.m31(-float(Vec4::dot(v, position))); + view.m32(-float(Vec4::dot(w, position))); + view.m33(1); + + return view; + } + Mat4x4 view(PRECISION_TYPE yaw, PRECISION_TYPE pitch) { + Mat4x4 view; + + pitch = degreeeToRadian(pitch); + yaw = degreeeToRadian(yaw); + + PRECISION_TYPE cosPitch = std::cos(pitch); + PRECISION_TYPE cosYaw = std::cos(yaw); + PRECISION_TYPE sinPitch = std::sin(pitch); + PRECISION_TYPE sinYaw = std::sin(yaw); + + auto x = Vec4{cosYaw, 0, -sinYaw}; // forward + auto y = Vec4{sinYaw * sinPitch, cosPitch, cosYaw * sinPitch}; // right + auto z = Vec4{sinYaw * cosPitch, -sinPitch, cosPitch * cosYaw}; // up + + view.m00(float(x.x())); + view.m01(float(x.y())); + view.m02(float(x.z())); + view.m03(float(x.w())); + + view.m10(float(y.x())); + view.m11(float(y.y())); + view.m12(float(y.z())); + view.m13(float(y.w())); + + view.m20(float(z.x())); + view.m21(float(z.y())); + view.m22(float(z.z())); + view.m23(float(z.w())); + + // view matrix are inverted, dot product to simulate translate matrix multiplication + view.m30(-float(Vec4::dot(x, position))); + view.m31(-float(Vec4::dot(y, position))); + view.m32(-float(Vec4::dot(z, position))); + view.m33(1); + + return view; + } + [[nodiscard]] inline Vec4 getPosition() const {return position;}; }; diff --git a/Step 3/include/engine/util/debug.h b/Step 3/include/engine/util/debug.h index 2c3b692..1fedc37 100644 --- a/Step 3/include/engine/util/debug.h +++ b/Step 3/include/engine/util/debug.h @@ -13,6 +13,10 @@ #define STEP_2_DEBUG_H #include "std.h" +#include +#ifdef COMPILE_GUI + #include +#endif namespace Raytracing { class profiler; diff --git a/Step 3/include/engine/world.h b/Step 3/include/engine/world.h index 4893c4f..6297e92 100644 --- a/Step 3/include/engine/world.h +++ b/Step 3/include/engine/world.h @@ -112,7 +112,7 @@ namespace Raytracing { * saving on computation */ // TODO: the above todo has been done, now we need to test the performance advantage of the BVH - //BVHTree* bvhTree = nullptr; + BVHTree* bvhTree = nullptr; std::unordered_map materials; public: World() = default; diff --git a/Step 3/include/graphics/debug_gui.h b/Step 3/include/graphics/debug_gui.h new file mode 100644 index 0000000..c6b15ce --- /dev/null +++ b/Step 3/include/graphics/debug_gui.h @@ -0,0 +1,20 @@ +/* + * Created by Brett Terpstra 6920201 on 30/10/22. + * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. + */ + +#ifndef STEP_3_DEBUG_GUI_H +#define STEP_3_DEBUG_GUI_H + +#include +#include + +namespace Raytracing { + class DebugUI { + public: + static void render(const std::function& generalTab); + static void registerTab(const std::string& name, const std::function& tabFunc); + }; +} + +#endif //STEP_3_DEBUG_GUI_H diff --git a/Step 3/include/graphics/gl/gl.h b/Step 3/include/graphics/gl/gl.h index e2265f1..ef218e8 100644 --- a/Step 3/include/graphics/gl/gl.h +++ b/Step 3/include/graphics/gl/gl.h @@ -10,19 +10,25 @@ #include #include #include -#include -#include -#include -#include "graphics/gl/glext.h" - -extern PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays; -extern PFNGLCREATEBUFFERSPROC glCreateBuffers; -extern PFNGLNAMEDBUFFERDATAPROC glNamedBufferData; -extern PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData; - -extern PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib; -extern PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding; -extern PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat; +#include +#include +#ifndef USE_GLFW + #include + #include + #include + #include "graphics/gl/glext.h" + + extern PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays; + extern PFNGLCREATEBUFFERSPROC glCreateBuffers; + extern PFNGLNAMEDBUFFERDATAPROC glNamedBufferData; + extern PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData; + + extern PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib; + extern PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding; + extern PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat; +#else + #include +#endif // since we are doing everything with raytracing // the purpose of these utility classes are purely for debug @@ -83,7 +89,7 @@ class VAO { // draws as if it where a fullscreen quad (literally used for that) void draw() const; // draw as if it's a box that we need to bulk draw. - void draw(const std::vector& positions); + void draw(Raytracing::Shader& shader, const std::vector& positions); ~VAO(); }; diff --git a/Step 3/include/graphics/gl/shader.h b/Step 3/include/graphics/gl/shader.h index 62d2ef0..16df4ef 100644 --- a/Step 3/include/graphics/gl/shader.h +++ b/Step 3/include/graphics/gl/shader.h @@ -8,10 +8,16 @@ #include "engine/util/std.h" #include "engine/math/vectors.h" -#include -#include -#include -#include +#include +#ifndef USE_GLFW + #include + #include + #include + #include +#else + #include +#endif + // opengl shader diff --git a/Step 3/include/graphics/graphics.h b/Step 3/include/graphics/graphics.h index 880b23a..e8b456e 100644 --- a/Step 3/include/graphics/graphics.h +++ b/Step 3/include/graphics/graphics.h @@ -11,16 +11,23 @@ // we are using the GLX extension to the X11 windowing system // instead of using external libs like GLFW and GLAD. // Wayland is not and will not be supported. -#include -#include -#include -#include -#include +#include +#ifndef USE_GLFW + #include + #include + #include + #include + #include + #include "graphics/imgui/imgui_impl_x11.h" +#else + #include + #include + #include "graphics/imgui/imgui_impl_glfw.h" +#endif #include #include #include #include -#include "graphics/imgui/imgui_impl_glfw.h" #include "graphics/imgui/imgui_impl_opengl3.h" #include #include @@ -30,6 +37,21 @@ namespace Raytracing { void drawQuad(); void deleteQuad(); + #ifdef USE_GLFW + class XWindow { + private: + GLFWwindow* window; + int m_displayWidth, m_displayHeight; + bool isCloseRequested = false; + public: + XWindow(int width, int height); + // runs X11 event processing and some GL commands used for window drawing + void runUpdates(const std::function& drawFunction); + [[nodiscard]] inline bool shouldWindowClose() const{ return isCloseRequested; } + void closeWindow(); + ~XWindow(); + }; + #else class XWindow { private: // X11 display itself @@ -78,6 +100,7 @@ namespace Raytracing { void closeWindow(); ~XWindow(); }; + #endif } #endif //STEP_3_GRAPHICS_H diff --git a/Step 3/include/graphics/imgui/imgui_impl_glfw.h b/Step 3/include/graphics/imgui/imgui_impl_glfw.h index 0d1ef3c..9f5e35c 100644 --- a/Step 3/include/graphics/imgui/imgui_impl_glfw.h +++ b/Step 3/include/graphics/imgui/imgui_impl_glfw.h @@ -1,15 +1,3 @@ -/* - * Created by Brett Terpstra 6920201 on 25/10/22. - * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. - * - * I HAVE MODIFIED THIS FILE SIGNIFICANTLY! - * I AM NOT USING GLFW - * BUT HAVE TAKEN THE BACKEND FOR IT AND ADAPTED IT FOR RAW X11 - */ - -#ifndef STEP_3_IMGUI_IMPL_GLFW_H -#define STEP_3_IMGUI_IMPL_GLFW_H - // dear imgui: Platform Backend for GLFW // This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..) // (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) @@ -25,27 +13,30 @@ // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. // Read online: https://github.com/ocornut/imgui/tree/master/docs -#include "graphics/imgui/imgui.h" // IMGUI_IMPL_API +#pragma once +#include "imgui.h" // IMGUI_IMPL_API +struct GLFWwindow; +struct GLFWmonitor; + +IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks); +IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks); +IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool install_callbacks); IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown(); -IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(double time, int display_w, int display_h, int w, int h); -IMGUI_IMPL_API bool ImGui_ImplGlfw_Init(); +IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(); // GLFW callbacks (installer) // - When calling Init with 'install_callbacks=true': ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any. // - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks. -IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(); -IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(); +IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window); +IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window); // GLFW callbacks (individual callbacks to call if you didn't install callbacks) -IMGUI_IMPL_API void ImGui_ImplGlfw_WindowFocusCallback(int focused); // Since 1.84 -IMGUI_IMPL_API void ImGui_ImplGlfw_CursorEnterCallback(int entered, bool cursorVisible); // Since 1.84 -IMGUI_IMPL_API void ImGui_ImplGlfw_CursorPosCallback(double x, double y, bool cursorVisible); // Since 1.87 -IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(unsigned int button, bool pressed, int mods); -IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(double xoffset, double yoffset); -IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(unsigned int key, int scancode, bool pressed, int mods); -IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(unsigned int c); -IMGUI_IMPL_API void ImGui_ImplGlfw_MonitorCallback(int event); -IMGUI_IMPL_API void ImGui_ImplGlfw_UpdateMouseData(bool cursorVisible, bool focused); - -#endif //STEP_3_IMGUI_IMPL_GLFW_H +IMGUI_IMPL_API void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused); // Since 1.84 +IMGUI_IMPL_API void ImGui_ImplGlfw_CursorEnterCallback(GLFWwindow* window, int entered); // Since 1.84 +IMGUI_IMPL_API void ImGui_ImplGlfw_CursorPosCallback(GLFWwindow* window, double x, double y); // Since 1.87 +IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods); +IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset); +IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods); +IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c); +IMGUI_IMPL_API void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor* monitor, int event); diff --git a/Step 3/include/graphics/imgui/imgui_impl_x11.h b/Step 3/include/graphics/imgui/imgui_impl_x11.h new file mode 100644 index 0000000..29854fd --- /dev/null +++ b/Step 3/include/graphics/imgui/imgui_impl_x11.h @@ -0,0 +1,51 @@ +/* + * Created by Brett Terpstra 6920201 on 25/10/22. + * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. + * + * I HAVE MODIFIED THIS FILE SIGNIFICANTLY! + * I AM NOT USING GLFW + * BUT HAVE TAKEN THE BACKEND FOR IT AND ADAPTED IT FOR RAW X11 + */ + +#ifndef STEP_3_IMGUI_IMPL_X11_H +#define STEP_3_IMGUI_IMPL_X11_H + +// dear imgui: Platform Backend for GLFW +// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..) +// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) + +// Implemented features: +// [X] Platform: Clipboard support. +// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy GLFW_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set] +// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. +// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange' (note: the resizing cursors requires GLFW 3.4+). + +// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. +// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. +// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. +// Read online: https://github.com/ocornut/imgui/tree/master/docs + +#include "graphics/imgui/imgui.h" // IMGUI_IMPL_API + +IMGUI_IMPL_API void ImGui_ImplX11_Shutdown(); +IMGUI_IMPL_API void ImGui_ImplX11_NewFrame(double time, int display_w, int display_h, int w, int h); +IMGUI_IMPL_API bool ImGui_ImplX11_Init(); + +// GLFW callbacks (installer) +// - When calling Init with 'install_callbacks=true': ImGui_ImplX11_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any. +// - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks. +IMGUI_IMPL_API void ImGui_ImplX11_InstallCallbacks(); +IMGUI_IMPL_API void ImGui_ImplX11_RestoreCallbacks(); + +// GLFW callbacks (individual callbacks to call if you didn't install callbacks) +IMGUI_IMPL_API void ImGui_ImplX11_WindowFocusCallback(int focused); // Since 1.84 +IMGUI_IMPL_API void ImGui_ImplX11_CursorEnterCallback(int entered, bool cursorVisible); // Since 1.84 +IMGUI_IMPL_API void ImGui_ImplX11_CursorPosCallback(double x, double y, bool cursorVisible); // Since 1.87 +IMGUI_IMPL_API void ImGui_ImplX11_MouseButtonCallback(unsigned int button, bool pressed, int mods); +IMGUI_IMPL_API void ImGui_ImplX11_ScrollCallback(double xoffset, double yoffset); +IMGUI_IMPL_API void ImGui_ImplX11_KeyCallback(unsigned int key, int scancode, bool pressed, int mods); +IMGUI_IMPL_API void ImGui_ImplX11_CharCallback(unsigned int c); +IMGUI_IMPL_API void ImGui_ImplX11_MonitorCallback(int event); +IMGUI_IMPL_API void ImGui_ImplX11_UpdateMouseData(bool cursorVisible, bool focused); + +#endif //STEP_3_IMGUI_IMPL_X11_H diff --git a/Step 3/resources/shaders/world.fs b/Step 3/resources/shaders/world.fs new file mode 100644 index 0000000..ef3cda7 --- /dev/null +++ b/Step 3/resources/shaders/world.fs @@ -0,0 +1,15 @@ +#version 330 core + +out vec4 FragColor; +in vec2 outUv; +in vec3 outNormal; + +uniform sampler2D tex; + +const vec3 lightDir = vec3(1.0, 1.0, 1.0); + +void main() { + vec4 textureColor = texture(tex, outUv); + //FragColor = vec4(textureColor.rgb, 1.0f); + FragColor = vec4(vec3(1.0, 0.0f, 0.0f) * dot(lightDir, outNormal), 1.0f); +} \ No newline at end of file diff --git a/Step 3/resources/shaders/world.vs b/Step 3/resources/shaders/world.vs new file mode 100644 index 0000000..2abaece --- /dev/null +++ b/Step 3/resources/shaders/world.vs @@ -0,0 +1,18 @@ +#version 330 core + +layout (location = 0) in vec3 inPos; +layout (location = 1) in vec2 inUv; +layout (location = 2) in vec3 inNormal; + +out vec2 outUv; +out vec3 outNormal; + +uniform mat4 transform; +uniform mat4 projectMatrix; +uniform mat4 ViewMatrix; + +void main() { + gl_Position = projectMatrix * ViewMatrix * transform * vec4(inPos, 1.0); + outUv = inUv; + outNormal = inNormal; +} \ No newline at end of file diff --git a/Step 3/src/engine/image/image.cpp b/Step 3/src/engine/image/image.cpp index 8b84aba..06c5f89 100644 --- a/Step 3/src/engine/image/image.cpp +++ b/Step 3/src/engine/image/image.cpp @@ -7,6 +7,9 @@ #include #define STB_IMAGE_WRITE_IMPLEMENTATION #include "engine/image/stb_image_write.h" +#include "engine/image/stb_image.h" +#define STB_IMAGE_RESIZE_IMPLEMENTATION +#include "engine/image/stb_image_resize.h" namespace Raytracing { @@ -91,4 +94,26 @@ namespace Raytracing { delete[](data); } } + ImageInput::ImageInput(const std::string& image) { + data = stbi_load(image.c_str(), &width, &height, &channels, 4); + } + unsigned long* ImageInput::getImageAsIconBuffer() { + const int size = 32; + unsigned char newData[size * size * channels]; + auto* returnData = new unsigned long[size * size + 2]; + stbir_resize_uint8(data, width, height, 0, newData, size, size, 0, channels); + int charPoint = 0; + returnData[charPoint++] = size; + returnData[charPoint++] = size; + for (int i = 0; i < size; i++){ + for (int j = 0; j < size; j++){ + unsigned long dtr = (((const unsigned long*) data)[i + j * size]); + returnData[i + j * size + 2] = (dtr >> 48) | (dtr << ((sizeof(unsigned long)*8) - 48)); + } + } + return returnData; + } + ImageInput::~ImageInput() { + stbi_image_free(data); + } } \ No newline at end of file diff --git a/Step 3/src/engine/main.cpp b/Step 3/src/engine/main.cpp index 055d2aa..ff9dec2 100644 --- a/Step 3/src/engine/main.cpp +++ b/Step 3/src/engine/main.cpp @@ -132,46 +132,78 @@ int main(int argc, char** args) { world.add(new Raytracing::ModelObject({0, 0, 5}, house, world.getMaterial("blueDiffuse"))); Raytracing::Raycaster raycaster{camera, image, world, parser}; - static bool started = false; + static bool started = false, debug = false; + static int maxRayBounce = 50; + static int raysPerPixel = 50; + raycaster.updateRayInfo(maxRayBounce, raysPerPixel); if (parser.hasOption("--gui") || parser.hasOption("-g")) { #ifdef COMPILE_GUI XWindow window(1440, 720); Texture mainImage(&image); + auto spiderVAO = new VAO(spider.toTriangles()); + auto houseVAO = new VAO(house.toTriangles()); + auto planeVAO = new VAO(plane.toTriangles()); Shader shader("../resources/shaders/basic.vs", "../resources/shaders/basic.fs"); + Shader worldShader("../resources/shaders/world.vs", "../resources/shaders/world.fs"); while (!window.shouldWindowClose()) { - window.runUpdates([&window, &mainImage, &shader, &raycaster, &parser]() -> void { + window.runUpdates([&window, &mainImage, &shader, &raycaster, &parser, &worldShader, &spiderVAO, &houseVAO, &planeVAO, &camera]() -> void { if (*haltExecution){window.closeWindow();} - ImGui::Begin("Debug"); - if (ImGui::Button("Start") && !started){ - started = true; - *haltRaytracing = false; - ilog << "Running raycaster!\n"; - if(parser.hasOption("--multi")) { - raycaster.runMulti(std::max(std::stoi(parser.getOptionValue("-t")), std::stoi(parser.getOptionValue("--threads")))); - } else { // we don't actually have to check for --single since it's implied to be default true. - raycaster.runSingle(); + DebugUI::render([&raycaster, &parser]() -> void { + if (ImGui::Button("Start") && !started){ + started = true; + *haltRaytracing = false; + ilog << "Running raycaster!\n"; + if(parser.hasOption("--multi")) { + raycaster.runMulti(std::max(std::stoi(parser.getOptionValue("-t")), std::stoi(parser.getOptionValue("--threads")))); + } else { // we don't actually have to check for --single since it's implied to be default true. + raycaster.runSingle(); + } } - } - if (ImGui::Checkbox("Pause", pauseRaytracing)){} - if (ImGui::Button("Stop") && started){ - *haltRaytracing = true; - started = false; - raycaster.deleteThreads(); - } - ImGui::End(); + if (ImGui::Checkbox("Pause", pauseRaytracing)){} + if (ImGui::Button("Stop") && started){ + *haltRaytracing = true; + started = false; + raycaster.deleteThreads(); + } + ImGui::NewLine(); + ImGui::InputInt("Max Ray Bounce", &maxRayBounce); + ImGui::InputInt("Rays Per Pixel", &raysPerPixel); + raycaster.updateRayInfo(maxRayBounce, raysPerPixel); + ImGui::Checkbox("Debug", &debug); + }); - - shader.use(); - mainImage.updateImage(); - mainImage.bind(); - mainImage.enableGlTextures(1); - drawQuad(); + if (debug){ + auto projection = camera.project(); + static float yaw = 0; + yaw += 1.0/60.0; + auto view = camera.view(yaw, 0); + worldShader.setMatrix("projectMatrix", projection); + worldShader.setMatrix("ViewMatrix", view); + worldShader.use(); + spiderVAO->bind(); + spiderVAO->draw(worldShader, {{0, 1, 0}}); + houseVAO->bind(); + houseVAO->draw(worldShader, {{5, 1, 0}, {0, 0, -5}, {0, 0, 5}}); + planeVAO->bind(); + planeVAO->draw(worldShader, {{-5, 0.5, 0}}); + } else { + shader.use(); + mainImage.updateImage(); + mainImage.bind(); + mainImage.enableGlTextures(1); + drawQuad(); + } mainImage.updateImage(); }); } + *haltExecution = true; + raycaster.join(); + delete(spiderVAO); + delete(houseVAO); + delete(planeVAO); #else flog << "Program not compiled with GUI support! Unable to continue!\n"; #endif diff --git a/Step 3/src/engine/raytracing.cpp b/Step 3/src/engine/raytracing.cpp index 9224895..24ff214 100644 --- a/Step 3/src/engine/raytracing.cpp +++ b/Step 3/src/engine/raytracing.cpp @@ -182,10 +182,8 @@ namespace Raytracing { PRECISION_TYPE sf = 1.0 / raysPerPixel; // apply pixel color with gamma correction image.setPixelColor(x, y, {std::sqrt(sf * color.r()), std::sqrt(sf * color.g()), std::sqrt(sf * color.b())}); - if (*haltExecution || *haltRaytracing) { - tlog << "Halting raytracing! " << *haltExecution << " " << *haltRaytracing << " " << i << "\n"; + if (*haltExecution || *haltRaytracing) return; - } while (*pauseRaytracing) // sleep for 1/60th of a second, or about 1 frame. std::this_thread::sleep_for(std::chrono::milliseconds(16)); } catch (std::exception& error) { @@ -196,7 +194,6 @@ namespace Raytracing { } j++; } - tlog << "ex threead " << i << "\n"; finishedThreads++; profiler::end("Raytracer Results", str.str()); })); diff --git a/Step 3/src/engine/world.cpp b/Step 3/src/engine/world.cpp index 1f3382c..48dcdcf 100644 --- a/Step 3/src/engine/world.cpp +++ b/Step 3/src/engine/world.cpp @@ -57,7 +57,8 @@ namespace Raytracing { } std::pair World::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const { - /*if (bvhTree != nullptr){ + // actually speeds up rendering by about 110,000ms (total across 16 threads) + if (bvhTree != nullptr){ auto hResult = HitData{false, Vec4(), Vec4(), max}; Object* objPtr = nullptr; @@ -86,7 +87,7 @@ namespace Raytracing { } return {hResult, objPtr}; - } else {*/ + } else { // rejection algo without using a binary space partitioning data structure auto hResult = HitData{false, Vec4(), Vec4(), max}; Object* objPtr = nullptr; @@ -100,11 +101,11 @@ namespace Raytracing { } } return {hResult, objPtr}; - //} + } } void World::generateBVH() { - //bvhTree = new BVHTree(objects); + bvhTree = new BVHTree(objects); } ScatterResults DiffuseMaterial::scatter(const Ray& ray, const HitData& hitData) const { diff --git a/Step 3/src/graphics/debug_gui.cpp b/Step 3/src/graphics/debug_gui.cpp new file mode 100644 index 0000000..e2e7357 --- /dev/null +++ b/Step 3/src/graphics/debug_gui.cpp @@ -0,0 +1,41 @@ +/* + * Created by Brett Terpstra 6920201 on 30/10/22. + * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. + */ +#include +#include +#include + +// this file is only included if the compile gui setting is enabled in CMake +namespace Raytracing { + + std::vector>> tabs; + + void DebugUI::render(const std::function& generalTab) { + if (ImGui::Begin("Debug Menu", nullptr, ImGuiWindowFlags_AlwaysAutoResize)){ + if (ImGui::BeginTabBar("debugTabs")){ + // Always have the general tab for starting / stopping the ray tracer + if (ImGui::BeginTabItem("General")) { + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, + ImGui::GetIO().Framerate); + generalTab(); + ImGui::EndTabItem(); + } + + // add any extra tabs after + for (const auto& tab: tabs) { + if (ImGui::BeginTabItem(tab.first.c_str())) { + tab.second(); + ImGui::EndTabItem(); + } + } + + ImGui::EndTabBar(); + } + } + ImGui::End(); + } + void DebugUI::registerTab(const std::string& name, const std::function& tabFunc) { + tabs.emplace_back(name, tabFunc); + } +} \ No newline at end of file diff --git a/Step 3/src/graphics/gl/gl.cpp b/Step 3/src/graphics/gl/gl.cpp index 031a273..b94cb73 100644 --- a/Step 3/src/graphics/gl/gl.cpp +++ b/Step 3/src/graphics/gl/gl.cpp @@ -6,8 +6,9 @@ #include #include #define STB_IMAGE_IMPLEMENTATION -#include +#include "engine/image/stb_image.h" +#ifndef USE_GLFW PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays; PFNGLCREATEBUFFERSPROC glCreateBuffers; PFNGLNAMEDBUFFERDATAPROC glNamedBufferData; @@ -29,6 +30,7 @@ void assignGLFunctionPointers() { glVertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC) glXGetProcAddress((unsigned char*) "glVertexArrayAttribFormat"); } +#endif unsigned int createVAO() { unsigned int vaoID; @@ -107,9 +109,6 @@ VAO::VAO(const std::vector& verts, const std::vector& uvs, const s // enable the attributes, prevents us from having to do this later. glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); - // redundant DSA nonsense. TODO: remove? my plan was to switch to GL4.6 idk if wise. - (*glEnableVertexArrayAttrib)(VaoID, 0); - (*glEnableVertexArrayAttrib)(VaoID, 1); // store index data storeData((int)indices.size(), indices.data()); // store vertex data @@ -119,14 +118,11 @@ VAO::VAO(const std::vector& verts, const std::vector& uvs, const s unbind(); } VAO::VAO(const std::vector& triangles): VaoID(createVAO()) { - this->drawCount = (int)triangles.size(); + this->drawCount = (int)triangles.size() * 3; glBindVertexArray(VaoID); // enable the attributes, prevents us from having to do this later. glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); - // redundant DSA nonsense. TODO: remove? my plan was to switch to GL4.6 idk if wise. - (*glEnableVertexArrayAttrib)(VaoID, 0); - (*glEnableVertexArrayAttrib)(VaoID, 1); // convert vertex data std::vector verts; std::vector uvs; @@ -173,12 +169,12 @@ VAO::VAO(const std::vector& triangles): VaoID(createVAO()) storeData(2, 3, 3 * sizeof(float), 0, (int)normals.size(), normals.data()); // create an instance buffer with a large number of positions (stored in matrices) // this way we don't have to expand it later, since I don't think I'll use 1k - createInstanceVBO(1000, sizeof(Raytracing::Mat4x4)); - // send the positions as attributes - addInstancedAttribute(3, 4, sizeof(Raytracing::Mat4x4), 0); - addInstancedAttribute(4, 4, sizeof(Raytracing::Mat4x4), 16); - addInstancedAttribute(5, 4, sizeof(Raytracing::Mat4x4), 32); - addInstancedAttribute(6, 4, sizeof(Raytracing::Mat4x4), 48); +// createInstanceVBO(1000, sizeof(Raytracing::Mat4x4)); +// // send the positions as attributes +// addInstancedAttribute(3, 4, sizeof(Raytracing::Mat4x4), 0); +// addInstancedAttribute(4, 4, sizeof(Raytracing::Mat4x4), 16); +// addInstancedAttribute(5, 4, sizeof(Raytracing::Mat4x4), 32); +// addInstancedAttribute(6, 4, sizeof(Raytracing::Mat4x4), 48); unbind(); } void VAO::bind() const { @@ -188,24 +184,30 @@ void VAO::unbind() { glBindVertexArray(0); VaoID; } -void VAO::draw(const std::vector& positions) { +void VAO::draw(Raytracing::Shader& shader, const std::vector& positions) { // this should only update if we are drawing with more positions than we already have allocated. - createInstanceVBO((int)positions.size(), sizeof(Raytracing::Mat4x4)); - std::vector data; - for (const Raytracing::Vec4& v : positions){ - // identity matrix - Raytracing::Mat4x4 mat4X4 {}; - // translate to position - mat4X4 = mat4X4.translate(v); - data.push_back(mat4X4); - } +// createInstanceVBO((int)positions.size(), sizeof(Raytracing::Mat4x4)); +// std::vector data; +// for (const Raytracing::Vec4& v : positions){ +// // identity matrix +// Raytracing::Mat4x4 mat4X4 {}; +// // translate to position +// mat4X4 = mat4X4.translate(v); +// data.push_back(mat4X4); +// } // send translated matrices as data to the GPU, TODO: since this will likely be used on static geometry, try making this more static! - glBindBuffer(GL_ARRAY_BUFFER, instanceVBO); - //glBufferData(GL_ARRAY_BUFFER, datas.size() * sizeof(LightData), NULL, GL_STREAM_DRAW); - glBufferSubData(GL_ARRAY_BUFFER, 0, (long)(data.size() * sizeof(Raytracing::Mat4x4)), &data[0]); - glBindBuffer(GL_ARRAY_BUFFER, 0); - // then finally draw - glDrawArraysInstanced(GL_TRIANGLES, 0, drawCount * 3, (int)positions.size()); +// glBindBuffer(GL_ARRAY_BUFFER, instanceVBO); +// //glBufferData(GL_ARRAY_BUFFER, datas.size() * sizeof(LightData), NULL, GL_STREAM_DRAW); +// glBufferSubData(GL_ARRAY_BUFFER, 0, (long)(data.size() * sizeof(Raytracing::Mat4x4)), &data[0]); +// glBindBuffer(GL_ARRAY_BUFFER, 0); +// // then finally draw + //glDrawArraysInstanced(GL_TRIANGLES, 0, drawCount * 3, (int)positions.size()); + for (const auto& v : positions) { + Raytracing::Mat4x4 transform {}; + transform.translate(v); + shader.setMatrix("transform", transform); + glDrawArrays(GL_TRIANGLES, 0, drawCount); + } } void VAO::draw() const { if (drawCount < 0) diff --git a/Step 3/src/graphics/graphics.cpp b/Step 3/src/graphics/graphics.cpp index 1c23cd9..6be71ca 100644 --- a/Step 3/src/graphics/graphics.cpp +++ b/Step 3/src/graphics/graphics.cpp @@ -4,8 +4,8 @@ */ #include #include -#include #include +#include "engine/image/stb_image.h" namespace Raytracing { @@ -61,10 +61,115 @@ namespace Raytracing { delete (quad); } - // unfortunately GLX doesn't provide a typedef for the context creation, so we must define our own. I've chosen to go with the same style as - // GL function pointers, "Pointer to the FunctioN GLX createContextAttribsARB PROCedure" - typedef GLXContext (* PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display*, GLXFBConfig, GLXContext, Bool, const int*); + struct ImageData { + unsigned char* data; + int width; + int height; + int channels; + }; + GLFWimage getImageData(const std::string& file) { + GLFWimage imager; + int channels = 0; + imager.pixels = stbi_load(file.c_str(), &imager.width, &imager.height, &channels, 4); + return imager; + } + + #ifdef USE_GLFW + XWindow::XWindow(int width, int height): m_displayWidth(width), m_displayHeight(height) { + // OpenGL 4.6 is like 5 years old at this point and most systems support it + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6); + // We only generated GLAD headers for GL core profile. Plus renderdoc only support core profile. + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + // Apple stuff. Not like apple supports GL4.6 anyways :/ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + glfwWindowHint(GLFW_VISIBLE, GL_TRUE); + glfwWindowHint(GLFW_DECORATED, GL_TRUE); + glfwWindowHint(GLFW_FOCUSED, GL_TRUE); + + glfwSetErrorCallback([](int error_code, const char* description) -> void { + elog << "GLFW Error: " << error_code << "\n\t" << description << "\n"; + }); + + if (!glfwInit()) + throw std::runtime_error("Unable to init GLFW!\n"); + + // create a window using the above settings, + window = glfwCreateWindow(width, height, "GLFW 3P93 Raytracing Project", NULL, NULL); + if (!window) + throw std::runtime_error("Unable to create GLFW window!\n"); + glfwMakeContextCurrent(window); + // enable V-Sync. + glfwSwapInterval(1); + // setup the callbacks we might use. + auto imageData16 = getImageData("../resources/icon/icon16.png"); + auto imageData32 = getImageData("../resources/icon/icon32.png"); + GLFWimage images[2]; + // TODO: delete STBI_resize + images[0] = imageData16; + images[1] = imageData32; + + glfwSetWindowIcon(window, 2, images); + stbi_image_free(imageData16.pixels); + stbi_image_free(imageData32.pixels); + + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + ImGui::StyleColorsDark(); + // create ImGUI GLFW instance and install the callbacks + ImGui_ImplGlfw_InitForOpenGL(window, true); + ImGui_ImplOpenGL3_Init("#version 130"); + + int version = gladLoadGL(glfwGetProcAddress); + if(!version) + throw std::runtime_error("Unable to load Glad GL!\n"); + + glfwShowWindow(window); + ilog << "Loaded GL" << GLAD_VERSION_MAJOR(version) << "." << GLAD_VERSION_MINOR(version) << "!\n"; + } + void XWindow::runUpdates(const std::function& drawFunction) { + // check for window events + isCloseRequested = glfwWindowShouldClose(window); + glfwPollEvents(); + // update window settings + glfwGetFramebufferSize(window, &m_displayWidth, &m_displayHeight); + glViewport(0, 0, m_displayWidth, m_displayHeight); + glClearColor(0.5, 0.7, 1.0, 1.0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glEnable(GL_DEPTH_TEST); + + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + ImGui::ShowDemoWindow(nullptr); + + drawFunction(); + + // Render ImGUI + ImGui::Render(); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + + glfwSwapBuffers(window); + } + void XWindow::closeWindow() { + if (isCloseRequested) + return; + tlog << "Closing window!\n"; + isCloseRequested = true; + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); + } + XWindow::~XWindow() { + closeWindow(); + } + #else XWindow::XWindow(int width, int height): m_width(width), m_height(height) { // open the DEFAULT display. We don't want to open a specific screen as that is annoying. dlog << "Creating X11 display!\n"; @@ -145,19 +250,47 @@ namespace Raytracing { CWColormap | CWEventMask, &xSetWindowAttributes); // install a error handler - // maybe we should set back the old one but i'd rather it goto std:err than crash the window + // maybe we should set back the old one but I'd rather it goto std:err than crash the window XSetErrorHandler([](Display* displayPtr, XErrorEvent* eventPtr) -> int { elog << "An error occurred while trying to setup X11: " << eventPtr->error_code << ";\n " << eventPtr->minor_code << ";\n " << eventPtr->request_code << "\n"; return 0; }); - // Now show the window - XMapWindow(display, window); XStoreName(display, window, "3P93 Raytracing Project"); + ImageInput image("../resources/icon/icon.png"); + auto* imageData = image.getImageAsIconBuffer(); + + auto hints = XAllocWMHints(); + hints->flags = IconPixmapHint | StateHint | IconPositionHint; + auto pixMapRob = XCreateBitmapFromData(display, window, (const char*) (icon_bits), 32, 32); + if (!pixMapRob) + flog << "Unable to create icon pixel map\n"; + hints->icon_pixmap = pixMapRob; + hints->initial_state = IconicState; + hints->icon_x = 0; + hints->icon_y = 0; + XSetWMHints(display, window, hints); + XFree(hints); + + int length = 32 * 32 + 2; + //int length = 16 * 16 * 4 + 32*32 * 4 + 4 * 4; + XChangeProperty(display, + window, + XInternAtom(display, "_NET_WM_ICON", False), + XInternAtom(display, "CARDINAL", False), + 32, + PropModeReplace, + (const unsigned char*) imageData, + length); + delete[](imageData); // there might actually be an argument to be made about X11 being outdated.... wmDelete = XInternAtom(display, "WM_DELETE_WINDOW", True); XSetWMProtocols(display, window, &wmDelete, 1); + + // Now show the window + XMapWindow(display, window); + // get the list of GLX extensions for this system const char* glExtensions = glXQueryExtensionsString(display, DefaultScreen(display)); // much in the same way that we get GL function pointers and use them we will do the same with the context creation @@ -181,7 +314,7 @@ namespace Raytracing { XSync(display, False); if (!glContext) flog << "Unable to create GL context!"; - if (glXIsDirect(display, glContext)){ + if (glXIsDirect(display, glContext)) { ilog << "A direct GL context was acquired!\n"; } else // direct contexts are faster than indirect! wlog << "Warning! Indirect context!\n"; @@ -193,7 +326,7 @@ namespace Raytracing { // we want to respect depth glEnable(GL_DEPTH_TEST); - assignGLFunctionPointers(); + //assignGLFunctionPointers(); //glEnableVertexArrayAttribPtr = glXGetProcAddress((unsigned char*)("glEnableVertexArrayAttrib")); // Setup Dear IMGUI @@ -323,4 +456,5 @@ namespace Raytracing { XDestroyWindow(display, window); XCloseDisplay(display); } + #endif } \ No newline at end of file diff --git a/Step 3/src/graphics/imgui/imgui_impl_glfw.cpp b/Step 3/src/graphics/imgui/imgui_impl_glfw.cpp index 396abcf..c415a61 100644 --- a/Step 3/src/graphics/imgui/imgui_impl_glfw.cpp +++ b/Step 3/src/graphics/imgui/imgui_impl_glfw.cpp @@ -1,13 +1,3 @@ -/* - * Created by Brett Terpstra 6920201 on 25/10/22. - * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. - * - * - * I HAVE MODIFIED THIS FILE SIGNIFICANTLY! - * I AM NOT USING GLFW - * BUT HAVE TAKEN THE BACKEND FOR IT AND ADAPTED IT FOR RAW X11 - * - */ // dear imgui: Platform Backend for GLFW // This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..) // (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) @@ -24,13 +14,105 @@ // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. // Read online: https://github.com/ocornut/imgui/tree/master/docs +// CHANGELOG +// (minor and older changes stripped away, please see git history for details) +// 2022-10-18: Perform a dummy glfwGetError() read to cancel missing mouse cursors errors. Using GLFW_VERSION_COMBINED directly. (#5785) +// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. +// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported). +// 2022-09-01: Inputs: Honor GLFW_CURSOR_DISABLED by not setting mouse position. +// 2022-04-30: Inputs: Fixed ImGui_ImplGlfw_TranslateUntranslatedKey() for lower case letters on OSX. +// 2022-03-23: Inputs: Fixed a regression in 1.87 which resulted in keyboard modifiers events being reported incorrectly on Linux/X11. +// 2022-02-07: Added ImGui_ImplGlfw_InstallCallbacks()/ImGui_ImplGlfw_RestoreCallbacks() helpers to facilitate user installing callbacks after initializing backend. +// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion. +// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[]. +// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+). +// 2022-01-17: Inputs: always update key mods next and before key event (not in NewFrame) to fix input queue with very low framerates. +// 2022-01-12: *BREAKING CHANGE*: Now using glfwSetCursorPosCallback(). If you called ImGui_ImplGlfw_InitXXX() with install_callbacks = false, you MUST install glfwSetCursorPosCallback() and forward it to the backend via ImGui_ImplGlfw_CursorPosCallback(). +// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range. +// 2022-01-05: Inputs: Converting GLFW untranslated keycodes back to translated keycodes (in the ImGui_ImplGlfw_KeyCallback() function) in order to match the behavior of every other backend, and facilitate the use of GLFW with lettered-shortcuts API. +// 2021-08-17: *BREAKING CHANGE*: Now using glfwSetWindowFocusCallback() to calling io.AddFocusEvent(). If you called ImGui_ImplGlfw_InitXXX() with install_callbacks = false, you MUST install glfwSetWindowFocusCallback() and forward it to the backend via ImGui_ImplGlfw_WindowFocusCallback(). +// 2021-07-29: *BREAKING CHANGE*: Now using glfwSetCursorEnterCallback(). MousePos is correctly reported when the host platform window is hovered but not focused. If you called ImGui_ImplGlfw_InitXXX() with install_callbacks = false, you MUST install glfwSetWindowFocusCallback() callback and forward it to the backend via ImGui_ImplGlfw_CursorEnterCallback(). +// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). +// 2020-01-17: Inputs: Disable error callback while assigning mouse cursors because some X11 setup don't have them and it generates errors. +// 2019-12-05: Inputs: Added support for new mouse cursors added in GLFW 3.4+ (resizing cursors, not allowed cursor). +// 2019-10-18: Misc: Previously installed user callbacks are now restored on shutdown. +// 2019-07-21: Inputs: Added mapping for ImGuiKey_KeyPadEnter. +// 2019-05-11: Inputs: Don't filter value from character callback before calling AddInputCharacter(). +// 2019-03-12: Misc: Preserve DisplayFramebufferScale when main window is minimized. +// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window. +// 2018-11-07: Inputs: When installing our GLFW callbacks, we save user's previously installed ones - if any - and chain call them. +// 2018-08-01: Inputs: Workaround for Emscripten which doesn't seem to handle focus related calls. +// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor. +// 2018-06-08: Misc: Extracted imgui_impl_glfw.cpp/.h away from the old combined GLFW+OpenGL/Vulkan examples. +// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag. +// 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value, passed to glfwSetCursor()). +// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves. +// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space. +// 2018-01-25: Inputs: Added gamepad support if ImGuiConfigFlags_NavEnableGamepad is set. +// 2018-01-25: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set). +// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support. +// 2018-01-18: Inputs: Added mapping for ImGuiKey_Insert. +// 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1). +// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers. #include "graphics/imgui/imgui.h" #include "graphics/imgui/imgui_impl_glfw.h" -#define XK_LATIN1 -#define XK_MISCELLANY -#include -#include + +// Clang warnings with -Weverything +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast +#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness +#endif + +// GLFW +#include +#ifdef _WIN32 +#undef APIENTRY +#define GLFW_EXPOSE_NATIVE_WIN32 +#include // for glfwGetWin32Window +#endif + +// We gather version tests as define in order to easily see which features are version-dependent. +#define GLFW_VERSION_COMBINED (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 + GLFW_VERSION_REVISION) +#ifdef GLFW_RESIZE_NESW_CURSOR // Let's be nice to people who pulled GLFW between 2019-04-16 (3.4 define) and 2019-11-29 (cursors defines) // FIXME: Remove when GLFW 3.4 is released? +#define GLFW_HAS_NEW_CURSORS (GLFW_VERSION_COMBINED >= 3400) // 3.4+ GLFW_RESIZE_ALL_CURSOR, GLFW_RESIZE_NESW_CURSOR, GLFW_RESIZE_NWSE_CURSOR, GLFW_NOT_ALLOWED_CURSOR +#else +#define GLFW_HAS_NEW_CURSORS (0) +#endif +#define GLFW_HAS_GAMEPAD_API (GLFW_VERSION_COMBINED >= 3300) // 3.3+ glfwGetGamepadState() new api +#define GLFW_HAS_GETKEYNAME (GLFW_VERSION_COMBINED >= 3200) // 3.2+ glfwGetKeyName() + +// GLFW data +enum GlfwClientApi +{ + GlfwClientApi_Unknown, + GlfwClientApi_OpenGL, + GlfwClientApi_Vulkan +}; + +struct ImGui_ImplGlfw_Data +{ + GLFWwindow* Window; + GlfwClientApi ClientApi; + double Time; + GLFWwindow* MouseWindow; + GLFWcursor* MouseCursors[ImGuiMouseCursor_COUNT]; + ImVec2 LastValidMousePos; + bool InstalledCallbacks; + + // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. + GLFWwindowfocusfun PrevUserCallbackWindowFocus; + GLFWcursorposfun PrevUserCallbackCursorPos; + GLFWcursorenterfun PrevUserCallbackCursorEnter; + GLFWmousebuttonfun PrevUserCallbackMousebutton; + GLFWscrollfun PrevUserCallbackScroll; + GLFWkeyfun PrevUserCallbackKey; + GLFWcharfun PrevUserCallbackChar; + GLFWmonitorfun PrevUserCallbackMonitor; + + ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); } +}; // Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts // It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts. @@ -39,201 +121,182 @@ // (passing install_callbacks=false in ImGui_ImplGlfw_InitXXX functions), set the current dear imgui context and then call our callbacks. // - Otherwise we may need to store a GLFWWindow* -> ImGuiContext* map and handle this in the backend, adding a little bit of extra complexity to it. // FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context. +static ImGui_ImplGlfw_Data* ImGui_ImplGlfw_GetBackendData() +{ + return ImGui::GetCurrentContext() ? (ImGui_ImplGlfw_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr; +} +// Functions +static const char* ImGui_ImplGlfw_GetClipboardText(void* user_data) +{ + return glfwGetClipboardString((GLFWwindow*)user_data); +} -//// Functions -//static const char* ImGui_ImplGlfw_GetClipboardText(void* data) { -//// auto sel = XInternAtom(display, "CLIPBOARD", false); -//// auto utf = XInternAtom(display, "UTF8_STRING", false); -//// Window WindowWithSelection = XGetSelectionOwner(display, sel); -//// if (WindowWithSelection == None) -//// return ""; -//// auto fake = XCreateSimpleWindow(display, root, -10, -10, 1, 1, 0, 0, 0); -//// auto fakeProperty = XInternAtom(display, "UGHX11", false); -//// XConvertSelection(display, sel, utf, fakeProperty, fake, CurrentTime); -//// int di; -//// unsigned long size, dul; -//// unsigned char* clipboard; -//// XGetWindowProperty(display, fake, fakeProperty, 0, 0, false, AnyPropertyType, &type, ) -//// TODO: -// return "\0"; -//} -// -//void ImGui_ImplGlfw_SetClipboardText(void* data) { -// // TODO: -// //glfwSetClipboardString((GLFWwindow*)user_data, text); -//} +static void ImGui_ImplGlfw_SetClipboardText(void* user_data, const char* text) +{ + glfwSetClipboardString((GLFWwindow*)user_data, text); +} -static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(unsigned int key) { - switch (key) { - case XK_Tab: return ImGuiKey_Tab; - case XK_Left: return ImGuiKey_LeftArrow; - case XK_Right: return ImGuiKey_RightArrow; - case XK_Up: return ImGuiKey_UpArrow; - case XK_Down: return ImGuiKey_DownArrow; - case XK_Page_Up: return ImGuiKey_PageUp; - case XK_Page_Down: return ImGuiKey_PageDown; - case XK_Home: return ImGuiKey_Home; - case XK_End: return ImGuiKey_End; - case XK_Insert: return ImGuiKey_Insert; - case XK_Delete: return ImGuiKey_Delete; - case XK_BackSpace: return ImGuiKey_Backspace; - case XK_space: return ImGuiKey_Space; - case XK_Return: return ImGuiKey_Enter; - case XK_Escape: return ImGuiKey_Escape; - case XK_apostrophe: return ImGuiKey_Apostrophe; - case XK_comma: return ImGuiKey_Comma; - case XK_minus: return ImGuiKey_Minus; - case XK_period: return ImGuiKey_Period; - case XK_slash: return ImGuiKey_Slash; - case XK_semicolon: return ImGuiKey_Semicolon; - case XK_equal: return ImGuiKey_Equal; - case XK_bracketleft: return ImGuiKey_LeftBracket; - case XK_backslash: return ImGuiKey_Backslash; - case XK_bracketright: return ImGuiKey_RightBracket; - case XK_grave: return ImGuiKey_GraveAccent; - case XK_Caps_Lock: return ImGuiKey_CapsLock; - case XK_Scroll_Lock: return ImGuiKey_ScrollLock; - case XK_Num_Lock: return ImGuiKey_NumLock; - case XK_Print: return ImGuiKey_PrintScreen; - case XK_Pause: return ImGuiKey_Pause; - case XK_KP_0: return ImGuiKey_Keypad0; - case XK_KP_1: return ImGuiKey_Keypad1; - case XK_KP_2: return ImGuiKey_Keypad2; - case XK_KP_3: return ImGuiKey_Keypad3; - case XK_KP_4: return ImGuiKey_Keypad4; - case XK_KP_5: return ImGuiKey_Keypad5; - case XK_KP_6: return ImGuiKey_Keypad6; - case XK_KP_7: return ImGuiKey_Keypad7; - case XK_KP_8: return ImGuiKey_Keypad8; - case XK_KP_9: return ImGuiKey_Keypad9; - case XK_KP_Decimal: return ImGuiKey_KeypadDecimal; - case XK_KP_Divide: return ImGuiKey_KeypadDivide; - case XK_KP_Multiply: return ImGuiKey_KeypadMultiply; - case XK_KP_Subtract: return ImGuiKey_KeypadSubtract; - case XK_KP_Add: return ImGuiKey_KeypadAdd; - case XK_KP_Enter: return ImGuiKey_KeypadEnter; - case XK_KP_Equal: return ImGuiKey_KeypadEqual; - case XK_Shift_L: return ImGuiKey_LeftShift; - case XK_Control_L: return ImGuiKey_LeftCtrl; - case XK_Alt_L: return ImGuiKey_LeftAlt; - case XK_Super_L: return ImGuiKey_LeftSuper; - case XK_Shift_R: return ImGuiKey_RightShift; - case XK_Control_R: return ImGuiKey_RightCtrl; - case XK_Alt_R: return ImGuiKey_RightAlt; - case XK_Super_R: return ImGuiKey_RightSuper; - case XK_Menu: return ImGuiKey_Menu; - case XK_0: return ImGuiKey_0; - case XK_1: return ImGuiKey_1; - case XK_2: return ImGuiKey_2; - case XK_3: return ImGuiKey_3; - case XK_4: return ImGuiKey_4; - case XK_5: return ImGuiKey_5; - case XK_6: return ImGuiKey_6; - case XK_7: return ImGuiKey_7; - case XK_8: return ImGuiKey_8; - case XK_9: return ImGuiKey_9; - case XK_A: return ImGuiKey_A; - case XK_B: return ImGuiKey_B; - case XK_C: return ImGuiKey_C; - case XK_D: return ImGuiKey_D; - case XK_E: return ImGuiKey_E; - case XK_F: return ImGuiKey_F; - case XK_G: return ImGuiKey_G; - case XK_H: return ImGuiKey_H; - case XK_I: return ImGuiKey_I; - case XK_J: return ImGuiKey_J; - case XK_K: return ImGuiKey_K; - case XK_L: return ImGuiKey_L; - case XK_M: return ImGuiKey_M; - case XK_N: return ImGuiKey_N; - case XK_O: return ImGuiKey_O; - case XK_P: return ImGuiKey_P; - case XK_Q: return ImGuiKey_Q; - case XK_R: return ImGuiKey_R; - case XK_S: return ImGuiKey_S; - case XK_T: return ImGuiKey_T; - case XK_U: return ImGuiKey_U; - case XK_V: return ImGuiKey_V; - case XK_W: return ImGuiKey_W; - case XK_X: return ImGuiKey_X; - case XK_Y: return ImGuiKey_Y; - case XK_Z: return ImGuiKey_Z; - case XK_a: return ImGuiKey_A; - case XK_b: return ImGuiKey_B; - case XK_c: return ImGuiKey_C; - case XK_d: return ImGuiKey_D; - case XK_e: return ImGuiKey_E; - case XK_f: return ImGuiKey_F; - case XK_g: return ImGuiKey_G; - case XK_h: return ImGuiKey_H; - case XK_i: return ImGuiKey_I; - case XK_j: return ImGuiKey_J; - case XK_k: return ImGuiKey_K; - case XK_l: return ImGuiKey_L; - case XK_m: return ImGuiKey_M; - case XK_n: return ImGuiKey_N; - case XK_o: return ImGuiKey_O; - case XK_p: return ImGuiKey_P; - case XK_q: return ImGuiKey_Q; - case XK_r: return ImGuiKey_R; - case XK_s: return ImGuiKey_S; - case XK_t: return ImGuiKey_T; - case XK_u: return ImGuiKey_U; - case XK_v: return ImGuiKey_V; - case XK_w: return ImGuiKey_W; - case XK_x: return ImGuiKey_X; - case XK_y: return ImGuiKey_Y; - case XK_z: return ImGuiKey_Z; - case XK_F1: return ImGuiKey_F1; - case XK_F2: return ImGuiKey_F2; - case XK_F3: return ImGuiKey_F3; - case XK_F4: return ImGuiKey_F4; - case XK_F5: return ImGuiKey_F5; - case XK_F6: return ImGuiKey_F6; - case XK_F7: return ImGuiKey_F7; - case XK_F8: return ImGuiKey_F8; - case XK_F9: return ImGuiKey_F9; - case XK_F10: return ImGuiKey_F10; - case XK_F11: return ImGuiKey_F11; - case XK_F12: return ImGuiKey_F12; +static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key) +{ + switch (key) + { + case GLFW_KEY_TAB: return ImGuiKey_Tab; + case GLFW_KEY_LEFT: return ImGuiKey_LeftArrow; + case GLFW_KEY_RIGHT: return ImGuiKey_RightArrow; + case GLFW_KEY_UP: return ImGuiKey_UpArrow; + case GLFW_KEY_DOWN: return ImGuiKey_DownArrow; + case GLFW_KEY_PAGE_UP: return ImGuiKey_PageUp; + case GLFW_KEY_PAGE_DOWN: return ImGuiKey_PageDown; + case GLFW_KEY_HOME: return ImGuiKey_Home; + case GLFW_KEY_END: return ImGuiKey_End; + case GLFW_KEY_INSERT: return ImGuiKey_Insert; + case GLFW_KEY_DELETE: return ImGuiKey_Delete; + case GLFW_KEY_BACKSPACE: return ImGuiKey_Backspace; + case GLFW_KEY_SPACE: return ImGuiKey_Space; + case GLFW_KEY_ENTER: return ImGuiKey_Enter; + case GLFW_KEY_ESCAPE: return ImGuiKey_Escape; + case GLFW_KEY_APOSTROPHE: return ImGuiKey_Apostrophe; + case GLFW_KEY_COMMA: return ImGuiKey_Comma; + case GLFW_KEY_MINUS: return ImGuiKey_Minus; + case GLFW_KEY_PERIOD: return ImGuiKey_Period; + case GLFW_KEY_SLASH: return ImGuiKey_Slash; + case GLFW_KEY_SEMICOLON: return ImGuiKey_Semicolon; + case GLFW_KEY_EQUAL: return ImGuiKey_Equal; + case GLFW_KEY_LEFT_BRACKET: return ImGuiKey_LeftBracket; + case GLFW_KEY_BACKSLASH: return ImGuiKey_Backslash; + case GLFW_KEY_RIGHT_BRACKET: return ImGuiKey_RightBracket; + case GLFW_KEY_GRAVE_ACCENT: return ImGuiKey_GraveAccent; + case GLFW_KEY_CAPS_LOCK: return ImGuiKey_CapsLock; + case GLFW_KEY_SCROLL_LOCK: return ImGuiKey_ScrollLock; + case GLFW_KEY_NUM_LOCK: return ImGuiKey_NumLock; + case GLFW_KEY_PRINT_SCREEN: return ImGuiKey_PrintScreen; + case GLFW_KEY_PAUSE: return ImGuiKey_Pause; + case GLFW_KEY_KP_0: return ImGuiKey_Keypad0; + case GLFW_KEY_KP_1: return ImGuiKey_Keypad1; + case GLFW_KEY_KP_2: return ImGuiKey_Keypad2; + case GLFW_KEY_KP_3: return ImGuiKey_Keypad3; + case GLFW_KEY_KP_4: return ImGuiKey_Keypad4; + case GLFW_KEY_KP_5: return ImGuiKey_Keypad5; + case GLFW_KEY_KP_6: return ImGuiKey_Keypad6; + case GLFW_KEY_KP_7: return ImGuiKey_Keypad7; + case GLFW_KEY_KP_8: return ImGuiKey_Keypad8; + case GLFW_KEY_KP_9: return ImGuiKey_Keypad9; + case GLFW_KEY_KP_DECIMAL: return ImGuiKey_KeypadDecimal; + case GLFW_KEY_KP_DIVIDE: return ImGuiKey_KeypadDivide; + case GLFW_KEY_KP_MULTIPLY: return ImGuiKey_KeypadMultiply; + case GLFW_KEY_KP_SUBTRACT: return ImGuiKey_KeypadSubtract; + case GLFW_KEY_KP_ADD: return ImGuiKey_KeypadAdd; + case GLFW_KEY_KP_ENTER: return ImGuiKey_KeypadEnter; + case GLFW_KEY_KP_EQUAL: return ImGuiKey_KeypadEqual; + case GLFW_KEY_LEFT_SHIFT: return ImGuiKey_LeftShift; + case GLFW_KEY_LEFT_CONTROL: return ImGuiKey_LeftCtrl; + case GLFW_KEY_LEFT_ALT: return ImGuiKey_LeftAlt; + case GLFW_KEY_LEFT_SUPER: return ImGuiKey_LeftSuper; + case GLFW_KEY_RIGHT_SHIFT: return ImGuiKey_RightShift; + case GLFW_KEY_RIGHT_CONTROL: return ImGuiKey_RightCtrl; + case GLFW_KEY_RIGHT_ALT: return ImGuiKey_RightAlt; + case GLFW_KEY_RIGHT_SUPER: return ImGuiKey_RightSuper; + case GLFW_KEY_MENU: return ImGuiKey_Menu; + case GLFW_KEY_0: return ImGuiKey_0; + case GLFW_KEY_1: return ImGuiKey_1; + case GLFW_KEY_2: return ImGuiKey_2; + case GLFW_KEY_3: return ImGuiKey_3; + case GLFW_KEY_4: return ImGuiKey_4; + case GLFW_KEY_5: return ImGuiKey_5; + case GLFW_KEY_6: return ImGuiKey_6; + case GLFW_KEY_7: return ImGuiKey_7; + case GLFW_KEY_8: return ImGuiKey_8; + case GLFW_KEY_9: return ImGuiKey_9; + case GLFW_KEY_A: return ImGuiKey_A; + case GLFW_KEY_B: return ImGuiKey_B; + case GLFW_KEY_C: return ImGuiKey_C; + case GLFW_KEY_D: return ImGuiKey_D; + case GLFW_KEY_E: return ImGuiKey_E; + case GLFW_KEY_F: return ImGuiKey_F; + case GLFW_KEY_G: return ImGuiKey_G; + case GLFW_KEY_H: return ImGuiKey_H; + case GLFW_KEY_I: return ImGuiKey_I; + case GLFW_KEY_J: return ImGuiKey_J; + case GLFW_KEY_K: return ImGuiKey_K; + case GLFW_KEY_L: return ImGuiKey_L; + case GLFW_KEY_M: return ImGuiKey_M; + case GLFW_KEY_N: return ImGuiKey_N; + case GLFW_KEY_O: return ImGuiKey_O; + case GLFW_KEY_P: return ImGuiKey_P; + case GLFW_KEY_Q: return ImGuiKey_Q; + case GLFW_KEY_R: return ImGuiKey_R; + case GLFW_KEY_S: return ImGuiKey_S; + case GLFW_KEY_T: return ImGuiKey_T; + case GLFW_KEY_U: return ImGuiKey_U; + case GLFW_KEY_V: return ImGuiKey_V; + case GLFW_KEY_W: return ImGuiKey_W; + case GLFW_KEY_X: return ImGuiKey_X; + case GLFW_KEY_Y: return ImGuiKey_Y; + case GLFW_KEY_Z: return ImGuiKey_Z; + case GLFW_KEY_F1: return ImGuiKey_F1; + case GLFW_KEY_F2: return ImGuiKey_F2; + case GLFW_KEY_F3: return ImGuiKey_F3; + case GLFW_KEY_F4: return ImGuiKey_F4; + case GLFW_KEY_F5: return ImGuiKey_F5; + case GLFW_KEY_F6: return ImGuiKey_F6; + case GLFW_KEY_F7: return ImGuiKey_F7; + case GLFW_KEY_F8: return ImGuiKey_F8; + case GLFW_KEY_F9: return ImGuiKey_F9; + case GLFW_KEY_F10: return ImGuiKey_F10; + case GLFW_KEY_F11: return ImGuiKey_F11; + case GLFW_KEY_F12: return ImGuiKey_F12; default: return ImGuiKey_None; } } -int ImGui_ImplGlfw_KeyToModifier(unsigned int key) { - if (key == XK_Control_L || key == XK_Control_R) - return RT_CONTROL; - if (key == XK_Shift_L || key == XK_Shift_R) - return RT_SHIFT; - if (key == XK_Alt_L || key == XK_Alt_R) - return RT_ALT; - if (key == XK_Super_L || key == XK_Super_R) - return RT_SUPER; +static int ImGui_ImplGlfw_KeyToModifier(int key) +{ + if (key == GLFW_KEY_LEFT_CONTROL || key == GLFW_KEY_RIGHT_CONTROL) + return GLFW_MOD_CONTROL; + if (key == GLFW_KEY_LEFT_SHIFT || key == GLFW_KEY_RIGHT_SHIFT) + return GLFW_MOD_SHIFT; + if (key == GLFW_KEY_LEFT_ALT || key == GLFW_KEY_RIGHT_ALT) + return GLFW_MOD_ALT; + if (key == GLFW_KEY_LEFT_SUPER || key == GLFW_KEY_RIGHT_SUPER) + return GLFW_MOD_SUPER; return 0; } -void ImGui_ImplGlfw_UpdateKeyModifiers(int mods) +static void ImGui_ImplGlfw_UpdateKeyModifiers(int mods) { ImGuiIO& io = ImGui::GetIO(); - io.AddKeyEvent(ImGuiModFlags_Ctrl, (mods & RT_CONTROL) != 0); - io.AddKeyEvent(ImGuiModFlags_Shift, (mods & RT_SHIFT) != 0); - io.AddKeyEvent(ImGuiModFlags_Alt, (mods & RT_ALT) != 0); - io.AddKeyEvent(ImGuiModFlags_Super, (mods & RT_SUPER) != 0); + io.AddKeyEvent(ImGuiKey_ModCtrl, (mods & GLFW_MOD_CONTROL) != 0); + io.AddKeyEvent(ImGuiKey_ModShift, (mods & GLFW_MOD_SHIFT) != 0); + io.AddKeyEvent(ImGuiKey_ModAlt, (mods & GLFW_MOD_ALT) != 0); + io.AddKeyEvent(ImGuiKey_ModSuper, (mods & GLFW_MOD_SUPER) != 0); } -void ImGui_ImplGlfw_MouseButtonCallback(unsigned int button, bool press, int mods) { +void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackMousebutton != nullptr && window == bd->Window) + bd->PrevUserCallbackMousebutton(window, button, action, mods); + + ImGui_ImplGlfw_UpdateKeyModifiers(mods); + ImGuiIO& io = ImGui::GetIO(); - if (button < ImGuiMouseButton_COUNT) - io.AddMouseButtonEvent((int)button, press); + if (button >= 0 && button < ImGuiMouseButton_COUNT) + io.AddMouseButtonEvent(button, action == GLFW_PRESS); } -void ImGui_ImplGlfw_ScrollCallback(double xoffset, double yoffset) { +void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackScroll != nullptr && window == bd->Window) + bd->PrevUserCallbackScroll(window, xoffset, yoffset); + ImGuiIO& io = ImGui::GetIO(); io.AddMouseWheelEvent((float)xoffset, (float)yoffset); } -static int ImGui_ImplGlfw_TranslateUntranslatedKey(unsigned int key, int scancode) { +static int ImGui_ImplGlfw_TranslateUntranslatedKey(int key, int scancode) +{ #if GLFW_HAS_GETKEYNAME && !defined(__EMSCRIPTEN__) // GLFW 3.1+ attempts to "untranslate" keys, which goes the opposite of what every other framework does, making using lettered shortcuts difficult. // (It had reasons to do so: namely GLFW is/was more likely to be used for WASD-type game controls rather than lettered shortcuts, but IHMO the 3.1 change could have been done differently) @@ -260,87 +323,162 @@ static int ImGui_ImplGlfw_TranslateUntranslatedKey(unsigned int key, int scancod return key; } -void ImGui_ImplGlfw_KeyCallback(unsigned int keycode, int scancode, bool press, int mods) { +void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int scancode, int action, int mods) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackKey != nullptr && window == bd->Window) + bd->PrevUserCallbackKey(window, keycode, scancode, action, mods); + + if (action != GLFW_PRESS && action != GLFW_RELEASE) + return; + // Workaround: X11 does not include current pressed/released modifier key in 'mods' flags. https://github.com/glfw/glfw/issues/1630 if (int keycode_to_mod = ImGui_ImplGlfw_KeyToModifier(keycode)) - mods = (press) ? (mods | keycode_to_mod) : (mods & ~keycode_to_mod); + mods = (action == GLFW_PRESS) ? (mods | keycode_to_mod) : (mods & ~keycode_to_mod); ImGui_ImplGlfw_UpdateKeyModifiers(mods); - //keycode = ImGui_ImplGlfw_TranslateUntranslatedKey(keycode, scancode); + keycode = ImGui_ImplGlfw_TranslateUntranslatedKey(keycode, scancode); ImGuiIO& io = ImGui::GetIO(); ImGuiKey imgui_key = ImGui_ImplGlfw_KeyToImGuiKey(keycode); - if (!press && ((keycode < 127 && keycode > 80) || (keycode < 64 && keycode > 31))) - io.AddInputCharacter(keycode); - io.AddKeyEvent(imgui_key, press); - io.SetKeyEventNativeData(imgui_key, (int)keycode, scancode); // To support legacy indexing (<1.87 user code) + io.AddKeyEvent(imgui_key, (action == GLFW_PRESS)); + io.SetKeyEventNativeData(imgui_key, keycode, scancode); // To support legacy indexing (<1.87 user code) } -void ImGui_ImplGlfw_WindowFocusCallback(int focused) { +void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackWindowFocus != nullptr && window == bd->Window) + bd->PrevUserCallbackWindowFocus(window, focused); + ImGuiIO& io = ImGui::GetIO(); io.AddFocusEvent(focused != 0); } -void ImGui_ImplGlfw_CursorPosCallback(double x, double y, bool cursorVisible) { - if (!cursorVisible) - return; - ImGuiIO& io = ImGui::GetIO(); - io.AddMousePosEvent((float)x, (float)y); -} - -ImVec2 LastValidMousePos {0, 0}; - -// Workaround: X11 seems to send spurious Leave/Enter events which would make us lose our position, -// so we back it up and restore on Leave/Enter (see https://github.com/ocornut/imgui/issues/4984) -void ImGui_ImplGlfw_CursorEnterCallback(int entered, bool cursorVisible) { - if (!cursorVisible) +void ImGui_ImplGlfw_CursorPosCallback(GLFWwindow* window, double x, double y) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackCursorPos != nullptr && window == bd->Window) + bd->PrevUserCallbackCursorPos(window, x, y); + if (glfwGetInputMode(window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED) return; ImGuiIO& io = ImGui::GetIO(); - if (entered) { - io.AddMousePosEvent(LastValidMousePos.x, LastValidMousePos.y); - } else { - LastValidMousePos = io.MousePos; + io.AddMousePosEvent((float)x, (float)y); + bd->LastValidMousePos = ImVec2((float)x, (float)y); +} + +// Workaround: X11 seems to send spurious Leave/Enter events which would make us lose our position, +// so we back it up and restore on Leave/Enter (see https://github.com/ocornut/imgui/issues/4984) +void ImGui_ImplGlfw_CursorEnterCallback(GLFWwindow* window, int entered) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackCursorEnter != nullptr && window == bd->Window) + bd->PrevUserCallbackCursorEnter(window, entered); + if (glfwGetInputMode(window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED) + return; + + ImGuiIO& io = ImGui::GetIO(); + if (entered) + { + bd->MouseWindow = window; + io.AddMousePosEvent(bd->LastValidMousePos.x, bd->LastValidMousePos.y); + } + else if (!entered && bd->MouseWindow == window) + { + bd->LastValidMousePos = io.MousePos; + bd->MouseWindow = nullptr; io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); } } -void ImGui_ImplGlfw_CharCallback(unsigned int c) { +void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + if (bd->PrevUserCallbackChar != nullptr && window == bd->Window) + bd->PrevUserCallbackChar(window, c); + ImGuiIO& io = ImGui::GetIO(); io.AddInputCharacter(c); } -void ImGui_ImplGlfw_MonitorCallback(int) { +void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor*, int) +{ // Unused in 'master' branch but 'docking' branch will use this, so we declare it ahead of it so if you have to install callbacks you can install this one too. } -void ImGui_ImplGlfw_InstallCallbacks() { +void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + IM_ASSERT(bd->InstalledCallbacks == false && "Callbacks already installed!"); + IM_ASSERT(bd->Window == window); + + bd->PrevUserCallbackWindowFocus = glfwSetWindowFocusCallback(window, ImGui_ImplGlfw_WindowFocusCallback); + bd->PrevUserCallbackCursorEnter = glfwSetCursorEnterCallback(window, ImGui_ImplGlfw_CursorEnterCallback); + bd->PrevUserCallbackCursorPos = glfwSetCursorPosCallback(window, ImGui_ImplGlfw_CursorPosCallback); + bd->PrevUserCallbackMousebutton = glfwSetMouseButtonCallback(window, ImGui_ImplGlfw_MouseButtonCallback); + bd->PrevUserCallbackScroll = glfwSetScrollCallback(window, ImGui_ImplGlfw_ScrollCallback); + bd->PrevUserCallbackKey = glfwSetKeyCallback(window, ImGui_ImplGlfw_KeyCallback); + bd->PrevUserCallbackChar = glfwSetCharCallback(window, ImGui_ImplGlfw_CharCallback); + bd->PrevUserCallbackMonitor = glfwSetMonitorCallback(ImGui_ImplGlfw_MonitorCallback); + bd->InstalledCallbacks = true; } -void ImGui_ImplGlfw_RestoreCallbacks() { - +void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + IM_ASSERT(bd->InstalledCallbacks == true && "Callbacks not installed!"); + IM_ASSERT(bd->Window == window); + + glfwSetWindowFocusCallback(window, bd->PrevUserCallbackWindowFocus); + glfwSetCursorEnterCallback(window, bd->PrevUserCallbackCursorEnter); + glfwSetCursorPosCallback(window, bd->PrevUserCallbackCursorPos); + glfwSetMouseButtonCallback(window, bd->PrevUserCallbackMousebutton); + glfwSetScrollCallback(window, bd->PrevUserCallbackScroll); + glfwSetKeyCallback(window, bd->PrevUserCallbackKey); + glfwSetCharCallback(window, bd->PrevUserCallbackChar); + glfwSetMonitorCallback(bd->PrevUserCallbackMonitor); + bd->InstalledCallbacks = false; + bd->PrevUserCallbackWindowFocus = nullptr; + bd->PrevUserCallbackCursorEnter = nullptr; + bd->PrevUserCallbackCursorPos = nullptr; + bd->PrevUserCallbackMousebutton = nullptr; + bd->PrevUserCallbackScroll = nullptr; + bd->PrevUserCallbackKey = nullptr; + bd->PrevUserCallbackChar = nullptr; + bd->PrevUserCallbackMonitor = nullptr; } -bool ImGui_ImplGlfw_Init() { +static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, GlfwClientApi client_api) +{ ImGuiIO& io = ImGui::GetIO(); IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!"); //printf("GLFW_VERSION: %d.%d.%d (%d)", GLFW_VERSION_MAJOR, GLFW_VERSION_MINOR, GLFW_VERSION_REVISION, GLFW_VERSION_COMBINED); // Setup backend capabilities flags + ImGui_ImplGlfw_Data* bd = IM_NEW(ImGui_ImplGlfw_Data)(); + io.BackendPlatformUserData = (void*)bd; io.BackendPlatformName = "imgui_impl_glfw"; io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional) io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used) - // TODO - //io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; - //io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; - //io.ClipboardUserData = bd->Window; + bd->Window = window; + bd->Time = 0.0; + + io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; + io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; + io.ClipboardUserData = bd->Window; + + // Set platform dependent data in viewport +#if defined(_WIN32) + ImGui::GetMainViewport()->PlatformHandleRaw = (void*)glfwGetWin32Window(bd->Window); +#endif // Create mouse cursors // (By design, on X11 cursors are user configurable and some cursors may be missing. When a cursor doesn't exist, // GLFW will emit an error which will often be printed by the app, so we temporarily disable error reporting. // Missing cursors will return nullptr and our _UpdateMouseCursor() function will use the Arrow cursor instead.) -/* GLFWerrorfun prev_error_callback = glfwSetErrorCallback(nullptr); + GLFWerrorfun prev_error_callback = glfwSetErrorCallback(nullptr); bd->MouseCursors[ImGuiMouseCursor_Arrow] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); bd->MouseCursors[ImGuiMouseCursor_TextInput] = glfwCreateStandardCursor(GLFW_IBEAM_CURSOR); bd->MouseCursors[ImGuiMouseCursor_ResizeNS] = glfwCreateStandardCursor(GLFW_VRESIZE_CURSOR); @@ -356,46 +494,88 @@ bool ImGui_ImplGlfw_Init() { bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); -#endif*/ +#endif +#if (GLFW_VERSION_COMBINED >= 3300) // Eat errors (see #5785) + (void)glfwGetError(NULL); +#endif + glfwSetErrorCallback(prev_error_callback); + // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. + if (install_callbacks) + ImGui_ImplGlfw_InstallCallbacks(window); + + bd->ClientApi = client_api; return true; } +bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks) +{ + return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_OpenGL); +} + +bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks) +{ + return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_Vulkan); +} + +bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool install_callbacks) +{ + return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_Unknown); +} + void ImGui_ImplGlfw_Shutdown() { + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?"); ImGuiIO& io = ImGui::GetIO(); + if (bd->InstalledCallbacks) + ImGui_ImplGlfw_RestoreCallbacks(bd->Window); + + for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) + glfwDestroyCursor(bd->MouseCursors[cursor_n]); + io.BackendPlatformName = nullptr; io.BackendPlatformUserData = nullptr; + IM_DELETE(bd); } -void ImGui_ImplGlfw_UpdateMouseData(bool cursorVisible, bool focused) { +static void ImGui_ImplGlfw_UpdateMouseData() +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); ImGuiIO& io = ImGui::GetIO(); - if (!cursorVisible) { + if (glfwGetInputMode(bd->Window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED) + { io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); return; } - if (focused) { - // TODO: + +#ifdef __EMSCRIPTEN__ + const bool is_app_focused = true; +#else + const bool is_app_focused = glfwGetWindowAttrib(bd->Window, GLFW_FOCUSED) != 0; +#endif + if (is_app_focused) + { // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user) - //if (io.WantSetMousePos) - // glfwSetCursorPos(bd->Window, (double)io.MousePos.x, (double)io.MousePos.y); + if (io.WantSetMousePos) + glfwSetCursorPos(bd->Window, (double)io.MousePos.x, (double)io.MousePos.y); // (Optional) Fallback to provide mouse position when focused (ImGui_ImplGlfw_CursorPosCallback already provides this when hovered or captured) - /*if (is_app_focused && bd->MouseWindow == nullptr) + if (is_app_focused && bd->MouseWindow == nullptr) { double mouse_x, mouse_y; glfwGetCursorPos(bd->Window, &mouse_x, &mouse_y); io.AddMousePosEvent((float)mouse_x, (float)mouse_y); bd->LastValidMousePos = ImVec2((float)mouse_x, (float)mouse_y); - }*/ + } } } -void ImGui_ImplGlfw_UpdateMouseCursor() { - // TODO: - /*ImGuiIO& io = ImGui::GetIO(); +static void ImGui_ImplGlfw_UpdateMouseCursor() +{ + ImGuiIO& io = ImGui::GetIO(); ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); if ((io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) || glfwGetInputMode(bd->Window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED) return; @@ -412,23 +592,89 @@ void ImGui_ImplGlfw_UpdateMouseCursor() { // FIXME-PLATFORM: Unfocused windows seems to fail changing the mouse cursor with GLFW 3.2, but 3.3 works here. glfwSetCursor(bd->Window, bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]); glfwSetInputMode(bd->Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); - }*/ + } } -double DTime = 0; - -void ImGui_ImplGlfw_NewFrame(double time, int display_w, int display_h, int w, int h) { +// Update gamepad inputs +static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; } +static void ImGui_ImplGlfw_UpdateGamepads() +{ ImGuiIO& io = ImGui::GetIO(); + if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. + return; + + io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad; +#if GLFW_HAS_GAMEPAD_API + GLFWgamepadstate gamepad; + if (!glfwGetGamepadState(GLFW_JOYSTICK_1, &gamepad)) + return; + #define MAP_BUTTON(KEY_NO, BUTTON_NO, _UNUSED) do { io.AddKeyEvent(KEY_NO, gamepad.buttons[BUTTON_NO] != 0); } while (0) + #define MAP_ANALOG(KEY_NO, AXIS_NO, _UNUSED, V0, V1) do { float v = gamepad.axes[AXIS_NO]; v = (v - V0) / (V1 - V0); io.AddKeyAnalogEvent(KEY_NO, v > 0.10f, Saturate(v)); } while (0) +#else + int axes_count = 0, buttons_count = 0; + const float* axes = glfwGetJoystickAxes(GLFW_JOYSTICK_1, &axes_count); + const unsigned char* buttons = glfwGetJoystickButtons(GLFW_JOYSTICK_1, &buttons_count); + if (axes_count == 0 || buttons_count == 0) + return; + #define MAP_BUTTON(KEY_NO, _UNUSED, BUTTON_NO) do { io.AddKeyEvent(KEY_NO, (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS)); } while (0) + #define MAP_ANALOG(KEY_NO, _UNUSED, AXIS_NO, V0, V1) do { float v = (axes_count > AXIS_NO) ? axes[AXIS_NO] : V0; v = (v - V0) / (V1 - V0); io.AddKeyAnalogEvent(KEY_NO, v > 0.10f, Saturate(v)); } while (0) +#endif + io.BackendFlags |= ImGuiBackendFlags_HasGamepad; + MAP_BUTTON(ImGuiKey_GamepadStart, GLFW_GAMEPAD_BUTTON_START, 7); + MAP_BUTTON(ImGuiKey_GamepadBack, GLFW_GAMEPAD_BUTTON_BACK, 6); + MAP_BUTTON(ImGuiKey_GamepadFaceLeft, GLFW_GAMEPAD_BUTTON_X, 2); // Xbox X, PS Square + MAP_BUTTON(ImGuiKey_GamepadFaceRight, GLFW_GAMEPAD_BUTTON_B, 1); // Xbox B, PS Circle + MAP_BUTTON(ImGuiKey_GamepadFaceUp, GLFW_GAMEPAD_BUTTON_Y, 3); // Xbox Y, PS Triangle + MAP_BUTTON(ImGuiKey_GamepadFaceDown, GLFW_GAMEPAD_BUTTON_A, 0); // Xbox A, PS Cross + MAP_BUTTON(ImGuiKey_GamepadDpadLeft, GLFW_GAMEPAD_BUTTON_DPAD_LEFT, 13); + MAP_BUTTON(ImGuiKey_GamepadDpadRight, GLFW_GAMEPAD_BUTTON_DPAD_RIGHT, 11); + MAP_BUTTON(ImGuiKey_GamepadDpadUp, GLFW_GAMEPAD_BUTTON_DPAD_UP, 10); + MAP_BUTTON(ImGuiKey_GamepadDpadDown, GLFW_GAMEPAD_BUTTON_DPAD_DOWN, 12); + MAP_BUTTON(ImGuiKey_GamepadL1, GLFW_GAMEPAD_BUTTON_LEFT_BUMPER, 4); + MAP_BUTTON(ImGuiKey_GamepadR1, GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER, 5); + MAP_ANALOG(ImGuiKey_GamepadL2, GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, 4, -0.75f, +1.0f); + MAP_ANALOG(ImGuiKey_GamepadR2, GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, 5, -0.75f, +1.0f); + MAP_BUTTON(ImGuiKey_GamepadL3, GLFW_GAMEPAD_BUTTON_LEFT_THUMB, 8); + MAP_BUTTON(ImGuiKey_GamepadR3, GLFW_GAMEPAD_BUTTON_RIGHT_THUMB, 9); + MAP_ANALOG(ImGuiKey_GamepadLStickLeft, GLFW_GAMEPAD_AXIS_LEFT_X, 0, -0.25f, -1.0f); + MAP_ANALOG(ImGuiKey_GamepadLStickRight, GLFW_GAMEPAD_AXIS_LEFT_X, 0, +0.25f, +1.0f); + MAP_ANALOG(ImGuiKey_GamepadLStickUp, GLFW_GAMEPAD_AXIS_LEFT_Y, 1, -0.25f, -1.0f); + MAP_ANALOG(ImGuiKey_GamepadLStickDown, GLFW_GAMEPAD_AXIS_LEFT_Y, 1, +0.25f, +1.0f); + MAP_ANALOG(ImGuiKey_GamepadRStickLeft, GLFW_GAMEPAD_AXIS_RIGHT_X, 2, -0.25f, -1.0f); + MAP_ANALOG(ImGuiKey_GamepadRStickRight, GLFW_GAMEPAD_AXIS_RIGHT_X, 2, +0.25f, +1.0f); + MAP_ANALOG(ImGuiKey_GamepadRStickUp, GLFW_GAMEPAD_AXIS_RIGHT_Y, 3, -0.25f, -1.0f); + MAP_ANALOG(ImGuiKey_GamepadRStickDown, GLFW_GAMEPAD_AXIS_RIGHT_Y, 3, +0.25f, +1.0f); + #undef MAP_BUTTON + #undef MAP_ANALOG +} + +void ImGui_ImplGlfw_NewFrame() +{ + ImGuiIO& io = ImGui::GetIO(); + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + IM_ASSERT(bd != nullptr && "Did you call ImGui_ImplGlfw_InitForXXX()?"); // Setup display size (every frame to accommodate for window resizing) + int w, h; + int display_w, display_h; + glfwGetWindowSize(bd->Window, &w, &h); + glfwGetFramebufferSize(bd->Window, &display_w, &display_h); io.DisplaySize = ImVec2((float)w, (float)h); if (w > 0 && h > 0) io.DisplayFramebufferScale = ImVec2((float)display_w / (float)w, (float)display_h / (float)h); // Setup time step - double current_time = time / 1000.0; - io.DeltaTime = DTime > 0.0 ? (float)(current_time - DTime) : (float)(1.0f / 60.0f); - DTime = current_time; + double current_time = glfwGetTime(); + io.DeltaTime = bd->Time > 0.0 ? (float)(current_time - bd->Time) : (float)(1.0f / 60.0f); + bd->Time = current_time; + ImGui_ImplGlfw_UpdateMouseData(); ImGui_ImplGlfw_UpdateMouseCursor(); + + // Update game controllers (if enabled and available) + ImGui_ImplGlfw_UpdateGamepads(); } + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif diff --git a/Step 3/src/graphics/imgui/imgui_impl_x11.cpp b/Step 3/src/graphics/imgui/imgui_impl_x11.cpp new file mode 100644 index 0000000..1fb69ca --- /dev/null +++ b/Step 3/src/graphics/imgui/imgui_impl_x11.cpp @@ -0,0 +1,434 @@ +/* + * Created by Brett Terpstra 6920201 on 25/10/22. + * Copyright (c) 2022 Brett Terpstra. All Rights Reserved. + * + * + * I HAVE MODIFIED THIS FILE SIGNIFICANTLY! + * I AM NOT USING GLFW + * BUT HAVE TAKEN THE BACKEND FOR IT AND ADAPTED IT FOR RAW X11 + * + */ +// dear imgui: Platform Backend for GLFW +// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..) +// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) +// (Requires: GLFW 3.1+) + +// Implemented features: +// [X] Platform: Clipboard support. +// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy GLFW_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set] +// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. +// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange' (note: the resizing cursors requires GLFW 3.4+). + +// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. +// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. +// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. +// Read online: https://github.com/ocornut/imgui/tree/master/docs + + +#include "graphics/imgui/imgui.h" +#include "graphics/imgui/imgui_impl_x11.h" +#define XK_LATIN1 +#define XK_MISCELLANY +#include +#include + +// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts +// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts. +// FIXME: multi-context support is not well tested and probably dysfunctional in this backend. +// - Because glfwPollEvents() process all windows and some events may be called outside of it, you will need to register your own callbacks +// (passing install_callbacks=false in ImGui_ImplX11_InitXXX functions), set the current dear imgui context and then call our callbacks. +// - Otherwise we may need to store a GLFWWindow* -> ImGuiContext* map and handle this in the backend, adding a little bit of extra complexity to it. +// FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context. + + +//// Functions +//static const char* ImGui_ImplX11_GetClipboardText(void* data) { +//// auto sel = XInternAtom(display, "CLIPBOARD", false); +//// auto utf = XInternAtom(display, "UTF8_STRING", false); +//// Window WindowWithSelection = XGetSelectionOwner(display, sel); +//// if (WindowWithSelection == None) +//// return ""; +//// auto fake = XCreateSimpleWindow(display, root, -10, -10, 1, 1, 0, 0, 0); +//// auto fakeProperty = XInternAtom(display, "UGHX11", false); +//// XConvertSelection(display, sel, utf, fakeProperty, fake, CurrentTime); +//// int di; +//// unsigned long size, dul; +//// unsigned char* clipboard; +//// XGetWindowProperty(display, fake, fakeProperty, 0, 0, false, AnyPropertyType, &type, ) +//// TODO: +// return "\0"; +//} +// +//void ImGui_ImplX11_SetClipboardText(void* data) { +// // TODO: +// //glfwSetClipboardString((GLFWwindow*)user_data, text); +//} + +static ImGuiKey ImGui_ImplX11_KeyToImGuiKey(unsigned int key) { + switch (key) { + case XK_Tab: return ImGuiKey_Tab; + case XK_Left: return ImGuiKey_LeftArrow; + case XK_Right: return ImGuiKey_RightArrow; + case XK_Up: return ImGuiKey_UpArrow; + case XK_Down: return ImGuiKey_DownArrow; + case XK_Page_Up: return ImGuiKey_PageUp; + case XK_Page_Down: return ImGuiKey_PageDown; + case XK_Home: return ImGuiKey_Home; + case XK_End: return ImGuiKey_End; + case XK_Insert: return ImGuiKey_Insert; + case XK_Delete: return ImGuiKey_Delete; + case XK_BackSpace: return ImGuiKey_Backspace; + case XK_space: return ImGuiKey_Space; + case XK_Return: return ImGuiKey_Enter; + case XK_Escape: return ImGuiKey_Escape; + case XK_apostrophe: return ImGuiKey_Apostrophe; + case XK_comma: return ImGuiKey_Comma; + case XK_minus: return ImGuiKey_Minus; + case XK_period: return ImGuiKey_Period; + case XK_slash: return ImGuiKey_Slash; + case XK_semicolon: return ImGuiKey_Semicolon; + case XK_equal: return ImGuiKey_Equal; + case XK_bracketleft: return ImGuiKey_LeftBracket; + case XK_backslash: return ImGuiKey_Backslash; + case XK_bracketright: return ImGuiKey_RightBracket; + case XK_grave: return ImGuiKey_GraveAccent; + case XK_Caps_Lock: return ImGuiKey_CapsLock; + case XK_Scroll_Lock: return ImGuiKey_ScrollLock; + case XK_Num_Lock: return ImGuiKey_NumLock; + case XK_Print: return ImGuiKey_PrintScreen; + case XK_Pause: return ImGuiKey_Pause; + case XK_KP_0: return ImGuiKey_Keypad0; + case XK_KP_1: return ImGuiKey_Keypad1; + case XK_KP_2: return ImGuiKey_Keypad2; + case XK_KP_3: return ImGuiKey_Keypad3; + case XK_KP_4: return ImGuiKey_Keypad4; + case XK_KP_5: return ImGuiKey_Keypad5; + case XK_KP_6: return ImGuiKey_Keypad6; + case XK_KP_7: return ImGuiKey_Keypad7; + case XK_KP_8: return ImGuiKey_Keypad8; + case XK_KP_9: return ImGuiKey_Keypad9; + case XK_KP_Decimal: return ImGuiKey_KeypadDecimal; + case XK_KP_Divide: return ImGuiKey_KeypadDivide; + case XK_KP_Multiply: return ImGuiKey_KeypadMultiply; + case XK_KP_Subtract: return ImGuiKey_KeypadSubtract; + case XK_KP_Add: return ImGuiKey_KeypadAdd; + case XK_KP_Enter: return ImGuiKey_KeypadEnter; + case XK_KP_Equal: return ImGuiKey_KeypadEqual; + case XK_Shift_L: return ImGuiKey_LeftShift; + case XK_Control_L: return ImGuiKey_LeftCtrl; + case XK_Alt_L: return ImGuiKey_LeftAlt; + case XK_Super_L: return ImGuiKey_LeftSuper; + case XK_Shift_R: return ImGuiKey_RightShift; + case XK_Control_R: return ImGuiKey_RightCtrl; + case XK_Alt_R: return ImGuiKey_RightAlt; + case XK_Super_R: return ImGuiKey_RightSuper; + case XK_Menu: return ImGuiKey_Menu; + case XK_0: return ImGuiKey_0; + case XK_1: return ImGuiKey_1; + case XK_2: return ImGuiKey_2; + case XK_3: return ImGuiKey_3; + case XK_4: return ImGuiKey_4; + case XK_5: return ImGuiKey_5; + case XK_6: return ImGuiKey_6; + case XK_7: return ImGuiKey_7; + case XK_8: return ImGuiKey_8; + case XK_9: return ImGuiKey_9; + case XK_A: return ImGuiKey_A; + case XK_B: return ImGuiKey_B; + case XK_C: return ImGuiKey_C; + case XK_D: return ImGuiKey_D; + case XK_E: return ImGuiKey_E; + case XK_F: return ImGuiKey_F; + case XK_G: return ImGuiKey_G; + case XK_H: return ImGuiKey_H; + case XK_I: return ImGuiKey_I; + case XK_J: return ImGuiKey_J; + case XK_K: return ImGuiKey_K; + case XK_L: return ImGuiKey_L; + case XK_M: return ImGuiKey_M; + case XK_N: return ImGuiKey_N; + case XK_O: return ImGuiKey_O; + case XK_P: return ImGuiKey_P; + case XK_Q: return ImGuiKey_Q; + case XK_R: return ImGuiKey_R; + case XK_S: return ImGuiKey_S; + case XK_T: return ImGuiKey_T; + case XK_U: return ImGuiKey_U; + case XK_V: return ImGuiKey_V; + case XK_W: return ImGuiKey_W; + case XK_X: return ImGuiKey_X; + case XK_Y: return ImGuiKey_Y; + case XK_Z: return ImGuiKey_Z; + case XK_a: return ImGuiKey_A; + case XK_b: return ImGuiKey_B; + case XK_c: return ImGuiKey_C; + case XK_d: return ImGuiKey_D; + case XK_e: return ImGuiKey_E; + case XK_f: return ImGuiKey_F; + case XK_g: return ImGuiKey_G; + case XK_h: return ImGuiKey_H; + case XK_i: return ImGuiKey_I; + case XK_j: return ImGuiKey_J; + case XK_k: return ImGuiKey_K; + case XK_l: return ImGuiKey_L; + case XK_m: return ImGuiKey_M; + case XK_n: return ImGuiKey_N; + case XK_o: return ImGuiKey_O; + case XK_p: return ImGuiKey_P; + case XK_q: return ImGuiKey_Q; + case XK_r: return ImGuiKey_R; + case XK_s: return ImGuiKey_S; + case XK_t: return ImGuiKey_T; + case XK_u: return ImGuiKey_U; + case XK_v: return ImGuiKey_V; + case XK_w: return ImGuiKey_W; + case XK_x: return ImGuiKey_X; + case XK_y: return ImGuiKey_Y; + case XK_z: return ImGuiKey_Z; + case XK_F1: return ImGuiKey_F1; + case XK_F2: return ImGuiKey_F2; + case XK_F3: return ImGuiKey_F3; + case XK_F4: return ImGuiKey_F4; + case XK_F5: return ImGuiKey_F5; + case XK_F6: return ImGuiKey_F6; + case XK_F7: return ImGuiKey_F7; + case XK_F8: return ImGuiKey_F8; + case XK_F9: return ImGuiKey_F9; + case XK_F10: return ImGuiKey_F10; + case XK_F11: return ImGuiKey_F11; + case XK_F12: return ImGuiKey_F12; + default: return ImGuiKey_None; + } +} + +int ImGui_ImplX11_KeyToModifier(unsigned int key) { + if (key == XK_Control_L || key == XK_Control_R) + return RT_CONTROL; + if (key == XK_Shift_L || key == XK_Shift_R) + return RT_SHIFT; + if (key == XK_Alt_L || key == XK_Alt_R) + return RT_ALT; + if (key == XK_Super_L || key == XK_Super_R) + return RT_SUPER; + return 0; +} + +void ImGui_ImplX11_UpdateKeyModifiers(int mods) +{ + ImGuiIO& io = ImGui::GetIO(); + io.AddKeyEvent(ImGuiModFlags_Ctrl, (mods & RT_CONTROL) != 0); + io.AddKeyEvent(ImGuiModFlags_Shift, (mods & RT_SHIFT) != 0); + io.AddKeyEvent(ImGuiModFlags_Alt, (mods & RT_ALT) != 0); + io.AddKeyEvent(ImGuiModFlags_Super, (mods & RT_SUPER) != 0); +} + +void ImGui_ImplX11_MouseButtonCallback(unsigned int button, bool press, int mods) { + ImGuiIO& io = ImGui::GetIO(); + if (button < ImGuiMouseButton_COUNT) + io.AddMouseButtonEvent((int)button, press); +} + +void ImGui_ImplX11_ScrollCallback(double xoffset, double yoffset) { + ImGuiIO& io = ImGui::GetIO(); + io.AddMouseWheelEvent((float)xoffset, (float)yoffset); +} + +static int ImGui_ImplX11_TranslateUntranslatedKey(unsigned int key, int scancode) { +#if GLFW_HAS_GETKEYNAME && !defined(__EMSCRIPTEN__) + // GLFW 3.1+ attempts to "untranslate" keys, which goes the opposite of what every other framework does, making using lettered shortcuts difficult. + // (It had reasons to do so: namely GLFW is/was more likely to be used for WASD-type game controls rather than lettered shortcuts, but IHMO the 3.1 change could have been done differently) + // See https://github.com/glfw/glfw/issues/1502 for details. + // Adding a workaround to undo this (so our keys are translated->untranslated->translated, likely a lossy process). + // This won't cover edge cases but this is at least going to cover common cases. + if (key >= GLFW_KEY_KP_0 && key <= GLFW_KEY_KP_EQUAL) + return key; + const char* key_name = glfwGetKeyName(key, scancode); + if (key_name && key_name[0] != 0 && key_name[1] == 0) + { + const char char_names[] = "`-=[]\\,;\'./"; + const int char_keys[] = { GLFW_KEY_GRAVE_ACCENT, GLFW_KEY_MINUS, GLFW_KEY_EQUAL, GLFW_KEY_LEFT_BRACKET, GLFW_KEY_RIGHT_BRACKET, GLFW_KEY_BACKSLASH, GLFW_KEY_COMMA, GLFW_KEY_SEMICOLON, GLFW_KEY_APOSTROPHE, GLFW_KEY_PERIOD, GLFW_KEY_SLASH, 0 }; + IM_ASSERT(IM_ARRAYSIZE(char_names) == IM_ARRAYSIZE(char_keys)); + if (key_name[0] >= '0' && key_name[0] <= '9') { key = GLFW_KEY_0 + (key_name[0] - '0'); } + else if (key_name[0] >= 'A' && key_name[0] <= 'Z') { key = GLFW_KEY_A + (key_name[0] - 'A'); } + else if (key_name[0] >= 'a' && key_name[0] <= 'z') { key = GLFW_KEY_A + (key_name[0] - 'a'); } + else if (const char* p = strchr(char_names, key_name[0])) { key = char_keys[p - char_names]; } + } + // if (action == GLFW_PRESS) printf("key %d scancode %d name '%s'\n", key, scancode, key_name); +#else + IM_UNUSED(scancode); +#endif + return key; +} + +void ImGui_ImplX11_KeyCallback(unsigned int keycode, int scancode, bool press, int mods) { + // Workaround: X11 does not include current pressed/released modifier key in 'mods' flags. https://github.com/glfw/glfw/issues/1630 + if (int keycode_to_mod = ImGui_ImplX11_KeyToModifier(keycode)) + mods = (press) ? (mods | keycode_to_mod) : (mods & ~keycode_to_mod); + ImGui_ImplX11_UpdateKeyModifiers(mods); + + //keycode = ImGui_ImplX11_TranslateUntranslatedKey(keycode, scancode); + + ImGuiIO& io = ImGui::GetIO(); + ImGuiKey imgui_key = ImGui_ImplX11_KeyToImGuiKey(keycode); + if (!press && ((keycode < 127 && keycode > 80) || (keycode < 64 && keycode > 31))) + io.AddInputCharacter(keycode); + io.AddKeyEvent(imgui_key, press); + io.SetKeyEventNativeData(imgui_key, (int)keycode, scancode); // To support legacy indexing (<1.87 user code) +} + +void ImGui_ImplX11_WindowFocusCallback(int focused) { + ImGuiIO& io = ImGui::GetIO(); + io.AddFocusEvent(focused != 0); +} + +void ImGui_ImplX11_CursorPosCallback(double x, double y, bool cursorVisible) { + if (!cursorVisible) + return; + ImGuiIO& io = ImGui::GetIO(); + io.AddMousePosEvent((float)x, (float)y); +} + +ImVec2 LastValidMousePos {0, 0}; + +// Workaround: X11 seems to send spurious Leave/Enter events which would make us lose our position, +// so we back it up and restore on Leave/Enter (see https://github.com/ocornut/imgui/issues/4984) +void ImGui_ImplX11_CursorEnterCallback(int entered, bool cursorVisible) { + if (!cursorVisible) + return; + + ImGuiIO& io = ImGui::GetIO(); + if (entered) { + io.AddMousePosEvent(LastValidMousePos.x, LastValidMousePos.y); + } else { + LastValidMousePos = io.MousePos; + io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); + } +} + +void ImGui_ImplX11_CharCallback(unsigned int c) { + ImGuiIO& io = ImGui::GetIO(); + io.AddInputCharacter(c); +} + +void ImGui_ImplX11_MonitorCallback(int) { + // Unused in 'master' branch but 'docking' branch will use this, so we declare it ahead of it so if you have to install callbacks you can install this one too. +} + +void ImGui_ImplX11_InstallCallbacks() { +} + +void ImGui_ImplX11_RestoreCallbacks() { + +} + +bool ImGui_ImplX11_Init() { + ImGuiIO& io = ImGui::GetIO(); + IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!"); + //printf("GLFW_VERSION: %d.%d.%d (%d)", GLFW_VERSION_MAJOR, GLFW_VERSION_MINOR, GLFW_VERSION_REVISION, GLFW_VERSION_COMBINED); + + // Setup backend capabilities flags + io.BackendPlatformName = "imgui_impl_glfw"; + io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional) + io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used) + + // TODO + //io.SetClipboardTextFn = ImGui_ImplX11_SetClipboardText; + //io.GetClipboardTextFn = ImGui_ImplX11_GetClipboardText; + //io.ClipboardUserData = bd->Window; + + // Create mouse cursors + // (By design, on X11 cursors are user configurable and some cursors may be missing. When a cursor doesn't exist, + // GLFW will emit an error which will often be printed by the app, so we temporarily disable error reporting. + // Missing cursors will return nullptr and our _UpdateMouseCursor() function will use the Arrow cursor instead.) +/* GLFWerrorfun prev_error_callback = glfwSetErrorCallback(nullptr); + bd->MouseCursors[ImGuiMouseCursor_Arrow] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_TextInput] = glfwCreateStandardCursor(GLFW_IBEAM_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeNS] = glfwCreateStandardCursor(GLFW_VRESIZE_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeEW] = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_Hand] = glfwCreateStandardCursor(GLFW_HAND_CURSOR); +#if GLFW_HAS_NEW_CURSORS + bd->MouseCursors[ImGuiMouseCursor_ResizeAll] = glfwCreateStandardCursor(GLFW_RESIZE_ALL_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = glfwCreateStandardCursor(GLFW_RESIZE_NESW_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = glfwCreateStandardCursor(GLFW_RESIZE_NWSE_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = glfwCreateStandardCursor(GLFW_NOT_ALLOWED_CURSOR); +#else + bd->MouseCursors[ImGuiMouseCursor_ResizeAll] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); + bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); +#endif*/ + // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. + return true; +} + +void ImGui_ImplX11_Shutdown() +{ + ImGuiIO& io = ImGui::GetIO(); + + io.BackendPlatformName = nullptr; + io.BackendPlatformUserData = nullptr; +} + +void ImGui_ImplX11_UpdateMouseData(bool cursorVisible, bool focused) { + ImGuiIO& io = ImGui::GetIO(); + + if (!cursorVisible) { + io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); + return; + } + if (focused) { + // TODO: + // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user) + //if (io.WantSetMousePos) + // glfwSetCursorPos(bd->Window, (double)io.MousePos.x, (double)io.MousePos.y); + + // (Optional) Fallback to provide mouse position when focused (ImGui_ImplX11_CursorPosCallback already provides this when hovered or captured) + /*if (is_app_focused && bd->MouseWindow == nullptr) + { + double mouse_x, mouse_y; + glfwGetCursorPos(bd->Window, &mouse_x, &mouse_y); + io.AddMousePosEvent((float)mouse_x, (float)mouse_y); + bd->LastValidMousePos = ImVec2((float)mouse_x, (float)mouse_y); + }*/ + } +} + +void ImGui_ImplX11_UpdateMouseCursor() { + // TODO: + /*ImGuiIO& io = ImGui::GetIO(); + ImGui_ImplX11_Data* bd = ImGui_ImplX11_GetBackendData(); + if ((io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) || glfwGetInputMode(bd->Window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED) + return; + + ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor(); + if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor) + { + // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor + glfwSetInputMode(bd->Window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); + } + else + { + // Show OS mouse cursor + // FIXME-PLATFORM: Unfocused windows seems to fail changing the mouse cursor with GLFW 3.2, but 3.3 works here. + glfwSetCursor(bd->Window, bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]); + glfwSetInputMode(bd->Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); + }*/ +} + +double DTime = 0; + +void ImGui_ImplX11_NewFrame(double time, int display_w, int display_h, int w, int h) { + ImGuiIO& io = ImGui::GetIO(); + + // Setup display size (every frame to accommodate for window resizing) + io.DisplaySize = ImVec2((float)w, (float)h); + if (w > 0 && h > 0) + io.DisplayFramebufferScale = ImVec2((float)display_w / (float)w, (float)display_h / (float)h); + + // Setup time step + double current_time = time / 1000.0; + io.DeltaTime = DTime > 0.0 ? (float)(current_time - DTime) : (float)(1.0f / 60.0f); + DTime = current_time; + + ImGui_ImplX11_UpdateMouseCursor(); +}