Migrated necessary tinygltf files into project as include headers instead of as dependency

This commit is contained in:
Xiao Qi 2023-03-07 16:16:38 +08:00
parent ffb489a0d6
commit 4609aa8044
6 changed files with 34826 additions and 3057 deletions

View File

@ -1,6 +1,3 @@
-- AssimpInclude = "%{prj.location}\\Dependencies\\assimp"
TinyGLTFInclude = "%{prj.location}\\Dependencies\\tinygltf"
outputdir = "%{wks.location}/bin/%{cfg.buildcfg}" outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
interdir = "%{wks.location}/bin_int" interdir = "%{wks.location}/bin_int"
workspace "ModelCompile" workspace "ModelCompile"
@ -26,60 +23,37 @@ project "ModelCompiler"
"%{prj.location}/src/**.hpp" "%{prj.location}/src/**.hpp"
} }
externalincludedirs
{
"%{TinyGLTFInclude}"
}
includedirs includedirs
{ {
"%{prj.location}/src", "%{prj.location}/src"
} }
externalwarnings "Off" externalwarnings "Off"
libdirs
{
"%{AssimpInclude}/lib/Debug",
"%{AssimpInclude}/lib/Release"
}
flags flags
{ {
"MultiProcessorCompile" "MultiProcessorCompile"
} }
-- filter "configurations:Debug"
-- postbuildcommands
-- {
-- "xcopy /r /y /q \"%{AssimpInclude}\\bin\\Debug\\assimp-vc142-mtd.dll\" \"$(OutDir)\""
-- }
-- filter "configurations:Release"
-- postbuildcommands
-- {
-- "xcopy /r /y /q \"%{AssimpInclude}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\""
-- }
-- filter "configurations:Publish"
-- postbuildcommands
-- {
-- "xcopy /r /y /q \"%{AssimpInclude}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\""
-- }
warnings 'Extra' warnings 'Extra'
defines {
"TINYGLTF_IMPLEMENTATION",
"TINYGLTF_NO_EXTERNAL_IMAGE",
"TINYGLTF_NO_INCLUDE_STB_IMAGE",
"TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE",
"TINYGLTF_NO_STB_IMAGE_WRITE",
"TINYGLTF_NO_STB_IMAGE"
}
filter "configurations:Debug" filter "configurations:Debug"
symbols "On" symbols "On"
defines {"_DEBUG"} defines {"_DEBUG"}
-- links{"assimp-vc142-mtd.lib"}
filter "configurations:Release" filter "configurations:Release"
optimize "On" optimize "On"
defines{"_RELEASE"} defines{"_RELEASE"}
-- links{"assimp-vc142-mt.lib"}
filter "configurations:Publish" filter "configurations:Publish"
optimize "On" optimize "On"
defines{"_RELEASE, _PUBLISH"} defines{"_RELEASE, _PUBLISH"}
-- links{"assimp-vc142-mt.lib"}

File diff suppressed because one or more lines are too long

26753
src/Includes/json.hpp Normal file

File diff suppressed because it is too large Load Diff

8058
src/Includes/tiny_gltf.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,13 +12,6 @@
*****************************************************************************/ *****************************************************************************/
#define TINYGLTF_IMPLEMENTATION
#define TINYGLTF_NO_EXTERNAL_IMAGE
#define TINYGLTF_NO_INCLUDE_STB_IMAGE
#define TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE
#define TINYGLTF_NO_STB_IMAGE_WRITE
#define TINYGLTF_NO_STB_IMAGE
#include "MeshCompiler.h" #include "MeshCompiler.h"
#include "MeshWriter.h" #include "MeshWriter.h"
@ -26,7 +19,7 @@
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
#include "tiny_gltf.h" #include "Includes/tiny_gltf.h"
#include <map> #include <map>
#include <stack> #include <stack>

View File

@ -8,11 +8,11 @@
* or disclosure of this file or its contents without the prior * or disclosure of this file or its contents without the prior
* written consent of Digipen Institute of Technology is prohibited. * written consent of Digipen Institute of Technology is prohibited.
******************************************************************************/ ******************************************************************************/
#include "Libraries/MeshCompiler.h" #include "Libraries/MeshCompiler.h"
#include <vector> #include <vector>
#include <filesystem> #include <filesystem>
#include <iostream>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
@ -22,7 +22,7 @@ int main(int argc, char* argv[])
if (argc == 1) if (argc == 1)
{ {
#if 0 #if 1
if (std::filesystem::is_directory(ASSET_ROOT)) if (std::filesystem::is_directory(ASSET_ROOT))
{ {
for (auto& dir : for (auto& dir :
@ -72,7 +72,7 @@ int main(int argc, char* argv[])
#else #else
(void)argc; (void)argc;
(void)argv; (void)argv;
SH_COMP::MeshCompiler::LoadAndCompile("racoon.gltf"); SH_COMP::MeshCompiler::LoadAndCompile("MD_HomeownerV2.gltf");
#endif #endif
return 0; return 0;