diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-03-13 14:40:27 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-03-13 13:49:09 +0000 |
commit | 24abcb6da0158363285e5b75cdf24a6fa4d1bd3b (patch) | |
tree | 0418a7dbb1a739a4d0f2f4d78c0a2ba929c82bb7 /src | |
parent | 986291112cf5e6b08c74b4e4c77ae9b6cfe09bb6 (diff) |
Fix updating texture parameters
Call the provided caller function in ReloadableTexture::onLoad every time
the function gets called after the texture is loaded so that texture
parameters get properly updated when animating.
Task-number: QT3DS-3152
Change-Id: Ied2e4685219030ae80905d63ab5855888cbd93c9
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/q3dsimagemanager_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/q3dsimagemanager_p.h b/src/runtime/q3dsimagemanager_p.h index 2541224..6281d63 100644 --- a/src/runtime/q3dsimagemanager_p.h +++ b/src/runtime/q3dsimagemanager_p.h @@ -78,7 +78,11 @@ public: m_loadFunc = [this, caller, params...]() { caller(m_texture, params...); }; - triggerLoading(); + // onLoad call might provide new parameters when called after loading so call it now + if (m_loaded) + m_loadFunc(); + else + triggerLoading(); } template <typename Caller, typename... Params> |