summaryrefslogtreecommitdiffstats
path: root/src/render/io
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2014-08-19 09:34:17 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-08-19 13:02:27 +0200
commit87a07e40e65f2a2540c9fdf579205e3d479d50e4 (patch)
tree1bc637920fb765c136d390c0559ca76f9bd7183a /src/render/io
parent977863dd3e6a7a40f60db1f9777500d21762d404 (diff)
Texture renamed to QTexture
Change-Id: I6f5570ce042b8d3ef44aa76c1fd8ce3a1dde4d3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io')
-rw-r--r--src/render/io/assimpparser.cpp6
-rw-r--r--src/render/io/assimpparser_p.h6
-rw-r--r--src/render/io/gltfparser.cpp14
-rw-r--r--src/render/io/gltfparser_p.h4
4 files changed, 15 insertions, 15 deletions
diff --git a/src/render/io/assimpparser.cpp b/src/render/io/assimpparser.cpp
index ec570d9c8..1d3e8ff86 100644
--- a/src/render/io/assimpparser.cpp
+++ b/src/render/io/assimpparser.cpp
@@ -51,7 +51,7 @@
#include <qmath.h>
#include <Qt3DCore/qentity.h>
#include <qmaterial.h>
-#include <texture.h>
+#include <qtexture.h>
#include "renderlogging.h"
#include "qbuffer.h"
#include "qattribute.h"
@@ -594,7 +594,7 @@ void AssimpParser::loadMesh(uint meshIndex)
void AssimpParser::loadEmbeddedTexture(uint textureIndex)
{
aiTexture *assimpTexture = m_aiScene->mTextures[textureIndex];
- Texture *texture = new Texture();
+ QTexture *texture = new QTexture();
TexImageDataPtr textureData(new TexImageData(0, 0));
bool isCompressed = assimpTexture->mHeight == 0;
@@ -774,7 +774,7 @@ void AssimpParser::copyMaterialTextures(QMaterial *material, aiMaterial *assimpM
// Load texture if not already loaded
bool textureLoaded = true;
if (!m_materialTextures.contains(fullPath)) {
- Texture *tex = new Texture();
+ QTexture *tex = new QTexture();
QImage textureImage;
if (!textureImage.load(fullPath) || !textureImage.isNull()) {
tex->setFromQImage(textureImage);
diff --git a/src/render/io/assimpparser_p.h b/src/render/io/assimpparser_p.h
index adae4709b..2f7dca78a 100644
--- a/src/render/io/assimpparser_p.h
+++ b/src/render/io/assimpparser_p.h
@@ -65,7 +65,7 @@ class QMaterial;
class QShaderProgram;
class QEffect;
class QCamera;
-class Texture;
+class QTexture;
class QMesh;
class AssimpMesh;
@@ -124,8 +124,8 @@ private :
QMap<uint, AssimpMesh *> m_meshes;
QMap<uint, QMaterial*> m_materials;
QMap<uint, QEffect *> m_effects;
- QMap<uint, Texture*> m_embeddedTextures;
- QMap<QString, Texture*> m_materialTextures;
+ QMap<uint, QTexture*> m_embeddedTextures;
+ QMap<QString, QTexture*> m_materialTextures;
QMap<aiNode*, QEntity*> m_cameras;
QHash<aiTextureType, QString> m_textureToParameterName;
diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp
index 0e39da1b6..91ae3f81f 100644
--- a/src/render/io/gltfparser.cpp
+++ b/src/render/io/gltfparser.cpp
@@ -55,7 +55,7 @@
#include <Qt3DCore/qtransform.h>
#include <Qt3DCore/qmatrixtransform.h>
#include <Qt3DCore/qcameralens.h>
-#include <texture.h>
+#include <qtexture.h>
#include <qparameter.h>
#include <QJsonDocument>
@@ -773,7 +773,7 @@ void GLTFParser::processJSONImage( QString id, QJsonObject jsonObj)
void GLTFParser::processJSONTexture( QString id, QJsonObject jsonObj)
{
- Texture* tex = new Texture();
+ QTexture* tex = new QTexture();
int target = jsonObj.value(KEY_TARGET).toInt();
@@ -781,8 +781,8 @@ void GLTFParser::processJSONTexture( QString id, QJsonObject jsonObj)
//int pixelFormat = jsonObj.value(KEY_FORMAT).toInt();
//int internalFormat = jsonObj.value(KEY_INTERNAL_FORMAT).toInt();
- tex->setTarget(static_cast<Texture::Target>(target));
- tex->setFormat(Texture::RGBA8_UNorm /* static_cast<QOpenGLTexture::TextureFormat>(internalFormat)*/);
+ tex->setTarget(static_cast<QTexture::Target>(target));
+ tex->setFormat(QTexture::RGBA8_UNorm /* static_cast<QOpenGLTexture::TextureFormat>(internalFormat)*/);
QString samplerId = jsonObj.value(KEY_SAMPLER).toString();
QString source = jsonObj.value(KEY_SOURCE).toString();
@@ -801,11 +801,11 @@ void GLTFParser::processJSONTexture( QString id, QJsonObject jsonObj)
QJsonObject sampler = samplersDict.value(samplerId).toObject();
- tex->setWrapMode(static_cast<Texture::WrapMode>(sampler.value(KEY_WRAP_S).toInt()));
+ tex->setWrapMode(static_cast<QTexture::WrapMode>(sampler.value(KEY_WRAP_S).toInt()));
// tex->setWrapMode(sampler.value("wrapT").toInt());
- tex->setMinificationFilter(static_cast<Texture::Filter>(sampler.value(KEY_MIN_FILTER).toInt()));
- tex->setMagnificationFilter(static_cast<Texture::Filter>(sampler.value(KEY_MAG_FILTER).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()));
m_textures[id] = tex;
}
diff --git a/src/render/io/gltfparser_p.h b/src/render/io/gltfparser_p.h
index 1e8edf73f..ffbb18930 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 Texture;
+class QTexture;
class GLTFParser : public AbstractSceneParser
{
@@ -146,7 +146,7 @@ private:
// up our techniques
QMap<QString, QEffect*> m_effectProxies;
- QMap<QString, Texture*> m_textures;
+ QMap<QString, QTexture*> m_textures;
QMap<QString, QImage> m_images;
QFile* resolveLocalData(QString path);