YoggieEngine/MyGraphicsEngine/ModelImporter.cpp

47 lines
1.2 KiB
C++
Raw Normal View History

#include "include/AssetManager/ModelImporter.h"
void ModelImporter::ImportFBX(std::string path)
{
spdlog::warn("ImportFBX not implemented!");
}
void ModelImporter::ImportBlend(std::string path)
{
spdlog::warn("ImportBlend not implemented!");
}
void ModelImporter::ImportGLTF(std::string path)
{
spdlog::warn("ImportGLTF not implemented!");
}
void ModelImporter::ImportOBJ(std::string path)
{
spdlog::warn("ImportOBJ not implemented!");
}
void ModelImporter::Import(std::string path)
{
spdlog::warn("Import not implemented!");
}
void ModelImporter::Test() {
tinygltf::Model loadedModel;
tinygltf::TinyGLTF loader;
std::string error;
std::string warn;
bool ret = loader.LoadASCIIFromFile(&loadedModel, &error, &warn, "./Build/SandboxApplication/Debug/sponza.gltf");
if (!warn.empty())
spdlog::warn("TinyGLTF Warning: {}", warn);
if (!error.empty())
spdlog::error("TinyGLTF Error: {}", error);
if (!ret) {
spdlog::error("TinyGLTF Error: Failed to parse glTF");
exit(-1);
}
spdlog::info("Meshes in model: {}", loadedModel.meshes.size());
spdlog::info("Primitives in mesh: {}", loadedModel.meshes[0].primitives.size());
}