Changed AssetType underlying type

Added mesh name to mesh asset object
Added in static token for LoadGLTF function
Fixed warning in GetTypeFromExtension
This commit is contained in:
Xiao Qi 2022-09-24 16:07:26 +08:00
parent a907c7c575
commit 78a20173e0
4 changed files with 11 additions and 6 deletions

View File

@ -18,6 +18,8 @@ namespace SHADE
SHMeshAssetHeader header;
std::string meshName;
std::vector<SHVec3> vertexPosition;
std::vector<SHVec2> texCoords;
std::vector<SHVec3> vertexTangent;

View File

@ -40,10 +40,10 @@ typedef FMOD::Sound* SHSound;
#define ASSET_META_VER "1.0"
// Asset type enum
enum class AssetType : int
enum class AssetType : uint8_t
{
INVALID = -1,
AUDIO = 0,
INVALID = 0,
AUDIO = 1,
SHADER,
MATERIAL,
IMAGE,
@ -52,7 +52,8 @@ enum class AssetType : int
SCRIPT,
SCENE,
PREFAB,
AUDIO_WAV
AUDIO_WAV,
DDS
};
//Directory

View File

@ -30,7 +30,7 @@ namespace SHADE
/****************************************************************************
* \brief Static function to generate resource ID.
****************************************************************************/
static AssetID GenerateAssetID() noexcept;
static AssetID GenerateAssetID(AssetType type) noexcept;
static AssetPath GenerateLocalPath(AssetPath path) noexcept;
@ -121,7 +121,7 @@ namespace SHADE
static bool IsRecognised(char const*) noexcept;
// Specialised load calls
void LoadGLTF(SHAsset asset) noexcept;
static void LoadGLTF(SHAsset asset) noexcept;
static FMOD::System* audioSystem;
static std::unordered_map<AssetID,SHSound>* audioSoundList;

View File

@ -42,6 +42,8 @@ namespace SHADE
return static_cast<AssetType>(i);
}
}
return AssetType::INVALID;
}
/****************************************************************************