summaryrefslogtreecommitdiff
path: root/assetFactory/textureFragment.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 14:49:52 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 14:49:52 +0100
commit70bddc3f8ef3eeb020b4d6114f3abf4ab160003f (patch)
treef8e83df70e00c9f7f3588638c756ac66a8ab0199 /assetFactory/textureFragment.cpp
parentExternalise a neater definition of TGAHead (diff)
parentLoad texture images in Worker (diff)
downloadilt-70bddc3f8ef3eeb020b4d6114f3abf4ab160003f.tar.bz2
ilt-70bddc3f8ef3eeb020b4d6114f3abf4ab160003f.tar.xz
ilt-70bddc3f8ef3eeb020b4d6114f3abf4ab160003f.zip
Merge branch 'worker' into assimp
Diffstat (limited to 'assetFactory/textureFragment.cpp')
-rw-r--r--assetFactory/textureFragment.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/assetFactory/textureFragment.cpp b/assetFactory/textureFragment.cpp
index d153688..0a4ec1d 100644
--- a/assetFactory/textureFragment.cpp
+++ b/assetFactory/textureFragment.cpp
@@ -11,5 +11,7 @@ TextureFragment::persist(Persistence::PersistenceStore & store)
void
TextureFragment::postLoad()
{
- image = std::make_unique<Image>(Resource::mapPath(path), STBI_rgb_alpha);
+ image = Worker::addWork([this]() {
+ return std::make_unique<Image>(Resource::mapPath(path), STBI_rgb_alpha);
+ });
}