diff --git a/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h b/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h index a927d54b..b4632c2e 100644 --- a/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h +++ b/SHADE_Engine/src/Assets/Asset Types/SHMeshAsset.h @@ -21,9 +21,9 @@ namespace SHADE std::string meshName; std::vector vertexPosition; - std::vector texCoords; std::vector vertexTangent; std::vector vertexNormal; + std::vector texCoords; std::vector indices; }; } \ No newline at end of file diff --git a/SHADE_Engine/src/Assets/SHAssetMacros.h b/SHADE_Engine/src/Assets/SHAssetMacros.h index b8940d3e..7f1fdcbc 100644 --- a/SHADE_Engine/src/Assets/SHAssetMacros.h +++ b/SHADE_Engine/src/Assets/SHAssetMacros.h @@ -70,7 +70,8 @@ enum class AssetType : uint8_t #define PREFAB_EXTENSION ".SHPrefab" #define MATERIAL_EXTENSION ".SHMat" #define TEXTURE_EXTENSION ".dds" -#define MESH_EXTENSION ".fbx" +#define FBX_EXTENSION ".fbx" +#define MESH_EXTENSION ".shmesh" std::string const EXTENSIONS[] = { AUDIO_EXTENSION, @@ -82,7 +83,8 @@ std::string const EXTENSIONS[] = { SCRIPT_EXTENSION, SCENE_EXTENSION, PREFAB_EXTENSION, - AUDIO_WAV_EXTENSION + AUDIO_WAV_EXTENSION, + FBX_EXTENSION }; // Error flags diff --git a/SHADE_Engine/src/Assets/SHAssetManager.cpp b/SHADE_Engine/src/Assets/SHAssetManager.cpp index ac05df59..c79d0596 100644 --- a/SHADE_Engine/src/Assets/SHAssetManager.cpp +++ b/SHADE_Engine/src/Assets/SHAssetManager.cpp @@ -199,7 +199,7 @@ namespace SHADE { AssetPath path{ p }; - if (path.extension().string() == MESH_EXTENSION) + if (path.extension().string() == FBX_EXTENSION) { LoadGLTF( { @@ -236,6 +236,17 @@ namespace SHADE return result; } + std::vector SHAssetManager::GetAllDDS() noexcept + { + std::vector result; + for (auto const& dds : ddsCollection) + { + result.push_back(dds.second); + } + + return result; + } + /**************************************************************************** * \param Path for meta data file * \param Path for asset file diff --git a/SHADE_Engine/src/Assets/SHAssetManager.h b/SHADE_Engine/src/Assets/SHAssetManager.h index 8547e9e3..bf6e0dc5 100644 --- a/SHADE_Engine/src/Assets/SHAssetManager.h +++ b/SHADE_Engine/src/Assets/SHAssetManager.h @@ -73,6 +73,7 @@ namespace SHADE //TODO: TEMPORARY FOR TESTING GLTF & DDS static void LoadDataTemp(std::string path) noexcept; static std::vector GetAllMeshes() noexcept; + static std::vector GetAllDDS() noexcept; private: /****************************************************************************