diff options
author | Paul Lemire <paul.lemire.ecortex.kdab.com> | 2014-10-27 12:24:37 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2014-10-30 07:15:13 +0100 |
commit | 2144f9c8204b27adfd298fd984ad314fbf28c0de (patch) | |
tree | 2d837856939f1aaa6b156ea07df5ad5723984924 /src/plugins | |
parent | c2ba286730162091865ea32af648579c7d662d01 (diff) |
QTexture refactoring
Target is now set in the ctor from C++. On the QML side, there's a QTexture
subclass for each target.
WrapMode on s, t, r for texture, accessible as a grouped property in QML.
Note: I left out the static fromImage as I didn't really understand their
purpose. Please let me know what I'm missing.
Change-Id: I16f75283ae459cbd8ab2d1ec53584b3022bc965b
Task-number: QTBUG-41537
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sceneparsers/assimp/assimpparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.cpp b/src/plugins/sceneparsers/assimp/assimpparser.cpp index 1afe1856f..ee2e6fd0c 100644 --- a/src/plugins/sceneparsers/assimp/assimpparser.cpp +++ b/src/plugins/sceneparsers/assimp/assimpparser.cpp @@ -593,7 +593,7 @@ void AssimpParser::loadMesh(uint meshIndex) void AssimpParser::loadEmbeddedTexture(uint textureIndex) { aiTexture *assimpTexture = m_scene->m_aiScene->mTextures[textureIndex]; - QTexture *texture = new QTexture(); + QTexture *texture = new QTexture(QTexture::Target2D); TexImageDataPtr textureData(new TexImageData(0, 0)); bool isCompressed = assimpTexture->mHeight == 0; @@ -773,7 +773,7 @@ void AssimpParser::copyMaterialTextures(QMaterial *material, aiMaterial *assimpM // Load texture if not already loaded bool textureLoaded = true; if (!m_scene->m_materialTextures.contains(fullPath)) { - QTexture *tex = new QTexture(); + QTexture *tex = new QTexture(QTexture::Target2D); QImage textureImage; if (!textureImage.load(fullPath) || !textureImage.isNull()) { tex->setFromQImage(textureImage); |