summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2015-11-03 10:29:17 +0100
committerAndy Nichols <andy.nichols@theqtcompany.com>2015-11-03 14:24:05 +0000
commit0df2906ff79d7d43c0a96dd47d6be433cf006db9 (patch)
tree52becca52c0f906829dfacf1af1238546d54d09e /src/render/materialsystem
parente35820a86b7fc61c8aafc266e9deb225b3d1c564 (diff)
Rename QOpenGLFilter to QGraphicsApiFilter
This API change is part of an effort to remove anything specific to one graphics API (in this case OpenGL) from the public APIs. In addition to the name of the class being changed, the QGraphicsApiFilter::Api has been refactored to reference the Graphics API, rather than an OpenGL API. Now this list includes OpenGL, and OpenGLES, but could also include Vulkan, DirectX, or any other graphics rendering API we wish to support in the future. Right now the properties in this class are still reflective of the OpenGL APIs, and may need to be extended with other properties in the future for other rendering technologies. The QGraphicsApiFilter::Profile enum has also been changed to be more more clear. So for now there are enums NoProfile, CoreProfile, and CompatibilityProfile. Task-number:QTBUG-49078 Change-Id: Ib5f9c3b7adee5badec6bce8a12b23683eb43b4cb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/materialsystem')
-rw-r--r--src/render/materialsystem/materialsystem.pri8
-rw-r--r--src/render/materialsystem/qgraphicsapifilter.cpp (renamed from src/render/materialsystem/qopenglfilter.cpp)162
-rw-r--r--src/render/materialsystem/qgraphicsapifilter.h (renamed from src/render/materialsystem/qopenglfilter.h)36
-rw-r--r--src/render/materialsystem/qtechnique.cpp20
-rw-r--r--src/render/materialsystem/qtechnique.h8
-rw-r--r--src/render/materialsystem/qtechnique_p.h6
-rw-r--r--src/render/materialsystem/technique.cpp22
-rw-r--r--src/render/materialsystem/technique_p.h6
8 files changed, 134 insertions, 134 deletions
diff --git a/src/render/materialsystem/materialsystem.pri b/src/render/materialsystem/materialsystem.pri
index a52d2297f..53f7e94f7 100644
--- a/src/render/materialsystem/materialsystem.pri
+++ b/src/render/materialsystem/materialsystem.pri
@@ -12,7 +12,6 @@ HEADERS += \
$$PWD/qeffect_p.h \
$$PWD/qmaterial.h \
$$PWD/qmaterial_p.h \
- $$PWD/qopenglfilter.h \
$$PWD/qparameter.h \
$$PWD/qparameter_p.h \
$$PWD/qparametermapping.h \
@@ -28,7 +27,8 @@ HEADERS += \
$$PWD/renderpass_p.h \
$$PWD/shader_p.h \
$$PWD/shaderdata_p.h \
- $$PWD/technique_p.h
+ $$PWD/technique_p.h \
+ $$PWD/qgraphicsapifilter.h
SOURCES += \
$$PWD/annotation.cpp \
@@ -39,7 +39,6 @@ SOURCES += \
$$PWD/qannotation.cpp \
$$PWD/qeffect.cpp \
$$PWD/qmaterial.cpp \
- $$PWD/qopenglfilter.cpp \
$$PWD/qparameter.cpp \
$$PWD/qparametermapping.cpp \
$$PWD/qrenderpass.cpp \
@@ -49,4 +48,5 @@ SOURCES += \
$$PWD/renderpass.cpp \
$$PWD/shader.cpp \
$$PWD/shaderdata.cpp \
- $$PWD/technique.cpp
+ $$PWD/technique.cpp \
+ $$PWD/qgraphicsapifilter.cpp
diff --git a/src/render/materialsystem/qopenglfilter.cpp b/src/render/materialsystem/qgraphicsapifilter.cpp
index e334ca88e..21f5468f0 100644
--- a/src/render/materialsystem/qopenglfilter.cpp
+++ b/src/render/materialsystem/qgraphicsapifilter.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qopenglfilter.h"
+#include "qgraphicsapifilter.h"
#include "private/qobject_p.h"
#include <QOpenGLContext>
@@ -42,21 +42,21 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QOpenGLFilterPrivate : public QObjectPrivate
+class QGraphicsApiFilterPrivate : public QObjectPrivate
{
public:
- QOpenGLFilterPrivate()
+ QGraphicsApiFilterPrivate()
: QObjectPrivate()
- , m_api(QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ? QOpenGLFilter::Desktop : QOpenGLFilter::ES)
- , m_profile(QOpenGLFilter::None) // matches all (no profile, core, compat)
+ , m_api(QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ? QGraphicsApiFilter::OpenGL : QGraphicsApiFilter::OpenGLES)
+ , m_profile(QGraphicsApiFilter::NoProfile) // matches all (no profile, core, compat)
, m_minor(0)
, m_major(0)
{
}
- Q_DECLARE_PUBLIC(QOpenGLFilter)
- QOpenGLFilter::Api m_api;
- QOpenGLFilter::Profile m_profile;
+ Q_DECLARE_PUBLIC(QGraphicsApiFilter)
+ QGraphicsApiFilter::Api m_api;
+ QGraphicsApiFilter::Profile m_profile;
int m_minor;
int m_major;
QStringList m_extensions;
@@ -64,35 +64,35 @@ public:
};
/*!
- \class Qt3DRender::QOpenGLFilter
- \inmodule Qt3DRenderer
+ \class Qt3DRender::QGraphicsApiFilter
+ \inmodule Qt3DRender
\since 5.5
- \brief The QOpenGLFilter class provides ...
+ \brief The QGraphicsApiFilter class provides ...
*/
/*!
- \qmltype OpenGLFilter
- \instantiates Qt3DRender::QOpenGLFilter
+ \qmltype GraphicsApiFilter
+ \instantiates Qt3DRender::QGraphicsApiFilter
\inherits QtObject
\inqmlmodule Qt3D.Render
\since 5.5
\brief For OpenGL ...
*/
-/*! \fn Qt3DRender::QOpenGLFilter::QOpenGLFilter(QObject *parent)
- Constructs a new QOpenGLFilter with the specified \a parent.
+/*! \fn Qt3DRender::QGraphicsApiFilter::QGraphicsApiFilter(QObject *parent)
+ Constructs a new QGraphicsApiFilter with the specified \a parent.
*/
-QOpenGLFilter::QOpenGLFilter(QObject *parent)
- : QObject(*new QOpenGLFilterPrivate, parent)
+QGraphicsApiFilter::QGraphicsApiFilter(QObject *parent)
+ : QObject(*new QGraphicsApiFilterPrivate, parent)
{
}
-/*! \fn void Qt3DRender::QOpenGLFilter::copy(const QOpenGLFilter &ref)
+/*! \fn void Qt3DRender::QGraphicsApiFilter::copy(const QGraphicsApiFilter &ref)
Copies the \a ref instance into this one.
*/
-void QOpenGLFilter::copy(const QOpenGLFilter &ref)
+void QGraphicsApiFilter::copy(const QGraphicsApiFilter &ref)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
d->m_api = ref.api();
d->m_profile = ref.profile();
d->m_major = ref.majorVersion();
@@ -102,189 +102,189 @@ void QOpenGLFilter::copy(const QOpenGLFilter &ref)
}
/*!
- \enum Qt3DRender::QOpenGLFilter::Api
+ \enum Qt3DRender::QGraphicsApiFilter::Api
- \value ES QSurfaceFormat::OpenGLES
- \value Desktop QSurfaceFormat::OpenGL
+ \value OpenGLES QSurfaceFormat::OpenGLES
+ \value OpenGL QSurfaceFormat::OpenGL
*/
/*!
- \enum Qt3DRender::QOpenGLFilter::Profile
+ \enum Qt3DRender::QGraphicsApiFilter::Profile
- \value None QSurfaceFormat::NoProfile
- \value Core QSurfaceFormat::CoreProfile
- \value Compatibility QSurfaceFormat::CompatibilityProfile
+ \value NoProfile QSurfaceFormat::NoProfile
+ \value CoreProfile QSurfaceFormat::CoreProfile
+ \value CompatibilityProfile QSurfaceFormat::CompatibilityProfile
*/
/*!
- \property Qt3DRender::QOpenGLFilter::api
+ \property Qt3DRender::QGraphicsApiFilter::api
*/
/*!
- \qmlproperty enumeration Qt3D.Renderer::OpenGLFilter::api
+ \qmlproperty enumeration Qt3D.Render::GraphicsApiFilter::api
- \value ES QSurfaceFormat::OpenGLES
- \value Desktop QSurfaceFormat::OpenGL
+ \value OpenGLES QSurfaceFormat::OpenGLES
+ \value OpenGL QSurfaceFormat::OpenGL
*/
-QOpenGLFilter::Api QOpenGLFilter::api() const
+QGraphicsApiFilter::Api QGraphicsApiFilter::api() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_api;
}
/*!
- \property Qt3DRender::QOpenGLFilter::profile
+ \property Qt3DRender::QGraphicsApiFilter::profile
*/
/*!
- \qmlproperty enumeration Qt3D.Renderer::OpenGLFilter::profile
+ \qmlproperty enumeration Qt3D.Render::GraphicsApiFilter::profile
- \value None QSurfaceFormat::NoProfile
- \value Core QSurfaceFormat::CoreProfile
- \value Compatibility QSurfaceFormat::CompatibilityProfile
+ \value NoProfile QSurfaceFormat::NoProfile
+ \value CoreProfile QSurfaceFormat::CoreProfile
+ \value CompatibilityProfile QSurfaceFormat::CompatibilityProfile
*/
-QOpenGLFilter::Profile QOpenGLFilter::profile() const
+QGraphicsApiFilter::Profile QGraphicsApiFilter::profile() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_profile;
}
/*!
- \property Qt3DRender::QOpenGLFilter::minorVersion
+ \property Qt3DRender::QGraphicsApiFilter::minorVersion
*/
/*!
- \qmlproperty int Qt3D.Renderer::OpenGLFilter::minorVersion
+ \qmlproperty int Qt3D.Render::GraphicsApiFilter::minorVersion
*/
-int QOpenGLFilter::minorVersion() const
+int QGraphicsApiFilter::minorVersion() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_minor;
}
/*!
- \property Qt3DRender::QOpenGLFilter::majorVersion
+ \property Qt3DRender::QGraphicsApiFilter::majorVersion
*/
/*!
- \qmlproperty int Qt3D.Renderer::OpenGLFilter::majorVersion
+ \qmlproperty int Qt3D.Render::GraphicsApiFilter::majorVersion
*/
-int QOpenGLFilter::majorVersion() const
+int QGraphicsApiFilter::majorVersion() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_major;
}
/*!
- \property Qt3DRender::QOpenGLFilter::extensions
+ \property Qt3DRender::QGraphicsApiFilter::extensions
*/
/*!
- \qmlproperty stringlist Qt3D.Renderer::OpenGLFilter::extensions
+ \qmlproperty stringlist Qt3D.Render::GraphicsApiFilter::extensions
*/
-QStringList QOpenGLFilter::extensions() const
+QStringList QGraphicsApiFilter::extensions() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_extensions;
}
/*!
- \property Qt3DRender::QOpenGLFilter::vendor
+ \property Qt3DRender::QGraphicsApiFilter::vendor
*/
/*!
- \qmlproperty string Qt3D.Renderer::OpenGLFilter::vendor
+ \qmlproperty string Qt3D.Render::GraphicsApiFilter::vendor
*/
-QString QOpenGLFilter::vendor() const
+QString QGraphicsApiFilter::vendor() const
{
- Q_D(const QOpenGLFilter);
+ Q_D(const QGraphicsApiFilter);
return d->m_vendor;
}
-void QOpenGLFilter::setApi(QOpenGLFilter::Api api)
+void QGraphicsApiFilter::setApi(QGraphicsApiFilter::Api api)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (d->m_api != api) {
d->m_api = api;
emit apiChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-void QOpenGLFilter::setProfile(QOpenGLFilter::Profile profile)
+void QGraphicsApiFilter::setProfile(QGraphicsApiFilter::Profile profile)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (d->m_profile != profile) {
d->m_profile = profile;
emit profileChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-void QOpenGLFilter::setMinorVersion(int minorVersion)
+void QGraphicsApiFilter::setMinorVersion(int minorVersion)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (minorVersion != d->m_minor) {
d->m_minor = minorVersion;
emit minorVersionChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-void QOpenGLFilter::setMajorVersion(int majorVersion)
+void QGraphicsApiFilter::setMajorVersion(int majorVersion)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (d->m_major != majorVersion) {
d->m_major = majorVersion;
emit majorVersionChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-void QOpenGLFilter::setExtensions(const QStringList &extensions)
+void QGraphicsApiFilter::setExtensions(const QStringList &extensions)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (d->m_extensions != extensions) {
d->m_extensions = extensions;
emit extensionsChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-void QOpenGLFilter::setVendor(const QString &vendor)
+void QGraphicsApiFilter::setVendor(const QString &vendor)
{
- Q_D(QOpenGLFilter);
+ Q_D(QGraphicsApiFilter);
if (d->m_vendor != vendor) {
d->m_vendor = vendor;
emit vendorChanged();
- emit openGLFilterChanged();
+ emit graphicsApiFilterChanged();
}
}
-/*! \fn bool Qt3DCore::operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample)
- \relates Qt3DRender::QOpenGLFilter
+/*! \fn bool Qt3DCore::operator ==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
+ \relates Qt3DRender::QGraphicsApiFilter
Returns true if \a reference and \a sample are equivalent.
*/
-bool operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample)
+bool operator ==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
{
if (sample.api() == reference.api()
&& sample.profile() <= reference.profile()
@@ -302,16 +302,16 @@ bool operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample)
return false;
}
-/*! \fn bool Qt3DCore::operator !=(const QOpenGLFilter &reference, const QOpenGLFilter &sample)
- \relates Qt3DRender::QOpenGLFilter
+/*! \fn bool Qt3DCore::operator !=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
+ \relates Qt3DRender::QGraphicsApiFilter
Returns true if \a reference and \a sample are different.
*/
-bool operator !=(const QOpenGLFilter &reference, const QOpenGLFilter &sample)
+bool operator !=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
{
return !(reference == sample);
}
-/*! \fn void Qt3DRender::QOpenGLFilter::openGLFilterChanged()
+/*! \fn void Qt3DRender::QGraphicsApiFilter::graphicsApiFilterChanged()
This signal is emitted when the value of any property is changed.
*/
} // namespace Qt3DRender
diff --git a/src/render/materialsystem/qopenglfilter.h b/src/render/materialsystem/qgraphicsapifilter.h
index a7d46b285..31a176532 100644
--- a/src/render/materialsystem/qopenglfilter.h
+++ b/src/render/materialsystem/qgraphicsapifilter.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QOPENGLFILTER_H
-#define QT3DRENDER_QOPENGLFILTER_H
+#ifndef QT3DRENDER_QGRAPHICSAPIFILTER_H
+#define QT3DRENDER_QGRAPHICSAPIFILTER_H
#include <QObject>
#include <QStringList>
@@ -46,13 +46,13 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QOpenGLFilterPrivate;
+class QGraphicsApiFilterPrivate;
-class QT3DRENDERSHARED_EXPORT QOpenGLFilter : public QObject
+class QT3DRENDERSHARED_EXPORT QGraphicsApiFilter : public QObject
{
Q_OBJECT
- Q_PROPERTY(Qt3DRender::QOpenGLFilter::Api api READ api WRITE setApi NOTIFY apiChanged)
- Q_PROPERTY(Qt3DRender::QOpenGLFilter::Profile profile READ profile WRITE setProfile NOTIFY profileChanged)
+ Q_PROPERTY(Qt3DRender::QGraphicsApiFilter::Api api READ api WRITE setApi NOTIFY apiChanged)
+ Q_PROPERTY(Qt3DRender::QGraphicsApiFilter::Profile profile READ profile WRITE setProfile NOTIFY profileChanged)
Q_PROPERTY(int minorVersion READ minorVersion WRITE setMinorVersion NOTIFY minorVersionChanged)
Q_PROPERTY(int majorVersion READ majorVersion WRITE setMajorVersion NOTIFY majorVersionChanged)
Q_PROPERTY(QStringList extensions READ extensions WRITE setExtensions NOTIFY extensionsChanged)
@@ -62,22 +62,22 @@ public:
enum Api
{
- ES = QSurfaceFormat::OpenGLES,
- Desktop = QSurfaceFormat::OpenGL
+ OpenGLES = QSurfaceFormat::OpenGLES,
+ OpenGL = QSurfaceFormat::OpenGL
};
Q_ENUM(Api)
enum Profile
{
- None = QSurfaceFormat::NoProfile,
- Core = QSurfaceFormat::CoreProfile,
- Compatibility = QSurfaceFormat::CompatibilityProfile
+ NoProfile = QSurfaceFormat::NoProfile,
+ CoreProfile = QSurfaceFormat::CoreProfile,
+ CompatibilityProfile = QSurfaceFormat::CompatibilityProfile
};
Q_ENUM(Profile)
- explicit QOpenGLFilter(QObject *parent = 0);
+ explicit QGraphicsApiFilter(QObject *parent = 0);
- void copy(const QOpenGLFilter &ref);
+ void copy(const QGraphicsApiFilter &ref);
Api api() const;
Profile profile() const;
@@ -100,17 +100,17 @@ Q_SIGNALS:
void majorVersionChanged();
void extensionsChanged();
void vendorChanged();
- void openGLFilterChanged();
+ void graphicsApiFilterChanged();
private:
- Q_DECLARE_PRIVATE(QOpenGLFilter)
+ Q_DECLARE_PRIVATE(QGraphicsApiFilter)
};
-bool operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample);
-bool operator !=(const QOpenGLFilter &reference, const QOpenGLFilter &sample);
+bool operator ==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample);
+bool operator !=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample);
} // namespace Qt3DRender
QT_END_NAMESPACE
-#endif // QT3DRENDER_QOPENGLFILTER_H
+#endif // QT3DRENDER_QGRAPHICSAPIFILTER_H
diff --git a/src/render/materialsystem/qtechnique.cpp b/src/render/materialsystem/qtechnique.cpp
index e80811603..7d34f49d2 100644
--- a/src/render/materialsystem/qtechnique.cpp
+++ b/src/render/materialsystem/qtechnique.cpp
@@ -37,7 +37,7 @@
#include "qtechnique.h"
#include "qtechnique_p.h"
#include "qparameter.h"
-#include "qopenglfilter.h"
+#include "qgraphicsapifilter.h"
#include <Qt3DCore/qscenepropertychange.h>
#include <QDebug>
@@ -64,7 +64,7 @@ QTechnique::QTechnique(QNode *parent)
: QNode(*new QTechniquePrivate, parent)
{
Q_D(QTechnique);
- QObject::connect(&d->m_openGLFilter, SIGNAL(openGLFilterChanged()), this, SLOT(_q_openGLFilterChanged()));
+ QObject::connect(&d->m_graphicsApiFilter, SIGNAL(graphicsApiFilterChanged()), this, SLOT(_q_graphicsApiFilterChanged()));
}
QTechnique::~QTechnique()
@@ -77,14 +77,14 @@ QTechnique::QTechnique(QTechniquePrivate &dd, QNode *parent)
: QNode(dd, parent)
{
Q_D(QTechnique);
- QObject::connect(&d->m_openGLFilter, SIGNAL(openGLFilterChanged()), this, SLOT(_q_openGLFilterChanged()));
+ QObject::connect(&d->m_graphicsApiFilter, SIGNAL(graphicsApiFilterChanged()), this, SLOT(_q_graphicsApiFilterChanged()));
}
void QTechnique::copy(const QNode *ref)
{
QNode::copy(ref);
const QTechnique *tech = static_cast<const QTechnique*>(ref);
- d_func()->m_openGLFilter.copy(tech->d_func()->m_openGLFilter);
+ d_func()->m_graphicsApiFilter.copy(tech->d_func()->m_graphicsApiFilter);
Q_FOREACH (QAnnotation *annotation, tech->d_func()->m_annotationList)
addAnnotation(qobject_cast<QAnnotation *>(QNode::clone(annotation)));
@@ -94,13 +94,13 @@ void QTechnique::copy(const QNode *ref)
addParameter(qobject_cast<QParameter *>(QNode::clone(p)));
}
-void QTechniquePrivate::_q_openGLFilterChanged()
+void QTechniquePrivate::_q_graphicsApiFilterChanged()
{
if (m_changeArbiter != Q_NULLPTR) {
QScenePropertyChangePtr change(new QScenePropertyChange(NodeUpdated, QSceneChange::Node, m_id));
- change->setPropertyName("openGLFilter");
- QOpenGLFilter *clone = new QOpenGLFilter();
- clone->copy(m_openGLFilter);
+ change->setPropertyName("graphicsApiFilter");
+ QGraphicsApiFilter *clone = new QGraphicsApiFilter();
+ clone->copy(m_graphicsApiFilter);
change->setValue(QVariant::fromValue(clone));
notifyObservers(change);
}
@@ -240,10 +240,10 @@ QList<QParameter *> QTechnique::parameters() const
return d->m_parameters;
}
-QOpenGLFilter *QTechnique::openGLFilter()
+QGraphicsApiFilter *QTechnique::graphicsApiFilter()
{
Q_D(QTechnique);
- return &d->m_openGLFilter;
+ return &d->m_graphicsApiFilter;
}
} // of namespace Qt3DRender
diff --git a/src/render/materialsystem/qtechnique.h b/src/render/materialsystem/qtechnique.h
index 7e28f313b..1a7bed492 100644
--- a/src/render/materialsystem/qtechnique.h
+++ b/src/render/materialsystem/qtechnique.h
@@ -50,12 +50,12 @@ namespace Qt3DRender {
class QParameter;
class QTechniquePrivate;
-class QOpenGLFilter;
+class QGraphicsApiFilter;
class QT3DRENDERSHARED_EXPORT QTechnique : public Qt3DCore::QNode
{
Q_OBJECT
- Q_PROPERTY(Qt3DRender::QOpenGLFilter *openGLFilter READ openGLFilter)
+ Q_PROPERTY(Qt3DRender::QGraphicsApiFilter *graphicsApiFilter READ graphicsApiFilter)
public:
explicit QTechnique(Qt3DCore::QNode *parent = 0);
@@ -73,7 +73,7 @@ public:
void removePass(QRenderPass *pass);
QList<QRenderPass *> renderPasses() const;
- QOpenGLFilter *openGLFilter();
+ QGraphicsApiFilter *graphicsApiFilter();
protected:
QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = 0);
@@ -82,7 +82,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QTechnique)
QT3D_CLONEABLE(QTechnique)
- Q_PRIVATE_SLOT(d_func(), void _q_openGLFilterChanged())
+ Q_PRIVATE_SLOT(d_func(), void _q_graphicsApiFilterChanged())
};
}
diff --git a/src/render/materialsystem/qtechnique_p.h b/src/render/materialsystem/qtechnique_p.h
index 7ea92cad0..25080bacb 100644
--- a/src/render/materialsystem/qtechnique_p.h
+++ b/src/render/materialsystem/qtechnique_p.h
@@ -49,7 +49,7 @@
//
#include <private/qnode_p.h>
-#include <Qt3DRender/qopenglfilter.h>
+#include <Qt3DRender/qgraphicsapifilter.h>
QT_BEGIN_NAMESPACE
@@ -70,10 +70,10 @@ public:
QList<QAnnotation *> m_annotationList;
QList<QParameter *> m_parameters;
QList<QRenderPass*> m_renderPasses;
- QOpenGLFilter m_openGLFilter;
+ QGraphicsApiFilter m_graphicsApiFilter;
private:
- void _q_openGLFilterChanged();
+ void _q_graphicsApiFilterChanged();
};
} // namespace Qt3DRender
diff --git a/src/render/materialsystem/technique.cpp b/src/render/materialsystem/technique.cpp
index 29f4c3f19..1fe4e8a8f 100644
--- a/src/render/materialsystem/technique.cpp
+++ b/src/render/materialsystem/technique.cpp
@@ -39,7 +39,7 @@
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qtechnique.h>
-#include <Qt3DRender/qopenglfilter.h>
+#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/private/renderer_p.h>
#include <Qt3DRender/private/annotation_p.h>
#include <Qt3DRender/private/shader_p.h>
@@ -57,14 +57,14 @@ namespace Render {
Technique::Technique()
: QBackendNode()
- , m_openglFilter(new QOpenGLFilter())
+ , m_graphicsApiFilter(new QGraphicsApiFilter())
{
}
Technique::~Technique()
{
cleanup();
- delete m_openglFilter;
+ delete m_graphicsApiFilter;
}
void Technique::cleanup()
@@ -87,9 +87,9 @@ void Technique::updateFromPeer(Qt3DCore::QNode *peer)
Q_FOREACH (QAnnotation *annotation, technique->annotations())
appendAnnotation(annotation->id());
- // Copy OpenGLFilter info from frontend OpenGLFilter
- QOpenGLFilter *peerFilter = technique->openGLFilter();
- m_openglFilter->copy(*peerFilter);
+ // Copy GraphicsApiFilter info from frontend GraphicsApiFilter
+ QGraphicsApiFilter *peerFilter = technique->graphicsApiFilter();
+ m_graphicsApiFilter->copy(*peerFilter);
}
}
@@ -99,10 +99,10 @@ void Technique::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
switch (e->type()) {
case NodeUpdated: {
- if (propertyChange->propertyName() == QByteArrayLiteral("openGLFilter")) {
- QOpenGLFilter *filter = propertyChange->value().value<QOpenGLFilter *>();
+ if (propertyChange->propertyName() == QByteArrayLiteral("graphicsApiFilter")) {
+ QGraphicsApiFilter *filter = propertyChange->value().value<QGraphicsApiFilter *>();
if (filter != Q_NULLPTR) {
- m_openglFilter->copy(*filter);
+ m_graphicsApiFilter->copy(*filter);
delete filter;
}
}
@@ -166,9 +166,9 @@ QList<Qt3DCore::QNodeId> Technique::renderPasses() const
return m_renderPasses;
}
-QOpenGLFilter *Technique::openGLFilter() const
+QGraphicsApiFilter *Technique::graphicsApiFilter() const
{
- return m_openglFilter;
+ return m_graphicsApiFilter;
}
void Technique::appendAnnotation(const Qt3DCore::QNodeId &criterionId)
diff --git a/src/render/materialsystem/technique_p.h b/src/render/materialsystem/technique_p.h
index 896642d58..ffeea4c8f 100644
--- a/src/render/materialsystem/technique_p.h
+++ b/src/render/materialsystem/technique_p.h
@@ -61,7 +61,7 @@ namespace Qt3DRender {
class QTechnique;
class QParameter;
-class QOpenGLFilter;
+class QGraphicsApiFilter;
class QAnnotation;
class QRenderPass;
@@ -89,10 +89,10 @@ public:
QList<Qt3DCore::QNodeId> annotations() const;
QList<Qt3DCore::QNodeId> renderPasses() const;
- QOpenGLFilter *openGLFilter() const;
+ QGraphicsApiFilter *graphicsApiFilter() const;
private:
- QOpenGLFilter *m_openglFilter;
+ QGraphicsApiFilter *m_graphicsApiFilter;
ParameterPack m_parameterPack;
QList<Qt3DCore::QNodeId> m_annotationList;