coroutines truly are cursed

This commit is contained in:
2021-11-11 20:12:50 +01:00
parent 1848bb5139
commit 01049019fd
25 changed files with 202 additions and 92 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#pragma once
#include "MinimalEngine.h"
#include "Containers/List.h"
#include "ThreadPool.h"
#include <thread>
#include <future>
#include <filesystem>
@@ -18,7 +19,7 @@ public:
void importAsset(const std::filesystem::path& filePath);
PTextureAsset getPlaceholderTexture();
private:
void import(const std::filesystem::path& path, PTextureAsset asset);
Job import(std::filesystem::path path, PTextureAsset asset);
Gfx::PGraphics graphics;
List<std::future<void>> futures;
PTextureAsset placeholderAsset;