Trying to fix invalid descriptorlayout
This commit is contained in:
@@ -24,7 +24,6 @@ void AssetRegistry::importFile(const std::string &filePath)
|
||||
{
|
||||
std::filesystem::path fsPath = std::filesystem::path(filePath);
|
||||
std::string extension = fsPath.extension().string();
|
||||
std::cout << extension << std::endl;
|
||||
if (extension.compare(".fbx") == 0
|
||||
|| extension.compare(".obj") == 0)
|
||||
{
|
||||
@@ -46,6 +45,16 @@ PMeshAsset AssetRegistry::findMesh(const std::string &filePath)
|
||||
return get().meshes[filePath];
|
||||
}
|
||||
|
||||
PTextureAsset AssetRegistry::findTexture(const std::string &filePath)
|
||||
{
|
||||
PTextureAsset result = get().textures[filePath];
|
||||
if(result == nullptr)
|
||||
{
|
||||
return get().textureLoader->getPlaceholderTexture();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
PMaterialAsset AssetRegistry::findMaterial(const std::string &filePath)
|
||||
{
|
||||
return get().materials[filePath];
|
||||
@@ -61,11 +70,6 @@ std::ifstream AssetRegistry::createReadStream(const std::string& relativePath, s
|
||||
return get().internalCreateReadStream(relativePath, openmode);
|
||||
}
|
||||
|
||||
PTextureAsset AssetRegistry::findTexture(const std::string &filePath)
|
||||
{
|
||||
return get().textures[filePath];
|
||||
}
|
||||
|
||||
AssetRegistry &AssetRegistry::get()
|
||||
{
|
||||
static AssetRegistry instance;
|
||||
@@ -122,6 +126,11 @@ void AssetRegistry::registerMesh(PMeshAsset mesh)
|
||||
}
|
||||
}
|
||||
|
||||
void AssetRegistry::registerMaterial(PMaterialAsset material)
|
||||
{
|
||||
materials[material->getFileName()] = material;
|
||||
}
|
||||
|
||||
std::ofstream AssetRegistry::internalCreateWriteStream(const std::string& relativePath, std::ios_base::openmode openmode)
|
||||
{
|
||||
return std::ofstream(rootFolder.generic_string().append(relativePath), openmode);
|
||||
|
||||
Reference in New Issue
Block a user