diff --git a/CMakeLists.txt b/CMakeLists.txt index 56b8c7c..8631574 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,35 @@ project(Final_Project) set(CMAKE_CXX_STANDARD 17) +# My Stuff file(GLOB_RECURSE CPP_FILES "src/*.cpp") include_directories(include/) +add_subdirectory(libraries/BLT) +# External Libraries +find_package(GLUT) + +if(NOT ${GLUT_FOUND}) + message("WARNING -- If you are on linux please install the FreeGLUT lib") + set(GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include/glut/include") + set(GLUT_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/include/glut/lib/freeglut.lib") +endif() +message("Using GLUT ${GLUT_INCLUDE_DIRS} and ${GLUT_LIBRARIES}") + +find_library(FreeImage_LIBRARIES libfreeimage.so OR libfreeimage.a) +find_file(FreeImage_INCLUDE FreeImage.h) +message(${FreeImage_LIBRARIES}) +if(NOT ${FreeImage_LIBRARIES} OR NOT ${FreeImage_INCLUDE}) + message("WARNING -- If you are on linux please install the FreeImage lib") + #set(FreeImage_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/libraries/freeimage/lib/FreeImage.lib;${CMAKE_CURRENT_SOURCE_DIR}/libraries/freeimage/lib/FreeImaged.dll") +endif() +message("Using FreeImage ${FreeImage_LIBRARIES} and ${FreeImage_INCLUDE}") + +include_directories(${GLUT_INCLUDE_DIRS}) +include_directories(${FreeImage_INCLUDE}) + add_executable(Final_Project ${CPP_FILES}) +target_link_libraries(Final_Project PRIVATE BLT) +target_link_libraries(Final_Project PRIVATE ${GLUT_LIBRARIES}) +target_link_libraries(Final_Project PRIVATE ${FreeImage_LIBRARIES}) \ No newline at end of file diff --git a/cmake-build-debug/.cmake/api/v1/reply/cache-v2-ffa72dbd44ea053ae311.json b/cmake-build-debug/.cmake/api/v1/reply/cache-v2-16ee6a5c257cdca882d4.json similarity index 70% rename from cmake-build-debug/.cmake/api/v1/reply/cache-v2-ffa72dbd44ea053ae311.json rename to cmake-build-debug/.cmake/api/v1/reply/cache-v2-16ee6a5c257cdca882d4.json index efc0abe..774d8b8 100644 --- a/cmake-build-debug/.cmake/api/v1/reply/cache-v2-ffa72dbd44ea053ae311.json +++ b/cmake-build-debug/.cmake/api/v1/reply/cache-v2-16ee6a5c257cdca882d4.json @@ -1,6 +1,78 @@ { "entries" : [ + { + "name" : "BLT_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT" + }, + { + "name" : "BLT_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "OFF" + }, + { + "name" : "BLT_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT" + }, + { + "name" : "BUILD_PROFILING", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Build the BLT profiler extension" + } + ], + "type" : "BOOL", + "value" : "ON" + }, + { + "name" : "BUILD_STD", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Build the BLT standard utilities." + } + ], + "type" : "BOOL", + "value" : "ON" + }, + { + "name" : "BUILD_TESTS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Build the BLT test set" + } + ], + "type" : "BOOL", + "value" : "OFF" + }, { "name" : "CMAKE_ADDR2LINE", "properties" : @@ -763,7 +835,7 @@ } ], "type" : "INTERNAL", - "value" : "1" + "value" : "2" }, { "name" : "CMAKE_OBJCOPY", @@ -1125,6 +1197,18 @@ "type" : "BOOL", "value" : "FALSE" }, + { + "name" : "FIND_PACKAGE_MESSAGE_DETAILS_GLUT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Details about finding GLUT" + } + ], + "type" : "INTERNAL", + "value" : "[/usr/lib/x86_64-linux-gnu/libglut.so][/usr/include][v()]" + }, { "name" : "Final_Project_BINARY_DIR", "properties" : @@ -1161,6 +1245,510 @@ "type" : "STATIC", "value" : "/home/laptop/Documents/Brock/CS 3P98/Final Project" }, + { + "name" : "FreeImageIO_INCLUDE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a file." + } + ], + "type" : "FILEPATH", + "value" : "FreeImageIO_INCLUDE-NOTFOUND" + }, + { + "name" : "FreeImage_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "The directory containing a CMake configuration file for FreeImage." + } + ], + "type" : "PATH", + "value" : "FreeImage_DIR-NOTFOUND" + }, + { + "name" : "FreeImage_INCLUDE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a file." + } + ], + "type" : "FILEPATH", + "value" : "/usr/include/FreeImage.h" + }, + { + "name" : "FreeImage_LIBRARIES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "/usr/lib/x86_64-linux-gnu/libfreeimage.so" + }, + { + "name" : "GLUT::GLUT_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "The directory containing a CMake configuration file for GLUT::GLUT." + } + ], + "type" : "PATH", + "value" : "GLUT::GLUT_DIR-NOTFOUND" + }, + { + "name" : "GLUT_CFLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_CFLAGS_I", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_CFLAGS_OTHER", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_FOUND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_INCLUDEDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_INCLUDE_DIR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a file." + } + ], + "type" : "PATH", + "value" : "/usr/include" + }, + { + "name" : "GLUT_LIBDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_LIBS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_LIBS_L", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_LIBS_OTHER", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_LIBS_PATHS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_MODULE_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_CFLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_CFLAGS_I", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_CFLAGS_OTHER", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_LIBDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_LIBS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_LIBS_L", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_LIBS_OTHER", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_STATIC_LIBS_PATHS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_Xi_LIBRARY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "/usr/lib/x86_64-linux-gnu/libXi.so" + }, + { + "name" : "GLUT_Xmu_LIBRARY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "GLUT_Xmu_LIBRARY-NOTFOUND" + }, + { + "name" : "GLUT_freeglut_INCLUDEDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_freeglut_LIBDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_freeglut_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_freeglut_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_glut_INCLUDEDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_glut_LIBDIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_glut_LIBRARY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "/usr/lib/x86_64-linux-gnu/libglut.so" + }, + { + "name" : "GLUT_glut_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "GLUT_glut_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "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" : "_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED", "properties" : @@ -1172,6 +1760,18 @@ ], "type" : "INTERNAL", "value" : "TRUE" + }, + { + "name" : "__pkg_config_checked_GLUT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "1" } ], "kind" : "cache", diff --git a/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8b9f2ab70d6c76509945.json b/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-2c011fba65a9adeb5821.json similarity index 77% rename from cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8b9f2ab70d6c76509945.json rename to cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-2c011fba65a9adeb5821.json index 78b2136..bf69697 100644 --- a/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-8b9f2ab70d6c76509945.json +++ b/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-2c011fba65a9adeb5821.json @@ -120,6 +120,44 @@ "isCMake" : true, "isExternal" : true, "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindGLUT.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/SelectLibraryConfigurations.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageMessage.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPkgConfig.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageMessage.cmake" + }, + { + "path" : "libraries/BLT/CMakeLists.txt" } ], "kind" : "cmakeFiles", diff --git a/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-a2cc1fe2487111d111f1.json b/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-3ef14ee1ded825530bb3.json similarity index 52% rename from cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-a2cc1fe2487111d111f1.json rename to cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-3ef14ee1ded825530bb3.json index 9c80792..5d6d685 100644 --- a/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-a2cc1fe2487111d111f1.json +++ b/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-3ef14ee1ded825530bb3.json @@ -6,6 +6,10 @@ [ { "build" : ".", + "childIndexes" : + [ + 1 + ], "jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json", "minimumCMakeVersion" : { @@ -14,6 +18,21 @@ "projectIndex" : 0, "source" : ".", "targetIndexes" : + [ + 1 + ] + }, + { + "build" : "libraries/BLT", + "jsonFile" : "directory-libraries.BLT-Debug-5a66f6c7b7b59c5dbec1.json", + "minimumCMakeVersion" : + { + "string" : "3.24" + }, + "parentIndex" : 0, + "projectIndex" : 1, + "source" : "libraries/BLT", + "targetIndexes" : [ 0 ] @@ -23,12 +42,28 @@ "projects" : [ { + "childIndexes" : + [ + 1 + ], "directoryIndexes" : [ 0 ], "name" : "Final_Project", "targetIndexes" : + [ + 1 + ] + }, + { + "directoryIndexes" : + [ + 1 + ], + "name" : "BLT", + "parentIndex" : 0, + "targetIndexes" : [ 0 ] @@ -36,10 +71,17 @@ ], "targets" : [ + { + "directoryIndex" : 1, + "id" : "BLT::@834776b52e80069b1648", + "jsonFile" : "target-BLT-Debug-b976cc3edcb868afeae8.json", + "name" : "BLT", + "projectIndex" : 1 + }, { "directoryIndex" : 0, "id" : "Final_Project::@6890427a1f51a3e7e1df", - "jsonFile" : "target-Final_Project-Debug-05fc27fbbc3e06eb5a7d.json", + "jsonFile" : "target-Final_Project-Debug-b5832a3f1c00859bdae5.json", "name" : "Final_Project", "projectIndex" : 0 } diff --git a/cmake-build-debug/.cmake/api/v1/reply/directory-libraries.BLT-Debug-5a66f6c7b7b59c5dbec1.json b/cmake-build-debug/.cmake/api/v1/reply/directory-libraries.BLT-Debug-5a66f6c7b7b59c5dbec1.json new file mode 100644 index 0000000..1662239 --- /dev/null +++ b/cmake-build-debug/.cmake/api/v1/reply/directory-libraries.BLT-Debug-5a66f6c7b7b59c5dbec1.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : "libraries/BLT", + "source" : "libraries/BLT" + } +} diff --git a/cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T17-45-21-0843.json b/cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T18-51-35-0099.json similarity index 82% rename from cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T17-45-21-0843.json rename to cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T18-51-35-0099.json index 2a60cf3..8e0d9b8 100644 --- a/cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T17-45-21-0843.json +++ b/cmake-build-debug/.cmake/api/v1/reply/index-2023-01-16T18-51-35-0099.json @@ -26,7 +26,7 @@ "objects" : [ { - "jsonFile" : "codemodel-v2-a2cc1fe2487111d111f1.json", + "jsonFile" : "codemodel-v2-3ef14ee1ded825530bb3.json", "kind" : "codemodel", "version" : { @@ -35,7 +35,7 @@ } }, { - "jsonFile" : "cache-v2-ffa72dbd44ea053ae311.json", + "jsonFile" : "cache-v2-16ee6a5c257cdca882d4.json", "kind" : "cache", "version" : { @@ -44,7 +44,7 @@ } }, { - "jsonFile" : "cmakeFiles-v1-8b9f2ab70d6c76509945.json", + "jsonFile" : "cmakeFiles-v1-2c011fba65a9adeb5821.json", "kind" : "cmakeFiles", "version" : { @@ -66,7 +66,7 @@ { "cache-v2" : { - "jsonFile" : "cache-v2-ffa72dbd44ea053ae311.json", + "jsonFile" : "cache-v2-16ee6a5c257cdca882d4.json", "kind" : "cache", "version" : { @@ -76,7 +76,7 @@ }, "cmakeFiles-v1" : { - "jsonFile" : "cmakeFiles-v1-8b9f2ab70d6c76509945.json", + "jsonFile" : "cmakeFiles-v1-2c011fba65a9adeb5821.json", "kind" : "cmakeFiles", "version" : { @@ -86,7 +86,7 @@ }, "codemodel-v2" : { - "jsonFile" : "codemodel-v2-a2cc1fe2487111d111f1.json", + "jsonFile" : "codemodel-v2-3ef14ee1ded825530bb3.json", "kind" : "codemodel", "version" : { diff --git a/cmake-build-debug/.cmake/api/v1/reply/target-BLT-Debug-b976cc3edcb868afeae8.json b/cmake-build-debug/.cmake/api/v1/reply/target-BLT-Debug-b976cc3edcb868afeae8.json new file mode 100644 index 0000000..ad36e8e --- /dev/null +++ b/cmake-build-debug/.cmake/api/v1/reply/target-BLT-Debug-b976cc3edcb868afeae8.json @@ -0,0 +1,145 @@ +{ + "archive" : {}, + "artifacts" : + [ + { + "path" : "libraries/BLT/libBLT.a" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_library", + "include_directories" + ], + "files" : + [ + "libraries/BLT/CMakeLists.txt", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 36, + "parent" : 0 + }, + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 9, + "parent" : 2 + }, + { + "command" : 1, + "file" : 0, + "line" : 29, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + } + ], + "includes" : + [ + { + "backtrace" : 3, + "path" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/include" + }, + { + "backtrace" : 4, + "path" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 1 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0, + 1, + 2, + 3, + 4 + ] + } + ], + "id" : "BLT::@834776b52e80069b1648", + "name" : "BLT", + "nameOnDisk" : "libBLT.a", + "paths" : + { + "build" : "libraries/BLT", + "source" : "libraries/BLT" + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1, + 2, + 3, + 4 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "libraries/BLT/src/blt/std/queues.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "libraries/BLT/src/blt/std/random.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "libraries/BLT/src/blt/std/string.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "libraries/BLT/src/blt/std/system.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "libraries/BLT/src/blt/profiling/profiler.cpp", + "sourceGroupIndex" : 0 + } + ], + "type" : "STATIC_LIBRARY" +} diff --git a/cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-05fc27fbbc3e06eb5a7d.json b/cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-b5832a3f1c00859bdae5.json similarity index 55% rename from cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-05fc27fbbc3e06eb5a7d.json rename to cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-b5832a3f1c00859bdae5.json index 55221c4..afec9cb 100644 --- a/cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-05fc27fbbc3e06eb5a7d.json +++ b/cmake-build-debug/.cmake/api/v1/reply/target-Final_Project-Debug-b5832a3f1c00859bdae5.json @@ -11,6 +11,7 @@ "commands" : [ "add_executable", + "target_link_libraries", "include_directories" ], "files" : @@ -25,13 +26,37 @@ { "command" : 0, "file" : 0, - "line" : 10, + "line" : 34, "parent" : 0 }, { "command" : 1, "file" : 0, - "line" : 8, + "line" : 35, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 36, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 37, + "parent" : 0 + }, + { + "command" : 2, + "file" : 0, + "line" : 9, + "parent" : 0 + }, + { + "command" : 2, + "file" : 0, + "line" : 32, "parent" : 0 } ] @@ -48,8 +73,16 @@ "includes" : [ { - "backtrace" : 2, + "backtrace" : 5, "path" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/include" + }, + { + "backtrace" : 6, + "path" : "/usr/include/FreeImage.h" + }, + { + "backtrace" : 2, + "path" : "/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" } ], "language" : "CXX", @@ -67,6 +100,13 @@ ] } ], + "dependencies" : + [ + { + "backtrace" : 2, + "id" : "BLT::@834776b52e80069b1648" + } + ], "id" : "Final_Project::@6890427a1f51a3e7e1df", "link" : { @@ -79,6 +119,26 @@ { "fragment" : "", "role" : "flags" + }, + { + "backtrace" : 2, + "fragment" : "libraries/BLT/libBLT.a", + "role" : "libraries" + }, + { + "backtrace" : 3, + "fragment" : "/usr/lib/x86_64-linux-gnu/libglut.so", + "role" : "libraries" + }, + { + "backtrace" : 3, + "fragment" : "/usr/lib/x86_64-linux-gnu/libXi.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/usr/lib/x86_64-linux-gnu/libfreeimage.so", + "role" : "libraries" } ], "language" : "CXX" diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps new file mode 100644 index 0000000..4b05a85 Binary files /dev/null and b/cmake-build-debug/.ninja_deps differ diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log new file mode 100644 index 0000000..f75a8d3 --- /dev/null +++ b/cmake-build-debug/.ninja_log @@ -0,0 +1,9 @@ +# ninja log v5 +50 999 1673895013560650475 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o cfdb4277170e1146 +759 1538 1673895014100653697 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o d11b576b8334e87e +1000 1876 1673895014440655727 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o c152c26bb81bca05 +1876 1891 1673895014452655799 libraries/BLT/libBLT.a ec946156e9e7a43a +1 49 1673895012612644820 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o 55504c9533707c50 +1 1125 1673895013688651239 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o 2e94f773455f509 +0 750 1673895013312648995 CMakeFiles/Final_Project.dir/src/main.cpp.o 9a5c370b83c53956 +1 106 1673895098129169170 Final_Project 13ba5588f68fabde diff --git a/cmake-build-debug/CMakeCache.txt b/cmake-build-debug/CMakeCache.txt index 5cd2827..25e2b56 100644 --- a/cmake-build-debug/CMakeCache.txt +++ b/cmake-build-debug/CMakeCache.txt @@ -14,6 +14,24 @@ # EXTERNAL cache entries ######################## +//Value Computed by CMake +BLT_BINARY_DIR:STATIC=/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT + +//Value Computed by CMake +BLT_IS_TOP_LEVEL:STATIC=OFF + +//Value Computed by CMake +BLT_SOURCE_DIR:STATIC=/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT + +//Build the BLT profiler extension +BUILD_PROFILING:BOOL=ON + +//Build the BLT standard utilities. +BUILD_STD:BOOL=ON + +//Build the BLT test set +BUILD_TESTS:BOOL=OFF + //Path to a program. CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line @@ -221,6 +239,39 @@ Final_Project_IS_TOP_LEVEL:STATIC=ON //Value Computed by CMake Final_Project_SOURCE_DIR:STATIC=/home/laptop/Documents/Brock/CS 3P98/Final Project +//Path to a file. +FreeImageIO_INCLUDE:FILEPATH=FreeImageIO_INCLUDE-NOTFOUND + +//The directory containing a CMake configuration file for FreeImage. +FreeImage_DIR:PATH=FreeImage_DIR-NOTFOUND + +//Path to a file. +FreeImage_INCLUDE:FILEPATH=/usr/include/FreeImage.h + +//Path to a library. +FreeImage_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libfreeimage.so + +//The directory containing a CMake configuration file for GLUT::GLUT. +"GLUT::GLUT_DIR":PATH=GLUT::GLUT_DIR-NOTFOUND + +//Path to a file. +GLUT_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +GLUT_Xi_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libXi.so + +//Path to a library. +GLUT_Xmu_LIBRARY:FILEPATH=GLUT_Xmu_LIBRARY-NOTFOUND + +//Path to a library. +GLUT_glut_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libglut.so + +//Arguments to supply to pkg-config +PKG_CONFIG_ARGN:STRING= + +//pkg-config executable +PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config + ######################## # INTERNAL cache entries @@ -322,7 +373,7 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP @@ -365,6 +416,50 @@ CMAKE_STRIP-ADVANCED:INTERNAL=1 CMAKE_UNAME:INTERNAL=/usr/bin/uname //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding GLUT +FIND_PACKAGE_MESSAGE_DETAILS_GLUT:INTERNAL=[/usr/lib/x86_64-linux-gnu/libglut.so][/usr/include][v()] +GLUT_CFLAGS:INTERNAL= +GLUT_CFLAGS_I:INTERNAL= +GLUT_CFLAGS_OTHER:INTERNAL= +GLUT_FOUND:INTERNAL= +GLUT_INCLUDEDIR:INTERNAL= +//ADVANCED property for variable: GLUT_INCLUDE_DIR +GLUT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +GLUT_LIBDIR:INTERNAL= +GLUT_LIBS:INTERNAL= +GLUT_LIBS_L:INTERNAL= +GLUT_LIBS_OTHER:INTERNAL= +GLUT_LIBS_PATHS:INTERNAL= +GLUT_MODULE_NAME:INTERNAL= +GLUT_PREFIX:INTERNAL= +GLUT_STATIC_CFLAGS:INTERNAL= +GLUT_STATIC_CFLAGS_I:INTERNAL= +GLUT_STATIC_CFLAGS_OTHER:INTERNAL= +GLUT_STATIC_LIBDIR:INTERNAL= +GLUT_STATIC_LIBS:INTERNAL= +GLUT_STATIC_LIBS_L:INTERNAL= +GLUT_STATIC_LIBS_OTHER:INTERNAL= +GLUT_STATIC_LIBS_PATHS:INTERNAL= +GLUT_VERSION:INTERNAL= +//ADVANCED property for variable: GLUT_Xi_LIBRARY +GLUT_Xi_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: GLUT_Xmu_LIBRARY +GLUT_Xmu_LIBRARY-ADVANCED:INTERNAL=1 +GLUT_freeglut_INCLUDEDIR:INTERNAL= +GLUT_freeglut_LIBDIR:INTERNAL= +GLUT_freeglut_PREFIX:INTERNAL= +GLUT_freeglut_VERSION:INTERNAL= +GLUT_glut_INCLUDEDIR:INTERNAL= +GLUT_glut_LIBDIR:INTERNAL= +//ADVANCED property for variable: GLUT_glut_LIBRARY +GLUT_glut_LIBRARY-ADVANCED:INTERNAL=1 +GLUT_glut_PREFIX:INTERNAL= +GLUT_glut_VERSION:INTERNAL= +//ADVANCED property for variable: PKG_CONFIG_ARGN +PKG_CONFIG_ARGN-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: PKG_CONFIG_EXECUTABLE +PKG_CONFIG_EXECUTABLE-ADVANCED:INTERNAL=1 //linker supports push/pop state _CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE +__pkg_config_checked_GLUT:INTERNAL=1 diff --git a/cmake-build-debug/CMakeFiles/Final_Project.dir/src/main.cpp.o b/cmake-build-debug/CMakeFiles/Final_Project.dir/src/main.cpp.o new file mode 100644 index 0000000..2ddbf9c Binary files /dev/null and b/cmake-build-debug/CMakeFiles/Final_Project.dir/src/main.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/TargetDirectories.txt b/cmake-build-debug/CMakeFiles/TargetDirectories.txt index 3abe006..b6f4330 100644 --- a/cmake-build-debug/CMakeFiles/TargetDirectories.txt +++ b/cmake-build-debug/CMakeFiles/TargetDirectories.txt @@ -1,3 +1,6 @@ /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/CMakeFiles/Final_Project.dir /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/CMakeFiles/edit_cache.dir /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/CMakeFiles/rebuild_cache.dir +/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir +/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT/CMakeFiles/edit_cache.dir +/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT/CMakeFiles/rebuild_cache.dir diff --git a/cmake-build-debug/CMakeFiles/clion-Debug-log.txt b/cmake-build-debug/CMakeFiles/clion-Debug-log.txt index f7913ef..a641efb 100644 --- a/cmake-build-debug/CMakeFiles/clion-Debug-log.txt +++ b/cmake-build-debug/CMakeFiles/clion-Debug-log.txt @@ -1,4 +1,13 @@ /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/home/laptop/Documents/clion/clion-2021.3.3/bin/ninja/linux/ninja -DCMAKE_C_COMPILER=/usr/bin/gcc-12 -DCMAKE_CXX_COMPILER=/usr/bin/g++-12 -G Ninja -S "/home/laptop/Documents/Brock/CS 3P98/Final Project" -B "/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug" +Standard Files /home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/src/blt/std/queues.cpp;/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/src/blt/std/random.cpp;/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/src/blt/std/string.cpp;/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/src/blt/std/system.cpp +Profiler Files /home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/src/blt/profiling/profiler.cpp +Source: /home/laptop/Documents/Brock/CS 3P98/Final Project +Current Source: /home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT +BLT 0.1a Successfully included! +Using GLUT /usr/include and /usr/lib/x86_64-linux-gnu/libglut.so;/usr/lib/x86_64-linux-gnu/libXi.so +/usr/lib/x86_64-linux-gnu/libfreeimage.so +WARNING -- If you are on linux please install the FreeImage lib +Using FreeImage /usr/lib/x86_64-linux-gnu/libfreeimage.so and /usr/include/FreeImage.h -- Configuring done -- Generating done -- Build files have been written to: /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug diff --git a/cmake-build-debug/CMakeFiles/rules.ninja b/cmake-build-debug/CMakeFiles/rules.ninja index d1a8f7e..65c18f2 100644 --- a/cmake-build-debug/CMakeFiles/rules.ninja +++ b/cmake-build-debug/CMakeFiles/rules.ninja @@ -38,6 +38,25 @@ rule CUSTOM_COMMAND description = $DESC +############################################# +# Rule for compiling CXX files. + +rule CXX_COMPILER__BLT_Debug + depfile = $DEP_FILE + deps = gcc + command = /usr/bin/g++-12 $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building CXX object $out + + +############################################# +# Rule for linking CXX static library. + +rule CXX_STATIC_LIBRARY_LINKER__BLT_Debug + command = $PRE_LINK && /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/bin/cmake -E rm -f $TARGET_FILE && /usr/bin/ar qc $TARGET_FILE $LINK_FLAGS $in && /usr/bin/ranlib $TARGET_FILE && $POST_BUILD + description = Linking CXX static library $TARGET_FILE + restat = $RESTAT + + ############################################# # Rule for re-running cmake. diff --git a/cmake-build-debug/Final_Project b/cmake-build-debug/Final_Project new file mode 100755 index 0000000..d0da578 Binary files /dev/null and b/cmake-build-debug/Final_Project differ diff --git a/cmake-build-debug/Testing/Temporary/LastTest.log b/cmake-build-debug/Testing/Temporary/LastTest.log index b84af5b..deef459 100644 --- a/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/cmake-build-debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Jan 16 12:45 EST +Start testing: Jan 16 13:51 EST ---------------------------------------------------------- -End testing: Jan 16 12:45 EST +End testing: Jan 16 13:51 EST diff --git a/cmake-build-debug/build.ninja b/cmake-build-debug/build.ninja index 5b80a0f..b36ad99 100644 --- a/cmake-build-debug/build.ninja +++ b/cmake-build-debug/build.ninja @@ -47,12 +47,12 @@ cmake_ninja_workdir = /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/cmake ############################################# # Order-only phony target for Final_Project -build cmake_object_order_depends_target_Final_Project: phony || CMakeFiles/Final_Project.dir +build cmake_object_order_depends_target_Final_Project: phony || cmake_object_order_depends_target_BLT build CMakeFiles/Final_Project.dir/src/main.cpp.o: CXX_COMPILER__Final_Project_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/src/main.cpp || cmake_object_order_depends_target_Final_Project DEP_FILE = CMakeFiles/Final_Project.dir/src/main.cpp.o.d FLAGS = -g -fdiagnostics-color=always - INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I/usr/include/FreeImage.h -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" OBJECT_DIR = CMakeFiles/Final_Project.dir OBJECT_FILE_DIR = CMakeFiles/Final_Project.dir/src @@ -64,8 +64,9 @@ build CMakeFiles/Final_Project.dir/src/main.cpp.o: CXX_COMPILER__Final_Project_D ############################################# # Link the executable Final_Project -build Final_Project: CXX_EXECUTABLE_LINKER__Final_Project_Debug CMakeFiles/Final_Project.dir/src/main.cpp.o +build Final_Project: CXX_EXECUTABLE_LINKER__Final_Project_Debug CMakeFiles/Final_Project.dir/src/main.cpp.o | libraries/BLT/libBLT.a /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/x86_64-linux-gnu/libXi.so /usr/lib/x86_64-linux-gnu/libfreeimage.so || libraries/BLT/libBLT.a FLAGS = -g + LINK_LIBRARIES = libraries/BLT/libBLT.a /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/x86_64-linux-gnu/libXi.so /usr/lib/x86_64-linux-gnu/libfreeimage.so OBJECT_DIR = CMakeFiles/Final_Project.dir POST_BUILD = : PRE_LINK = : @@ -95,9 +96,101 @@ build CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND build rebuild_cache: phony CMakeFiles/rebuild_cache.util +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# /home/laptop/Documents/Brock/CS 3P98/Final Project/CMakeLists.txt +# ============================================================================= + +# ============================================================================= +# Object build statements for STATIC_LIBRARY target BLT + + +############################################# +# Order-only phony target for BLT + +build cmake_object_order_depends_target_BLT: phony || libraries/BLT/CMakeFiles/BLT.dir + +build libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o: CXX_COMPILER__BLT_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/src/blt/std/queues.cpp || cmake_object_order_depends_target_BLT + DEP_FILE = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o.d + FLAGS = -g -fdiagnostics-color=always + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + OBJECT_FILE_DIR = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std + +build libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o: CXX_COMPILER__BLT_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/src/blt/std/random.cpp || cmake_object_order_depends_target_BLT + DEP_FILE = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o.d + FLAGS = -g -fdiagnostics-color=always + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + OBJECT_FILE_DIR = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std + +build libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o: CXX_COMPILER__BLT_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/src/blt/std/string.cpp || cmake_object_order_depends_target_BLT + DEP_FILE = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o.d + FLAGS = -g -fdiagnostics-color=always + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + OBJECT_FILE_DIR = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std + +build libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o: CXX_COMPILER__BLT_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/src/blt/std/system.cpp || cmake_object_order_depends_target_BLT + DEP_FILE = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o.d + FLAGS = -g -fdiagnostics-color=always + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + OBJECT_FILE_DIR = libraries/BLT/CMakeFiles/BLT.dir/src/blt/std + +build libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o: CXX_COMPILER__BLT_Debug /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/src/blt/profiling/profiler.cpp || cmake_object_order_depends_target_BLT + DEP_FILE = libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o.d + FLAGS = -g -fdiagnostics-color=always + INCLUDES = -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/include" -I"/home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT/include" + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + OBJECT_FILE_DIR = libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling + + +# ============================================================================= +# Link build statements for STATIC_LIBRARY target BLT + + +############################################# +# Link the static library libraries/BLT/libBLT.a + +build libraries/BLT/libBLT.a: CXX_STATIC_LIBRARY_LINKER__BLT_Debug libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o + LANGUAGE_COMPILE_FLAGS = -g + OBJECT_DIR = libraries/BLT/CMakeFiles/BLT.dir + POST_BUILD = : + PRE_LINK = : + TARGET_FILE = libraries/BLT/libBLT.a + TARGET_PDB = BLT.a.dbg + + +############################################# +# Utility command for edit_cache + +build libraries/BLT/CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd "/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT" && /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. + DESC = No interactive CMake dialog available... + restat = 1 + +build libraries/BLT/edit_cache: phony libraries/BLT/CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build libraries/BLT/CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd "/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT" && /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/bin/cmake --regenerate-during-build -S"/home/laptop/Documents/Brock/CS 3P98/Final Project" -B"/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug" + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build libraries/BLT/rebuild_cache: phony libraries/BLT/CMakeFiles/rebuild_cache.util + # ============================================================================= # Target aliases. +build BLT: phony libraries/BLT/libBLT.a + +build libBLT.a: phony libraries/BLT/libBLT.a + # ============================================================================= # Folder targets. @@ -106,7 +199,14 @@ build rebuild_cache: phony CMakeFiles/rebuild_cache.util ############################################# # Folder: /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug -build all: phony Final_Project +build all: phony Final_Project libraries/BLT/all + +# ============================================================================= + +############################################# +# Folder: /home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT + +build libraries/BLT/all: phony libraries/BLT/libBLT.a # ============================================================================= # Built-in targets @@ -115,14 +215,14 @@ build all: phony Final_Project ############################################# # Re-run CMake if any of its inputs changed. -build build.ninja: RERUN_CMAKE | /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/CMakeLists.txt /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCXXInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCommonLanguageInclude.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeGenericSystem.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeInitializeConfigs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeLanguageInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInitialize.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/3.24.2/CMakeCCompiler.cmake CMakeFiles/3.24.2/CMakeCXXCompiler.cmake CMakeFiles/3.24.2/CMakeSystem.cmake +build build.ninja: RERUN_CMAKE | /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/CMakeLists.txt /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/CMakeLists.txt /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCXXInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCommonLanguageInclude.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeGenericSystem.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeInitializeConfigs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeLanguageInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInitialize.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindGLUT.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageMessage.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPkgConfig.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/UnixPaths.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.24.2/CMakeCCompiler.cmake CMakeFiles/3.24.2/CMakeCXXCompiler.cmake CMakeFiles/3.24.2/CMakeSystem.cmake pool = console ############################################# # A missing CMake input file is not an error. -build /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/CMakeLists.txt /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCXXInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCommonLanguageInclude.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeGenericSystem.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeInitializeConfigs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeLanguageInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInitialize.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/3.24.2/CMakeCCompiler.cmake CMakeFiles/3.24.2/CMakeCXXCompiler.cmake CMakeFiles/3.24.2/CMakeSystem.cmake: phony +build /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/CMakeLists.txt /home/laptop/Documents/Brock/CS$ 3P98/Final$ Project/libraries/BLT/CMakeLists.txt /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCXXInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeCommonLanguageInclude.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeGenericSystem.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeInitializeConfigs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeLanguageInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInformation.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/CMakeSystemSpecificInitialize.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Compiler/GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindGLUT.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPackageMessage.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/FindPkgConfig.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-C.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU-CXX.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux-GNU.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/Linux.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/Platform/UnixPaths.cmake /home/laptop/Documents/clion/clion-2021.3.3/bin/cmake/linux/share/cmake-3.24/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.24.2/CMakeCCompiler.cmake CMakeFiles/3.24.2/CMakeCXXCompiler.cmake CMakeFiles/3.24.2/CMakeSystem.cmake: phony ############################################# diff --git a/cmake-build-debug/cmake_install.cmake b/cmake-build-debug/cmake_install.cmake index 04ca9b4..e5f1e18 100644 --- a/cmake-build-debug/cmake_install.cmake +++ b/cmake-build-debug/cmake_install.cmake @@ -42,6 +42,11 @@ if(NOT DEFINED CMAKE_OBJDUMP) set(CMAKE_OBJDUMP "/usr/bin/objdump") endif() +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/home/laptop/Documents/Brock/CS 3P98/Final Project/cmake-build-debug/libraries/BLT/cmake_install.cmake") +endif() + if(CMAKE_INSTALL_COMPONENT) set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") else() diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o new file mode 100644 index 0000000..4c3d046 Binary files /dev/null and b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o differ diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o new file mode 100644 index 0000000..cee5aa8 Binary files /dev/null and b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/queues.cpp.o differ diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o new file mode 100644 index 0000000..67d6826 Binary files /dev/null and b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/random.cpp.o differ diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o new file mode 100644 index 0000000..be6e0f0 Binary files /dev/null and b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o differ diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o new file mode 100644 index 0000000..dab77f3 Binary files /dev/null and b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/system.cpp.o differ diff --git a/cmake-build-debug/libraries/BLT/cmake_install.cmake b/cmake-build-debug/libraries/BLT/cmake_install.cmake new file mode 100644 index 0000000..46ad969 --- /dev/null +++ b/cmake-build-debug/libraries/BLT/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/laptop/Documents/Brock/CS 3P98/Final Project/libraries/BLT + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + diff --git a/cmake-build-debug/libraries/BLT/libBLT.a b/cmake-build-debug/libraries/BLT/libBLT.a new file mode 100644 index 0000000..70adc0f Binary files /dev/null and b/cmake-build-debug/libraries/BLT/libBLT.a differ diff --git a/libraries/freeimage/include/FreeImage.h b/libraries/freeimage/include/FreeImage.h new file mode 100644 index 0000000..ff60dd6 --- /dev/null +++ b/libraries/freeimage/include/FreeImage.h @@ -0,0 +1,1103 @@ +// ========================================================== +// FreeImage 3 +// +// Design and implementation by +// - Floris van den Berg (flvdberg@wxs.nl) +// - Hervé Drolon (drolon@infonie.fr) +// +// Contributors: +// - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file +// +// This file is part of FreeImage 3 +// +// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY +// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES +// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE +// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED +// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT +// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY +// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL +// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER +// THIS DISCLAIMER. +// +// Use at your own risk! +// ========================================================== + +#ifndef FREEIMAGE_H +#define FREEIMAGE_H + +// Version information ------------------------------------------------------ + +#define FREEIMAGE_MAJOR_VERSION 3 +#define FREEIMAGE_MINOR_VERSION 15 +#define FREEIMAGE_RELEASE_SERIAL 3 + +// Compiler options --------------------------------------------------------- + +#include // needed for UNICODE functions + +#if defined(FREEIMAGE_LIB) + #define DLL_API + #define DLL_CALLCONV +#else + #if defined(_WIN32) || defined(__WIN32__) + #define DLL_CALLCONV __stdcall + // The following ifdef block is the standard way of creating macros which make exporting + // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS + // symbol defined on the command line. this symbol should not be defined on any project + // that uses this DLL. This way any other project whose source files include this file see + // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols + // defined with this macro as being exported. + #ifdef FREEIMAGE_EXPORTS + #define DLL_API __declspec(dllexport) + #else + #define DLL_API __declspec(dllimport) + #endif // FREEIMAGE_EXPORTS + #else + // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility) + #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) + #ifndef GCC_HASCLASSVISIBILITY + #define GCC_HASCLASSVISIBILITY + #endif + #endif // __GNUC__ + #define DLL_CALLCONV + #if defined(GCC_HASCLASSVISIBILITY) + #define DLL_API __attribute__ ((visibility("default"))) + #else + #define DLL_API + #endif + #endif // WIN32 / !WIN32 +#endif // FREEIMAGE_LIB + +// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined +// If your big endian system isn't being detected, add an OS specific check +#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \ + (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \ + defined(__BIG_ENDIAN__) +#define FREEIMAGE_BIGENDIAN +#endif // BYTE_ORDER + +// This really only affects 24 and 32 bit formats, the rest are always RGB order. +#define FREEIMAGE_COLORORDER_BGR 0 +#define FREEIMAGE_COLORORDER_RGB 1 +#if defined(FREEIMAGE_BIGENDIAN) +#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB +#else +#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR +#endif + +// Ensure 4-byte enums if we're using Borland C++ compilers +#if defined(__BORLANDC__) +#pragma option push -b +#endif + +// For C compatibility -------------------------------------------------------- + +#ifdef __cplusplus +#define FI_DEFAULT(x) = x +#define FI_ENUM(x) enum x +#define FI_STRUCT(x) struct x +#else +#define FI_DEFAULT(x) +#define FI_ENUM(x) typedef int x; enum x +#define FI_STRUCT(x) typedef struct x x; struct x +#endif + +// Bitmap types ------------------------------------------------------------- + +FI_STRUCT (FIBITMAP) { void *data; }; +FI_STRUCT (FIMULTIBITMAP) { void *data; }; + +// Types used in the library (directly copied from Windows) ----------------- + +#if defined(__MINGW32__) && defined(_WINDOWS_H) +#define _WINDOWS_ // prevent a bug in MinGW32 +#endif // __MINGW32__ + +#ifndef _WINDOWS_ +#define _WINDOWS_ + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef NULL +#define NULL 0 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 +#endif + +#ifndef _MSC_VER +// define portable types for 32-bit / 64-bit OS +#include +typedef int32_t BOOL; +typedef uint8_t BYTE; +typedef uint16_t WORD; +typedef uint32_t DWORD; +typedef int32_t LONG; +typedef int64_t FIINT64; +typedef uint64_t FIUINT64; +#else +// MS is not C99 ISO compliant +typedef long BOOL; +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; +typedef long LONG; +typedef signed __int64 FIINT64; +typedef unsigned __int64 FIUINT64; +#endif // _MSC_VER + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(push, 1) +#else +#pragma pack(1) +#endif // WIN32 + +typedef struct tagRGBQUAD { +#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; +#else + BYTE rgbRed; + BYTE rgbGreen; + BYTE rgbBlue; +#endif // FREEIMAGE_COLORORDER + BYTE rgbReserved; +} RGBQUAD; + +typedef struct tagRGBTRIPLE { +#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR + BYTE rgbtBlue; + BYTE rgbtGreen; + BYTE rgbtRed; +#else + BYTE rgbtRed; + BYTE rgbtGreen; + BYTE rgbtBlue; +#endif // FREEIMAGE_COLORORDER +} RGBTRIPLE; + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(pop) +#else +#pragma pack() +#endif // WIN32 + +typedef struct tagBITMAPINFOHEADER{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER, *PBITMAPINFOHEADER; + +typedef struct tagBITMAPINFO { + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO, *PBITMAPINFO; + +#endif // _WINDOWS_ + +// Types used in the library (specific to FreeImage) ------------------------ + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(push, 1) +#else +#pragma pack(1) +#endif // WIN32 + +/** 48-bit RGB +*/ +typedef struct tagFIRGB16 { + WORD red; + WORD green; + WORD blue; +} FIRGB16; + +/** 64-bit RGBA +*/ +typedef struct tagFIRGBA16 { + WORD red; + WORD green; + WORD blue; + WORD alpha; +} FIRGBA16; + +/** 96-bit RGB Float +*/ +typedef struct tagFIRGBF { + float red; + float green; + float blue; +} FIRGBF; + +/** 128-bit RGBA Float +*/ +typedef struct tagFIRGBAF { + float red; + float green; + float blue; + float alpha; +} FIRGBAF; + +/** Data structure for COMPLEX type (complex number) +*/ +typedef struct tagFICOMPLEX { + /// real part + double r; + /// imaginary part + double i; +} FICOMPLEX; + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(pop) +#else +#pragma pack() +#endif // WIN32 + +// Indexes for byte arrays, masks and shifts for treating pixels as words --- +// These coincide with the order of RGBQUAD and RGBTRIPLE ------------------- + +#ifndef FREEIMAGE_BIGENDIAN +#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR +// Little Endian (x86 / MS Windows, Linux) : BGR(A) order +#define FI_RGBA_RED 2 +#define FI_RGBA_GREEN 1 +#define FI_RGBA_BLUE 0 +#define FI_RGBA_ALPHA 3 +#define FI_RGBA_RED_MASK 0x00FF0000 +#define FI_RGBA_GREEN_MASK 0x0000FF00 +#define FI_RGBA_BLUE_MASK 0x000000FF +#define FI_RGBA_ALPHA_MASK 0xFF000000 +#define FI_RGBA_RED_SHIFT 16 +#define FI_RGBA_GREEN_SHIFT 8 +#define FI_RGBA_BLUE_SHIFT 0 +#define FI_RGBA_ALPHA_SHIFT 24 +#else +// Little Endian (x86 / MaxOSX) : RGB(A) order +#define FI_RGBA_RED 0 +#define FI_RGBA_GREEN 1 +#define FI_RGBA_BLUE 2 +#define FI_RGBA_ALPHA 3 +#define FI_RGBA_RED_MASK 0x000000FF +#define FI_RGBA_GREEN_MASK 0x0000FF00 +#define FI_RGBA_BLUE_MASK 0x00FF0000 +#define FI_RGBA_ALPHA_MASK 0xFF000000 +#define FI_RGBA_RED_SHIFT 0 +#define FI_RGBA_GREEN_SHIFT 8 +#define FI_RGBA_BLUE_SHIFT 16 +#define FI_RGBA_ALPHA_SHIFT 24 +#endif // FREEIMAGE_COLORORDER +#else +#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR +// Big Endian (PPC / none) : BGR(A) order +#define FI_RGBA_RED 2 +#define FI_RGBA_GREEN 1 +#define FI_RGBA_BLUE 0 +#define FI_RGBA_ALPHA 3 +#define FI_RGBA_RED_MASK 0x0000FF00 +#define FI_RGBA_GREEN_MASK 0x00FF0000 +#define FI_RGBA_BLUE_MASK 0xFF000000 +#define FI_RGBA_ALPHA_MASK 0x000000FF +#define FI_RGBA_RED_SHIFT 8 +#define FI_RGBA_GREEN_SHIFT 16 +#define FI_RGBA_BLUE_SHIFT 24 +#define FI_RGBA_ALPHA_SHIFT 0 +#else +// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order +#define FI_RGBA_RED 0 +#define FI_RGBA_GREEN 1 +#define FI_RGBA_BLUE 2 +#define FI_RGBA_ALPHA 3 +#define FI_RGBA_RED_MASK 0xFF000000 +#define FI_RGBA_GREEN_MASK 0x00FF0000 +#define FI_RGBA_BLUE_MASK 0x0000FF00 +#define FI_RGBA_ALPHA_MASK 0x000000FF +#define FI_RGBA_RED_SHIFT 24 +#define FI_RGBA_GREEN_SHIFT 16 +#define FI_RGBA_BLUE_SHIFT 8 +#define FI_RGBA_ALPHA_SHIFT 0 +#endif // FREEIMAGE_COLORORDER +#endif // FREEIMAGE_BIGENDIAN + +#define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK) + +// The 16bit macros only include masks and shifts, since each color element is not byte aligned + +#define FI16_555_RED_MASK 0x7C00 +#define FI16_555_GREEN_MASK 0x03E0 +#define FI16_555_BLUE_MASK 0x001F +#define FI16_555_RED_SHIFT 10 +#define FI16_555_GREEN_SHIFT 5 +#define FI16_555_BLUE_SHIFT 0 +#define FI16_565_RED_MASK 0xF800 +#define FI16_565_GREEN_MASK 0x07E0 +#define FI16_565_BLUE_MASK 0x001F +#define FI16_565_RED_SHIFT 11 +#define FI16_565_GREEN_SHIFT 5 +#define FI16_565_BLUE_SHIFT 0 + +// ICC profile support ------------------------------------------------------ + +#define FIICC_DEFAULT 0x00 +#define FIICC_COLOR_IS_CMYK 0x01 + +FI_STRUCT (FIICCPROFILE) { + WORD flags; // info flag + DWORD size; // profile's size measured in bytes + void *data; // points to a block of contiguous memory containing the profile +}; + +// Important enums ---------------------------------------------------------- + +/** I/O image format identifiers. +*/ +FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_UNKNOWN = -1, + FIF_BMP = 0, + FIF_ICO = 1, + FIF_JPEG = 2, + FIF_JNG = 3, + FIF_KOALA = 4, + FIF_LBM = 5, + FIF_IFF = FIF_LBM, + FIF_MNG = 6, + FIF_PBM = 7, + FIF_PBMRAW = 8, + FIF_PCD = 9, + FIF_PCX = 10, + FIF_PGM = 11, + FIF_PGMRAW = 12, + FIF_PNG = 13, + FIF_PPM = 14, + FIF_PPMRAW = 15, + FIF_RAS = 16, + FIF_TARGA = 17, + FIF_TIFF = 18, + FIF_WBMP = 19, + FIF_PSD = 20, + FIF_CUT = 21, + FIF_XBM = 22, + FIF_XPM = 23, + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, + FIF_FAXG3 = 27, + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, + FIF_JP2 = 31, + FIF_PFM = 32, + FIF_PICT = 33, + FIF_RAW = 34 +}; + +/** Image type used in FreeImage. +*/ +FI_ENUM(FREE_IMAGE_TYPE) { + FIT_UNKNOWN = 0, // unknown type + FIT_BITMAP = 1, // standard image : 1-, 4-, 8-, 16-, 24-, 32-bit + FIT_UINT16 = 2, // array of unsigned short : unsigned 16-bit + FIT_INT16 = 3, // array of short : signed 16-bit + FIT_UINT32 = 4, // array of unsigned long : unsigned 32-bit + FIT_INT32 = 5, // array of long : signed 32-bit + FIT_FLOAT = 6, // array of float : 32-bit IEEE floating point + FIT_DOUBLE = 7, // array of double : 64-bit IEEE floating point + FIT_COMPLEX = 8, // array of FICOMPLEX : 2 x 64-bit IEEE floating point + FIT_RGB16 = 9, // 48-bit RGB image : 3 x 16-bit + FIT_RGBA16 = 10, // 64-bit RGBA image : 4 x 16-bit + FIT_RGBF = 11, // 96-bit RGB float image : 3 x 32-bit IEEE floating point + FIT_RGBAF = 12 // 128-bit RGBA float image : 4 x 32-bit IEEE floating point +}; + +/** Image color type used in FreeImage. +*/ +FI_ENUM(FREE_IMAGE_COLOR_TYPE) { + FIC_MINISWHITE = 0, // min value is white + FIC_MINISBLACK = 1, // min value is black + FIC_RGB = 2, // RGB color model + FIC_PALETTE = 3, // color map indexed + FIC_RGBALPHA = 4, // RGB color model with alpha channel + FIC_CMYK = 5 // CMYK color model +}; + +/** Color quantization algorithms. +Constants used in FreeImage_ColorQuantize. +*/ +FI_ENUM(FREE_IMAGE_QUANTIZE) { + FIQ_WUQUANT = 0, // Xiaolin Wu color quantization algorithm + FIQ_NNQUANT = 1 // NeuQuant neural-net quantization algorithm by Anthony Dekker +}; + +/** Dithering algorithms. +Constants used in FreeImage_Dither. +*/ +FI_ENUM(FREE_IMAGE_DITHER) { + FID_FS = 0, // Floyd & Steinberg error diffusion + FID_BAYER4x4 = 1, // Bayer ordered dispersed dot dithering (order 2 dithering matrix) + FID_BAYER8x8 = 2, // Bayer ordered dispersed dot dithering (order 3 dithering matrix) + FID_CLUSTER6x6 = 3, // Ordered clustered dot dithering (order 3 - 6x6 matrix) + FID_CLUSTER8x8 = 4, // Ordered clustered dot dithering (order 4 - 8x8 matrix) + FID_CLUSTER16x16= 5, // Ordered clustered dot dithering (order 8 - 16x16 matrix) + FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix) +}; + +/** Lossless JPEG transformations +Constants used in FreeImage_JPEGTransform +*/ +FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_NONE = 0, // no transformation + FIJPEG_OP_FLIP_H = 1, // horizontal flip + FIJPEG_OP_FLIP_V = 2, // vertical flip + FIJPEG_OP_TRANSPOSE = 3, // transpose across UL-to-LR axis + FIJPEG_OP_TRANSVERSE = 4, // transpose across UR-to-LL axis + FIJPEG_OP_ROTATE_90 = 5, // 90-degree clockwise rotation + FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw) +}; + +/** Tone mapping operators. +Constants used in FreeImage_ToneMapping. +*/ +FI_ENUM(FREE_IMAGE_TMO) { + FITMO_DRAGO03 = 0, // Adaptive logarithmic mapping (F. Drago, 2003) + FITMO_REINHARD05 = 1, // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005) + FITMO_FATTAL02 = 2 // Gradient domain high dynamic range compression (R. Fattal, 2002) +}; + +/** Upsampling / downsampling filters. +Constants used in FreeImage_Rescale. +*/ +FI_ENUM(FREE_IMAGE_FILTER) { + FILTER_BOX = 0, // Box, pulse, Fourier window, 1st order (constant) b-spline + FILTER_BICUBIC = 1, // Mitchell & Netravali's two-param cubic filter + FILTER_BILINEAR = 2, // Bilinear filter + FILTER_BSPLINE = 3, // 4th order (cubic) b-spline + FILTER_CATMULLROM = 4, // Catmull-Rom spline, Overhauser spline + FILTER_LANCZOS3 = 5 // Lanczos3 filter +}; + +/** Color channels. +Constants used in color manipulation routines. +*/ +FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) { + FICC_RGB = 0, // Use red, green and blue channels + FICC_RED = 1, // Use red channel + FICC_GREEN = 2, // Use green channel + FICC_BLUE = 3, // Use blue channel + FICC_ALPHA = 4, // Use alpha channel + FICC_BLACK = 5, // Use black channel + FICC_REAL = 6, // Complex images: use real part + FICC_IMAG = 7, // Complex images: use imaginary part + FICC_MAG = 8, // Complex images: use magnitude + FICC_PHASE = 9 // Complex images: use phase +}; + +// Metadata support --------------------------------------------------------- + +/** + Tag data type information (based on TIFF specifications) + + Note: RATIONALs are the ratio of two 32-bit integer values. +*/ +FI_ENUM(FREE_IMAGE_MDTYPE) { + FIDT_NOTYPE = 0, // placeholder + FIDT_BYTE = 1, // 8-bit unsigned integer + FIDT_ASCII = 2, // 8-bit bytes w/ last byte null + FIDT_SHORT = 3, // 16-bit unsigned integer + FIDT_LONG = 4, // 32-bit unsigned integer + FIDT_RATIONAL = 5, // 64-bit unsigned fraction + FIDT_SBYTE = 6, // 8-bit signed integer + FIDT_UNDEFINED = 7, // 8-bit untyped data + FIDT_SSHORT = 8, // 16-bit signed integer + FIDT_SLONG = 9, // 32-bit signed integer + FIDT_SRATIONAL = 10, // 64-bit signed fraction + FIDT_FLOAT = 11, // 32-bit IEEE floating point + FIDT_DOUBLE = 12, // 64-bit IEEE floating point + FIDT_IFD = 13, // 32-bit unsigned integer (offset) + FIDT_PALETTE = 14, // 32-bit RGBQUAD + FIDT_LONG8 = 16, // 64-bit unsigned integer + FIDT_SLONG8 = 17, // 64-bit signed integer + FIDT_IFD8 = 18 // 64-bit unsigned integer (offset) +}; + +/** + Metadata models supported by FreeImage +*/ +FI_ENUM(FREE_IMAGE_MDMODEL) { + FIMD_NODATA = -1, + FIMD_COMMENTS = 0, // single comment or keywords + FIMD_EXIF_MAIN = 1, // Exif-TIFF metadata + FIMD_EXIF_EXIF = 2, // Exif-specific metadata + FIMD_EXIF_GPS = 3, // Exif GPS metadata + FIMD_EXIF_MAKERNOTE = 4, // Exif maker note metadata + FIMD_EXIF_INTEROP = 5, // Exif interoperability metadata + FIMD_IPTC = 6, // IPTC/NAA metadata + FIMD_XMP = 7, // Abobe XMP metadata + FIMD_GEOTIFF = 8, // GeoTIFF metadata + FIMD_ANIMATION = 9, // Animation metadata + FIMD_CUSTOM = 10, // Used to attach other metadata types to a dib + FIMD_EXIF_RAW = 11 // Exif metadata as a raw buffer +}; + +/** + Handle to a metadata model +*/ +FI_STRUCT (FIMETADATA) { void *data; }; + +/** + Handle to a FreeImage tag +*/ +FI_STRUCT (FITAG) { void *data; }; + +// File IO routines --------------------------------------------------------- + +#ifndef FREEIMAGE_IO +#define FREEIMAGE_IO + +typedef void* fi_handle; +typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle); +typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle); +typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin); +typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle); + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(push, 1) +#else +#pragma pack(1) +#endif // WIN32 + +FI_STRUCT(FreeImageIO) { + FI_ReadProc read_proc; // pointer to the function used to read data + FI_WriteProc write_proc; // pointer to the function used to write data + FI_SeekProc seek_proc; // pointer to the function used to seek + FI_TellProc tell_proc; // pointer to the function used to aquire the current position +}; + +#if (defined(_WIN32) || defined(__WIN32__)) +#pragma pack(pop) +#else +#pragma pack() +#endif // WIN32 + +/** +Handle to a memory I/O stream +*/ +FI_STRUCT (FIMEMORY) { void *data; }; + +#endif // FREEIMAGE_IO + +// Plugin routines ---------------------------------------------------------- + +#ifndef PLUGINS +#define PLUGINS + +typedef const char *(DLL_CALLCONV *FI_FormatProc)(void); +typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void); +typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void); +typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void); +typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read); +typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data); +typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data); +typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data); +typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data); +typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data); +typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle); +typedef const char *(DLL_CALLCONV *FI_MimeProc)(void); +typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp); +typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type); +typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void); +typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void); + +FI_STRUCT (Plugin) { + FI_FormatProc format_proc; + FI_DescriptionProc description_proc; + FI_ExtensionListProc extension_proc; + FI_RegExprProc regexpr_proc; + FI_OpenProc open_proc; + FI_CloseProc close_proc; + FI_PageCountProc pagecount_proc; + FI_PageCapabilityProc pagecapability_proc; + FI_LoadProc load_proc; + FI_SaveProc save_proc; + FI_ValidateProc validate_proc; + FI_MimeProc mime_proc; + FI_SupportsExportBPPProc supports_export_bpp_proc; + FI_SupportsExportTypeProc supports_export_type_proc; + FI_SupportsICCProfilesProc supports_icc_profiles_proc; + FI_SupportsNoPixelsProc supports_no_pixels_proc; +}; + +typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id); + +#endif // PLUGINS + + +// Load / Save flag constants ----------------------------------------------- + +#define FIF_LOAD_NOPIXELS 0x8000 // loading: load the image header only (not supported by all plugins) + +#define BMP_DEFAULT 0 +#define BMP_SAVE_RLE 1 +#define CUT_DEFAULT 0 +#define DDS_DEFAULT 0 +#define EXR_DEFAULT 0 // save data as half with piz-based wavelet compression +#define EXR_FLOAT 0x0001 // save data as float instead of as half (not recommended) +#define EXR_NONE 0x0002 // save with no compression +#define EXR_ZIP 0x0004 // save with zlib compression, in blocks of 16 scan lines +#define EXR_PIZ 0x0008 // save with piz-based wavelet compression +#define EXR_PXR24 0x0010 // save with lossy 24-bit float compression +#define EXR_B44 0x0020 // save with lossy 44% float compression - goes to 22% when combined with EXR_LC +#define EXR_LC 0x0040 // save images with one luminance and two chroma channels, rather than as RGB (lossy compression) +#define FAXG3_DEFAULT 0 +#define GIF_DEFAULT 0 +#define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color +#define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading +#define HDR_DEFAULT 0 +#define ICO_DEFAULT 0 +#define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading +#define IFF_DEFAULT 0 +#define J2K_DEFAULT 0 // save with a 16:1 rate +#define JP2_DEFAULT 0 // save with a 16:1 rate +#define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420) +#define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality +#define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed +#define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags) +#define JPEG_EXIFROTATE 0x0008 // load and rotate according to Exif 'Orientation' tag if available +#define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1) +#define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1) +#define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1) +#define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1) +#define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1) +#define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags) +#define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1) +#define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value +#define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2) +#define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4) +#define JPEG_OPTIMIZE 0x20000 // on saving, compute optimal Huffman coding tables (can reduce a few percent of file size) +#define JPEG_BASELINE 0x40000 // save basic JPEG, without metadata or any markers +#define KOALA_DEFAULT 0 +#define LBM_DEFAULT 0 +#define MNG_DEFAULT 0 +#define PCD_DEFAULT 0 +#define PCD_BASE 1 // load the bitmap sized 768 x 512 +#define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256 +#define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128 +#define PCX_DEFAULT 0 +#define PFM_DEFAULT 0 +#define PICT_DEFAULT 0 +#define PNG_DEFAULT 0 +#define PNG_IGNOREGAMMA 1 // loading: avoid gamma correction +#define PNG_Z_BEST_SPEED 0x0001 // save using ZLib level 1 compression flag (default value is 6) +#define PNG_Z_DEFAULT_COMPRESSION 0x0006 // save using ZLib level 6 compression flag (default recommended value) +#define PNG_Z_BEST_COMPRESSION 0x0009 // save using ZLib level 9 compression flag (default value is 6) +#define PNG_Z_NO_COMPRESSION 0x0100 // save without ZLib compression +#define PNG_INTERLACED 0x0200 // save using Adam7 interlacing (use | to combine with other save flags) +#define PNM_DEFAULT 0 +#define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6) +#define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3) +#define PSD_DEFAULT 0 +#define PSD_CMYK 1 // reads tags for separated CMYK (default is conversion to RGB) +#define PSD_LAB 2 // reads tags for CIELab (default is conversion to RGB) +#define RAS_DEFAULT 0 +#define RAW_DEFAULT 0 // load the file as linear RGB 48-bit +#define RAW_PREVIEW 1 // try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit +#define RAW_DISPLAY 2 // load the file as RGB 24-bit +#define RAW_HALFSIZE 4 // output a half-size color image +#define SGI_DEFAULT 0 +#define TARGA_DEFAULT 0 +#define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -> RGB888. +#define TARGA_SAVE_RLE 2 // If set, the writer saves with RLE compression +#define TIFF_DEFAULT 0 +#define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags) +#define TIFF_PACKBITS 0x0100 // save using PACKBITS compression +#define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression) +#define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression +#define TIFF_NONE 0x0800 // save without any compression +#define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding +#define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding +#define TIFF_LZW 0x4000 // save using LZW compression +#define TIFF_JPEG 0x8000 // save using JPEG compression +#define TIFF_LOGLUV 0x10000 // save using LogLuv compression +#define WBMP_DEFAULT 0 +#define XBM_DEFAULT 0 +#define XPM_DEFAULT 0 + +// Background filling options --------------------------------------------------------- +// Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas + +#define FI_COLOR_IS_RGB_COLOR 0x00 // RGBQUAD color is a RGB color (contains no valid alpha channel) +#define FI_COLOR_IS_RGBA_COLOR 0x01 // RGBQUAD color is a RGBA color (contains a valid alpha channel) +#define FI_COLOR_FIND_EQUAL_COLOR 0x02 // For palettized images: lookup equal RGB color from palette +#define FI_COLOR_ALPHA_IS_INDEX 0x04 // The color's rgbReserved member (alpha) contains the palette index to be used +#define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed + + +#ifdef __cplusplus +extern "C" { +#endif + +// Init / Error routines ---------------------------------------------------- + +DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE)); +DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void); + +// Version routines --------------------------------------------------------- + +DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void); +DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void); + +// Message output functions ------------------------------------------------- + +typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg); +typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); + +DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); +DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf); +DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...); + +// Allocate / Clone / Unload routines --------------------------------------- + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); +DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib); +DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib); + +// Header loading routines +DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib); + +// Load / Save routines ----------------------------------------------------- + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); + +// Memory I/O stream routines ----------------------------------------------- + +DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0)); +DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0)); +DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream); +DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin); +DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes); +DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream); +DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream); + +DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags); + +// Plugin Interface --------------------------------------------------------- + +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0)); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0)); +DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void); +DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable); +DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime); +DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif); +DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif); +DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif); +DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif); +DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif); +DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif); + +// Multipaging interface ---------------------------------------------------- + +DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0)); +DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); +DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0)); +DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap); +DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data); +DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data); +DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page); +DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page); +DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed); +DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source); +DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count); + +// Filetype request routines ------------------------------------------------ + +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0)); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0)); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0)); +DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0)); + +// Image type request routine ----------------------------------------------- + +DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib); + +// FreeImage helper routines ------------------------------------------------ + +DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void); +DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue); +DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue); + +// Pixel access routines ---------------------------------------------------- + +DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib); +DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline); + +DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value); +DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value); +DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value); +DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value); + +// DIB info routines -------------------------------------------------------- + +DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib); +DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib); + +DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib); +DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res); +DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res); + +DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib); +DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib); +DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib); + +DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib); +DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib); + +DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib); +DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib); +DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled); +DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count); +DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib); +DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index); +DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib); + +DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor); +DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor); + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail); + +// ICC profile routines ----------------------------------------------------- + +DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib); +DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size); +DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib); + +// Line conversion routines ------------------------------------------------- + +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels); +DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels); + +// Smart conversion routines ------------------------------------------------ + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm); + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE)); +DLL_API void DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE)); + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib); + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE)); + +// tone mapping operators +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05Ex(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0), double adaptation FI_DEFAULT(1), double color_correction FI_DEFAULT(0)); + +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85)); + +// ZLib interface ----------------------------------------------------------- + +DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); +DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); +DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); +DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); +DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size); + +// -------------------------------------------------------------------------- +// Metadata routines -------------------------------------------------------- +// -------------------------------------------------------------------------- + +// tag creation / destruction +DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void); +DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag); +DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag); + +// tag getters and setters +DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag); +DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag); +DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag); +DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag); +DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag); +DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag); +DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag); + +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length); +DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value); + +// iterator +DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag); +DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag); +DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle); + +// metadata setter and getter +DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag); +DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag); + +// helpers +DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src); + +// tag to C string conversion +DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL)); + +// -------------------------------------------------------------------------- +// Image manipulation toolkit ----------------------------------------------- +// -------------------------------------------------------------------------- + +// rotation and flipping +/// @deprecated see FreeImage_Rotate +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask); +DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE)); +DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE)); + +// upsampling / downsampling +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE)); + +// color manipulation routines (point operations) +DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel); +DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma); +DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage); +DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage); +DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib); +DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK)); +DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert); +DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE)); +DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap); +DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha); +DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap); +DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b); + +// channel processing routines +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel); +DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); +DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); + +// copy / paste / composite routines +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom); +DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL)); +DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom); +DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib); + +// background filling routines +DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom, const void *color, int options FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateEx(int width, int height, int bpp, const RGBQUAD *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateExT(FREE_IMAGE_TYPE type, int width, int height, int bpp, const void *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); + +// miscellaneous algorithms +DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3)); + +// restore the borland-specific enum size option +#if defined(__BORLANDC__) +#pragma option pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // FREEIMAGE_H diff --git a/libraries/freeimage/include/FreeImageIO.h b/libraries/freeimage/include/FreeImageIO.h new file mode 100644 index 0000000..b251d47 --- /dev/null +++ b/libraries/freeimage/include/FreeImageIO.h @@ -0,0 +1,48 @@ +// ========================================================== +// Input/Output functions +// +// Design and implementation by +// - Floris van den Berg (flvdberg@wxs.nl) +// +// This file is part of FreeImage 3 +// +// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY +// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES +// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE +// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED +// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT +// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY +// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL +// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER +// THIS DISCLAIMER. +// +// Use at your own risk! +// ========================================================== + +#ifndef FREEIMAGEIO_H +#define FREEIMAGEIO_H + +#ifndef FREEIMAGE_H +#include "FreeImage.h" +#endif + +// ---------------------------------------------------------- + +FI_STRUCT (FIMEMORYHEADER) { + /// remember to delete the buffer + BOOL delete_me; + /// file length + long filelen; + /// buffer size + long datalen; + /// current position + long curpos; + /// start buffer address + void *data; +}; + +void SetDefaultIO(FreeImageIO *io); + +void SetMemoryIO(FreeImageIO *io); + +#endif // !FREEIMAGEIO_H diff --git a/libraries/freeimage/lib/FreeImage.lib b/libraries/freeimage/lib/FreeImage.lib new file mode 100644 index 0000000..740aa97 Binary files /dev/null and b/libraries/freeimage/lib/FreeImage.lib differ diff --git a/libraries/freeimage/lib/FreeImaged.dll b/libraries/freeimage/lib/FreeImaged.dll new file mode 100644 index 0000000..38c0099 Binary files /dev/null and b/libraries/freeimage/lib/FreeImaged.dll differ diff --git a/libraries/glut/include/GL/freeglut.h b/libraries/glut/include/GL/freeglut.h new file mode 100644 index 0000000..0e6f8c6 --- /dev/null +++ b/libraries/glut/include/GL/freeglut.h @@ -0,0 +1,22 @@ +#ifndef __FREEGLUT_H__ +#define __FREEGLUT_H__ + +/* + * freeglut.h + * + * The freeglut library include file + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#include "freeglut_std.h" +#include "freeglut_ext.h" + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_H__ */ diff --git a/libraries/glut/include/GL/freeglut_ext.h b/libraries/glut/include/GL/freeglut_ext.h new file mode 100644 index 0000000..aca85e7 --- /dev/null +++ b/libraries/glut/include/GL/freeglut_ext.h @@ -0,0 +1,212 @@ +#ifndef __FREEGLUT_EXT_H__ +#define __FREEGLUT_EXT_H__ + +/* + * freeglut_ext.h + * + * The non-GLUT-compatible extensions to the freeglut library include file + * + * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. + * Written by Pawel W. Olszta, + * Creation date: Thu Dec 2 1999 + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Additional GLUT Key definitions for the Special key function + */ +#define GLUT_KEY_NUM_LOCK 0x006D +#define GLUT_KEY_BEGIN 0x006E +#define GLUT_KEY_DELETE 0x006F + +/* + * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window + */ +#define GLUT_ACTION_EXIT 0 +#define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1 +#define GLUT_ACTION_CONTINUE_EXECUTION 2 + +/* + * Create a new rendering context when the user opens a new window? + */ +#define GLUT_CREATE_NEW_CONTEXT 0 +#define GLUT_USE_CURRENT_CONTEXT 1 + +/* + * Direct/Indirect rendering context options (has meaning only in Unix/X11) + */ +#define GLUT_FORCE_INDIRECT_CONTEXT 0 +#define GLUT_ALLOW_DIRECT_CONTEXT 1 +#define GLUT_TRY_DIRECT_CONTEXT 2 +#define GLUT_FORCE_DIRECT_CONTEXT 3 + +/* + * GLUT API Extension macro definitions -- the glutGet parameters + */ +#define GLUT_INIT_STATE 0x007C + +#define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9 + +#define GLUT_WINDOW_BORDER_WIDTH 0x01FA +#define GLUT_WINDOW_HEADER_HEIGHT 0x01FB + +#define GLUT_VERSION 0x01FC + +#define GLUT_RENDERING_CONTEXT 0x01FD +#define GLUT_DIRECT_RENDERING 0x01FE + +#define GLUT_FULL_SCREEN 0x01FF + +/* + * New tokens for glutInitDisplayMode. + * Only one GLUT_AUXn bit may be used at a time. + * Value 0x0400 is defined in OpenGLUT. + */ +#define GLUT_AUX 0x1000 + +#define GLUT_AUX1 0x1000 +#define GLUT_AUX2 0x2000 +#define GLUT_AUX3 0x4000 +#define GLUT_AUX4 0x8000 + +/* + * Context-related flags, see freeglut_state.c + */ +#define GLUT_INIT_MAJOR_VERSION 0x0200 +#define GLUT_INIT_MINOR_VERSION 0x0201 +#define GLUT_INIT_FLAGS 0x0202 +#define GLUT_INIT_PROFILE 0x0203 + +/* + * Flags for glutInitContextFlags, see freeglut_init.c + */ +#define GLUT_DEBUG 0x0001 +#define GLUT_FORWARD_COMPATIBLE 0x0002 + + +/* + * Flags for glutInitContextProfile, see freeglut_init.c + */ +#define GLUT_CORE_PROFILE 0x0001 +#define GLUT_COMPATIBILITY_PROFILE 0x0002 + +/* + * Process loop function, see freeglut_main.c + */ +FGAPI void FGAPIENTRY glutMainLoopEvent( void ); +FGAPI void FGAPIENTRY glutLeaveMainLoop( void ); +FGAPI void FGAPIENTRY glutExit ( void ); + +/* + * Window management functions, see freeglut_window.c + */ +FGAPI void FGAPIENTRY glutFullScreenToggle( void ); + +/* + * Window-specific callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) ); +FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) ); +/* A. Donev: Also a destruction callback for menus */ +FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) ); + +/* + * State setting and retrieval functions, see freeglut_state.c + */ +FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value ); +FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size); +/* A.Donev: User-data manipulation */ +FGAPI void* FGAPIENTRY glutGetWindowData( void ); +FGAPI void FGAPIENTRY glutSetWindowData(void* data); +FGAPI void* FGAPIENTRY glutGetMenuData( void ); +FGAPI void FGAPIENTRY glutSetMenuData(void* data); + +/* + * Font stuff, see freeglut_font.c + */ +FGAPI int FGAPIENTRY glutBitmapHeight( void* font ); +FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font ); +FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string ); +FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string ); + +/* + * Geometry functions, see freeglut_geometry.c + */ +FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void ); +FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void ); +FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale ); +FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale ); +FGAPI void FGAPIENTRY glutWireCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks); +FGAPI void FGAPIENTRY glutSolidCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks); + +/* + * Extension functions, see freeglut_ext.c + */ +typedef void (*GLUTproc)(); +FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName ); + +/* + * Joystick functions, see freeglut_joystick.c + */ +/* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */ +/* If you have a serious need for these functions in your application, please either + * contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net, + * switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's + * "js" library. + */ +int glutJoystickGetNumAxes( int ident ); +int glutJoystickGetNumButtons( int ident ); +int glutJoystickNotWorking( int ident ); +float glutJoystickGetDeadBand( int ident, int axis ); +void glutJoystickSetDeadBand( int ident, int axis, float db ); +float glutJoystickGetSaturation( int ident, int axis ); +void glutJoystickSetSaturation( int ident, int axis, float st ); +void glutJoystickSetMinRange( int ident, float *axes ); +void glutJoystickSetMaxRange( int ident, float *axes ); +void glutJoystickSetCenter( int ident, float *axes ); +void glutJoystickGetMinRange( int ident, float *axes ); +void glutJoystickGetMaxRange( int ident, float *axes ); +void glutJoystickGetCenter( int ident, float *axes ); + +/* + * Initialization functions, see freeglut_init.c + */ +FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion ); +FGAPI void FGAPIENTRY glutInitContextFlags( int flags ); +FGAPI void FGAPIENTRY glutInitContextProfile( int profile ); + +/* + * GLUT API macro definitions -- the display mode definitions + */ +#define GLUT_CAPTIONLESS 0x0400 +#define GLUT_BORDERLESS 0x0800 +#define GLUT_SRGB 0x1000 + +#ifdef __cplusplus + } +#endif + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_EXT_H__ */ diff --git a/libraries/glut/include/GL/freeglut_std.h b/libraries/glut/include/GL/freeglut_std.h new file mode 100644 index 0000000..da18176 --- /dev/null +++ b/libraries/glut/include/GL/freeglut_std.h @@ -0,0 +1,626 @@ +#ifndef __FREEGLUT_STD_H__ +#define __FREEGLUT_STD_H__ + +/* + * freeglut_std.h + * + * The GLUT-compatible part of the freeglut library include file + * + * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. + * Written by Pawel W. Olszta, + * Creation date: Thu Dec 2 1999 + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Under windows, we have to differentiate between static and dynamic libraries + */ +#ifdef _WIN32 +/* #pragma may not be supported by some compilers. + * Discussion by FreeGLUT developers suggests that + * Visual C++ specific code involving pragmas may + * need to move to a separate header. 24th Dec 2003 + */ + +/* Define FREEGLUT_LIB_PRAGMAS to 1 to include library + * pragmas or to 1 to exclude library pragmas. + * The default behavior depends on the compiler/platform. + */ +# ifndef FREEGLUT_LIB_PRAGMAS +# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE) +# define FREEGLUT_LIB_PRAGMAS 1 +# else +# define FREEGLUT_LIB_PRAGMAS 0 +# endif +# endif + +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# define NOMINMAX +# include + +/* Windows static library */ +# ifdef FREEGLUT_STATIC + +# define FGAPI +# define FGAPIENTRY + + /* Link with Win32 static freeglut lib */ +# if FREEGLUT_LIB_PRAGMAS +# pragma comment (lib, "freeglut_static.lib") +# endif + +/* Windows shared library (DLL) */ +# else + +# define FGAPIENTRY __stdcall +# if defined(FREEGLUT_EXPORTS) +# define FGAPI __declspec(dllexport) +# else +# define FGAPI __declspec(dllimport) + + /* Link with Win32 shared freeglut lib */ +# if FREEGLUT_LIB_PRAGMAS +# pragma comment (lib, "freeglut.lib") +# endif + +# endif + +# endif + +/* Drag in other Windows libraries as required by FreeGLUT */ +# if FREEGLUT_LIB_PRAGMAS +# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */ +# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */ +# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */ +# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */ +# pragma comment (lib, "user32.lib") /* link Windows user lib */ +# endif + +#else + +/* Non-Windows definition of FGAPI and FGAPIENTRY */ +# define FGAPI +# define FGAPIENTRY + +#endif + +/* + * The freeglut and GLUT API versions + */ +#define FREEGLUT 1 +#define GLUT_API_VERSION 4 +#define FREEGLUT_VERSION_2_0 1 +#define GLUT_XLIB_IMPLEMENTATION 13 + +/* + * Always include OpenGL and GLU headers + */ +#include +#include + +/* + * GLUT API macro definitions -- the special key codes: + */ +#define GLUT_KEY_F1 0x0001 +#define GLUT_KEY_F2 0x0002 +#define GLUT_KEY_F3 0x0003 +#define GLUT_KEY_F4 0x0004 +#define GLUT_KEY_F5 0x0005 +#define GLUT_KEY_F6 0x0006 +#define GLUT_KEY_F7 0x0007 +#define GLUT_KEY_F8 0x0008 +#define GLUT_KEY_F9 0x0009 +#define GLUT_KEY_F10 0x000A +#define GLUT_KEY_F11 0x000B +#define GLUT_KEY_F12 0x000C +#define GLUT_KEY_LEFT 0x0064 +#define GLUT_KEY_UP 0x0065 +#define GLUT_KEY_RIGHT 0x0066 +#define GLUT_KEY_DOWN 0x0067 +#define GLUT_KEY_PAGE_UP 0x0068 +#define GLUT_KEY_PAGE_DOWN 0x0069 +#define GLUT_KEY_HOME 0x006A +#define GLUT_KEY_END 0x006B +#define GLUT_KEY_INSERT 0x006C + +/* + * GLUT API macro definitions -- mouse state definitions + */ +#define GLUT_LEFT_BUTTON 0x0000 +#define GLUT_MIDDLE_BUTTON 0x0001 +#define GLUT_RIGHT_BUTTON 0x0002 +#define GLUT_DOWN 0x0000 +#define GLUT_UP 0x0001 +#define GLUT_LEFT 0x0000 +#define GLUT_ENTERED 0x0001 + +/* + * GLUT API macro definitions -- the display mode definitions + */ +#define GLUT_RGB 0x0000 +#define GLUT_RGBA 0x0000 +#define GLUT_INDEX 0x0001 +#define GLUT_SINGLE 0x0000 +#define GLUT_DOUBLE 0x0002 +#define GLUT_ACCUM 0x0004 +#define GLUT_ALPHA 0x0008 +#define GLUT_DEPTH 0x0010 +#define GLUT_STENCIL 0x0020 +#define GLUT_MULTISAMPLE 0x0080 +#define GLUT_STEREO 0x0100 +#define GLUT_LUMINANCE 0x0200 + +/* + * GLUT API macro definitions -- windows and menu related definitions + */ +#define GLUT_MENU_NOT_IN_USE 0x0000 +#define GLUT_MENU_IN_USE 0x0001 +#define GLUT_NOT_VISIBLE 0x0000 +#define GLUT_VISIBLE 0x0001 +#define GLUT_HIDDEN 0x0000 +#define GLUT_FULLY_RETAINED 0x0001 +#define GLUT_PARTIALLY_RETAINED 0x0002 +#define GLUT_FULLY_COVERED 0x0003 + +/* + * GLUT API macro definitions -- fonts definitions + * + * Steve Baker suggested to make it binary compatible with GLUT: + */ +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__) +# define GLUT_STROKE_ROMAN ((void *)0x0000) +# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001) +# define GLUT_BITMAP_9_BY_15 ((void *)0x0002) +# define GLUT_BITMAP_8_BY_13 ((void *)0x0003) +# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004) +# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005) +# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006) +# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007) +# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008) +#else + /* + * I don't really know if it's a good idea... But here it goes: + */ + extern void* glutStrokeRoman; + extern void* glutStrokeMonoRoman; + extern void* glutBitmap9By15; + extern void* glutBitmap8By13; + extern void* glutBitmapTimesRoman10; + extern void* glutBitmapTimesRoman24; + extern void* glutBitmapHelvetica10; + extern void* glutBitmapHelvetica12; + extern void* glutBitmapHelvetica18; + + /* + * Those pointers will be used by following definitions: + */ +# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman) +# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman) +# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15) +# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13) +# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10) +# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24) +# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10) +# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12) +# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18) +#endif + +/* + * GLUT API macro definitions -- the glutGet parameters + */ +#define GLUT_WINDOW_X 0x0064 +#define GLUT_WINDOW_Y 0x0065 +#define GLUT_WINDOW_WIDTH 0x0066 +#define GLUT_WINDOW_HEIGHT 0x0067 +#define GLUT_WINDOW_BUFFER_SIZE 0x0068 +#define GLUT_WINDOW_STENCIL_SIZE 0x0069 +#define GLUT_WINDOW_DEPTH_SIZE 0x006A +#define GLUT_WINDOW_RED_SIZE 0x006B +#define GLUT_WINDOW_GREEN_SIZE 0x006C +#define GLUT_WINDOW_BLUE_SIZE 0x006D +#define GLUT_WINDOW_ALPHA_SIZE 0x006E +#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F +#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070 +#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071 +#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072 +#define GLUT_WINDOW_DOUBLEBUFFER 0x0073 +#define GLUT_WINDOW_RGBA 0x0074 +#define GLUT_WINDOW_PARENT 0x0075 +#define GLUT_WINDOW_NUM_CHILDREN 0x0076 +#define GLUT_WINDOW_COLORMAP_SIZE 0x0077 +#define GLUT_WINDOW_NUM_SAMPLES 0x0078 +#define GLUT_WINDOW_STEREO 0x0079 +#define GLUT_WINDOW_CURSOR 0x007A + +#define GLUT_SCREEN_WIDTH 0x00C8 +#define GLUT_SCREEN_HEIGHT 0x00C9 +#define GLUT_SCREEN_WIDTH_MM 0x00CA +#define GLUT_SCREEN_HEIGHT_MM 0x00CB +#define GLUT_MENU_NUM_ITEMS 0x012C +#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190 +#define GLUT_INIT_WINDOW_X 0x01F4 +#define GLUT_INIT_WINDOW_Y 0x01F5 +#define GLUT_INIT_WINDOW_WIDTH 0x01F6 +#define GLUT_INIT_WINDOW_HEIGHT 0x01F7 +#define GLUT_INIT_DISPLAY_MODE 0x01F8 +#define GLUT_ELAPSED_TIME 0x02BC +#define GLUT_WINDOW_FORMAT_ID 0x007B + +/* + * GLUT API macro definitions -- the glutDeviceGet parameters + */ +#define GLUT_HAS_KEYBOARD 0x0258 +#define GLUT_HAS_MOUSE 0x0259 +#define GLUT_HAS_SPACEBALL 0x025A +#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B +#define GLUT_HAS_TABLET 0x025C +#define GLUT_NUM_MOUSE_BUTTONS 0x025D +#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E +#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F +#define GLUT_NUM_DIALS 0x0260 +#define GLUT_NUM_TABLET_BUTTONS 0x0261 +#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262 +#define GLUT_DEVICE_KEY_REPEAT 0x0263 +#define GLUT_HAS_JOYSTICK 0x0264 +#define GLUT_OWNS_JOYSTICK 0x0265 +#define GLUT_JOYSTICK_BUTTONS 0x0266 +#define GLUT_JOYSTICK_AXES 0x0267 +#define GLUT_JOYSTICK_POLL_RATE 0x0268 + +/* + * GLUT API macro definitions -- the glutLayerGet parameters + */ +#define GLUT_OVERLAY_POSSIBLE 0x0320 +#define GLUT_LAYER_IN_USE 0x0321 +#define GLUT_HAS_OVERLAY 0x0322 +#define GLUT_TRANSPARENT_INDEX 0x0323 +#define GLUT_NORMAL_DAMAGED 0x0324 +#define GLUT_OVERLAY_DAMAGED 0x0325 + +/* + * GLUT API macro definitions -- the glutVideoResizeGet parameters + */ +#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384 +#define GLUT_VIDEO_RESIZE_IN_USE 0x0385 +#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386 +#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387 +#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388 +#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389 +#define GLUT_VIDEO_RESIZE_X 0x038A +#define GLUT_VIDEO_RESIZE_Y 0x038B +#define GLUT_VIDEO_RESIZE_WIDTH 0x038C +#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D + +/* + * GLUT API macro definitions -- the glutUseLayer parameters + */ +#define GLUT_NORMAL 0x0000 +#define GLUT_OVERLAY 0x0001 + +/* + * GLUT API macro definitions -- the glutGetModifiers parameters + */ +#define GLUT_ACTIVE_SHIFT 0x0001 +#define GLUT_ACTIVE_CTRL 0x0002 +#define GLUT_ACTIVE_ALT 0x0004 + +/* + * GLUT API macro definitions -- the glutSetCursor parameters + */ +#define GLUT_CURSOR_RIGHT_ARROW 0x0000 +#define GLUT_CURSOR_LEFT_ARROW 0x0001 +#define GLUT_CURSOR_INFO 0x0002 +#define GLUT_CURSOR_DESTROY 0x0003 +#define GLUT_CURSOR_HELP 0x0004 +#define GLUT_CURSOR_CYCLE 0x0005 +#define GLUT_CURSOR_SPRAY 0x0006 +#define GLUT_CURSOR_WAIT 0x0007 +#define GLUT_CURSOR_TEXT 0x0008 +#define GLUT_CURSOR_CROSSHAIR 0x0009 +#define GLUT_CURSOR_UP_DOWN 0x000A +#define GLUT_CURSOR_LEFT_RIGHT 0x000B +#define GLUT_CURSOR_TOP_SIDE 0x000C +#define GLUT_CURSOR_BOTTOM_SIDE 0x000D +#define GLUT_CURSOR_LEFT_SIDE 0x000E +#define GLUT_CURSOR_RIGHT_SIDE 0x000F +#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010 +#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011 +#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012 +#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013 +#define GLUT_CURSOR_INHERIT 0x0064 +#define GLUT_CURSOR_NONE 0x0065 +#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066 + +/* + * GLUT API macro definitions -- RGB color component specification definitions + */ +#define GLUT_RED 0x0000 +#define GLUT_GREEN 0x0001 +#define GLUT_BLUE 0x0002 + +/* + * GLUT API macro definitions -- additional keyboard and joystick definitions + */ +#define GLUT_KEY_REPEAT_OFF 0x0000 +#define GLUT_KEY_REPEAT_ON 0x0001 +#define GLUT_KEY_REPEAT_DEFAULT 0x0002 + +#define GLUT_JOYSTICK_BUTTON_A 0x0001 +#define GLUT_JOYSTICK_BUTTON_B 0x0002 +#define GLUT_JOYSTICK_BUTTON_C 0x0004 +#define GLUT_JOYSTICK_BUTTON_D 0x0008 + +/* + * GLUT API macro definitions -- game mode definitions + */ +#define GLUT_GAME_MODE_ACTIVE 0x0000 +#define GLUT_GAME_MODE_POSSIBLE 0x0001 +#define GLUT_GAME_MODE_WIDTH 0x0002 +#define GLUT_GAME_MODE_HEIGHT 0x0003 +#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004 +#define GLUT_GAME_MODE_REFRESH_RATE 0x0005 +#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006 + +/* + * Initialization functions, see fglut_init.c + */ +FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv ); +FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y ); +FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height ); +FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ); +FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode ); + +/* + * Process loop function, see freeglut_main.c + */ +FGAPI void FGAPIENTRY glutMainLoop( void ); + +/* + * Window management functions, see freeglut_window.c + */ +FGAPI int FGAPIENTRY glutCreateWindow( const char* title ); +FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height ); +FGAPI void FGAPIENTRY glutDestroyWindow( int window ); +FGAPI void FGAPIENTRY glutSetWindow( int window ); +FGAPI int FGAPIENTRY glutGetWindow( void ); +FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title ); +FGAPI void FGAPIENTRY glutSetIconTitle( const char* title ); +FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height ); +FGAPI void FGAPIENTRY glutPositionWindow( int x, int y ); +FGAPI void FGAPIENTRY glutShowWindow( void ); +FGAPI void FGAPIENTRY glutHideWindow( void ); +FGAPI void FGAPIENTRY glutIconifyWindow( void ); +FGAPI void FGAPIENTRY glutPushWindow( void ); +FGAPI void FGAPIENTRY glutPopWindow( void ); +FGAPI void FGAPIENTRY glutFullScreen( void ); + +/* + * Display-connected functions, see freeglut_display.c + */ +FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window ); +FGAPI void FGAPIENTRY glutPostRedisplay( void ); +FGAPI void FGAPIENTRY glutSwapBuffers( void ); + +/* + * Mouse cursor functions, see freeglut_cursor.c + */ +FGAPI void FGAPIENTRY glutWarpPointer( int x, int y ); +FGAPI void FGAPIENTRY glutSetCursor( int cursor ); + +/* + * Overlay stuff, see freeglut_overlay.c + */ +FGAPI void FGAPIENTRY glutEstablishOverlay( void ); +FGAPI void FGAPIENTRY glutRemoveOverlay( void ); +FGAPI void FGAPIENTRY glutUseLayer( GLenum layer ); +FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void ); +FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window ); +FGAPI void FGAPIENTRY glutShowOverlay( void ); +FGAPI void FGAPIENTRY glutHideOverlay( void ); + +/* + * Menu stuff, see freeglut_menu.c + */ +FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) ); +FGAPI void FGAPIENTRY glutDestroyMenu( int menu ); +FGAPI int FGAPIENTRY glutGetMenu( void ); +FGAPI void FGAPIENTRY glutSetMenu( int menu ); +FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value ); +FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu ); +FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value ); +FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value ); +FGAPI void FGAPIENTRY glutRemoveMenuItem( int item ); +FGAPI void FGAPIENTRY glutAttachMenu( int button ); +FGAPI void FGAPIENTRY glutDetachMenu( int button ); + +/* + * Global callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value ); +FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) ); + +/* + * Window-specific callback functions, see freeglut_callbacks.c + */ +FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) ); +FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) ); +FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ); +FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) ); + +FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) ); +FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval ); +FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) ); +FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) ); +FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) ); + +FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) ); +FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) ); +FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) ); + +/* + * State setting and retrieval functions, see freeglut_state.c + */ +FGAPI int FGAPIENTRY glutGet( GLenum query ); +FGAPI int FGAPIENTRY glutDeviceGet( GLenum query ); +FGAPI int FGAPIENTRY glutGetModifiers( void ); +FGAPI int FGAPIENTRY glutLayerGet( GLenum query ); + +/* + * Font stuff, see freeglut_font.c + */ +FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character ); +FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character ); +FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character ); +FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character ); +FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string ); +FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string ); + +/* + * Geometry functions, see freeglut_geometry.c + */ +FGAPI void FGAPIENTRY glutWireCube( GLdouble size ); +FGAPI void FGAPIENTRY glutSolidCube( GLdouble size ); +FGAPI void FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks ); +FGAPI void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks ); + +FGAPI void FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings ); +FGAPI void FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings ); +FGAPI void FGAPIENTRY glutWireDodecahedron( void ); +FGAPI void FGAPIENTRY glutSolidDodecahedron( void ); +FGAPI void FGAPIENTRY glutWireOctahedron( void ); +FGAPI void FGAPIENTRY glutSolidOctahedron( void ); +FGAPI void FGAPIENTRY glutWireTetrahedron( void ); +FGAPI void FGAPIENTRY glutSolidTetrahedron( void ); +FGAPI void FGAPIENTRY glutWireIcosahedron( void ); +FGAPI void FGAPIENTRY glutSolidIcosahedron( void ); + +/* + * Teapot rendering functions, found in freeglut_teapot.c + */ +FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size ); +FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size ); + +/* + * Game mode functions, see freeglut_gamemode.c + */ +FGAPI void FGAPIENTRY glutGameModeString( const char* string ); +FGAPI int FGAPIENTRY glutEnterGameMode( void ); +FGAPI void FGAPIENTRY glutLeaveGameMode( void ); +FGAPI int FGAPIENTRY glutGameModeGet( GLenum query ); + +/* + * Video resize functions, see freeglut_videoresize.c + */ +FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query ); +FGAPI void FGAPIENTRY glutSetupVideoResizing( void ); +FGAPI void FGAPIENTRY glutStopVideoResizing( void ); +FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height ); +FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height ); + +/* + * Colormap functions, see freeglut_misc.c + */ +FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue ); +FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component ); +FGAPI void FGAPIENTRY glutCopyColormap( int window ); + +/* + * Misc keyboard and joystick functions, see freeglut_misc.c + */ +FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore ); +FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode ); +FGAPI void FGAPIENTRY glutForceJoystickFunc( void ); + +/* + * Misc functions, see freeglut_misc.c + */ +FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension ); +FGAPI void FGAPIENTRY glutReportErrors( void ); + +/* Comment from glut.h of classic GLUT: + + Win32 has an annoying issue where there are multiple C run-time + libraries (CRTs). If the executable is linked with a different CRT + from the GLUT DLL, the GLUT DLL will not share the same CRT static + data seen by the executable. In particular, atexit callbacks registered + in the executable will not be called if GLUT calls its (different) + exit routine). GLUT is typically built with the + "/MD" option (the CRT with multithreading DLL support), but the Visual + C++ linker default is "/ML" (the single threaded CRT). + + One workaround to this issue is requiring users to always link with + the same CRT as GLUT is compiled with. That requires users supply a + non-standard option. GLUT 3.7 has its own built-in workaround where + the executable's "exit" function pointer is covertly passed to GLUT. + GLUT then calls the executable's exit function pointer to ensure that + any "atexit" calls registered by the application are called if GLUT + needs to exit. + + Note that the __glut*WithExit routines should NEVER be called directly. + To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ + +/* to get the prototype for exit() */ +#include + +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__) +FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); +FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); +FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int)); +#ifndef FREEGLUT_BUILDING_LIB +#if defined(__GNUC__) +#define FGUNUSED __attribute__((unused)) +#else +#define FGUNUSED +#endif +static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#define glutInit glutInit_ATEXIT_HACK +static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +#define glutCreateWindow glutCreateWindow_ATEXIT_HACK +static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } +#define glutCreateMenu glutCreateMenu_ATEXIT_HACK +#endif +#endif + +#ifdef __cplusplus + } +#endif + +/*** END OF FILE ***/ + +#endif /* __FREEGLUT_STD_H__ */ + diff --git a/libraries/glut/include/GL/glut.h b/libraries/glut/include/GL/glut.h new file mode 100644 index 0000000..6191f77 --- /dev/null +++ b/libraries/glut/include/GL/glut.h @@ -0,0 +1,21 @@ +#ifndef __GLUT_H__ +#define __GLUT_H__ + +/* + * glut.h + * + * The freeglut library include file + * + * 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 + * PAWEL W. OLSZTA 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. + */ + +#include "freeglut_std.h" + +/*** END OF FILE ***/ + +#endif /* __GLUT_H__ */ diff --git a/libraries/glut/lib/freeglut.dll b/libraries/glut/lib/freeglut.dll new file mode 100644 index 0000000..0c4f24a Binary files /dev/null and b/libraries/glut/lib/freeglut.dll differ diff --git a/libraries/glut/lib/freeglut.lib b/libraries/glut/lib/freeglut.lib new file mode 100644 index 0000000..9f7b857 Binary files /dev/null and b/libraries/glut/lib/freeglut.lib differ