Material WIP

This commit is contained in:
Xiao Qi 2022-10-29 11:58:14 +08:00
parent 22b0a2f97b
commit cd62dbbb25
3 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,10 @@ namespace SHADE
data->data = std::move(content);
result = data;
}
else if (path.extension().string() == MATERIAL_EXTENSION)
{
auto data = //TODO make material class
}
file.close();
@ -76,6 +80,10 @@ namespace SHADE
auto prefab = dynamic_cast<SHPrefabAsset const*>(data);
file << prefab->data;
}
else if (path.extension().string() == MATERIAL_EXTENSION)
{
auto material = //todo
}
file.close();
}

View File

@ -49,6 +49,7 @@ enum class AssetType : AssetTypeMeta
MESH,
SCENE,
PREFAB,
MATERIAL,
MAX_COUNT
};
constexpr size_t TYPE_COUNT{ static_cast<size_t>(AssetType::MAX_COUNT) };

View File

@ -362,6 +362,7 @@ namespace SHADE
loaders[static_cast<size_t>(AssetType::MESH)] = dynamic_cast<SHAssetLoader*>(new SHMeshLoader());
loaders[static_cast<size_t>(AssetType::SCENE)] = dynamic_cast<SHAssetLoader*>(new SHTextBasedLoader());
loaders[static_cast<size_t>(AssetType::PREFAB)] = loaders[static_cast<size_t>(AssetType::SCENE)];
loaders[static_cast<size_t>(AssetType::MATERIAL)] = loaders[static_cast<size_t>(AssetType::SCENE)];
}
/****************************************************************************