Added GLTF extension recognisation

This commit is contained in:
Xiao Qi 2022-09-26 19:10:12 +08:00
parent 4dd2335fb8
commit caab2c37ab
5 changed files with 4998 additions and 3 deletions

Binary file not shown.

4993
Assets/racoon.gltf Normal file

File diff suppressed because one or more lines are too long

View File

@ -79,7 +79,7 @@ namespace Sandbox
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHInputManagerSystem, SHADE::SHInputManagerSystem::InputManagerRoutine>();
//TODO: REMOVE AFTER PRESENTATION
SHADE::SHAssetManager::LoadDataTemp("../../Assets/racoon.fbx");
SHADE::SHAssetManager::LoadDataTemp("../../Assets/racoon.gltf");
SHADE::SHAssetManager::LoadDataTemp("../../Assets/RaccoonBag_Color_Ver4.dds");
SHADE::SHAssetManager::LoadDataTemp("../../Assets/RaccoonPreTexturedVer1_Base9.dds");
//TODO: REMOVE AFTER PRESENTATION

View File

@ -71,6 +71,7 @@ enum class AssetType : uint8_t
#define MATERIAL_EXTENSION ".SHMat"
#define TEXTURE_EXTENSION ".dds"
#define FBX_EXTENSION ".fbx"
#define GLTF_EXTENSION ".gltf"
#define MESH_EXTENSION ".shmesh"
std::string const EXTENSIONS[] = {
@ -84,7 +85,8 @@ std::string const EXTENSIONS[] = {
SCENE_EXTENSION,
PREFAB_EXTENSION,
AUDIO_WAV_EXTENSION,
FBX_EXTENSION
FBX_EXTENSION,
GLTF_EXTENSION
};
// Error flags

View File

@ -199,7 +199,7 @@ namespace SHADE
{
AssetPath path{ p };
if (path.extension().string() == FBX_EXTENSION)
if (path.extension().string() == GLTF_EXTENSION)
{
LoadGLTF(
{