summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-03-18 10:41:10 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-04-06 15:30:27 +0000
commite6741fa7d5b2afb27138b2eadcc9f16c43d854aa (patch)
tree9b0b26a52a3cdc8185ab9802b8c7648a12cc7063
parent854f14cfa59b5ad8f3c7f9146c01c753ce6d4481 (diff)
QAbstractTextureProvider renamed to QAbstractTexture
Change-Id: If8ea2c9806e28f6d97eb3fb852686647c0c04d8f Task-number: QTBUG-51504 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--examples/qt3d/deferred-renderer-cpp/gbuffer.cpp22
-rw-r--r--examples/qt3d/deferred-renderer-cpp/gbuffer.h10
-rw-r--r--examples/qt3d/materials-cpp/barrel.h6
-rw-r--r--src/plugins/sceneparsers/assimp/assimpparser.cpp4
-rw-r--r--src/plugins/sceneparsers/assimp/assimpparser.h6
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser.cpp18
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser.h4
-rw-r--r--src/quick3d/imports/render/qt3dquick3drenderplugin.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dtexture_p.h2
-rw-r--r--src/render/defaults/qdiffusemapmaterial.cpp12
-rw-r--r--src/render/defaults/qdiffusemapmaterial.h10
-rw-r--r--src/render/defaults/qdiffusemapmaterial_p.h4
-rw-r--r--src/render/defaults/qdiffusespecularmapmaterial.cpp24
-rw-r--r--src/render/defaults/qdiffusespecularmapmaterial.h18
-rw-r--r--src/render/defaults/qdiffusespecularmapmaterial_p.h6
-rw-r--r--src/render/defaults/qnormaldiffusemapmaterial.cpp24
-rw-r--r--src/render/defaults/qnormaldiffusemapmaterial.h18
-rw-r--r--src/render/defaults/qnormaldiffusemapmaterial_p.h6
-rw-r--r--src/render/defaults/qnormaldiffusespecularmapmaterial.cpp36
-rw-r--r--src/render/defaults/qnormaldiffusespecularmapmaterial.h24
-rw-r--r--src/render/defaults/qnormaldiffusespecularmapmaterial_p.h8
-rw-r--r--src/render/frontend/qrenderaspect.cpp3
-rw-r--r--src/render/frontend/qrendertargetoutput.cpp6
-rw-r--r--src/render/frontend/qrendertargetoutput.h10
-rw-r--r--src/render/frontend/qrendertargetoutput_p.h4
-rw-r--r--src/render/jobs/loadtexturedatajob.cpp12
-rw-r--r--src/render/materialsystem/qmaterial.h2
-rw-r--r--src/render/materialsystem/qparameter.cpp2
-rw-r--r--src/render/materialsystem/qparameter.h4
-rw-r--r--src/render/texture/qabstracttexture.cpp (renamed from src/render/texture/qabstracttextureprovider.cpp)208
-rw-r--r--src/render/texture/qabstracttexture.h (renamed from src/render/texture/qabstracttextureprovider.h)24
-rw-r--r--src/render/texture/qabstracttexture_p.h (renamed from src/render/texture/qabstracttextureprovider_p.h)26
-rw-r--r--src/render/texture/qabstracttextureimage.cpp14
-rw-r--r--src/render/texture/qabstracttextureimage.h10
-rw-r--r--src/render/texture/qabstracttextureimage_p.h6
-rw-r--r--src/render/texture/qtexture.cpp (renamed from src/render/texture/qtextureproviders.cpp)54
-rw-r--r--src/render/texture/qtexture.h117
-rw-r--r--src/render/texture/qtextureproviders.h165
-rw-r--r--src/render/texture/qtexturewrapmode.cpp2
-rw-r--r--src/render/texture/texture.cpp88
-rw-r--r--src/render/texture/texture.pri13
-rw-r--r--src/render/texture/texture_p.h22
-rw-r--r--src/render/texture/textureimage.cpp8
-rw-r--r--src/render/texture/textureimage_p.h6
44 files changed, 510 insertions, 560 deletions
diff --git a/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp b/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
index b388af344..984dbb1f2 100644
--- a/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
+++ b/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
@@ -53,11 +53,11 @@
GBuffer::GBuffer(Qt3DCore::QNode *parent)
: Qt3DRender::QRenderTarget(parent)
{
- const Qt3DRender::QAbstractTextureProvider::TextureFormat formats[AttachmentsCount] = {
- Qt3DRender::QAbstractTextureProvider::RGBA32F,
- Qt3DRender::QAbstractTextureProvider::RGB32F,
- Qt3DRender::QAbstractTextureProvider::RGB16F,
- Qt3DRender::QAbstractTextureProvider::D32F
+ const Qt3DRender::QAbstractTexture::TextureFormat formats[AttachmentsCount] = {
+ Qt3DRender::QAbstractTexture::RGBA32F,
+ Qt3DRender::QAbstractTexture::RGB32F,
+ Qt3DRender::QAbstractTexture::RGB16F,
+ Qt3DRender::QAbstractTexture::D32F
};
const Qt3DRender::QRenderTargetOutput::AttachmentPoint attachmentPoints[AttachmentsCount] = {
@@ -76,8 +76,8 @@ GBuffer::GBuffer(Qt3DCore::QNode *parent)
m_textures[i]->setHeight(1024);
m_textures[i]->setGenerateMipMaps(false);
m_textures[i]->setWrapMode(Qt3DRender::QTextureWrapMode(Qt3DRender::QTextureWrapMode::ClampToEdge));
- m_textures[i]->setMinificationFilter(Qt3DRender::QAbstractTextureProvider::Linear);
- m_textures[i]->setMagnificationFilter(Qt3DRender::QAbstractTextureProvider::Linear);
+ m_textures[i]->setMinificationFilter(Qt3DRender::QAbstractTexture::Linear);
+ m_textures[i]->setMagnificationFilter(Qt3DRender::QAbstractTexture::Linear);
output->setTexture(m_textures[i]);
output->setAttachmentPoint(attachmentPoints[i]);
@@ -85,22 +85,22 @@ GBuffer::GBuffer(Qt3DCore::QNode *parent)
}
}
-Qt3DRender::QAbstractTextureProvider *GBuffer::colorTexture() const
+Qt3DRender::QAbstractTexture *GBuffer::colorTexture() const
{
return m_textures[Color];
}
-Qt3DRender::QAbstractTextureProvider *GBuffer::positionTexture() const
+Qt3DRender::QAbstractTexture *GBuffer::positionTexture() const
{
return m_textures[Position];
}
-Qt3DRender::QAbstractTextureProvider *GBuffer::normalTexture() const
+Qt3DRender::QAbstractTexture *GBuffer::normalTexture() const
{
return m_textures[Normal];
}
-Qt3DRender::QAbstractTextureProvider *GBuffer::depthTexture() const
+Qt3DRender::QAbstractTexture *GBuffer::depthTexture() const
{
return m_textures[Depth];
}
diff --git a/examples/qt3d/deferred-renderer-cpp/gbuffer.h b/examples/qt3d/deferred-renderer-cpp/gbuffer.h
index 7b79dc5f8..dab8b6752 100644
--- a/examples/qt3d/deferred-renderer-cpp/gbuffer.h
+++ b/examples/qt3d/deferred-renderer-cpp/gbuffer.h
@@ -68,13 +68,13 @@ public:
AttachmentsCount
};
- Qt3DRender::QAbstractTextureProvider *colorTexture() const;
- Qt3DRender::QAbstractTextureProvider *positionTexture() const;
- Qt3DRender::QAbstractTextureProvider *normalTexture() const;
- Qt3DRender::QAbstractTextureProvider *depthTexture() const;
+ Qt3DRender::QAbstractTexture *colorTexture() const;
+ Qt3DRender::QAbstractTexture *positionTexture() const;
+ Qt3DRender::QAbstractTexture *normalTexture() const;
+ Qt3DRender::QAbstractTexture *depthTexture() const;
private:
- Qt3DRender::QAbstractTextureProvider *m_textures[AttachmentsCount];
+ Qt3DRender::QAbstractTexture *m_textures[AttachmentsCount];
Qt3DRender::QRenderTargetOutput *m_attachments[AttachmentsCount];
};
diff --git a/examples/qt3d/materials-cpp/barrel.h b/examples/qt3d/materials-cpp/barrel.h
index 372f7a368..293501519 100644
--- a/examples/qt3d/materials-cpp/barrel.h
+++ b/examples/qt3d/materials-cpp/barrel.h
@@ -97,9 +97,9 @@ private:
DiffuseColor m_diffuseColor;
SpecularColor m_specularColor;
Qt3DRender::QNormalDiffuseSpecularMapMaterial *m_material;
- Qt3DRender::QAbstractTextureProvider *m_diffuseTexture;
- Qt3DRender::QAbstractTextureProvider *m_normalTexture;
- Qt3DRender::QAbstractTextureProvider *m_specularTexture;
+ Qt3DRender::QAbstractTexture *m_diffuseTexture;
+ Qt3DRender::QAbstractTexture *m_normalTexture;
+ Qt3DRender::QAbstractTexture *m_specularTexture;
Qt3DRender::QTextureImage *m_diffuseTextureImage;
Qt3DRender::QTextureImage *m_normalTextureImage;
Qt3DRender::QTextureImage *m_specularTextureImage;
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.cpp b/src/plugins/sceneparsers/assimp/assimpparser.cpp
index eb2fb026e..33e1f9c1f 100644
--- a/src/plugins/sceneparsers/assimp/assimpparser.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpparser.cpp
@@ -674,7 +674,7 @@ void AssimpParser::loadMesh(uint meshIndex)
void AssimpParser::loadEmbeddedTexture(uint textureIndex)
{
aiTexture *assimpTexture = m_scene->m_aiScene->mTextures[textureIndex];
- QAbstractTextureProvider *texture = new QTexture2D();
+ QAbstractTexture *texture = new QTexture2D();
AssimpRawTextureImage *imageData = new AssimpRawTextureImage();
bool isCompressed = assimpTexture->mHeight == 0;
@@ -846,7 +846,7 @@ void AssimpParser::copyMaterialTextures(QMaterial *material, aiMaterial *assimpM
QString fullPath = m_sceneDir.absoluteFilePath(texturePath(path));
// Load texture if not already loaded
if (!m_scene->m_materialTextures.contains(fullPath)) {
- QAbstractTextureProvider *tex = new QTexture2D();
+ QAbstractTexture *tex = new QTexture2D();
QTextureImage *texImage = new QTextureImage();
texImage->setSource(QUrl::fromLocalFile(fullPath));
tex->addTextureImage(texImage);
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.h b/src/plugins/sceneparsers/assimp/assimpparser.h
index 97ee2798d..f03af00c3 100644
--- a/src/plugins/sceneparsers/assimp/assimpparser.h
+++ b/src/plugins/sceneparsers/assimp/assimpparser.h
@@ -76,7 +76,7 @@ namespace Qt3DRender {
class QMaterial;
class QShaderProgram;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QMesh;
class QGeometryRenderer;
@@ -134,8 +134,8 @@ private:
QMap<uint, QGeometryRenderer *> m_meshes;
QMap<uint, QMaterial*> m_materials;
QMap<uint, QEffect *> m_effects;
- QMap<uint, QAbstractTextureProvider *> m_embeddedTextures;
- QMap<QString, QAbstractTextureProvider *> m_materialTextures;
+ QMap<uint, QAbstractTexture *> m_embeddedTextures;
+ QMap<QString, QAbstractTexture *> m_materialTextures;
QMap<aiNode*, Qt3DCore::QEntity*> m_cameras;
QHash<aiTextureType, QString> m_textureToParameterName;
// QMap<aiNode*, Light*> m_lights;
diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp
index b1167579a..97a4a74ad 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp
@@ -847,7 +847,7 @@ void GLTFParser::cleanup()
}
m_techniques.clear();
//Check for Textures with no parent
- Q_FOREACH (QAbstractTextureProvider *texture, m_textures.values()) {
+ Q_FOREACH (QAbstractTexture *texture, m_textures.values()) {
if (texture->parent() == Q_NULLPTR)
delete texture;
}
@@ -1164,7 +1164,7 @@ void GLTFParser::processJSONTexture(const QString &id, const QJsonObject &jsonOb
//int pixelFormat = jsonObj.value(KEY_FORMAT).toInt(GL_RGBA);
int internalFormat = jsonObject.value(KEY_INTERNAL_FORMAT).toInt(GL_RGBA);
- tex->setFormat(static_cast<QAbstractTextureProvider::TextureFormat>(internalFormat));
+ tex->setFormat(static_cast<QAbstractTexture::TextureFormat>(internalFormat));
QString samplerId = jsonObject.value(KEY_SAMPLER).toString();
QString source = jsonObject.value(KEY_SOURCE).toString();
@@ -1186,15 +1186,15 @@ void GLTFParser::processJSONTexture(const QString &id, const QJsonObject &jsonOb
QJsonObject sampler = samplersDict.value(samplerId).toObject();
tex->setWrapMode(QTextureWrapMode(static_cast<QTextureWrapMode::WrapMode>(sampler.value(KEY_WRAP_S).toInt())));
- tex->setMinificationFilter(static_cast<QAbstractTextureProvider::Filter>(sampler.value(KEY_MIN_FILTER).toInt()));
- if (tex->minificationFilter() == QAbstractTextureProvider::NearestMipMapLinear ||
- tex->minificationFilter() == QAbstractTextureProvider::LinearMipMapNearest ||
- tex->minificationFilter() == QAbstractTextureProvider::NearestMipMapNearest ||
- tex->minificationFilter() == QAbstractTextureProvider::LinearMipMapLinear) {
+ tex->setMinificationFilter(static_cast<QAbstractTexture::Filter>(sampler.value(KEY_MIN_FILTER).toInt()));
+ if (tex->minificationFilter() == QAbstractTexture::NearestMipMapLinear ||
+ tex->minificationFilter() == QAbstractTexture::LinearMipMapNearest ||
+ tex->minificationFilter() == QAbstractTexture::NearestMipMapNearest ||
+ tex->minificationFilter() == QAbstractTexture::LinearMipMapLinear) {
tex->setGenerateMipMaps(true);
}
- tex->setMagnificationFilter(static_cast<QAbstractTextureProvider::Filter>(sampler.value(KEY_MAG_FILTER).toInt()));
+ tex->setMagnificationFilter(static_cast<QAbstractTexture::Filter>(sampler.value(KEY_MAG_FILTER).toInt()));
m_textures[id] = tex;
}
@@ -1238,7 +1238,7 @@ QVariant GLTFParser::parameterValueFromJSON(int type, const QJsonValue &value) c
} else if (value.isString()) {
if (type == GL_SAMPLER_2D) {
//Textures are special because we need to do a lookup to return the
- //QAbstractTextureProvider
+ //QAbstractTexture
QString textureId = value.toString();
if (!m_textures.contains(textureId)) {
qCWarning(GLTFParserLog) << "unknown texture" << textureId;
diff --git a/src/plugins/sceneparsers/gltf/gltfparser.h b/src/plugins/sceneparsers/gltf/gltfparser.h
index e158c0a71..e21bed8de 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser.h
+++ b/src/plugins/sceneparsers/gltf/gltfparser.h
@@ -74,7 +74,7 @@ class QCameraLens;
class QMaterial;
class QShaderProgram;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QRenderState;
class QTechnique;
class QParameter;
@@ -201,7 +201,7 @@ private:
QMap<QString, QTechnique *> m_techniques;
QMap<QParameter*, ParameterData> m_parameterDataDict;
- QMap<QString, QAbstractTextureProvider*> m_textures;
+ QMap<QString, QAbstractTexture*> m_textures;
QMap<QString, QString> m_imagePaths;
};
diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
index 177029eae..7737d4b79 100644
--- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
+++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
@@ -202,7 +202,7 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri)
// Textures
qmlRegisterType<Qt3DRender::QTextureWrapMode>(uri, 2, 0, "WrapMode");//, QStringLiteral("QTextureWrapMode cannot be created from QML"));
- qmlRegisterUncreatableType<Qt3DRender::QAbstractTextureProvider>(uri, 2, 0, "Texture", QStringLiteral("Texture should be created from one of the subclasses"));
+ qmlRegisterUncreatableType<Qt3DRender::QAbstractTexture>(uri, 2, 0, "Texture", QStringLiteral("Texture should be created from one of the subclasses"));
Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture1D, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture1D", "Qt3D.Render/Texture1D", uri, 2, 0, "Texture1D");
Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture1DArray, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture1DArray", "Qt3D.Render/Texture1DArray", uri, 2, 0, "Texture1DArray");
Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture2D, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture2D", "Qt3D.Render/Texture2D", uri, 2, 0, "Texture2D");
diff --git a/src/quick3d/quick3drender/items/quick3dtexture_p.h b/src/quick3d/quick3drender/items/quick3dtexture_p.h
index a3f86f5bc..a1e2ad6b8 100644
--- a/src/quick3d/quick3drender/items/quick3dtexture_p.h
+++ b/src/quick3d/quick3drender/items/quick3dtexture_p.h
@@ -73,7 +73,7 @@ public:
explicit Quick3DTextureExtension(QObject *parent = 0);
QQmlListProperty<QAbstractTextureImage> textureImages();
- inline QAbstractTextureProvider *parentTexture() const { return qobject_cast<QAbstractTextureProvider *>(parent()); }
+ inline QAbstractTexture *parentTexture() const { return qobject_cast<QAbstractTexture *>(parent()); }
private:
static void appendTextureImage(QQmlListProperty<QAbstractTextureImage> *list, QAbstractTextureImage *textureImage);
diff --git a/src/render/defaults/qdiffusemapmaterial.cpp b/src/render/defaults/qdiffusemapmaterial.cpp
index cfca526e5..985b6c569 100644
--- a/src/render/defaults/qdiffusemapmaterial.cpp
+++ b/src/render/defaults/qdiffusemapmaterial.cpp
@@ -75,8 +75,8 @@ QDiffuseMapMaterialPrivate::QDiffuseMapMaterialPrivate()
, m_diffuseMapGL2ES2Shader(new QShaderProgram())
, m_filterKey(new QFilterKey)
{
- m_diffuseTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_diffuseTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_diffuseTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_diffuseTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_diffuseTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_diffuseTexture->setGenerateMipMaps(true);
m_diffuseTexture->setMaximumAnisotropy(16.0f);
@@ -154,7 +154,7 @@ void QDiffuseMapMaterialPrivate::handleAmbientChanged(const QVariant &var)
void QDiffuseMapMaterialPrivate::handleDiffuseChanged(const QVariant &var)
{
Q_Q(QDiffuseMapMaterial);
- emit q->diffuseChanged(var.value<QAbstractTextureProvider *>());
+ emit q->diffuseChanged(var.value<QAbstractTexture *>());
}
void QDiffuseMapMaterialPrivate::handleSpecularChanged(const QVariant &var)
@@ -261,10 +261,10 @@ float QDiffuseMapMaterial::shininess() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QDiffuseMapMaterial::diffuse() const
+QAbstractTexture *QDiffuseMapMaterial::diffuse() const
{
Q_D(const QDiffuseMapMaterial);
- return d->m_diffuseParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_diffuseParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -297,7 +297,7 @@ void QDiffuseMapMaterial::setShininess(float shininess)
d->m_shininessParameter->setValue(shininess);
}
-void QDiffuseMapMaterial::setDiffuse(QAbstractTextureProvider *diffuseMap)
+void QDiffuseMapMaterial::setDiffuse(QAbstractTexture *diffuseMap)
{
Q_D(QDiffuseMapMaterial);
d->m_diffuseParameter->setValue(QVariant::fromValue(diffuseMap));
diff --git a/src/render/defaults/qdiffusemapmaterial.h b/src/render/defaults/qdiffusemapmaterial.h
index 45bfc37fb..a78e19a36 100644
--- a/src/render/defaults/qdiffusemapmaterial.h
+++ b/src/render/defaults/qdiffusemapmaterial.h
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
class QDiffuseMapMaterialPrivate;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QT3DRENDERSHARED_EXPORT QDiffuseMapMaterial : public QMaterial
{
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QDiffuseMapMaterial : public QMaterial
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
Q_PROPERTY(QColor specular READ specular WRITE setSpecular NOTIFY specularChanged)
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
@@ -66,19 +66,19 @@ public:
QColor ambient() const;
QColor specular() const;
float shininess() const;
- QAbstractTextureProvider *diffuse() const;
+ QAbstractTexture *diffuse() const;
float textureScale() const;
public Q_SLOTS:
void setAmbient(const QColor &color);
void setSpecular(const QColor &specular);
void setShininess(float shininess);
- void setDiffuse(QAbstractTextureProvider *diffuse);
+ void setDiffuse(QAbstractTexture *diffuse);
void setTextureScale(float textureScale);
Q_SIGNALS:
void ambientChanged(const QColor &ambient);
- void diffuseChanged(QAbstractTextureProvider *diffuse);
+ void diffuseChanged(QAbstractTexture *diffuse);
void specularChanged(const QColor &specular);
void shininessChanged(float shininess);
void textureScaleChanged(float textureScale);
diff --git a/src/render/defaults/qdiffusemapmaterial_p.h b/src/render/defaults/qdiffusemapmaterial_p.h
index 5a3a742ed..3a0d721a3 100644
--- a/src/render/defaults/qdiffusemapmaterial_p.h
+++ b/src/render/defaults/qdiffusemapmaterial_p.h
@@ -59,7 +59,7 @@ namespace Qt3DRender {
class QFilterKey;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QTechnique;
class QParameter;
class QShaderProgram;
@@ -80,7 +80,7 @@ class QDiffuseMapMaterialPrivate : public QMaterialPrivate
void handleTextureScaleChanged(const QVariant &var);
QEffect *m_diffuseMapEffect;
- QAbstractTextureProvider *m_diffuseTexture;
+ QAbstractTexture *m_diffuseTexture;
QParameter *m_ambientParameter;
QParameter *m_diffuseParameter;
QParameter *m_specularParameter;
diff --git a/src/render/defaults/qdiffusespecularmapmaterial.cpp b/src/render/defaults/qdiffusespecularmapmaterial.cpp
index b1bc840c1..26b98bd2c 100644
--- a/src/render/defaults/qdiffusespecularmapmaterial.cpp
+++ b/src/render/defaults/qdiffusespecularmapmaterial.cpp
@@ -76,14 +76,14 @@ QDiffuseSpecularMapMaterialPrivate::QDiffuseSpecularMapMaterialPrivate()
, m_diffuseSpecularMapGL2ES2Shader(new QShaderProgram())
, m_filterKey(new QFilterKey)
{
- m_diffuseTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_diffuseTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_diffuseTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_diffuseTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_diffuseTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_diffuseTexture->setGenerateMipMaps(true);
m_diffuseTexture->setMaximumAnisotropy(16.0f);
- m_specularTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_specularTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_specularTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_specularTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_specularTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_specularTexture->setGenerateMipMaps(true);
m_specularTexture->setMaximumAnisotropy(16.0f);
@@ -161,13 +161,13 @@ void QDiffuseSpecularMapMaterialPrivate::handleAmbientChanged(const QVariant &va
void QDiffuseSpecularMapMaterialPrivate::handleDiffuseChanged(const QVariant &var)
{
Q_Q(QDiffuseSpecularMapMaterial);
- emit q->diffuseChanged(var.value<QAbstractTextureProvider *>());
+ emit q->diffuseChanged(var.value<QAbstractTexture *>());
}
void QDiffuseSpecularMapMaterialPrivate::handleSpecularChanged(const QVariant &var)
{
Q_Q(QDiffuseSpecularMapMaterial);
- emit q->specularChanged(var.value<QAbstractTextureProvider *>());
+ emit q->specularChanged(var.value<QAbstractTexture *>());
}
void QDiffuseSpecularMapMaterialPrivate::handleShininessChanged(const QVariant &var)
@@ -245,10 +245,10 @@ QColor QDiffuseSpecularMapMaterial::ambient() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QDiffuseSpecularMapMaterial::diffuse() const
+QAbstractTexture *QDiffuseSpecularMapMaterial::diffuse() const
{
Q_D(const QDiffuseSpecularMapMaterial);
- return d->m_diffuseParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_diffuseParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -265,10 +265,10 @@ QAbstractTextureProvider *QDiffuseSpecularMapMaterial::diffuse() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QDiffuseSpecularMapMaterial::specular() const
+QAbstractTexture *QDiffuseSpecularMapMaterial::specular() const
{
Q_D(const QDiffuseSpecularMapMaterial);
- return d->m_specularParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_specularParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -299,13 +299,13 @@ void QDiffuseSpecularMapMaterial::setAmbient(const QColor &ambient)
d->m_ambientParameter->setValue(ambient);
}
-void QDiffuseSpecularMapMaterial::setDiffuse(QAbstractTextureProvider *diffuse)
+void QDiffuseSpecularMapMaterial::setDiffuse(QAbstractTexture *diffuse)
{
Q_D(QDiffuseSpecularMapMaterial);
d->m_diffuseParameter->setValue(QVariant::fromValue(diffuse));
}
-void QDiffuseSpecularMapMaterial::setSpecular(QAbstractTextureProvider *specular)
+void QDiffuseSpecularMapMaterial::setSpecular(QAbstractTexture *specular)
{
Q_D(QDiffuseSpecularMapMaterial);
d->m_specularParameter->setValue(QVariant::fromValue(specular));
diff --git a/src/render/defaults/qdiffusespecularmapmaterial.h b/src/render/defaults/qdiffusespecularmapmaterial.h
index eddad09dc..b80f2c17f 100644
--- a/src/render/defaults/qdiffusespecularmapmaterial.h
+++ b/src/render/defaults/qdiffusespecularmapmaterial.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QDiffuseSpecularMapMaterialPrivate;
class QT3DRENDERSHARED_EXPORT QDiffuseSpecularMapMaterial : public QMaterial
@@ -55,8 +55,8 @@ class QT3DRENDERSHARED_EXPORT QDiffuseSpecularMapMaterial : public QMaterial
Q_OBJECT
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *specular READ specular WRITE setSpecular NOTIFY specularChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *specular READ specular WRITE setSpecular NOTIFY specularChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
@@ -64,22 +64,22 @@ public:
~QDiffuseSpecularMapMaterial();
QColor ambient() const;
- QAbstractTextureProvider *diffuse() const;
- QAbstractTextureProvider *specular() const;
+ QAbstractTexture *diffuse() const;
+ QAbstractTexture *specular() const;
float shininess() const;
float textureScale() const;
public Q_SLOTS:
void setAmbient(const QColor &ambient);
- void setDiffuse(QAbstractTextureProvider *diffuse);
- void setSpecular(QAbstractTextureProvider *specular);
+ void setDiffuse(QAbstractTexture *diffuse);
+ void setSpecular(QAbstractTexture *specular);
void setShininess(float shininess);
void setTextureScale(float textureScale);
Q_SIGNALS:
void ambientChanged(const QColor &ambient);
- void diffuseChanged(QAbstractTextureProvider *diffuse);
- void specularChanged(QAbstractTextureProvider *specular);
+ void diffuseChanged(QAbstractTexture *diffuse);
+ void specularChanged(QAbstractTexture *specular);
void shininessChanged(float shininess);
void textureScaleChanged(float textureScale);
diff --git a/src/render/defaults/qdiffusespecularmapmaterial_p.h b/src/render/defaults/qdiffusespecularmapmaterial_p.h
index 86570b977..58e4e63ba 100644
--- a/src/render/defaults/qdiffusespecularmapmaterial_p.h
+++ b/src/render/defaults/qdiffusespecularmapmaterial_p.h
@@ -59,7 +59,7 @@ namespace Qt3DRender {
class QFilterKey;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QTechnique;
class QParameter;
class QShaderProgram;
@@ -81,8 +81,8 @@ public:
void handleTextureScaleChanged(const QVariant &var);
QEffect *m_diffuseSpecularMapEffect;
- QAbstractTextureProvider *m_diffuseTexture;
- QAbstractTextureProvider *m_specularTexture;
+ QAbstractTexture *m_diffuseTexture;
+ QAbstractTexture *m_specularTexture;
QParameter *m_ambientParameter;
QParameter *m_diffuseParameter;
QParameter *m_specularParameter;
diff --git a/src/render/defaults/qnormaldiffusemapmaterial.cpp b/src/render/defaults/qnormaldiffusemapmaterial.cpp
index 3ce95e844..d1eef5929 100644
--- a/src/render/defaults/qnormaldiffusemapmaterial.cpp
+++ b/src/render/defaults/qnormaldiffusemapmaterial.cpp
@@ -77,14 +77,14 @@ QNormalDiffuseMapMaterialPrivate::QNormalDiffuseMapMaterialPrivate()
, m_normalDiffuseGL2ES2Shader(new QShaderProgram())
, m_filterKey(new QFilterKey)
{
- m_diffuseTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_diffuseTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_diffuseTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_diffuseTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_diffuseTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_diffuseTexture->setGenerateMipMaps(true);
m_diffuseTexture->setMaximumAnisotropy(16.0f);
- m_normalTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_normalTexture->setMinificationFilter(QAbstractTextureProvider::Linear);
+ m_normalTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_normalTexture->setMinificationFilter(QAbstractTexture::Linear);
m_normalTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_normalTexture->setMaximumAnisotropy(16.0f);
}
@@ -164,13 +164,13 @@ void QNormalDiffuseMapMaterialPrivate::handleAmbientChanged(const QVariant &var)
void QNormalDiffuseMapMaterialPrivate::handleDiffuseChanged(const QVariant &var)
{
Q_Q(QNormalDiffuseMapMaterial);
- emit q->diffuseChanged(var.value<QAbstractTextureProvider *>());
+ emit q->diffuseChanged(var.value<QAbstractTexture *>());
}
void QNormalDiffuseMapMaterialPrivate::handleNormalChanged(const QVariant &var)
{
Q_Q(QNormalDiffuseMapMaterial);
- emit q->normalChanged(var.value<QAbstractTextureProvider *>());
+ emit q->normalChanged(var.value<QAbstractTexture *>());
}
void QNormalDiffuseMapMaterialPrivate::handleSpecularChanged(const QVariant &var)
@@ -273,10 +273,10 @@ QColor QNormalDiffuseMapMaterial::specular() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QNormalDiffuseMapMaterial::diffuse() const
+QAbstractTexture *QNormalDiffuseMapMaterial::diffuse() const
{
Q_D(const QNormalDiffuseMapMaterial);
- return d->m_diffuseParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_diffuseParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -292,10 +292,10 @@ QAbstractTextureProvider *QNormalDiffuseMapMaterial::diffuse() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QNormalDiffuseMapMaterial::normal() const
+QAbstractTexture *QNormalDiffuseMapMaterial::normal() const
{
Q_D(const QNormalDiffuseMapMaterial);
- return d->m_normalParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_normalParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -332,13 +332,13 @@ void QNormalDiffuseMapMaterial::setSpecular(const QColor &specular)
d->m_specularParameter->setValue(specular);
}
-void QNormalDiffuseMapMaterial::setDiffuse(QAbstractTextureProvider *diffuse)
+void QNormalDiffuseMapMaterial::setDiffuse(QAbstractTexture *diffuse)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_diffuseParameter->setValue(QVariant::fromValue(diffuse));
}
-void QNormalDiffuseMapMaterial::setNormal(QAbstractTextureProvider *normal)
+void QNormalDiffuseMapMaterial::setNormal(QAbstractTexture *normal)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_normalParameter->setValue(QVariant::fromValue(normal));
diff --git a/src/render/defaults/qnormaldiffusemapmaterial.h b/src/render/defaults/qnormaldiffusemapmaterial.h
index 6dc6e7b8b..81bfb302e 100644
--- a/src/render/defaults/qnormaldiffusemapmaterial.h
+++ b/src/render/defaults/qnormaldiffusemapmaterial.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QNormalDiffuseMapMaterialPrivate;
class QT3DRENDERSHARED_EXPORT QNormalDiffuseMapMaterial : public QMaterial
@@ -55,8 +55,8 @@ class QT3DRENDERSHARED_EXPORT QNormalDiffuseMapMaterial : public QMaterial
Q_OBJECT
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
Q_PROPERTY(QColor specular READ specular WRITE setSpecular NOTIFY specularChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *normal READ normal WRITE setNormal NOTIFY normalChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *normal READ normal WRITE setNormal NOTIFY normalChanged)
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
@@ -66,23 +66,23 @@ public:
QColor ambient() const;
QColor specular() const;
- QAbstractTextureProvider *diffuse() const;
- QAbstractTextureProvider *normal() const;
+ QAbstractTexture *diffuse() const;
+ QAbstractTexture *normal() const;
float shininess() const;
float textureScale() const;
public Q_SLOTS:
void setAmbient(const QColor &ambient);
void setSpecular(const QColor &specular);
- void setDiffuse(QAbstractTextureProvider *diffuse);
- void setNormal(QAbstractTextureProvider *normal);
+ void setDiffuse(QAbstractTexture *diffuse);
+ void setNormal(QAbstractTexture *normal);
void setShininess(float shininess);
void setTextureScale(float textureScale);
Q_SIGNALS:
void ambientChanged(const QColor &ambient);
- void diffuseChanged(QAbstractTextureProvider *diffuse);
- void normalChanged(QAbstractTextureProvider *normal);
+ void diffuseChanged(QAbstractTexture *diffuse);
+ void normalChanged(QAbstractTexture *normal);
void specularChanged(const QColor &specular);
void shininessChanged(float shininess);
void textureScaleChanged(float textureScale);
diff --git a/src/render/defaults/qnormaldiffusemapmaterial_p.h b/src/render/defaults/qnormaldiffusemapmaterial_p.h
index d1831c13d..a446faa13 100644
--- a/src/render/defaults/qnormaldiffusemapmaterial_p.h
+++ b/src/render/defaults/qnormaldiffusemapmaterial_p.h
@@ -59,7 +59,7 @@ namespace Qt3DRender {
class QFilterKey;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QTechnique;
class QParameter;
class QShaderProgram;
@@ -82,8 +82,8 @@ public:
void handleTextureScaleChanged(const QVariant &var);
QEffect *m_normalDiffuseEffect;
- QAbstractTextureProvider *m_diffuseTexture;
- QAbstractTextureProvider *m_normalTexture;
+ QAbstractTexture *m_diffuseTexture;
+ QAbstractTexture *m_normalTexture;
QParameter *m_ambientParameter;
QParameter *m_diffuseParameter;
QParameter *m_normalParameter;
diff --git a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
index 6802e58fd..7457ee38b 100644
--- a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
+++ b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
@@ -78,19 +78,19 @@ QNormalDiffuseSpecularMapMaterialPrivate::QNormalDiffuseSpecularMapMaterialPriva
, m_normalDiffuseSpecularGL2ES2Shader(new QShaderProgram())
, m_filterKey(new QFilterKey)
{
- m_diffuseTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_diffuseTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_diffuseTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_diffuseTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_diffuseTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_diffuseTexture->setGenerateMipMaps(true);
m_diffuseTexture->setMaximumAnisotropy(16.0f);
- m_normalTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_normalTexture->setMinificationFilter(QAbstractTextureProvider::Linear);
+ m_normalTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_normalTexture->setMinificationFilter(QAbstractTexture::Linear);
m_normalTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_normalTexture->setMaximumAnisotropy(16.0f);
- m_specularTexture->setMagnificationFilter(QAbstractTextureProvider::Linear);
- m_specularTexture->setMinificationFilter(QAbstractTextureProvider::LinearMipMapLinear);
+ m_specularTexture->setMagnificationFilter(QAbstractTexture::Linear);
+ m_specularTexture->setMinificationFilter(QAbstractTexture::LinearMipMapLinear);
m_specularTexture->setWrapMode(QTextureWrapMode(QTextureWrapMode::Repeat));
m_specularTexture->setGenerateMipMaps(true);
m_specularTexture->setMaximumAnisotropy(16.0f);
@@ -171,19 +171,19 @@ void QNormalDiffuseSpecularMapMaterialPrivate::handleAmbientChanged(const QVaria
void QNormalDiffuseSpecularMapMaterialPrivate::handleDiffuseChanged(const QVariant &var)
{
Q_Q(QNormalDiffuseSpecularMapMaterial);
- emit q->diffuseChanged(var.value<QAbstractTextureProvider *>());
+ emit q->diffuseChanged(var.value<QAbstractTexture *>());
}
void QNormalDiffuseSpecularMapMaterialPrivate::handleNormalChanged(const QVariant &var)
{
Q_Q(QNormalDiffuseSpecularMapMaterial);
- emit q->normalChanged(var.value<QAbstractTextureProvider *>());
+ emit q->normalChanged(var.value<QAbstractTexture *>());
}
void QNormalDiffuseSpecularMapMaterialPrivate::handleSpecularChanged(const QVariant &var)
{
Q_Q(QNormalDiffuseSpecularMapMaterial);
- emit q->specularChanged(var.value<QAbstractTextureProvider *>());
+ emit q->specularChanged(var.value<QAbstractTexture *>());
}
void QNormalDiffuseSpecularMapMaterialPrivate::handleShininessChanged(const QVariant &var)
@@ -269,10 +269,10 @@ QColor QNormalDiffuseSpecularMapMaterial::ambient() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QNormalDiffuseSpecularMapMaterial::diffuse() const
+QAbstractTexture *QNormalDiffuseSpecularMapMaterial::diffuse() const
{
Q_D(const QNormalDiffuseSpecularMapMaterial);
- return d->m_diffuseParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_diffuseParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -288,10 +288,10 @@ QAbstractTextureProvider *QNormalDiffuseSpecularMapMaterial::diffuse() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QNormalDiffuseSpecularMapMaterial::normal() const
+QAbstractTexture *QNormalDiffuseSpecularMapMaterial::normal() const
{
Q_D(const QNormalDiffuseSpecularMapMaterial);
- return d->m_normalParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_normalParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -308,10 +308,10 @@ QAbstractTextureProvider *QNormalDiffuseSpecularMapMaterial::normal() const
\li Maximum anisotropy of 16.0
\endlist
*/
-QAbstractTextureProvider *QNormalDiffuseSpecularMapMaterial::specular() const
+QAbstractTexture *QNormalDiffuseSpecularMapMaterial::specular() const
{
Q_D(const QNormalDiffuseSpecularMapMaterial);
- return d->m_specularParameter->value().value<QAbstractTextureProvider *>();
+ return d->m_specularParameter->value().value<QAbstractTexture *>();
}
/*!
@@ -342,19 +342,19 @@ void QNormalDiffuseSpecularMapMaterial::setAmbient(const QColor &ambient)
d->m_ambientParameter->setValue(ambient);
}
-void QNormalDiffuseSpecularMapMaterial::setDiffuse(QAbstractTextureProvider *diffuse)
+void QNormalDiffuseSpecularMapMaterial::setDiffuse(QAbstractTexture *diffuse)
{
Q_D(QNormalDiffuseSpecularMapMaterial);
d->m_diffuseParameter->setValue(QVariant::fromValue(diffuse));
}
-void QNormalDiffuseSpecularMapMaterial::setNormal(QAbstractTextureProvider *normal)
+void QNormalDiffuseSpecularMapMaterial::setNormal(QAbstractTexture *normal)
{
Q_D(QNormalDiffuseSpecularMapMaterial);
d->m_normalParameter->setValue(QVariant::fromValue(normal));
}
-void QNormalDiffuseSpecularMapMaterial::setSpecular(QAbstractTextureProvider *specular)
+void QNormalDiffuseSpecularMapMaterial::setSpecular(QAbstractTexture *specular)
{
Q_D(QNormalDiffuseSpecularMapMaterial);
d->m_specularParameter->setValue(QVariant::fromValue(specular));
diff --git a/src/render/defaults/qnormaldiffusespecularmapmaterial.h b/src/render/defaults/qnormaldiffusespecularmapmaterial.h
index b93aab760..aa4b23eaa 100644
--- a/src/render/defaults/qnormaldiffusespecularmapmaterial.h
+++ b/src/render/defaults/qnormaldiffusespecularmapmaterial.h
@@ -53,9 +53,9 @@ class QT3DRENDERSHARED_EXPORT QNormalDiffuseSpecularMapMaterial : public QMateri
{
Q_OBJECT
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *normal READ normal WRITE setNormal NOTIFY normalChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *specular READ specular WRITE setSpecular NOTIFY specularChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *normal READ normal WRITE setNormal NOTIFY normalChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *specular READ specular WRITE setSpecular NOTIFY specularChanged)
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
@@ -64,25 +64,25 @@ public:
~QNormalDiffuseSpecularMapMaterial();
QColor ambient() const;
- QAbstractTextureProvider *diffuse() const;
- QAbstractTextureProvider *normal() const;
- QAbstractTextureProvider *specular() const;
+ QAbstractTexture *diffuse() const;
+ QAbstractTexture *normal() const;
+ QAbstractTexture *specular() const;
float shininess() const;
float textureScale() const;
public Q_SLOTS:
void setAmbient(const QColor &ambient);
- void setDiffuse(QAbstractTextureProvider *diffuse);
- void setNormal(QAbstractTextureProvider *normal);
- void setSpecular(QAbstractTextureProvider *specular);
+ void setDiffuse(QAbstractTexture *diffuse);
+ void setNormal(QAbstractTexture *normal);
+ void setSpecular(QAbstractTexture *specular);
void setShininess(float shininess);
void setTextureScale(float textureScale);
Q_SIGNALS:
void ambientChanged(const QColor &ambient);
- void diffuseChanged(QAbstractTextureProvider *diffuse);
- void normalChanged(QAbstractTextureProvider *normal);
- void specularChanged(QAbstractTextureProvider *specular);
+ void diffuseChanged(QAbstractTexture *diffuse);
+ void normalChanged(QAbstractTexture *normal);
+ void specularChanged(QAbstractTexture *specular);
void shininessChanged(float shininess);
void textureScaleChanged(float textureScale);
diff --git a/src/render/defaults/qnormaldiffusespecularmapmaterial_p.h b/src/render/defaults/qnormaldiffusespecularmapmaterial_p.h
index 7f862702e..cdd12abff 100644
--- a/src/render/defaults/qnormaldiffusespecularmapmaterial_p.h
+++ b/src/render/defaults/qnormaldiffusespecularmapmaterial_p.h
@@ -59,7 +59,7 @@ namespace Qt3DRender {
class QFilterKey;
class QEffect;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QTechnique;
class QParameter;
class QShaderProgram;
@@ -82,9 +82,9 @@ public:
void handleTextureScaleChanged(const QVariant &var);
QEffect *m_normalDiffuseSpecularEffect;
- QAbstractTextureProvider *m_diffuseTexture;
- QAbstractTextureProvider *m_normalTexture;
- QAbstractTextureProvider *m_specularTexture;
+ QAbstractTexture *m_diffuseTexture;
+ QAbstractTexture *m_normalTexture;
+ QAbstractTexture *m_specularTexture;
QParameter *m_ambientParameter;
QParameter *m_diffuseParameter;
QParameter *m_normalParameter;
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index 5b71d1e80..41c5451e6 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -181,6 +181,7 @@ void QRenderAspectPrivate::registerBackendTypes()
q->registerBackendType<Qt3DCore::QEntity>(QBackendNodeMapperPtr(new Render::RenderEntityFunctor(m_renderer, m_nodeManagers)));
q->registerBackendType<Qt3DCore::QTransform>(QBackendNodeMapperPtr(new Render::NodeFunctor<Render::Transform, Render::TransformManager>(m_renderer, m_nodeManagers->transformManager())));
+
q->registerBackendType<Qt3DRender::QCameraLens>(QBackendNodeMapperPtr(new Render::NodeFunctor<Render::CameraLens, Render::CameraManager>(m_renderer, m_nodeManagers->cameraManager())));
q->registerBackendType<QLayer>(QBackendNodeMapperPtr(new Render::NodeFunctor<Render::Layer, Render::LayerManager>(m_renderer, m_nodeManagers->layerManager())));
q->registerBackendType<QSceneLoader>(QBackendNodeMapperPtr(new Render::RenderSceneFunctor(m_renderer, m_nodeManagers->sceneManager())));
@@ -198,7 +199,7 @@ void QRenderAspectPrivate::registerBackendTypes()
q->registerBackendType<QGeometryRenderer>(QBackendNodeMapperPtr(new Render::GeometryRendererFunctor(m_renderer, m_nodeManagers->geometryRendererManager())));
// Textures
- q->registerBackendType<QAbstractTextureProvider>(QBackendNodeMapperPtr(new Render::TextureFunctor(m_renderer, m_nodeManagers->textureManager(), m_nodeManagers->textureImageManager(), m_nodeManagers->textureDataManager())));
+ q->registerBackendType<QAbstractTexture>(QBackendNodeMapperPtr(new Render::TextureFunctor(m_renderer, m_nodeManagers->textureManager(), m_nodeManagers->textureImageManager(), m_nodeManagers->textureDataManager())));
q->registerBackendType<QAbstractTextureImage>(QBackendNodeMapperPtr(new Render::TextureImageFunctor(m_renderer, m_nodeManagers->textureManager(), m_nodeManagers->textureImageManager(), m_nodeManagers->textureDataManager())));
// Material system
diff --git a/src/render/frontend/qrendertargetoutput.cpp b/src/render/frontend/qrendertargetoutput.cpp
index 12dc2aa28..147f38897 100644
--- a/src/render/frontend/qrendertargetoutput.cpp
+++ b/src/render/frontend/qrendertargetoutput.cpp
@@ -60,7 +60,7 @@ void QRenderTargetOutput::copy(const QNode *ref)
QNode::copy(ref);
const QRenderTargetOutput *rA = static_cast<const QRenderTargetOutput*>(ref);
d_func()->m_attachmentPoint = rA->d_func()->m_attachmentPoint;
- setTexture(qobject_cast<QAbstractTextureProvider *>(QNode::clone(rA->d_func()->m_texture)));
+ setTexture(qobject_cast<QAbstractTexture *>(QNode::clone(rA->d_func()->m_texture)));
}
QRenderTargetOutput::QRenderTargetOutput(QNode *parent)
@@ -94,7 +94,7 @@ QRenderTargetOutput::AttachmentPoint QRenderTargetOutput::attachmentPoint() cons
return d->m_attachmentPoint;
}
-void QRenderTargetOutput::setTexture(QAbstractTextureProvider *texture)
+void QRenderTargetOutput::setTexture(QAbstractTexture *texture)
{
Q_D(QRenderTargetOutput);
if (texture != d->m_texture) {
@@ -107,7 +107,7 @@ void QRenderTargetOutput::setTexture(QAbstractTextureProvider *texture)
}
}
-QAbstractTextureProvider *QRenderTargetOutput::texture() const
+QAbstractTexture *QRenderTargetOutput::texture() const
{
Q_D(const QRenderTargetOutput);
return d->m_texture;
diff --git a/src/render/frontend/qrendertargetoutput.h b/src/render/frontend/qrendertargetoutput.h
index 2f32869fa..0383c7de9 100644
--- a/src/render/frontend/qrendertargetoutput.h
+++ b/src/render/frontend/qrendertargetoutput.h
@@ -47,14 +47,14 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QRenderTargetOutputPrivate;
class QT3DRENDERSHARED_EXPORT QRenderTargetOutput : public Qt3DCore::QNode
{
Q_OBJECT
Q_PROPERTY(AttachmentPoint attachmentPoint READ attachmentPoint WRITE setAttachmentPoint NOTIFY attachmentPointChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider *texture READ texture WRITE setTexture NOTIFY textureChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture *texture READ texture WRITE setTexture NOTIFY textureChanged)
Q_PROPERTY(int mipLevel READ mipLevel WRITE setMipLevel NOTIFY mipLevelChanged)
Q_PROPERTY(int layer READ layer WRITE setLayer NOTIFY layerChanged)
Q_PROPERTY(CubeMapFace face READ face WRITE setFace NOTIFY faceChanged)
@@ -97,21 +97,21 @@ public:
~QRenderTargetOutput();
AttachmentPoint attachmentPoint() const;
- QAbstractTextureProvider *texture() const;
+ QAbstractTexture *texture() const;
int mipLevel() const;
int layer() const;
CubeMapFace face() const;
public Q_SLOTS:
void setAttachmentPoint(AttachmentPoint attachmentPoint);
- void setTexture(QAbstractTextureProvider *texture);
+ void setTexture(QAbstractTexture *texture);
void setMipLevel(int level);
void setLayer(int layer);
void setFace(CubeMapFace face);
Q_SIGNALS:
void attachmentPointChanged(AttachmentPoint attachmentPoint);
- void textureChanged(QAbstractTextureProvider *texture);
+ void textureChanged(QAbstractTexture *texture);
void mipLevelChanged(int mipLevel);
void layerChanged(int layer);
void faceChanged(CubeMapFace face);
diff --git a/src/render/frontend/qrendertargetoutput_p.h b/src/render/frontend/qrendertargetoutput_p.h
index c948b44ad..631a7d7d7 100644
--- a/src/render/frontend/qrendertargetoutput_p.h
+++ b/src/render/frontend/qrendertargetoutput_p.h
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QRenderTargetOutputPrivate : public Qt3DCore::QNodePrivate
{
@@ -67,7 +67,7 @@ public:
Q_DECLARE_PUBLIC(QRenderTargetOutput)
- QAbstractTextureProvider *m_texture;
+ QAbstractTexture *m_texture;
QRenderTargetOutput::AttachmentPoint m_attachmentPoint;
int m_mipLevel;
int m_layer;
diff --git a/src/render/jobs/loadtexturedatajob.cpp b/src/render/jobs/loadtexturedatajob.cpp
index c4ec99601..698167d13 100644
--- a/src/render/jobs/loadtexturedatajob.cpp
+++ b/src/render/jobs/loadtexturedatajob.cpp
@@ -108,15 +108,15 @@ void LoadTextureDataJob::run()
if (!data)
return;
- if (txt->target() == QAbstractTextureProvider::TargetAutomatic)
- txt->setTarget(static_cast<QAbstractTextureProvider::Target>(data->target()));
+ if (txt->target() == QAbstractTexture::TargetAutomatic)
+ txt->setTarget(static_cast<QAbstractTexture::Target>(data->target()));
if (!txt->isAutoMipMapGenerationEnabled())
txt->setMipLevels(data->mipLevels());
txt->setSize(data->width(), data->height(), data->depth());
txt->setLayers(data->layers());
- txt->setFormat(static_cast<QAbstractTextureProvider::TextureFormat>(data->format()));
+ txt->setFormat(static_cast<QAbstractTexture::TextureFormat>(data->format()));
txt->setTextureDataHandle(textureDataHandle);
}
@@ -140,7 +140,7 @@ void LoadTextureDataJob::run()
// Set texture size of texture if the first layer / level / face has a valid size
// otherwise assume the size was set on the texture itself
if (texImg->layer() == 0 && texImg->mipLevel() == 0 &&
- texImg->face() == QAbstractTextureProvider::CubeMapPositiveX) {
+ texImg->face() == QAbstractTexture::CubeMapPositiveX) {
if (data == Q_NULLPTR) {
qWarning() << "Texture data is null, texture data failed to load";
@@ -152,8 +152,8 @@ void LoadTextureDataJob::run()
txt->setSize(data->width(), data->height(), data->depth());
}
// Set the format of the texture if the texture format is set to Automatic
- if (txt->format() == QAbstractTextureProvider::Automatic) {
- txt->setFormat(static_cast<QAbstractTextureProvider::TextureFormat>(data->format()));
+ if (txt->format() == QAbstractTexture::Automatic) {
+ txt->setFormat(static_cast<QAbstractTexture::TextureFormat>(data->format()));
}
}
}
diff --git a/src/render/materialsystem/qmaterial.h b/src/render/materialsystem/qmaterial.h
index e237f4cd3..36497b48c 100644
--- a/src/render/materialsystem/qmaterial.h
+++ b/src/render/materialsystem/qmaterial.h
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QParameter;
class QMaterialPrivate;
class QEffect;
diff --git a/src/render/materialsystem/qparameter.cpp b/src/render/materialsystem/qparameter.cpp
index d8f1c1c94..4bdc90648 100644
--- a/src/render/materialsystem/qparameter.cpp
+++ b/src/render/materialsystem/qparameter.cpp
@@ -97,7 +97,7 @@ QParameter::QParameter(const QString &name, const QVariant &value, QNode *parent
setValue(value);
}
-QParameter::QParameter(const QString &name, QAbstractTextureProvider *texture, QNode *parent)
+QParameter::QParameter(const QString &name, QAbstractTexture *texture, QNode *parent)
: QNode(*new QParameterPrivate, parent)
{
Q_D(QParameter);
diff --git a/src/render/materialsystem/qparameter.h b/src/render/materialsystem/qparameter.h
index 09872e030..48ba6fe7c 100644
--- a/src/render/materialsystem/qparameter.h
+++ b/src/render/materialsystem/qparameter.h
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
class QParameterPrivate;
-class QAbstractTextureProvider;
+class QAbstractTexture;
class QT3DRENDERSHARED_EXPORT QParameter : public Qt3DCore::QNode
{
@@ -61,7 +61,7 @@ public:
explicit QParameter(Qt3DCore::QNode *parent = 0);
~QParameter();
QParameter(const QString &name, const QVariant& value, Qt3DCore::QNode *parent = 0);
- QParameter(const QString &name, QAbstractTextureProvider *texture, Qt3DCore::QNode *parent = 0);
+ QParameter(const QString &name, QAbstractTexture *texture, Qt3DCore::QNode *parent = 0);
QString name() const;
diff --git a/src/render/texture/qabstracttextureprovider.cpp b/src/render/texture/qabstracttexture.cpp
index 2bb17c864..5770c2649 100644
--- a/src/render/texture/qabstracttextureprovider.cpp
+++ b/src/render/texture/qabstracttexture.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include "qabstracttextureprovider.h"
-#include "qabstracttextureprovider_p.h"
+#include "qabstracttexture.h"
+#include "qabstracttexture_p.h"
#include <Qt3DCore/qscenepropertychange.h>
#include <Qt3DRender/qabstracttextureimage.h>
@@ -48,29 +48,29 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-QAbstractTextureProviderPrivate::QAbstractTextureProviderPrivate()
+QAbstractTexturePrivate::QAbstractTexturePrivate()
: QNodePrivate()
- , m_target(QAbstractTextureProvider::Target2D)
- , m_format(QAbstractTextureProvider::Automatic)
+ , m_target(QAbstractTexture::Target2D)
+ , m_format(QAbstractTexture::Automatic)
, m_width(1)
, m_height(1)
, m_depth(1)
, m_autoMipMap(false)
- , m_minFilter(QAbstractTextureProvider::Nearest)
- , m_magFilter(QAbstractTextureProvider::Nearest)
- , m_status(QAbstractTextureProvider::Loading)
+ , m_minFilter(QAbstractTexture::Nearest)
+ , m_magFilter(QAbstractTexture::Nearest)
+ , m_status(QAbstractTexture::Loading)
, m_maximumAnisotropy(1.0f)
- , m_comparisonFunction(QAbstractTextureProvider::CompareLessEqual)
- , m_comparisonMode(QAbstractTextureProvider::CompareNone)
+ , m_comparisonFunction(QAbstractTexture::CompareLessEqual)
+ , m_comparisonMode(QAbstractTexture::CompareNone)
, m_maximumLayers(1)
, m_unique(false)
{
}
-void QAbstractTextureProvider::copy(const QNode *ref)
+void QAbstractTexture::copy(const QNode *ref)
{
QNode::copy(ref);
- const QAbstractTextureProvider *t = static_cast<const QAbstractTextureProvider*>(ref);
+ const QAbstractTexture *t = static_cast<const QAbstractTexture*>(ref);
d_func()->m_target = t->d_func()->m_target;
d_func()->m_width = t->d_func()->m_width;
d_func()->m_height = t->d_func()->m_height;
@@ -89,12 +89,12 @@ void QAbstractTextureProvider::copy(const QNode *ref)
}
/*!
- \class Qt3DRender::QAbstractTextureProvider
+ \class Qt3DRender::QAbstractTexture
\inmodule Qt3DRender
\since 5.5
\brief A base class to be used to provide textures.
- The QAbstractTextureProvider class shouldn't be used directly but rather
+ The QAbstractTexture class shouldn't be used directly but rather
through one of its subclasses. Each subclass implements a given texture
target (2D, 2DArray, 3D, CubeMap ...) Each subclass provides a set of
functors for each layer, cube map face and mipmap level. In turn the
@@ -102,26 +102,26 @@ void QAbstractTextureProvider::copy(const QNode *ref)
with data.
*/
-QAbstractTextureProvider::QAbstractTextureProvider(QNode *parent)
- : QNode(*new QAbstractTextureProviderPrivate, parent)
+QAbstractTexture::QAbstractTexture(QNode *parent)
+ : QNode(*new QAbstractTexturePrivate, parent)
{
}
-QAbstractTextureProvider::QAbstractTextureProvider(Target target, QNode *parent)
- : QNode(*new QAbstractTextureProviderPrivate, parent)
+QAbstractTexture::QAbstractTexture(Target target, QNode *parent)
+ : QNode(*new QAbstractTexturePrivate, parent)
{
d_func()->m_target = target;
}
/*! \internal */
-QAbstractTextureProvider::QAbstractTextureProvider(QAbstractTextureProviderPrivate &dd, QNode *parent)
+QAbstractTexture::QAbstractTexture(QAbstractTexturePrivate &dd, QNode *parent)
: QNode(dd, parent)
{
}
-QAbstractTextureProvider::~QAbstractTextureProvider()
+QAbstractTexture::~QAbstractTexture()
{
- // The subclasses of QAbstractTextureProvider are only there to set the type on a QTextureProvider
+ // The subclasses of QAbstractTexture are only there to set the type on a QTextureProvider
// QNode::cleanup needs to be handled here and not in the subclasses.
QNode::cleanup();
}
@@ -129,7 +129,7 @@ QAbstractTextureProvider::~QAbstractTextureProvider()
/*!
Sets the size of the texture provider to width \a w, height \a h and depth \a d.
*/
-void QAbstractTextureProvider::setSize(int w, int h, int d)
+void QAbstractTexture::setSize(int w, int h, int d)
{
setWidth(w);
setHeight(h);
@@ -137,13 +137,13 @@ void QAbstractTextureProvider::setSize(int w, int h, int d)
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::width
+ \property Qt3DRender::QAbstractTexture::width
Holds the width of the texture provider.
*/
-void QAbstractTextureProvider::setWidth(int width)
+void QAbstractTexture::setWidth(int width)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_width != width) {
d->m_width = width;
emit widthChanged(width);
@@ -151,13 +151,13 @@ void QAbstractTextureProvider::setWidth(int width)
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::height
+ \property Qt3DRender::QAbstractTexture::height
Holds the height of the texture provider.
*/
-void QAbstractTextureProvider::setHeight(int height)
+void QAbstractTexture::setHeight(int height)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_height != height) {
d->m_height = height;
emit heightChanged(height);
@@ -165,39 +165,39 @@ void QAbstractTextureProvider::setHeight(int height)
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::depth
+ \property Qt3DRender::QAbstractTexture::depth
Holds the depth of the texture provider.
*/
-void QAbstractTextureProvider::setDepth(int depth)
+void QAbstractTexture::setDepth(int depth)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_depth != depth) {
d->m_depth = depth;
emit depthChanged(depth);
}
}
-int QAbstractTextureProvider::width() const
+int QAbstractTexture::width() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_width;
}
-int QAbstractTextureProvider::height() const
+int QAbstractTexture::height() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_height;
}
-int QAbstractTextureProvider::depth() const
+int QAbstractTexture::depth() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_depth;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::maximumLayers
+ \property Qt3DRender::QAbstractTexture::maximumLayers
Holds the maximum layer count of the texture provider. By default, the
maximum layer count is 1.
@@ -205,9 +205,9 @@ int QAbstractTextureProvider::depth() const
\note this has a meaning only for texture providers that have 3D or
array target formats.
*/
-void QAbstractTextureProvider::setMaximumLayers(int maximumLayers)
+void QAbstractTexture::setMaximumLayers(int maximumLayers)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_maximumLayers != maximumLayers) {
d->m_maximumLayers = maximumLayers;
emit maximumLayersChanged(maximumLayers);
@@ -220,14 +220,14 @@ void QAbstractTextureProvider::setMaximumLayers(int maximumLayers)
\note this has a meaning only for texture providers that have 3D or
array target formats.
*/
-int QAbstractTextureProvider::maximumLayers() const
+int QAbstractTexture::maximumLayers() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_maximumLayers;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::unique
+ \property Qt3DRender::QAbstractTexture::unique
Sets whether this texture provider should be unique by reading \a unique.
By default this is false.
@@ -239,9 +239,9 @@ int QAbstractTextureProvider::maximumLayers() const
the renderer to perform these comparison, in which case you can set is
unique to true.
*/
-void QAbstractTextureProvider::setUnique(bool unique)
+void QAbstractTexture::setUnique(bool unique)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_unique != unique) {
d->m_unique = unique;
emit uniqueChanged(unique);
@@ -253,20 +253,20 @@ void QAbstractTextureProvider::setUnique(bool unique)
renderer or not. Defaults to false as this allow in most cases the renderer
to be faster.
*/
-bool QAbstractTextureProvider::isUnique() const
+bool QAbstractTexture::isUnique() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_unique;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::format
+ \property Qt3DRender::QAbstractTexture::format
Holds the format of the texture provider.
*/
-void QAbstractTextureProvider::setFormat(TextureFormat format)
+void QAbstractTexture::setFormat(TextureFormat format)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_format != format) {
d->m_format = format;
emit formatChanged(format);
@@ -276,42 +276,42 @@ void QAbstractTextureProvider::setFormat(TextureFormat format)
/*!
Return the texture provider's format.
*/
-QAbstractTextureProvider::TextureFormat QAbstractTextureProvider::format() const
+QAbstractTexture::TextureFormat QAbstractTexture::format() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_format;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::status readonly
+ \property Qt3DRender::QAbstractTexture::status readonly
Holds the current status of the texture provider.
*/
-void QAbstractTextureProvider::setStatus(Status status)
+void QAbstractTexture::setStatus(Status status)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (status != d->m_status) {
d->m_status = status;
emit statusChanged(status);
}
}
-QAbstractTextureProvider::Status QAbstractTextureProvider::status() const
+QAbstractTexture::Status QAbstractTexture::status() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_status;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::target readonly
+ \property Qt3DRender::QAbstractTexture::target readonly
Holds the target format of the texture provider.
\note The target format can only be set once.
*/
-QAbstractTextureProvider::Target QAbstractTextureProvider::target() const
+QAbstractTexture::Target QAbstractTexture::target() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_target;
}
@@ -319,11 +319,11 @@ QAbstractTextureProvider::Target QAbstractTextureProvider::target() const
Adds a new Qt3DCore::QAbstractTextureImage \a textureImage to the texture provider.
\note Qt3DRender::QAbstractTextureImage should never be shared between multiple
- Qt3DRender::QAbstractTextureProvider instances.
+ Qt3DRender::QAbstractTexture instances.
*/
-void QAbstractTextureProvider::addTextureImage(QAbstractTextureImage *textureImage)
+void QAbstractTexture::addTextureImage(QAbstractTextureImage *textureImage)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (!d->m_textureImages.contains(textureImage)) {
d->m_textureImages.append(textureImage);
@@ -349,9 +349,9 @@ void QAbstractTextureProvider::addTextureImage(QAbstractTextureImage *textureIma
/*!
Removes a Qt3DCore::QAbstractTextureImage \a textureImage from the texture provider.
*/
-void QAbstractTextureProvider::removeTextureImage(QAbstractTextureImage *textureImage)
+void QAbstractTexture::removeTextureImage(QAbstractTextureImage *textureImage)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_changeArbiter != Q_NULLPTR) {
QScenePropertyChangePtr change(new QScenePropertyChange(NodeRemoved, QSceneChange::Node, id()));
change->setPropertyName("textureImage");
@@ -365,40 +365,40 @@ void QAbstractTextureProvider::removeTextureImage(QAbstractTextureImage *texture
Returns a list of pointers to QAbstractTextureImage objects contained in
the texture provider.
*/
-QList<QAbstractTextureImage *> QAbstractTextureProvider::textureImages() const
+QList<QAbstractTextureImage *> QAbstractTexture::textureImages() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_textureImages;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::generateMipMaps
+ \property Qt3DRender::QAbstractTexture::generateMipMaps
Holds whether the texture provider should auto generate mipmaps.
*/
-void QAbstractTextureProvider::setGenerateMipMaps(bool gen)
+void QAbstractTexture::setGenerateMipMaps(bool gen)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_autoMipMap != gen) {
d->m_autoMipMap = gen;
emit generateMipMapsChanged(gen);
}
}
-bool QAbstractTextureProvider::generateMipMaps() const
+bool QAbstractTexture::generateMipMaps() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_autoMipMap;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::minificationFilter
+ \property Qt3DRender::QAbstractTexture::minificationFilter
Holds the minification filter of the texture provider.
*/
-void QAbstractTextureProvider::setMinificationFilter(Filter f)
+void QAbstractTexture::setMinificationFilter(Filter f)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_minFilter != f) {
d->m_minFilter = f;
emit minificationFilterChanged(f);
@@ -406,39 +406,39 @@ void QAbstractTextureProvider::setMinificationFilter(Filter f)
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::magnificationFilter
+ \property Qt3DRender::QAbstractTexture::magnificationFilter
Holds the magnification filter of the texture provider.
*/
-void QAbstractTextureProvider::setMagnificationFilter(Filter f)
+void QAbstractTexture::setMagnificationFilter(Filter f)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_magFilter != f) {
d->m_magFilter = f;
emit magnificationFilterChanged(f);
}
}
-QAbstractTextureProvider::Filter QAbstractTextureProvider::minificationFilter() const
+QAbstractTexture::Filter QAbstractTexture::minificationFilter() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_minFilter;
}
-QAbstractTextureProvider::Filter QAbstractTextureProvider::magnificationFilter() const
+QAbstractTexture::Filter QAbstractTexture::magnificationFilter() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_magFilter;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::wrapMode
+ \property Qt3DRender::QAbstractTexture::wrapMode
Holds the wrap mode of the texture provider.
*/
-void QAbstractTextureProvider::setWrapMode(const QTextureWrapMode &wrapMode)
+void QAbstractTexture::setWrapMode(const QTextureWrapMode &wrapMode)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_wrapMode.x() != wrapMode.x()) {
d->m_wrapMode.setX(wrapMode.x());
QScenePropertyChangePtr e(new QScenePropertyChange(NodeUpdated, QSceneChange::Node, id()));
@@ -462,75 +462,75 @@ void QAbstractTextureProvider::setWrapMode(const QTextureWrapMode &wrapMode)
}
}
-QTextureWrapMode *QAbstractTextureProvider::wrapMode()
+QTextureWrapMode *QAbstractTexture::wrapMode()
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
return &d->m_wrapMode;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::maximumAnisotropy
+ \property Qt3DRender::QAbstractTexture::maximumAnisotropy
Holds the maximum anisotropy of the texture provider.
*/
-void QAbstractTextureProvider::setMaximumAnisotropy(float anisotropy)
+void QAbstractTexture::setMaximumAnisotropy(float anisotropy)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (!qFuzzyCompare(d->m_maximumAnisotropy, anisotropy)) {
d->m_maximumAnisotropy = anisotropy;
emit maximumAnisotropyChanged(anisotropy);
}
}
-float QAbstractTextureProvider::maximumAnisotropy() const
+float QAbstractTexture::maximumAnisotropy() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_maximumAnisotropy;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::comparisonFunction
+ \property Qt3DRender::QAbstractTexture::comparisonFunction
Holds the comparison function of the texture provider.
*/
-void QAbstractTextureProvider::setComparisonFunction(QAbstractTextureProvider::ComparisonFunction function)
+void QAbstractTexture::setComparisonFunction(QAbstractTexture::ComparisonFunction function)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_comparisonFunction != function) {
d->m_comparisonFunction = function;
emit comparisonFunctionChanged(function);
}
}
-QAbstractTextureProvider::ComparisonFunction QAbstractTextureProvider::comparisonFunction() const
+QAbstractTexture::ComparisonFunction QAbstractTexture::comparisonFunction() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_comparisonFunction;
}
/*!
- \property Qt3DRender::QAbstractTextureProvider::comparisonMode
+ \property Qt3DRender::QAbstractTexture::comparisonMode
Holds the comparison mode of the texture provider.
*/
-void QAbstractTextureProvider::setComparisonMode(QAbstractTextureProvider::ComparisonMode mode)
+void QAbstractTexture::setComparisonMode(QAbstractTexture::ComparisonMode mode)
{
- Q_D(QAbstractTextureProvider);
+ Q_D(QAbstractTexture);
if (d->m_comparisonMode != mode) {
d->m_comparisonMode = mode;
emit comparisonModeChanged(mode);
}
}
-QAbstractTextureProvider::ComparisonMode QAbstractTextureProvider::comparisonMode() const
+QAbstractTexture::ComparisonMode QAbstractTexture::comparisonMode() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_comparisonMode;
}
-QTextureImageDataGeneratorPtr QAbstractTextureProvider::dataGenerator() const
+QTextureImageDataGeneratorPtr QAbstractTexture::dataGenerator() const
{
- Q_D(const QAbstractTextureProvider);
+ Q_D(const QAbstractTexture);
return d->m_dataFunctor;
}
diff --git a/src/render/texture/qabstracttextureprovider.h b/src/render/texture/qabstracttexture.h
index ed5023b29..2077f71ed 100644
--- a/src/render/texture/qabstracttextureprovider.h
+++ b/src/render/texture/qabstracttexture.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QABSTRACTTEXTUREPROVIDER_H
-#define QT3DRENDER_QABSTRACTTEXTUREPROVIDER_H
+#ifndef QT3DRENDER_QABSTRACTTEXTURE_H
+#define QT3DRENDER_QABSTRACTTEXTURE_H
#include <Qt3DRender/qtexturedata.h>
#include <Qt3DRender/qt3drender_global.h>
@@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProviderPrivate;
+class QAbstractTexturePrivate;
class QTextureWrapMode;
class QAbstractTextureImage;
class QTextureImageDataGenerator;
typedef QSharedPointer<QTextureImageDataGenerator> QTextureImageDataGeneratorPtr;
-class QT3DRENDERSHARED_EXPORT QAbstractTextureProvider : public Qt3DCore::QNode
+class QT3DRENDERSHARED_EXPORT QAbstractTexture : public Qt3DCore::QNode
{
Q_OBJECT
Q_PROPERTY(Target target READ target CONSTANT)
@@ -266,7 +266,7 @@ public:
};
Q_ENUM(ComparisonMode)
- ~QAbstractTextureProvider();
+ ~QAbstractTexture();
Target target() const;
@@ -327,21 +327,21 @@ Q_SIGNALS:
void uniqueChanged(bool unique);
protected:
- explicit QAbstractTextureProvider(Qt3DCore::QNode *parent = 0);
- explicit QAbstractTextureProvider(Target target, Qt3DCore::QNode *parent = 0);
- QAbstractTextureProvider(QAbstractTextureProviderPrivate &dd, Qt3DCore::QNode *parent = 0);
+ explicit QAbstractTexture(Qt3DCore::QNode *parent = 0);
+ explicit QAbstractTexture(Target target, Qt3DCore::QNode *parent = 0);
+ QAbstractTexture(QAbstractTexturePrivate &dd, Qt3DCore::QNode *parent = 0);
void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE;
void setStatus(Status status);
private:
- Q_DECLARE_PRIVATE(QAbstractTextureProvider)
- QT3D_CLONEABLE(QAbstractTextureProvider)
+ Q_DECLARE_PRIVATE(QAbstractTexture)
+ QT3D_CLONEABLE(QAbstractTexture)
};
} // namespace Qt3DRender
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(Qt3DRender::QAbstractTextureProvider *)
+Q_DECLARE_METATYPE(Qt3DRender::QAbstractTexture *)
-#endif // QT3DRENDER_QABSTRACTTEXTUREPROVIDER_H
+#endif // QT3DRENDER_QABSTRACTTEXTURE_H
diff --git a/src/render/texture/qabstracttextureprovider_p.h b/src/render/texture/qabstracttexture_p.h
index 6c42bda77..cfe1ddc0d 100644
--- a/src/render/texture/qabstracttextureprovider_p.h
+++ b/src/render/texture/qabstracttexture_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QABSTRACTTEXTUREPROVIDER_P_H
-#define QT3DRENDER_QABSTRACTTEXTUREPROVIDER_P_H
+#ifndef QT3DRENDER_QABSTRACTTEXTURE_P_H
+#define QT3DRENDER_QABSTRACTTEXTURE_P_H
//
// W A R N I N G
@@ -53,34 +53,34 @@
#include <Qt3DRender/qt3drender_global.h>
#include <Qt3DCore/private/qnode_p.h>
-#include <Qt3DRender/qabstracttextureprovider.h>
+#include <Qt3DRender/qabstracttexture.h>
#include <Qt3DRender/qtexturewrapmode.h>
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAbstractTextureProviderPrivate : public Qt3DCore::QNodePrivate
+class QAbstractTexturePrivate : public Qt3DCore::QNodePrivate
{
public :
- QAbstractTextureProviderPrivate();
+ QAbstractTexturePrivate();
- Q_DECLARE_PUBLIC(QAbstractTextureProvider)
+ Q_DECLARE_PUBLIC(QAbstractTexture)
- QAbstractTextureProvider::Target m_target;
- QAbstractTextureProvider::TextureFormat m_format;
+ QAbstractTexture::Target m_target;
+ QAbstractTexture::TextureFormat m_format;
int m_width, m_height, m_depth;
bool m_autoMipMap;
QList<QTexImageDataPtr> m_data;
- QAbstractTextureProvider::Filter m_minFilter, m_magFilter;
+ QAbstractTexture::Filter m_minFilter, m_magFilter;
// FIXME, store per direction
QTextureWrapMode m_wrapMode;
- QAbstractTextureProvider::Status m_status;
+ QAbstractTexture::Status m_status;
float m_maximumAnisotropy;
- QAbstractTextureProvider::ComparisonFunction m_comparisonFunction;
- QAbstractTextureProvider::ComparisonMode m_comparisonMode;
+ QAbstractTexture::ComparisonFunction m_comparisonFunction;
+ QAbstractTexture::ComparisonMode m_comparisonMode;
QList<QAbstractTextureImage *> m_textureImages;
int m_maximumLayers;
bool m_unique;
@@ -92,5 +92,5 @@ public :
QT_END_NAMESPACE
-#endif // QT3DRENDER_QABSTRACTTEXTUREPROVIDER_P_H
+#endif // QT3DRENDER_QABSTRACTTEXTURE_P_H
diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp
index d2c8ad748..0f8af8d58 100644
--- a/src/render/texture/qabstracttextureimage.cpp
+++ b/src/render/texture/qabstracttextureimage.cpp
@@ -65,7 +65,7 @@ namespace Qt3DRender {
\brief Encapsulates the necessary information to create an OpenGL texture image.
QAbstractTextureImage should be used as the means of providing image data to a
- QAbstractTextureProvider. It contains the necessary information: mipmap
+ QAbstractTexture. It contains the necessary information: mipmap
level, layer, cube face load at the proper place data into an OpenGL texture.
The actual data is provided through a QTextureImageDataGenerator that will be
@@ -141,8 +141,8 @@ int QAbstractTextureImage::layer() const
\value CubeMapNegativeZ 0x851A GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
\note The cube map face has a meaning only for
- \l [CPP] {Qt3DRender::QAbstractTextureProvider::}{TargetCubeMap} and
- \l [CPP] {Qt3DRender::QAbstractTextureProvider::}{TargetCubeMapArray}.
+ \l [CPP] {Qt3DRender::QAbstractTexture::}{TargetCubeMap} and
+ \l [CPP] {Qt3DRender::QAbstractTexture::}{TargetCubeMapArray}.
*/
/*!
@@ -151,10 +151,10 @@ int QAbstractTextureImage::layer() const
Holds the cube map face of the texture image.
\note The cube map face has a meaning only for
- \l {QAbstractTextureProvider::}{TargetCubeMap} and
- \l {QAbstractTextureProvider::}{TargetCubeMapArray}.
+ \l {QAbstractTexture::}{TargetCubeMap} and
+ \l {QAbstractTexture::}{TargetCubeMapArray}.
*/
-QAbstractTextureProvider::CubeMapFace QAbstractTextureImage::face() const
+QAbstractTexture::CubeMapFace QAbstractTextureImage::face() const
{
Q_D(const QAbstractTextureImage);
return d->m_face;
@@ -178,7 +178,7 @@ void QAbstractTextureImage::setLayer(int layer)
}
}
-void QAbstractTextureImage::setFace(QAbstractTextureProvider::CubeMapFace face)
+void QAbstractTextureImage::setFace(QAbstractTexture::CubeMapFace face)
{
Q_D(QAbstractTextureImage);
if (face != d->m_face) {
diff --git a/src/render/texture/qabstracttextureimage.h b/src/render/texture/qabstracttextureimage.h
index f0194f989..5a88efc7b 100644
--- a/src/render/texture/qabstracttextureimage.h
+++ b/src/render/texture/qabstracttextureimage.h
@@ -41,7 +41,7 @@
#define QT3DRENDER_QABSTRACTTEXTUREIMAGE_H
#include <Qt3DRender/qabstractfunctor.h>
-#include <Qt3DRender/qabstracttextureprovider.h>
+#include <Qt3DRender/qabstracttexture.h>
QT_BEGIN_NAMESPACE
@@ -72,24 +72,24 @@ class QT3DRENDERSHARED_EXPORT QAbstractTextureImage : public Qt3DCore::QNode
Q_OBJECT
Q_PROPERTY(int mipLevel READ mipLevel WRITE setMipLevel NOTIFY mipLevelChanged)
Q_PROPERTY(int layer READ layer WRITE setLayer NOTIFY layerChanged)
- Q_PROPERTY(Qt3DRender::QAbstractTextureProvider::CubeMapFace face READ face WRITE setFace NOTIFY faceChanged)
+ Q_PROPERTY(Qt3DRender::QAbstractTexture::CubeMapFace face READ face WRITE setFace NOTIFY faceChanged)
public:
explicit QAbstractTextureImage(Qt3DCore::QNode *parent = 0);
virtual ~QAbstractTextureImage();
int mipLevel() const;
int layer() const;
- QAbstractTextureProvider::CubeMapFace face() const;
+ QAbstractTexture::CubeMapFace face() const;
public Q_SLOTS:
void setMipLevel(int level);
void setLayer(int layer);
- void setFace(QAbstractTextureProvider::CubeMapFace face);
+ void setFace(QAbstractTexture::CubeMapFace face);
Q_SIGNALS:
void mipLevelChanged(int mipLevel);
void layerChanged(int layer);
- void faceChanged(QAbstractTextureProvider::CubeMapFace face);
+ void faceChanged(QAbstractTexture::CubeMapFace face);
protected:
void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE;
diff --git a/src/render/texture/qabstracttextureimage_p.h b/src/render/texture/qabstracttextureimage_p.h
index 2e743e4e7..ac85be831 100644
--- a/src/render/texture/qabstracttextureimage_p.h
+++ b/src/render/texture/qabstracttextureimage_p.h
@@ -53,7 +53,7 @@
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DRender/private/qt3drender_global_p.h>
-#include <Qt3DRender/qabstracttextureprovider.h>
+#include <Qt3DRender/qabstracttexture.h>
QT_BEGIN_NAMESPACE
@@ -68,7 +68,7 @@ public:
: QNodePrivate()
, m_mipLevel(0)
, m_layer(0)
- , m_face(QAbstractTextureProvider::CubeMapPositiveX)
+ , m_face(QAbstractTexture::CubeMapPositiveX)
{
}
@@ -76,7 +76,7 @@ public:
int m_mipLevel;
int m_layer;
- QAbstractTextureProvider::CubeMapFace m_face;
+ QAbstractTexture::CubeMapFace m_face;
};
} // namespace Qt3DRender
diff --git a/src/render/texture/qtextureproviders.cpp b/src/render/texture/qtexture.cpp
index 4ea91574c..ab416bdc6 100644
--- a/src/render/texture/qtextureproviders.cpp
+++ b/src/render/texture/qtexture.cpp
@@ -40,18 +40,18 @@
#include "qtextureimage.h"
#include "qabstracttextureimage.h"
#include "qtextureimage_p.h"
-#include "qtextureproviders.h"
-#include "qabstracttextureprovider_p.h"
+#include "qtexture.h"
+#include "qabstracttexture_p.h"
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QTextureLoaderPrivate : public QAbstractTextureProviderPrivate
+class QTextureLoaderPrivate : public QAbstractTexturePrivate
{
public:
QTextureLoaderPrivate()
- : QAbstractTextureProviderPrivate()
+ : QAbstractTexturePrivate()
{
}
@@ -62,14 +62,14 @@ public:
\class Qt3DRender::QTexture1D
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target1D target format.
+ \brief A QAbstractTexture with a Target1D target format.
*/
/*!
Constructs a new Qt3DRender::QTexture1D instance with \a parent as parent.
*/
QTexture1D::QTexture1D(QNode *parent)
- : QAbstractTextureProvider(Target1D, parent)
+ : QAbstractTexture(Target1D, parent)
{
}
@@ -81,14 +81,14 @@ QTexture1D::~QTexture1D()
\class Qt3DRender::QTexture1DArray
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target1DArray target format.
+ \brief A QAbstractTexture with a Target1DArray target format.
*/
/*!
Constructs a new Qt3DRender::QTexture1DArray instance with \a parent as parent.
*/
QTexture1DArray::QTexture1DArray(QNode *parent)
- : QAbstractTextureProvider(Target1DArray, parent)
+ : QAbstractTexture(Target1DArray, parent)
{
}
@@ -100,14 +100,14 @@ QTexture1DArray::~QTexture1DArray()
\class Qt3DRender::QTexture2D
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target2D target format.
+ \brief A QAbstractTexture with a Target2D target format.
*/
/*!
Constructs a new Qt3DRender::QTexture2D instance with \a parent as parent.
*/
QTexture2D::QTexture2D(QNode *parent)
- : QAbstractTextureProvider(Target2D, parent)
+ : QAbstractTexture(Target2D, parent)
{
}
@@ -119,14 +119,14 @@ QTexture2D::~QTexture2D()
\class Qt3DRender::QTexture2DArray
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target2DArray target format.
+ \brief A QAbstractTexture with a Target2DArray target format.
*/
/*!
Constructs a new Qt3DRender::QTexture2DArray instance with \a parent as parent.
*/
QTexture2DArray::QTexture2DArray(QNode *parent)
- : QAbstractTextureProvider(Target2DArray, parent)
+ : QAbstractTexture(Target2DArray, parent)
{
}
@@ -139,14 +139,14 @@ QTexture2DArray::~QTexture2DArray()
\class Qt3DRender::QTexture3D
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target3D target format.
+ \brief A QAbstractTexture with a Target3D target format.
*/
/*!
Constructs a new Qt3DRender::QTexture3D instance with \a parent as parent.
*/
QTexture3D::QTexture3D(QNode *parent)
- : QAbstractTextureProvider(Target3D, parent)
+ : QAbstractTexture(Target3D, parent)
{
}
@@ -158,14 +158,14 @@ QTexture3D::~QTexture3D()
\class Qt3DRender::QTextureCubeMap
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a TargetCubeMap target format.
+ \brief A QAbstractTexture with a TargetCubeMap target format.
*/
/*!
Constructs a new Qt3DRender::QTextureCubeMap instance with \a parent as parent.
*/
QTextureCubeMap::QTextureCubeMap(QNode *parent)
- : QAbstractTextureProvider(TargetCubeMap, parent)
+ : QAbstractTexture(TargetCubeMap, parent)
{
}
@@ -177,14 +177,14 @@ QTextureCubeMap::~QTextureCubeMap()
\class Qt3DRender::QTextureCubeMapArray
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a TargetCubeMapArray target format.
+ \brief A QAbstractTexture with a TargetCubeMapArray target format.
*/
/*!
Constructs a new Qt3DRender::QTextureCubeMapArray instance with \a parent as parent.
*/
QTextureCubeMapArray::QTextureCubeMapArray(QNode *parent)
- : QAbstractTextureProvider(TargetCubeMapArray, parent)
+ : QAbstractTexture(TargetCubeMapArray, parent)
{
}
@@ -197,14 +197,14 @@ QTextureCubeMapArray::~QTextureCubeMapArray()
\class Qt3DRender::QTexture2DMultisample
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target2DMultisample target format.
+ \brief A QAbstractTexture with a Target2DMultisample target format.
*/
/*!
Constructs a new Qt3DRender::QTexture2DMultisample instance with \a parent as parent.
*/
QTexture2DMultisample::QTexture2DMultisample(QNode *parent)
- : QAbstractTextureProvider(Target2DMultisample, parent)
+ : QAbstractTexture(Target2DMultisample, parent)
{
}
@@ -216,14 +216,14 @@ QTexture2DMultisample::~QTexture2DMultisample()
\class Qt3DRender::QTexture2DMultisampleArray
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a Target2DMultisampleArray target format.
+ \brief A QAbstractTexture with a Target2DMultisampleArray target format.
*/
/*!
Constructs a new Qt3DRender::QTexture2DMultisampleArray instance with \a parent as parent.
*/
QTexture2DMultisampleArray::QTexture2DMultisampleArray(QNode *parent)
- : QAbstractTextureProvider(Target2DMultisampleArray, parent)
+ : QAbstractTexture(Target2DMultisampleArray, parent)
{
}
@@ -235,14 +235,14 @@ QTexture2DMultisampleArray::~QTexture2DMultisampleArray()
\class Qt3DRender::QTextureRectangle
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a TargetRectangle target format.
+ \brief A QAbstractTexture with a TargetRectangle target format.
*/
/*!
Constructs a new Qt3DRender::QTextureRectangle instance with \a parent as parent.
*/
QTextureRectangle::QTextureRectangle(QNode *parent)
- : QAbstractTextureProvider(TargetRectangle, parent)
+ : QAbstractTexture(TargetRectangle, parent)
{
}
@@ -254,14 +254,14 @@ QTextureRectangle::~QTextureRectangle()
\class Qt3DRender::QTextureBuffer
\inmodule Qt3DRender
\since 5.5
- \brief A QAbstractTextureProvider with a TargetBuffer target format.
+ \brief A QAbstractTexture with a TargetBuffer target format.
*/
/*!
Constructs a new Qt3DRender::QTextureBuffer instance with \a parent as parent.
*/
QTextureBuffer::QTextureBuffer(QNode *parent)
- : QAbstractTextureProvider(TargetBuffer, parent)
+ : QAbstractTexture(TargetBuffer, parent)
{
}
@@ -270,7 +270,7 @@ QTextureBuffer::~QTextureBuffer()
}
QTextureLoader::QTextureLoader(QNode *parent)
- : QAbstractTextureProvider(*new QTextureLoaderPrivate, parent)
+ : QAbstractTexture(*new QTextureLoaderPrivate, parent)
{
d_func()->m_target = TargetAutomatic;
}
diff --git a/src/render/texture/qtexture.h b/src/render/texture/qtexture.h
index 29a8aad9c..3b1bc2f8c 100644
--- a/src/render/texture/qtexture.h
+++ b/src/render/texture/qtexture.h
@@ -42,8 +42,8 @@
#include <Qt3DRender/qtexturedata.h>
#include <Qt3DRender/qtexturewrapmode.h>
-#include <Qt3DRender/qtextureproviders.h>
#include <Qt3DRender/qtextureimage.h>
+#include <Qt3DRender/qabstracttexture.h>
QT_BEGIN_NAMESPACE
@@ -53,6 +53,121 @@ QT_BEGIN_NAMESPACE
#pragma qt_sync_stop_processing
#endif
+namespace Qt3DRender {
+
+class QT3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture1D(Qt3DCore::QNode *parent = 0);
+ ~QTexture1D();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture1DArray(Qt3DCore::QNode *parent = 0);
+ ~QTexture1DArray();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture2D(Qt3DCore::QNode *parent = 0);
+ ~QTexture2D();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture2DArray(Qt3DCore::QNode *parent = 0);
+ ~QTexture2DArray();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture3D(Qt3DCore::QNode *parent = 0);
+ ~QTexture3D();
+};
+
+class QT3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTextureCubeMap(Qt3DCore::QNode *parent = 0);
+ ~QTextureCubeMap();
+};
+
+class QT3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = 0);
+ ~QTextureCubeMapArray();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture2DMultisample(Qt3DCore::QNode *parent = 0);
+ ~QTexture2DMultisample();
+};
+
+class QT3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = 0);
+ ~QTexture2DMultisampleArray();
+};
+
+class QT3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTextureRectangle(Qt3DCore::QNode *parent = 0);
+ ~QTextureRectangle();
+};
+
+class QT3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture
+{
+ Q_OBJECT
+public:
+ explicit QTextureBuffer(Qt3DCore::QNode *parent = 0);
+ ~QTextureBuffer();
+};
+
+class QTextureLoaderPrivate;
+
+class QT3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+
+public:
+ explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr);
+ ~QTextureLoader();
+
+ QUrl source() const;
+
+public Q_SLOTS:
+ void setSource(const QUrl &source);
+
+Q_SIGNALS:
+ void sourceChanged(const QUrl &source);
+
+private:
+ Q_DECLARE_PRIVATE(QTextureLoader)
+};
+
+} // namespace Qt3DRender
+
QT_END_NAMESPACE
#endif // QT3DRENDER_QTEXTURE_H
diff --git a/src/render/texture/qtextureproviders.h b/src/render/texture/qtextureproviders.h
deleted file mode 100644
index 20a3a12cd..000000000
--- a/src/render/texture/qtextureproviders.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT3DRENDER_QTEXTUREPROVIDERS_H
-#define QT3DRENDER_QTEXTUREPROVIDERS_H
-
-#include <QUrl>
-#include <Qt3DRender/qabstracttextureprovider.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-class QT3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture1D(Qt3DCore::QNode *parent = 0);
- ~QTexture1D();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture1DArray(Qt3DCore::QNode *parent = 0);
- ~QTexture1DArray();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture2D(Qt3DCore::QNode *parent = 0);
- ~QTexture2D();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture2DArray(Qt3DCore::QNode *parent = 0);
- ~QTexture2DArray();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture3D(Qt3DCore::QNode *parent = 0);
- ~QTexture3D();
-};
-
-class QT3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTextureCubeMap(Qt3DCore::QNode *parent = 0);
- ~QTextureCubeMap();
-};
-
-class QT3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = 0);
- ~QTextureCubeMapArray();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture2DMultisample(Qt3DCore::QNode *parent = 0);
- ~QTexture2DMultisample();
-};
-
-class QT3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = 0);
- ~QTexture2DMultisampleArray();
-};
-
-class QT3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTextureRectangle(Qt3DCore::QNode *parent = 0);
- ~QTextureRectangle();
-};
-
-class QT3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTextureProvider
-{
- Q_OBJECT
-public:
- explicit QTextureBuffer(Qt3DCore::QNode *parent = 0);
- ~QTextureBuffer();
-};
-
-class QTextureLoaderPrivate;
-
-class QT3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTextureProvider
-{
- Q_OBJECT
- Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
-
-public:
- explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr);
- ~QTextureLoader();
-
- QUrl source() const;
-
-public Q_SLOTS:
- void setSource(const QUrl &source);
-
-Q_SIGNALS:
- void sourceChanged(const QUrl &source);
-
-private:
- Q_DECLARE_PRIVATE(QTextureLoader)
-};
-
-} // namespace Qt3DRender
-
-QT_END_NAMESPACE
-
-#endif // QT3DRENDER_QTEXTUREPROVIDERS_H
diff --git a/src/render/texture/qtexturewrapmode.cpp b/src/render/texture/qtexturewrapmode.cpp
index f0f123d2a..da4ebad1b 100644
--- a/src/render/texture/qtexturewrapmode.cpp
+++ b/src/render/texture/qtexturewrapmode.cpp
@@ -66,7 +66,7 @@ public:
\inmodule Qt3DRender
\since 5.5
- \brief Defines the wrap mode a Qt3DRender::QAbstractTextureProvider
+ \brief Defines the wrap mode a Qt3DRender::QAbstractTexture
should apply to a texture.
*/
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp
index 36d518cae..125307eb9 100644
--- a/src/render/texture/texture.cpp
+++ b/src/render/texture/texture.cpp
@@ -66,16 +66,16 @@ Texture::Texture()
, m_layers(1)
, m_mipLevels(1)
, m_generateMipMaps(false)
- , m_target(QAbstractTextureProvider::Target2D)
- , m_format(QAbstractTextureProvider::RGBA8_UNorm)
- , m_magnificationFilter(QAbstractTextureProvider::Nearest)
- , m_minificationFilter(QAbstractTextureProvider::Nearest)
+ , m_target(QAbstractTexture::Target2D)
+ , m_format(QAbstractTexture::RGBA8_UNorm)
+ , m_magnificationFilter(QAbstractTexture::Nearest)
+ , m_minificationFilter(QAbstractTexture::Nearest)
, m_wrapModeX(QTextureWrapMode::ClampToEdge)
, m_wrapModeY(QTextureWrapMode::ClampToEdge)
, m_wrapModeZ(QTextureWrapMode::ClampToEdge)
, m_maximumAnisotropy(1.0f)
- , m_comparisonFunction(QAbstractTextureProvider::CompareLessEqual)
- , m_comparisonMode(QAbstractTextureProvider::CompareNone)
+ , m_comparisonFunction(QAbstractTexture::CompareLessEqual)
+ , m_comparisonMode(QAbstractTexture::CompareNone)
, m_isDirty(false)
, m_filtersAndWrapUpdated(false)
, m_dataUploadRequired(false)
@@ -101,16 +101,16 @@ void Texture::cleanup()
m_layers = 1;
m_mipLevels = 1;
m_generateMipMaps = false;
- m_target = QAbstractTextureProvider::Target2D;
- m_format = QAbstractTextureProvider::RGBA8_UNorm;
- m_magnificationFilter = QAbstractTextureProvider::Nearest;
- m_minificationFilter = QAbstractTextureProvider::Nearest;
+ m_target = QAbstractTexture::Target2D;
+ m_format = QAbstractTexture::RGBA8_UNorm;
+ m_magnificationFilter = QAbstractTexture::Nearest;
+ m_minificationFilter = QAbstractTexture::Nearest;
m_wrapModeX = QTextureWrapMode::ClampToEdge;
m_wrapModeY = QTextureWrapMode::ClampToEdge;
m_wrapModeZ = QTextureWrapMode::ClampToEdge;
m_maximumAnisotropy = 1.0f;
- m_comparisonFunction = QAbstractTextureProvider::CompareLessEqual;
- m_comparisonMode = QAbstractTextureProvider::CompareNone;
+ m_comparisonFunction = QAbstractTexture::CompareLessEqual;
+ m_comparisonMode = QAbstractTexture::CompareNone;
m_isDirty = false;
m_filtersAndWrapUpdated = false;
m_dataUploadRequired = false;
@@ -127,7 +127,7 @@ void Texture::cleanup()
// AspectThread
void Texture::updateFromPeer(Qt3DCore::QNode *peer)
{
- QAbstractTextureProvider *texture = static_cast<QAbstractTextureProvider *>(peer);
+ QAbstractTexture *texture = static_cast<QAbstractTexture *>(peer);
QMutexLocker lock(&m_lock);
if (texture != Q_NULLPTR) {
@@ -239,30 +239,30 @@ QOpenGLTexture *Texture::buildGLTexture()
return Q_NULLPTR;
}
- if (m_target == QAbstractTextureProvider::TargetAutomatic) {
+ if (m_target == QAbstractTexture::TargetAutomatic) {
qWarning() << Q_FUNC_INFO << "something went wrong, target shouldn't be automatic at this point";
return Q_NULLPTR;
}
QOpenGLTexture* glTex = new QOpenGLTexture(static_cast<QOpenGLTexture::Target>(m_target));
- if (m_format == QAbstractTextureProvider::Automatic)
+ if (m_format == QAbstractTexture::Automatic)
qWarning() << Q_FUNC_INFO << "something went wrong, format shouldn't be automatic at this point";
// m_format may not be ES2 compatible. Now it's time to convert it, if necessary.
- QAbstractTextureProvider::TextureFormat format = m_format;
+ QAbstractTexture::TextureFormat format = m_format;
if (ctx->isOpenGLES() && ctx->format().majorVersion() < 3) {
switch (m_format) {
case QOpenGLTexture::RGBA8_UNorm:
case QOpenGLTexture::RGBAFormat:
- format = QAbstractTextureProvider::RGBAFormat;
+ format = QAbstractTexture::RGBAFormat;
break;
case QOpenGLTexture::RGB8_UNorm:
case QOpenGLTexture::RGBFormat:
- format = QAbstractTextureProvider::RGBFormat;
+ format = QAbstractTexture::RGBFormat;
break;
case QOpenGLTexture::DepthFormat:
- format = QAbstractTextureProvider::DepthFormat;
+ format = QAbstractTexture::DepthFormat;
break;
default:
qWarning() << Q_FUNC_INFO << "could not find a matching OpenGL ES 2.0 unsized texture format";
@@ -273,23 +273,23 @@ QOpenGLTexture *Texture::buildGLTexture()
// Map ETC1 to ETC2 when supported. This allows using features like
// immutable storage as ETC2 is standard in GLES 3.0, while the ETC1 extension
// is written against GLES 1.0.
- if (m_format == QAbstractTextureProvider::RGB8_ETC1) {
+ if (m_format == QAbstractTexture::RGB8_ETC1) {
if ((ctx->isOpenGLES() && ctx->format().majorVersion() >= 3)
|| ctx->hasExtension(QByteArrayLiteral("GL_OES_compressed_ETC2_RGB8_texture"))
|| ctx->hasExtension(QByteArrayLiteral("GL_ARB_ES3_compatibility")))
- format = m_format = QAbstractTextureProvider::RGB8_ETC2;
+ format = m_format = QAbstractTexture::RGB8_ETC2;
}
- glTex->setFormat(format == QAbstractTextureProvider::Automatic ?
+ glTex->setFormat(format == QAbstractTexture::Automatic ?
QOpenGLTexture::NoFormat :
static_cast<QOpenGLTexture::TextureFormat>(format));
glTex->setSize(m_width, m_height, m_depth);
// Set layers count if texture array
- if (m_target == QAbstractTextureProvider::Target1DArray ||
- m_target == QAbstractTextureProvider::Target2DArray ||
- m_target == QAbstractTextureProvider::Target3D ||
- m_target == QAbstractTextureProvider::Target2DMultisampleArray ||
- m_target == QAbstractTextureProvider::TargetCubeMapArray) {
+ if (m_target == QAbstractTexture::Target1DArray ||
+ m_target == QAbstractTexture::Target2DArray ||
+ m_target == QAbstractTexture::Target3D ||
+ m_target == QAbstractTexture::Target2DMultisampleArray ||
+ m_target == QAbstractTexture::TargetCubeMapArray) {
glTex->setLayers(m_layers);
}
@@ -407,11 +407,11 @@ void Texture::setToGLTexture(TextureImage *rImg, QTexImageData *imgData)
void Texture::updateWrapAndFilters()
{
m_gl->setWrapMode(QOpenGLTexture::DirectionS, static_cast<QOpenGLTexture::WrapMode>(m_wrapModeX));
- if (m_target != QAbstractTextureProvider::Target1D &&
- m_target != QAbstractTextureProvider::Target1DArray &&
- m_target != QAbstractTextureProvider::TargetBuffer)
+ if (m_target != QAbstractTexture::Target1D &&
+ m_target != QAbstractTexture::Target1DArray &&
+ m_target != QAbstractTexture::TargetBuffer)
m_gl->setWrapMode(QOpenGLTexture::DirectionT, static_cast<QOpenGLTexture::WrapMode>(m_wrapModeY));
- if (m_target == QAbstractTextureProvider::Target3D)
+ if (m_target == QAbstractTexture::Target3D)
m_gl->setWrapMode(QOpenGLTexture::DirectionR, static_cast<QOpenGLTexture::WrapMode>(m_wrapModeZ));
m_gl->setMinMagFilters(static_cast<QOpenGLTexture::Filter>(m_minificationFilter),
static_cast<QOpenGLTexture::Filter>(m_magnificationFilter));
@@ -459,7 +459,7 @@ bool Texture::isTextureReset() const
return m_isDirty;
}
-void Texture::setTarget(QAbstractTextureProvider::Target target)
+void Texture::setTarget(QAbstractTexture::Target target)
{
if (target != m_target) {
m_target = target;
@@ -483,7 +483,7 @@ void Texture::setSize(int width, int height, int depth)
}
}
-void Texture::setFormat(QAbstractTextureProvider::TextureFormat format)
+void Texture::setFormat(QAbstractTexture::TextureFormat format)
{
if (format != m_format) {
m_format = format;
@@ -528,12 +528,12 @@ void Texture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
m_generateMipMaps = propertyChange->value().toBool();
m_isDirty |= (oldMipMaps != m_generateMipMaps);
} else if (propertyChange->propertyName() == QByteArrayLiteral("minificationFilter")) {
- QAbstractTextureProvider::Filter oldMinFilter = m_minificationFilter;
- m_minificationFilter = static_cast<QAbstractTextureProvider::Filter>(propertyChange->value().toInt());
+ QAbstractTexture::Filter oldMinFilter = m_minificationFilter;
+ m_minificationFilter = static_cast<QAbstractTexture::Filter>(propertyChange->value().toInt());
m_filtersAndWrapUpdated |= (oldMinFilter != m_minificationFilter);
} else if (propertyChange->propertyName() == QByteArrayLiteral("magnificationFilter")) {
- QAbstractTextureProvider::Filter oldMagFilter = m_magnificationFilter;
- m_magnificationFilter = static_cast<QAbstractTextureProvider::Filter>(propertyChange->value().toInt());
+ QAbstractTexture::Filter oldMagFilter = m_magnificationFilter;
+ m_magnificationFilter = static_cast<QAbstractTexture::Filter>(propertyChange->value().toInt());
m_filtersAndWrapUpdated |= (oldMagFilter != m_magnificationFilter);
} else if (propertyChange->propertyName() == QByteArrayLiteral("wrapModeX")) {
QTextureWrapMode::WrapMode oldWrapModeX = m_wrapModeX;
@@ -548,22 +548,22 @@ void Texture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
m_wrapModeZ =static_cast<QTextureWrapMode::WrapMode>(propertyChange->value().toInt());
m_filtersAndWrapUpdated |= (oldWrapModeZ != m_wrapModeZ);
} else if (propertyChange->propertyName() == QByteArrayLiteral("format")) {
- setFormat(static_cast<QAbstractTextureProvider::TextureFormat>(propertyChange->value().toInt()));
+ setFormat(static_cast<QAbstractTexture::TextureFormat>(propertyChange->value().toInt()));
} else if (propertyChange->propertyName() == QByteArrayLiteral("target")) {
- QAbstractTextureProvider::Target oldTarget = m_target;
- m_target = static_cast<QAbstractTextureProvider::Target>(propertyChange->value().toInt());
+ QAbstractTexture::Target oldTarget = m_target;
+ m_target = static_cast<QAbstractTexture::Target>(propertyChange->value().toInt());
m_isDirty |= (oldTarget != m_target);
} else if (propertyChange->propertyName() == QByteArrayLiteral("maximumAnisotropy")) {
float oldMaximumAnisotropy = m_maximumAnisotropy;
m_maximumAnisotropy = propertyChange->value().toFloat();
m_filtersAndWrapUpdated |= !qFuzzyCompare(oldMaximumAnisotropy, m_maximumAnisotropy);
} else if (propertyChange->propertyName() == QByteArrayLiteral("comparisonFunction")) {
- QAbstractTextureProvider::ComparisonFunction oldComparisonFunction = m_comparisonFunction;
- m_comparisonFunction = propertyChange->value().value<QAbstractTextureProvider::ComparisonFunction>();
+ QAbstractTexture::ComparisonFunction oldComparisonFunction = m_comparisonFunction;
+ m_comparisonFunction = propertyChange->value().value<QAbstractTexture::ComparisonFunction>();
m_filtersAndWrapUpdated |= (oldComparisonFunction != m_comparisonFunction);
} else if (propertyChange->propertyName() == QByteArrayLiteral("comparisonMode")) {
- QAbstractTextureProvider::ComparisonMode oldComparisonMode = m_comparisonMode;
- m_comparisonMode = propertyChange->value().value<QAbstractTextureProvider::ComparisonMode>();
+ QAbstractTexture::ComparisonMode oldComparisonMode = m_comparisonMode;
+ m_comparisonMode = propertyChange->value().value<QAbstractTexture::ComparisonMode>();
m_filtersAndWrapUpdated |= (oldComparisonMode != m_comparisonMode);
} else if (propertyChange->propertyName() == QByteArrayLiteral("maximumLayers")) {
const int oldLayers = m_layers;
diff --git a/src/render/texture/texture.pri b/src/render/texture/texture.pri
index d9e1a5854..b4eff5892 100644
--- a/src/render/texture/texture.pri
+++ b/src/render/texture/texture.pri
@@ -3,25 +3,24 @@ INCLUDEPATH += $$PWD
HEADERS += \
$$PWD/qabstracttextureimage.h \
$$PWD/qabstracttextureimage_p.h \
- $$PWD/qabstracttextureprovider.h \
- $$PWD/qabstracttextureprovider_p.h \
$$PWD/qtexture.h \
$$PWD/qtextureimage.h \
- $$PWD/qtextureproviders.h \
$$PWD/qtexturewrapmode.h \
$$PWD/texture_p.h \
$$PWD/texturedatamanager_p.h \
$$PWD/textureimage_p.h \
$$PWD/qtexturedata_p.h \
- $$PWD/qtexturedata.h
+ $$PWD/qtexturedata.h \
+ $$PWD/qabstracttexture.h \
+ $$PWD/qabstracttexture_p.h
SOURCES += \
$$PWD/qabstracttextureimage.cpp \
- $$PWD/qabstracttextureprovider.cpp \
$$PWD/qtextureimage.cpp \
- $$PWD/qtextureproviders.cpp \
$$PWD/qtexturewrapmode.cpp \
$$PWD/texture.cpp \
$$PWD/texturedatamanager.cpp \
$$PWD/textureimage.cpp \
- $$PWD/qtexturedata.cpp
+ $$PWD/qtexturedata.cpp \
+ $$PWD/qabstracttexture.cpp \
+ $$PWD/qtexture.cpp
diff --git a/src/render/texture/texture_p.h b/src/render/texture/texture_p.h
index c8bf7b909..a2a7ed35d 100644
--- a/src/render/texture/texture_p.h
+++ b/src/render/texture/texture_p.h
@@ -64,7 +64,7 @@ class QOpenGLTexture;
namespace Qt3DRender {
-class QAbstractTextureProvider;
+class QAbstractTexture;
namespace Render {
@@ -102,15 +102,15 @@ public:
void requestTextureDataUpdate();
void addToPendingTextureJobs();
- void setTarget(QAbstractTextureProvider::Target target);
+ void setTarget(QAbstractTexture::Target target);
void setSize(int width, int height, int depth);
- void setFormat(QAbstractTextureProvider::TextureFormat format);
+ void setFormat(QAbstractTexture::TextureFormat format);
void setMipLevels(int mipmapLevels);
void setLayers(int layers);
inline QVector<HTextureImage> textureImages() const { return m_textureImages; }
- inline QAbstractTextureProvider::TextureFormat format() const { return m_format; }
- inline QAbstractTextureProvider::Target target() const { return m_target; }
+ inline QAbstractTexture::TextureFormat format() const { return m_format; }
+ inline QAbstractTexture::Target target() const { return m_target; }
inline bool isAutoMipMapGenerationEnabled() const { return m_generateMipMaps; }
inline QTextureImageDataGeneratorPtr dataGenerator() const { return m_dataFunctor; }
@@ -132,16 +132,16 @@ private:
int m_layers;
int m_mipLevels;
bool m_generateMipMaps;
- QAbstractTextureProvider::Target m_target;
- QAbstractTextureProvider::TextureFormat m_format;
- QAbstractTextureProvider::Filter m_magnificationFilter;
- QAbstractTextureProvider::Filter m_minificationFilter;
+ QAbstractTexture::Target m_target;
+ QAbstractTexture::TextureFormat m_format;
+ QAbstractTexture::Filter m_magnificationFilter;
+ QAbstractTexture::Filter m_minificationFilter;
QTextureWrapMode::WrapMode m_wrapModeX;
QTextureWrapMode::WrapMode m_wrapModeY;
QTextureWrapMode::WrapMode m_wrapModeZ;
float m_maximumAnisotropy;
- QAbstractTextureProvider::ComparisonFunction m_comparisonFunction;
- QAbstractTextureProvider::ComparisonMode m_comparisonMode;
+ QAbstractTexture::ComparisonFunction m_comparisonFunction;
+ QAbstractTexture::ComparisonMode m_comparisonMode;
QTextureImageDataGeneratorPtr m_dataFunctor;
HTextureData m_textureDataHandle;
diff --git a/src/render/texture/textureimage.cpp b/src/render/texture/textureimage.cpp
index 734cdc92d..5db481fea 100644
--- a/src/render/texture/textureimage.cpp
+++ b/src/render/texture/textureimage.cpp
@@ -53,7 +53,7 @@ TextureImage::TextureImage()
: BackendNode()
, m_layer(0)
, m_mipLevel(0)
- , m_face(QAbstractTextureProvider::CubeMapPositiveX)
+ , m_face(QAbstractTexture::CubeMapPositiveX)
, m_dirty(true)
, m_textureManager(Q_NULLPTR)
, m_textureImageManager(Q_NULLPTR)
@@ -67,7 +67,7 @@ void TextureImage::cleanup()
m_layer = 0;
m_mipLevel = 0;
m_dirty = true;
- m_face = QAbstractTextureProvider::CubeMapPositiveX;
+ m_face = QAbstractTexture::CubeMapPositiveX;
m_generator.reset();
m_textureManager = Q_NULLPTR;
m_textureImageManager = Q_NULLPTR;
@@ -85,7 +85,7 @@ void TextureImage::updateFromPeer(Qt3DCore::QNode *peer)
m_generator = textureImage->dataGenerator();
// Notify the Texture that we are one of its TextureImage
if (!peer->parentNode()) {
- qWarning() << "Not QAbstractTextureProvider parent found";
+ qWarning() << "Not QAbstractTexture parent found";
} else {
m_textureProviderId = peer->parentNode()->id();
m_textureProvider = m_textureManager->lookupHandle(m_textureProviderId);
@@ -109,7 +109,7 @@ void TextureImage::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
m_mipLevel = propertyChange->value().toInt();
m_dirty = true;
} else if (propertyChange->propertyName() == QByteArrayLiteral("face")) {
- m_face = static_cast<QAbstractTextureProvider::CubeMapFace>(propertyChange->value().toInt());
+ m_face = static_cast<QAbstractTexture::CubeMapFace>(propertyChange->value().toInt());
m_dirty = true;
} else if (propertyChange->propertyName() == QByteArrayLiteral("dataFunctor")) {
m_generator = propertyChange->value().value<QTextureImageDataGeneratorPtr>();
diff --git a/src/render/texture/textureimage_p.h b/src/render/texture/textureimage_p.h
index 8f39045e9..9a26a25a4 100644
--- a/src/render/texture/textureimage_p.h
+++ b/src/render/texture/textureimage_p.h
@@ -53,7 +53,7 @@
#include <Qt3DRender/private/backendnode_p.h>
#include <Qt3DRender/private/handle_types_p.h>
-#include <Qt3DRender/qabstracttextureprovider.h>
+#include <Qt3DRender/qabstracttexture.h>
#include <Qt3DRender/qabstracttextureimage.h>
#include <qglobal.h>
@@ -79,13 +79,13 @@ public:
int m_layer;
int m_mipLevel;
- QAbstractTextureProvider::CubeMapFace m_face;
+ QAbstractTexture::CubeMapFace m_face;
bool m_dirty;
inline TextureImageDNA dna() const { return m_dna; }
inline int layer() const { return m_layer; }
inline int mipLevel() const { return m_mipLevel; }
- inline QAbstractTextureProvider::CubeMapFace face() const { return m_face; }
+ inline QAbstractTexture::CubeMapFace face() const { return m_face; }
void setTextureManager(TextureManager *manager);
void setTextureImageManager(TextureImageManager *manager);