diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-11-03 10:29:17 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-11-03 14:24:05 +0000 |
commit | 0df2906ff79d7d43c0a96dd47d6be433cf006db9 (patch) | |
tree | 52becca52c0f906829dfacf1af1238546d54d09e /src/render/materialsystem/technique.cpp | |
parent | e35820a86b7fc61c8aafc266e9deb225b3d1c564 (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/technique.cpp')
-rw-r--r-- | src/render/materialsystem/technique.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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) |