This commit is contained in:
Xiao Qi 2023-02-22 15:36:05 +08:00
parent 966ce21686
commit d94e81231c
1 changed files with 13 additions and 3 deletions

View File

@ -14,12 +14,10 @@
#define TINYGLTF_IMPLEMENTATION #define TINYGLTF_IMPLEMENTATION
#define TINYGLTF_NO_EXTERNAL_IMAGE #define TINYGLTF_NO_EXTERNAL_IMAGE
#define TINYGLTF_USE_CPP14
#define TINYGLTF_NO_INCLUDE_STB_IMAGE #define TINYGLTF_NO_INCLUDE_STB_IMAGE
#define TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE #define TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE
#define TINYGLTF_NO_STB_IMAGE_WRITE #define TINYGLTF_NO_STB_IMAGE_WRITE
#define TINYGLTF_NO_STB_IMAGE #define TINYGLTF_NO_STB_IMAGE
#define TINYGLTF_USE_CPP14
#include "MeshCompiler.h" #include "MeshCompiler.h"
#include "MeshWriter.h" #include "MeshWriter.h"
@ -62,6 +60,16 @@ namespace SH_COMP
void MeshCompiler::ProcessModel(ModelData const& data, ModelRef asset) noexcept void MeshCompiler::ProcessModel(ModelData const& data, ModelRef asset) noexcept
{ {
#if 0
for (auto i {0}; i < 2; ++i)
{
auto& mesh{ asset.meshes.emplace_back() };
mesh.vertexNormal.resize(3883);
mesh.vertexPosition.resize(3883);
mesh.vertexTangent.resize(3883);
mesh.texCoords.resize(3883);
}
#else
accessors = &data.accessors; accessors = &data.accessors;
bufferViews = &data.bufferViews; bufferViews = &data.bufferViews;
buffer = data.buffers[0].data.data(); buffer = data.buffers[0].data.data();
@ -129,6 +137,8 @@ namespace SH_COMP
std::cout << "[Model Compiler] Failed to load critical data from gltf\n"; std::cout << "[Model Compiler] Failed to load critical data from gltf\n";
} }
} }
#endif
} }
inline void MeshCompiler::BuildHeaders(ModelRef asset) noexcept inline void MeshCompiler::BuildHeaders(ModelRef asset) noexcept