Trying to fix invalid descriptorlayout

This commit is contained in:
Dynamitos
2020-10-03 11:00:10 +02:00
parent 79388bf41a
commit ceee96b462
69 changed files with 1087 additions and 393 deletions
+10 -2
View File
@@ -12,7 +12,10 @@ using namespace Seele;
TextureLoader::TextureLoader(Gfx::PGraphics graphics)
: graphics(graphics)
{
placeholderAsset = new TextureAsset();
placeholderTexture = import("./textures/placeholder.png");
placeholderAsset->setTexture(placeholderTexture);
placeholderAsset->setStatus(Asset::Status::Ready);
}
TextureLoader::~TextureLoader()
@@ -26,11 +29,16 @@ void TextureLoader::importAsset(const std::filesystem::path& filePath)
asset->setStatus(Asset::Status::Loading);
asset->setTexture(placeholderTexture);
AssetRegistry::get().textures[filePath.string()] = asset;
futures.add(std::async(std::launch::async, [this, filePath, asset] () mutable {
//futures.add(std::async(std::launch::async, [this, filePath, asset] () mutable {
Gfx::PTexture2D texture = import(filePath);
asset->setTexture(texture);
asset->setStatus(Asset::Status::Ready);
}));
//}));
}
PTextureAsset TextureLoader::getPlaceholderTexture()
{
return placeholderAsset;
}
Gfx::PTexture2D TextureLoader::import(const std::filesystem::path& path)