Merge pull request #55 from SHADE-DP/SP3-13-Assets-Manager
SP3-13 Assets Management Added function in asset manager to retrieve all dds images
This commit is contained in:
commit
728d615425
|
@ -21,9 +21,9 @@ namespace SHADE
|
|||
std::string meshName;
|
||||
|
||||
std::vector<SHVec3> vertexPosition;
|
||||
std::vector<SHVec2> texCoords;
|
||||
std::vector<SHVec3> vertexTangent;
|
||||
std::vector<SHVec3> vertexNormal;
|
||||
std::vector<SHVec2> texCoords;
|
||||
std::vector<uint32_t> indices;
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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<SHDDSAsset> SHAssetManager::GetAllDDS() noexcept
|
||||
{
|
||||
std::vector<SHDDSAsset> result;
|
||||
for (auto const& dds : ddsCollection)
|
||||
{
|
||||
result.push_back(dds.second);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* \param Path for meta data file
|
||||
* \param Path for asset file
|
||||
|
|
|
@ -73,6 +73,7 @@ namespace SHADE
|
|||
//TODO: TEMPORARY FOR TESTING GLTF & DDS
|
||||
static void LoadDataTemp(std::string path) noexcept;
|
||||
static std::vector<SHMeshAsset> GetAllMeshes() noexcept;
|
||||
static std::vector<SHDDSAsset> GetAllDDS() noexcept;
|
||||
|
||||
private:
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in New Issue