YoggieEngine/MyGraphicsEngine/ModelImporter.cpp
Nigel Barink 9c92cc05b7 Added Gorrilla-Audio and Tinygltf Library
Started laying out a assetManager / ModelImporter
2022-05-04 11:11:57 +02:00

47 lines
1.2 KiB
C++

#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());
}