diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-01-28 08:31:29 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-08 11:15:35 +0000 |
commit | bfc4432f4deccb6b1287e4cc0d4aa8e34ea810c1 (patch) | |
tree | 62031b56bb903796df11f84a6df8215effe9ea8c /src/render/io | |
parent | f49cabe35cbd89bd4e5a0e91100a96afdb5d8401 (diff) |
QTexture renamed to QAbstractTextureProvider
This is done prior to the whole texture API refactoring.
Doc was also added, might need improvement later on but a base is present at
least.
Change-Id: I75589f14dfbfba7bc4250b2e0960670e020ed38a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io')
-rw-r--r-- | src/render/io/gltfparser.cpp | 8 | ||||
-rw-r--r-- | src/render/io/gltfparser_p.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp index 1792014a1..b135fc3b0 100644 --- a/src/render/io/gltfparser.cpp +++ b/src/render/io/gltfparser.cpp @@ -793,14 +793,14 @@ void GLTFParser::processJSONImage( QString id, QJsonObject jsonObj) void GLTFParser::processJSONTexture( QString id, QJsonObject jsonObj) { int target = jsonObj.value(KEY_TARGET).toInt(); - QTexture* tex = new QTexture(static_cast<QTexture::Target>(target)); + QAbstractTextureProvider* tex = new QAbstractTextureProvider(static_cast<QAbstractTextureProvider::Target>(target)); // TODO: Choose suitable internal format - may vary on OpenGL context type //int pixelFormat = jsonObj.value(KEY_FORMAT).toInt(); //int internalFormat = jsonObj.value(KEY_INTERNAL_FORMAT).toInt(); - tex->setFormat(QTexture::RGBA8_UNorm /* static_cast<QOpenGLTexture::TextureFormat>(internalFormat)*/); + tex->setFormat(QAbstractTextureProvider::RGBA8_UNorm /* static_cast<QOpenGLTexture::TextureFormat>(internalFormat)*/); QString samplerId = jsonObj.value(KEY_SAMPLER).toString(); QString source = jsonObj.value(KEY_SOURCE).toString(); @@ -820,8 +820,8 @@ void GLTFParser::processJSONTexture( QString id, QJsonObject jsonObj) QJsonObject sampler = samplersDict.value(samplerId).toObject(); tex->setWrapMode(QTextureWrapMode(static_cast<QTextureWrapMode::WrapMode>(sampler.value(KEY_WRAP_S).toInt()))); - tex->setMinificationFilter(static_cast<QTexture::Filter>(sampler.value(KEY_MIN_FILTER).toInt())); - tex->setMagnificationFilter(static_cast<QTexture::Filter>(sampler.value(KEY_MAG_FILTER).toInt())); + tex->setMinificationFilter(static_cast<QAbstractTextureProvider::Filter>(sampler.value(KEY_MIN_FILTER).toInt())); + tex->setMagnificationFilter(static_cast<QAbstractTextureProvider::Filter>(sampler.value(KEY_MAG_FILTER).toInt())); m_textures[id] = tex; } diff --git a/src/render/io/gltfparser_p.h b/src/render/io/gltfparser_p.h index 10d8bfab7..152ff1c58 100644 --- a/src/render/io/gltfparser_p.h +++ b/src/render/io/gltfparser_p.h @@ -66,7 +66,7 @@ class QShaderProgram; class QEffect; class QCamera; class QCameraLens; -class QTexture; +class QAbstractTextureProvider; class GLTFParser : public AbstractSceneParser { @@ -146,7 +146,7 @@ private: // up our techniques QMap<QString, QEffect*> m_effectProxies; - QMap<QString, QTexture*> m_textures; + QMap<QString, QAbstractTextureProvider*> m_textures; QMap<QString, QImage> m_images; QFile* resolveLocalData(QString path); |