summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSApplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/Qt3DSApplication.cpp')
-rw-r--r--src/runtime/Qt3DSApplication.cpp39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index db5d359..4c88335 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -350,26 +350,22 @@ struct STextureUploadRenderTask : public IRenderTask, public IImageLoadListener
if (!m_deleteSet.isEmpty())
m_bufferManager.unloadSet(m_deleteSet);
if (!m_uploadSet.isEmpty()) {
- QVector<CRegisteredString> sourcePaths;
+ QVector<QString> sourcePaths;
for (auto &s : qAsConst(m_uploadSet))
- sourcePaths.push_back(m_bufferManager.GetStringTable().RegisterStr(s));
- QT3DSU32 id = m_batchLoader.LoadImageBatch(toConstDataRef(sourcePaths.data(),
- sourcePaths.size()),
- CRegisteredString(),
- this, m_type, m_preferKtx, false);
+ sourcePaths.push_back(s);
+ QT3DSU32 id = m_batchLoader.LoadImageBatch(sourcePaths, {}, this, m_type,
+ m_preferKtx, false);
if (id) {
m_batches[id] = m_uploadSet;
m_uploadSet.clear();
}
}
if (!m_uploadWaitSet.isEmpty()) {
- QVector<CRegisteredString> sourcePaths;
+ QVector<QString> sourcePaths;
for (auto &s : qAsConst(m_uploadWaitSet))
- sourcePaths.push_back(m_bufferManager.GetStringTable().RegisterStr(s));
- QT3DSU32 id = m_batchLoader.LoadImageBatch(toConstDataRef(sourcePaths.data(),
- sourcePaths.size()),
- CRegisteredString(),
- this, m_type, m_preferKtx, false);
+ sourcePaths.push_back(s);
+ QT3DSU32 id = m_batchLoader.LoadImageBatch(sourcePaths, {}, this, m_type,
+ m_preferKtx, false);
if (id) {
m_batchLoader.BlockUntilLoaded(id);
m_bufferManager.loadSet(m_uploadWaitSet, m_flipCompressedTextures);
@@ -379,27 +375,28 @@ struct STextureUploadRenderTask : public IRenderTask, public IImageLoadListener
}
void add(const QSet<QString> &set, bool wait)
{
+ const auto resolved = IBufferManager::resolveImageSet(set, m_preferKtx);
QMutexLocker loc(&m_updateMutex);
if (wait)
- m_uploadWaitSet.unite(set);
+ m_uploadWaitSet.unite(resolved);
else
- m_uploadSet.unite(set);
- const auto unified = IBufferManager::resolveImageSet(set, m_preferKtx);
- m_deleteSet.subtract(unified);
+ m_uploadSet.unite(resolved);
+
+ m_deleteSet.subtract(resolved);
}
void remove(const QSet<QString> &set)
{
- const auto unified = IBufferManager::resolveImageSet(set, m_preferKtx);
+ const auto resolved = IBufferManager::resolveImageSet(set, m_preferKtx);
QMutexLocker loc(&m_updateMutex);
- m_uploadSet.subtract(unified);
- m_uploadWaitSet.subtract(unified);
- m_deleteSet.unite(unified);
+ m_uploadSet.subtract(resolved);
+ m_uploadWaitSet.subtract(resolved);
+ m_deleteSet.unite(resolved);
}
bool persistent() const override
{
return true;
}
- void OnImageLoadComplete(CRegisteredString inPath, ImageLoadResult::Enum inResult) override
+ void OnImageLoadComplete(const QString &inPath, ImageLoadResult::Enum inResult) override
{
Q_UNUSED(inPath);
Q_UNUSED(inResult);