summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/playground-qml/main.qml14
-rw-r--r--examples/rollerball/AdsEffect.qml6
-rw-r--r--examples/shadow-map-qml/AdsEffect.qml6
-rw-r--r--examples/tessellation-modes/TessellatedWireframeEffect.qml10
-rw-r--r--examples/wireframe/WireframeEffect.qml6
-rw-r--r--src/quick3d/imports/render/qt3dquick3drenderplugin.cpp4
-rw-r--r--src/quick3d/quick3drenderer/items/quick3drenderpass.cpp16
-rw-r--r--src/quick3d/quick3drenderer/items/quick3drenderpass.h12
-rw-r--r--src/render/backend/renderer.cpp8
-rw-r--r--src/render/backend/rendereraspect.cpp2
-rw-r--r--src/render/backend/renderrenderpass.cpp10
-rw-r--r--src/render/backend/renderrenderpass_p.h8
-rw-r--r--src/render/backend/renderview.cpp10
-rw-r--r--src/render/frontend/qparametermapping.cpp (renamed from src/render/frontend/qparametermapper.cpp)48
-rw-r--r--src/render/frontend/qparametermapping.h (renamed from src/render/frontend/qparametermapper.h)18
-rw-r--r--src/render/frontend/qparametermapping_p.h (renamed from src/render/frontend/qparametermapper_p.h)16
-rw-r--r--src/render/frontend/qrenderpass.cpp13
-rw-r--r--src/render/frontend/qrenderpass.h8
-rw-r--r--src/render/frontend/qrenderpass_p.h4
-rw-r--r--src/render/frontend/render-frontend.pri10
20 files changed, 114 insertions, 115 deletions
diff --git a/examples/playground-qml/main.qml b/examples/playground-qml/main.qml
index 80f26ce8f..4dc15f18a 100644
--- a/examples/playground-qml/main.qml
+++ b/examples/playground-qml/main.qml
@@ -265,9 +265,9 @@ Entity {
RenderPass {
annotations : [Annotation {name : "Name"; value : "TextureLighting" }]
bindings : [ // Add only the bindings needed for a shader
- ParameterMapper {parameterName: "vertexTexCoord"; shaderVariableName: "texCoord0"; bindingType: ParameterMapper.Attribute},
- ParameterMapper {parameterName: "tex"; shaderVariableName: "texture"; bindingType: ParameterMapper.Uniform},
- ParameterMapper {parameterName: "modelViewProjection"; shaderVariableName: "customMvp"; bindingType: ParameterMapper.StandardUniform}
+ ParameterMapping {parameterName: "vertexTexCoord"; shaderVariableName: "texCoord0"; bindingType: ParameterMapping.Attribute},
+ ParameterMapping {parameterName: "tex"; shaderVariableName: "texture"; bindingType: ParameterMapping.Uniform},
+ ParameterMapping {parameterName: "modelViewProjection"; shaderVariableName: "customMvp"; bindingType: ParameterMapping.StandardUniform}
]
shaderProgram : ShaderProgram {
@@ -495,10 +495,10 @@ Entity {
RenderPass {
annotations : []
bindings : [ // Add only the bindings needed for a shader
- ParameterMapper {parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapper.Uniform},
- ParameterMapper {parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapper.Uniform},
- ParameterMapper {parameterName: "lightPos"; shaderVariableName: "lightPosition"; bindingType: ParameterMapper.Uniform},
- ParameterMapper {parameterName: "lightIntensity"; shaderVariableName: "lightIntensity"; bindingType: ParameterMapper.Uniform}
+ ParameterMapping {parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapping.Uniform},
+ ParameterMapping {parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapping.Uniform},
+ ParameterMapping {parameterName: "lightPos"; shaderVariableName: "lightPosition"; bindingType: ParameterMapping.Uniform},
+ ParameterMapping {parameterName: "lightIntensity"; shaderVariableName: "lightIntensity"; bindingType: ParameterMapping.Uniform}
]
shaderProgram : ShaderProgram {
id : diffuseShader
diff --git a/examples/rollerball/AdsEffect.qml b/examples/rollerball/AdsEffect.qml
index fba98d591..aa7c265af 100644
--- a/examples/rollerball/AdsEffect.qml
+++ b/examples/rollerball/AdsEffect.qml
@@ -92,9 +92,9 @@ Effect {
// ka uniform name in the shader to a property called ambient
bindings: [
// Uniforms (those provided by the user)
- ParameterMapper { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapper.Uniform }
+ ParameterMapping { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapping.Uniform }
]
shaderProgram: ShaderProgram {
diff --git a/examples/shadow-map-qml/AdsEffect.qml b/examples/shadow-map-qml/AdsEffect.qml
index f718b23f9..342deafe4 100644
--- a/examples/shadow-map-qml/AdsEffect.qml
+++ b/examples/shadow-map-qml/AdsEffect.qml
@@ -104,9 +104,9 @@ Effect {
// ka uniform name in the shader to a property called ambient
bindings: [
// Uniforms (those provided by the user)
- ParameterMapper { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapper.Uniform }
+ ParameterMapping { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapping.Uniform }
]
shaderProgram: ShaderProgram {
diff --git a/examples/tessellation-modes/TessellatedWireframeEffect.qml b/examples/tessellation-modes/TessellatedWireframeEffect.qml
index 731fe3917..d8908ee1d 100644
--- a/examples/tessellation-modes/TessellatedWireframeEffect.qml
+++ b/examples/tessellation-modes/TessellatedWireframeEffect.qml
@@ -90,14 +90,14 @@ Effect {
RenderPass {
bindings: [
- ParameterMapper { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapper.Uniform },
+ ParameterMapping { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapping.Uniform },
// TODO: Support uniform arrays. We want to be able to do (or something similar) and map vectors or lists of values
// through to the uniforms
- ParameterMapper { parameterName: "innerTessLevel"; shaderVariableName: "inner[0]"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "outerTessLevel"; shaderVariableName: "outer[0]"; bindingType: ParameterMapper.Uniform }
+ ParameterMapping { parameterName: "innerTessLevel"; shaderVariableName: "inner[0]"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "outerTessLevel"; shaderVariableName: "outer[0]"; bindingType: ParameterMapping.Uniform }
]
shaderProgram: ShaderProgram {
diff --git a/examples/wireframe/WireframeEffect.qml b/examples/wireframe/WireframeEffect.qml
index a6502eb29..e4b8578dc 100644
--- a/examples/wireframe/WireframeEffect.qml
+++ b/examples/wireframe/WireframeEffect.qml
@@ -96,9 +96,9 @@ Effect {
// ka uniform name in the shader to a property called ambient
bindings: [
// Uniforms (those provided by the user)
- ParameterMapper { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapper.Uniform },
- ParameterMapper { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapper.Uniform }
+ ParameterMapping { parameterName: "ambient"; shaderVariableName: "ka"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "diffuse"; shaderVariableName: "kd"; bindingType: ParameterMapping.Uniform },
+ ParameterMapping { parameterName: "specular"; shaderVariableName: "ks"; bindingType: ParameterMapping.Uniform }
]
shaderProgram: ShaderProgram {
diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
index 9c3b2464b..ceeb6201b 100644
--- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
+++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
@@ -59,7 +59,7 @@
#include <Qt3DRenderer/qeffect.h>
#include <Qt3DRenderer/qparameter.h>
#include <Qt3DRenderer/qannotation.h>
-#include <Qt3DRenderer/qparametermapper.h>
+#include <Qt3DRenderer/qparametermapping.h>
#include <Qt3DRenderer/qcuboidmesh.h>
#include <Qt3DRenderer/qcylindermesh.h>
#include <Qt3DRenderer/qplanemesh.h>
@@ -116,7 +116,7 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri)
qmlRegisterType<Qt3D::QOpenGLFilter>(uri, 2, 0, "OpenGLFilter");
qmlRegisterUncreatableType<Qt3D::QParameter>(uri, 2, 0, "QParameter", "Quick3D should instantiate Quick3DParameter only");
qmlRegisterType<Qt3D::Render::Quick::Quick3DParameter>(uri, 2, 0, "Parameter");
- qmlRegisterType<Qt3D::QParameterMapper>(uri, 2, 0, "ParameterMapper");
+ qmlRegisterType<Qt3D::QParameterMapping>(uri, 2, 0, "ParameterMapping");
qmlRegisterExtendedType<Qt3D::QMaterial, Qt3D::Render::Quick::Quick3DMaterial>(uri, 2, 0, "Material");
qmlRegisterExtendedType<Qt3D::QRenderPass, Qt3D::Render::Quick::Quick3DRenderPass>(uri, 2, 0, "RenderPass");
qmlRegisterType<Qt3D::QShaderProgram>(uri, 2, 0, "ShaderProgram");
diff --git a/src/quick3d/quick3drenderer/items/quick3drenderpass.cpp b/src/quick3d/quick3drenderer/items/quick3drenderpass.cpp
index c4e507c57..91173087e 100644
--- a/src/quick3d/quick3drenderer/items/quick3drenderpass.cpp
+++ b/src/quick3d/quick3drenderer/items/quick3drenderpass.cpp
@@ -41,7 +41,7 @@
****************************************************************************/
#include "quick3drenderpass.h"
-#include <Qt3DRenderer/qparametermapper.h>
+#include <Qt3DRenderer/qparametermapping.h>
QT_BEGIN_NAMESPACE
@@ -65,9 +65,9 @@ QQmlListProperty<QAnnotation> Quick3DRenderPass::annotationList()
&Quick3DRenderPass::clearAnnotations);
}
-QQmlListProperty<QParameterMapper> Quick3DRenderPass::bindingList()
+QQmlListProperty<QParameterMapping> Quick3DRenderPass::bindingList()
{
- return QQmlListProperty<Qt3D::QParameterMapper>(this, 0,
+ return QQmlListProperty<Qt3D::QParameterMapping>(this, 0,
&Quick3DRenderPass::appendBinding,
&Quick3DRenderPass::bindingsCount,
&Quick3DRenderPass::bindingAt,
@@ -108,28 +108,28 @@ void Quick3DRenderPass::clearAnnotations(QQmlListProperty<QAnnotation> *list)
rPass->parentRenderPass()->removeAnnotation(c);
}
-void Quick3DRenderPass::appendBinding(QQmlListProperty<QParameterMapper> *list, QParameterMapper *binding)
+void Quick3DRenderPass::appendBinding(QQmlListProperty<QParameterMapping> *list, QParameterMapping *binding)
{
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
rPass->parentRenderPass()->addBinding(binding);
}
-QParameterMapper *Quick3DRenderPass::bindingAt(QQmlListProperty<QParameterMapper> *list, int index)
+QParameterMapping *Quick3DRenderPass::bindingAt(QQmlListProperty<QParameterMapping> *list, int index)
{
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
return rPass->parentRenderPass()->bindings().at(index);
}
-int Quick3DRenderPass::bindingsCount(QQmlListProperty<QParameterMapper> *list)
+int Quick3DRenderPass::bindingsCount(QQmlListProperty<QParameterMapping> *list)
{
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
return rPass->parentRenderPass()->bindings().count();
}
-void Quick3DRenderPass::clearBindings(QQmlListProperty<QParameterMapper> *list)
+void Quick3DRenderPass::clearBindings(QQmlListProperty<QParameterMapping> *list)
{
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
- Q_FOREACH (QParameterMapper *binding, rPass->parentRenderPass()->bindings())
+ Q_FOREACH (QParameterMapping *binding, rPass->parentRenderPass()->bindings())
rPass->parentRenderPass()->removeBinding(binding);
}
diff --git a/src/quick3d/quick3drenderer/items/quick3drenderpass.h b/src/quick3d/quick3drenderer/items/quick3drenderpass.h
index 6ffdc281a..9da68267a 100644
--- a/src/quick3d/quick3drenderer/items/quick3drenderpass.h
+++ b/src/quick3d/quick3drenderer/items/quick3drenderpass.h
@@ -59,13 +59,13 @@ class QT3DQUICKRENDERERSHARED_EXPORT Quick3DRenderPass : public QObject
{
Q_OBJECT
Q_PROPERTY(QQmlListProperty<Qt3D::QAnnotation> annotations READ annotationList)
- Q_PROPERTY(QQmlListProperty<Qt3D::QParameterMapper> bindings READ bindingList)
+ Q_PROPERTY(QQmlListProperty<Qt3D::QParameterMapping> bindings READ bindingList)
Q_PROPERTY(QQmlListProperty<Qt3D::QRenderState> renderStates READ renderStateList)
public:
explicit Quick3DRenderPass(QObject *parent = 0);
QQmlListProperty<Qt3D::QAnnotation> annotationList();
- QQmlListProperty<Qt3D::QParameterMapper> bindingList();
+ QQmlListProperty<Qt3D::QParameterMapping> bindingList();
QQmlListProperty<Qt3D::QRenderState> renderStateList();
inline QRenderPass *parentRenderPass() const { return qobject_cast<QRenderPass *>(parent()); }
@@ -75,10 +75,10 @@ private:
static int annotationsCount(QQmlListProperty<Qt3D::QAnnotation> *list);
static void clearAnnotations(QQmlListProperty<Qt3D::QAnnotation> *list);
- static void appendBinding(QQmlListProperty<Qt3D::QParameterMapper> *list, QParameterMapper *binding);
- static QParameterMapper *bindingAt(QQmlListProperty<Qt3D::QParameterMapper> *list, int index);
- static int bindingsCount(QQmlListProperty<Qt3D::QParameterMapper> *list);
- static void clearBindings(QQmlListProperty<Qt3D::QParameterMapper> *list);
+ static void appendBinding(QQmlListProperty<Qt3D::QParameterMapping> *list, QParameterMapping *binding);
+ static QParameterMapping *bindingAt(QQmlListProperty<Qt3D::QParameterMapping> *list, int index);
+ static int bindingsCount(QQmlListProperty<Qt3D::QParameterMapping> *list);
+ static void clearBindings(QQmlListProperty<Qt3D::QParameterMapping> *list);
static void appendRenderState(QQmlListProperty<Qt3D::QRenderState> *list, QRenderState *state);
static QRenderState *renderStateAt(QQmlListProperty<Qt3D::QRenderState> *list, int index);
diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp
index 5d0b462d9..c8e858237 100644
--- a/src/render/backend/renderer.cpp
+++ b/src/render/backend/renderer.cpp
@@ -49,7 +49,7 @@
#include <Qt3DRenderer/qmaterial.h>
#include <Qt3DRenderer/qmesh.h>
-#include <Qt3DRenderer/qparametermapper.h>
+#include <Qt3DRenderer/qparametermapping.h>
#include <Qt3DRenderer/qrenderpass.h>
#include <Qt3DRenderer/qshaderprogram.h>
#include <Qt3DRenderer/qtechnique.h>
@@ -177,18 +177,18 @@ void Renderer::buildDefaultTechnique()
// diffuse lighting uniforms
QParameter* lightPos = new QParameter(QStringLiteral("lightPos"), QVector4D(10.0f, 10.0f, 0.0f, 1.0f));
m_defaultTechnique->addParameter(lightPos);
- basicPass->addBinding(new QParameterMapper(QStringLiteral("lightPos"), QStringLiteral("lightPosition"), QParameterMapper::Uniform));
+ basicPass->addBinding(new QParameterMapping(QStringLiteral("lightPos"), QStringLiteral("lightPosition"), QParameterMapping::Uniform));
QParameter* lightIntensity = new QParameter(QStringLiteral("lightIntensity"), QVector3D(0.5f, 0.5f, 0.5f));
m_defaultTechnique->addParameter(lightIntensity);
QParameter* kd = new QParameter(QStringLiteral("diffuse"), QVector3D(1.0f, 0.5f, 0.0f));
m_defaultTechnique->addParameter(kd);
- basicPass->addBinding(new QParameterMapper(QStringLiteral("diffuse"), QStringLiteral("kd"), QParameterMapper::Uniform));
+ basicPass->addBinding(new QParameterMapping(QStringLiteral("diffuse"), QStringLiteral("kd"), QParameterMapping::Uniform));
QParameter* ka = new QParameter(QStringLiteral("ambient"), QVector3D(0.2f, 0.2f, 0.2f));
m_defaultTechnique->addParameter(ka);
- basicPass->addBinding(new QParameterMapper(QStringLiteral("ambient"), QStringLiteral("ka"), QParameterMapper::Uniform));
+ basicPass->addBinding(new QParameterMapping(QStringLiteral("ambient"), QStringLiteral("ka"), QParameterMapping::Uniform));
}
diff --git a/src/render/backend/rendereraspect.cpp b/src/render/backend/rendereraspect.cpp
index f555f0257..1dd05af59 100644
--- a/src/render/backend/rendereraspect.cpp
+++ b/src/render/backend/rendereraspect.cpp
@@ -55,7 +55,7 @@
#include <Qt3DRenderer/qmaterial.h>
#include <Qt3DRenderer/qmesh.h>
#include <Qt3DRenderer/qparameter.h>
-#include <Qt3DRenderer/qparametermapper.h>
+#include <Qt3DRenderer/qparametermapping.h>
#include <Qt3DRenderer/qrenderpassfilter.h>
#include <Qt3DRenderer/qrendertargetselector.h>
#include <Qt3DRenderer/qtechniquefilter.h>
diff --git a/src/render/backend/renderrenderpass.cpp b/src/render/backend/renderrenderpass.cpp
index 8ecacce39..dd4a761cc 100644
--- a/src/render/backend/renderrenderpass.cpp
+++ b/src/render/backend/renderrenderpass.cpp
@@ -42,7 +42,7 @@
#include "renderrenderpass_p.h"
#include <Qt3DRenderer/private/renderannotation_p.h>
-#include <Qt3DRenderer/qparametermapper.h>
+#include <Qt3DRenderer/qparametermapping.h>
#include <Qt3DRenderer/qrenderstate.h>
#include <Qt3DRenderer/qrenderpass.h>
@@ -76,7 +76,7 @@ void RenderRenderPass::updateFromPeer(QNode *peer)
m_shaderUuid = pass->shaderProgram()->uuid();
// The RenderPass clones frontend bindings in case the frontend ever removes them
// TO DO: We probably need a QParameterMapper manager
- Q_FOREACH (QParameterMapper *binding, pass->bindings())
+ Q_FOREACH (QParameterMapping *binding, pass->bindings())
appendBinding(binding);
Q_FOREACH (QAnnotation *c, pass->annotations())
appendAnnotation(c->uuid());
@@ -97,7 +97,7 @@ void RenderRenderPass::sceneChangeEvent(const QSceneChangePtr &e)
m_shaderUuid = propertyChange->value().toUuid();
}
else if (propertyChange->propertyName() == QByteArrayLiteral("binding")) {
- appendBinding(propertyChange->value().value<QParameterMapper *>());
+ appendBinding(propertyChange->value().value<QParameterMapping *>());
}
else if (propertyChange->propertyName() == QByteArrayLiteral("renderState")) {
appendRenderState(propertyChange->value().value<QRenderState *>());
@@ -131,7 +131,7 @@ QUuid RenderRenderPass::shaderProgram() const
return m_shaderUuid;
}
-QList<QParameterMapper *> RenderRenderPass::bindings() const
+QList<QParameterMapping *> RenderRenderPass::bindings() const
{
return m_bindings.values();
}
@@ -157,7 +157,7 @@ void RenderRenderPass::removeAnnotation(const QUuid &annotationId)
m_annotationList.removeOne(annotationId);
}
-void RenderRenderPass::appendBinding(QParameterMapper *binding)
+void RenderRenderPass::appendBinding(QParameterMapping *binding)
{
if (!m_bindings.contains(binding->uuid()))
m_bindings[binding->uuid()] = binding;
diff --git a/src/render/backend/renderrenderpass_p.h b/src/render/backend/renderrenderpass_p.h
index 34c66ba08..65bd6c2e1 100644
--- a/src/render/backend/renderrenderpass_p.h
+++ b/src/render/backend/renderrenderpass_p.h
@@ -54,7 +54,7 @@ namespace Qt3D {
class QRenderPass;
class QAbstractShader;
-class QParameterMapper;
+class QParameterMapping;
class QAnnotation;
class QRenderState;
@@ -72,14 +72,14 @@ public:
void updateFromPeer(QNode *peer) Q_DECL_OVERRIDE;
void sceneChangeEvent(const QSceneChangePtr &e) Q_DECL_OVERRIDE;
QUuid shaderProgram() const;
- QList<QParameterMapper *> bindings() const;
+ QList<QParameterMapping *> bindings() const;
QList<QUuid> annotations() const;
QList<QRenderState *> renderStates() const;
void appendAnnotation(const QUuid &criterionId);
void removeAnnotation(const QUuid &criterionId);
- void appendBinding(QParameterMapper *binding);
+ void appendBinding(QParameterMapping *binding);
void removeBinding(const QUuid &bindingId);
void appendRenderState(QRenderState *renderState);
@@ -87,7 +87,7 @@ public:
private:
QUuid m_shaderUuid;
- QHash<QUuid, QParameterMapper *> m_bindings;
+ QHash<QUuid, QParameterMapping *> m_bindings;
QHash<QUuid, QRenderState *> m_renderStates;
QList<QUuid> m_annotationList;
};
diff --git a/src/render/backend/renderview.cpp b/src/render/backend/renderview.cpp
index c9d859311..02c6a9130 100644
--- a/src/render/backend/renderview.cpp
+++ b/src/render/backend/renderview.cpp
@@ -53,7 +53,6 @@
#include <Qt3DRenderer/private/qmeshdata_p.h>
#include <Qt3DRenderer/private/meshdatamanager_p.h>
#include <Qt3DRenderer/private/qparameter_p.h>
-#include <Qt3DRenderer/private/qparametermapper_p.h>
#include <Qt3DRenderer/private/rendercameralens_p.h>
#include <Qt3DRenderer/private/rendercommand_p.h>
#include <Qt3DRenderer/private/rendereffect_p.h>
@@ -70,6 +69,7 @@
#include <Qt3DRenderer/private/sortmethod_p.h>
#include <Qt3DRenderer/sphere.h>
+#include <Qt3DRenderer/qparametermapping.h>
#include <Qt3DRenderer/qalphatest.h>
#include <Qt3DRenderer/qblendequation.h>
#include <Qt3DRenderer/qblendstate.h>
@@ -693,17 +693,17 @@ void RenderView::setShaderAndUniforms(RenderCommand *command, RenderRenderPass *
}
// Set uniforms and attributes explicitly binded
- Q_FOREACH (QParameterMapper *binding, rPass->bindings()) {
+ Q_FOREACH (QParameterMapping *binding, rPass->bindings()) {
if (!parameters.contains(binding->parameterName())) {
- if (binding->bindingType() == QParameterMapper::Attribute
+ if (binding->bindingType() == QParameterMapping::Attribute
&& attributeNames.contains(binding->shaderVariableName()))
command->m_parameterAttributeToShaderNames.insert(binding->parameterName(), binding->shaderVariableName());
- else if (binding->bindingType() == QParameterMapper::StandardUniform
+ else if (binding->bindingType() == QParameterMapping::StandardUniform
&& uniformNames.contains(binding->shaderVariableName())
&& m_standardUniformSetters.contains(binding->parameterName()))
command->m_uniforms.setUniform(binding->shaderVariableName(),
(this->*m_standardUniformSetters[binding->parameterName()])(worldTransform));
- else if (binding->bindingType() == QParameterMapper::FragmentOutput && fragOutputs.contains(binding->parameterName()))
+ else if (binding->bindingType() == QParameterMapping::FragmentOutput && fragOutputs.contains(binding->parameterName()))
fragOutputs.insert(binding->shaderVariableName(), fragOutputs.take(binding->parameterName()));
else
qCWarning(Render::Backend) << Q_FUNC_INFO << "Trying to bind a Parameter that hasn't been defined " << binding->parameterName();
diff --git a/src/render/frontend/qparametermapper.cpp b/src/render/frontend/qparametermapping.cpp
index fa5f7ed2a..c35f2671e 100644
--- a/src/render/frontend/qparametermapper.cpp
+++ b/src/render/frontend/qparametermapping.cpp
@@ -39,89 +39,89 @@
**
****************************************************************************/
-#include "qparametermapper.h"
-#include <private/qparametermapper_p.h>
+#include "qparametermapping.h"
+#include <private/qparametermapping_p.h>
QT_BEGIN_NAMESPACE
namespace Qt3D {
-QParameterMapperPrivate::QParameterMapperPrivate(QParameterMapper *qq)
+QParameterMappingPrivate::QParameterMappingPrivate(QParameterMapping *qq)
: QNodePrivate(qq)
- , m_bindingType(QParameterMapper::Uniform)
+ , m_bindingType(QParameterMapping::Uniform)
{
}
-void QParameterMapper::copy(const QNode *ref)
+void QParameterMapping::copy(const QNode *ref)
{
QNode::copy(ref);
- const QParameterMapper *mapper = static_cast<const QParameterMapper*>(ref);
+ const QParameterMapping *mapper = static_cast<const QParameterMapping*>(ref);
d_func()->m_parameterName = mapper->d_func()->m_parameterName;
d_func()->m_shaderVariableName = mapper->d_func()->m_shaderVariableName;
d_func()->m_bindingType = mapper->d_func()->m_bindingType;
}
-QParameterMapper::QParameterMapper(QNode *parent)
- : QNode(*new QParameterMapperPrivate(this), parent)
+QParameterMapping::QParameterMapping(QNode *parent)
+ : QNode(*new QParameterMappingPrivate(this), parent)
{
}
-QParameterMapper::QParameterMapper(QParameterMapperPrivate &dd, QNode *parent)
+QParameterMapping::QParameterMapping(QParameterMappingPrivate &dd, QNode *parent)
: QNode(dd, parent)
{
}
-QParameterMapper::QParameterMapper(const QString &parameterName, const QString &shaderParameterName, QParameterMapper::Binding bindingType, QNode *parent)
- : QNode(*new QParameterMapperPrivate(this), parent)
+QParameterMapping::QParameterMapping(const QString &parameterName, const QString &shaderParameterName, QParameterMapping::Binding bindingType, QNode *parent)
+ : QNode(*new QParameterMappingPrivate(this), parent)
{
- Q_D(QParameterMapper);
+ Q_D(QParameterMapping);
d->m_parameterName = parameterName;
d->m_shaderVariableName = shaderParameterName;
d->m_bindingType = bindingType;
}
-void QParameterMapper::setParameterName(const QString &name)
+void QParameterMapping::setParameterName(const QString &name)
{
- Q_D(QParameterMapper);
+ Q_D(QParameterMapping);
if (d->m_parameterName != name) {
d->m_parameterName = name;
emit parameterNameChanged();
}
}
-void QParameterMapper::setShaderVariableName(const QString &name)
+void QParameterMapping::setShaderVariableName(const QString &name)
{
- Q_D(QParameterMapper);
+ Q_D(QParameterMapping);
if (d->m_shaderVariableName != name) {
d->m_shaderVariableName = name;
emit shaderVariableNameChanged();
}
}
-void QParameterMapper::setBindingType(QParameterMapper::Binding type)
+void QParameterMapping::setBindingType(QParameterMapping::Binding type)
{
- Q_D(QParameterMapper);
+ Q_D(QParameterMapping);
if (d->m_bindingType != type) {
d->m_bindingType = type;
emit bindingTypeChanged();
}
}
-QString QParameterMapper::parameterName() const
+QString QParameterMapping::parameterName() const
{
- Q_D(const QParameterMapper);
+ Q_D(const QParameterMapping);
return d->m_parameterName;
}
-QString QParameterMapper::shaderVariableName() const
+QString QParameterMapping::shaderVariableName() const
{
- Q_D(const QParameterMapper);
+ Q_D(const QParameterMapping);
return d->m_shaderVariableName;
}
-QParameterMapper::Binding QParameterMapper::bindingType() const
+QParameterMapping::Binding QParameterMapping::bindingType() const
{
- Q_D(const QParameterMapper);
+ Q_D(const QParameterMapping);
return d->m_bindingType;
}
diff --git a/src/render/frontend/qparametermapper.h b/src/render/frontend/qparametermapping.h
index 99001025d..78f2603ce 100644
--- a/src/render/frontend/qparametermapper.h
+++ b/src/render/frontend/qparametermapping.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QT3D_QPARAMETERBINDER_H
-#define QT3D_QPARAMETERBINDER_H
+#ifndef QT3D_QPARAMETERMAPPING_H
+#define QT3D_QPARAMETERMAPPING_H
#include <Qt3DCore/qnode.h>
#include <Qt3DRenderer/qt3drenderer_global.h>
@@ -49,9 +49,9 @@ QT_BEGIN_NAMESPACE
namespace Qt3D {
-class QParameterMapperPrivate;
+class QParameterMappingPrivate;
-class QT3DRENDERERSHARED_EXPORT QParameterMapper : public QNode
+class QT3DRENDERERSHARED_EXPORT QParameterMapping : public QNode
{
Q_OBJECT
Q_ENUMS(Binding)
@@ -67,8 +67,8 @@ public:
FragmentOutput
};
- explicit QParameterMapper(QNode *parent = 0);
- QParameterMapper(const QString &parameterName, const QString &shaderParameterName, QParameterMapper::Binding bindingType, QNode *parent = 0);
+ explicit QParameterMapping(QNode *parent = 0);
+ QParameterMapping(const QString &parameterName, const QString &shaderParameterName, QParameterMapping::Binding bindingType, QNode *parent = 0);
void setParameterName(const QString &name);
void setShaderVariableName(const QString &name);
@@ -84,12 +84,12 @@ Q_SIGNALS:
void bindingTypeChanged();
protected:
- QParameterMapper(QParameterMapperPrivate &dd, QNode *parent = 0);
+ QParameterMapping(QParameterMappingPrivate &dd, QNode *parent = 0);
void copy(const QNode *ref) Q_DECL_OVERRIDE;
private:
- Q_DECLARE_PRIVATE(QParameterMapper)
- QT3D_CLONEABLE(QParameterMapper)
+ Q_DECLARE_PRIVATE(QParameterMapping)
+ QT3D_CLONEABLE(QParameterMapping)
};
} // Qt3D
diff --git a/src/render/frontend/qparametermapper_p.h b/src/render/frontend/qparametermapping_p.h
index 2d7d5a43c..e90e42318 100644
--- a/src/render/frontend/qparametermapper_p.h
+++ b/src/render/frontend/qparametermapping_p.h
@@ -39,30 +39,30 @@
**
****************************************************************************/
-#ifndef QT3D_QPARAMETERMAPPER_P_H
-#define QT3D_QPARAMETERMAPPER_P_H
+#ifndef QT3D_QPARAMETERMAPPING_P_H
+#define QT3D_QPARAMETERMAPPING_P_H
#include <private/qnode_p.h>
-#include <Qt3DRenderer/QParameterMapper>
+#include <Qt3DRenderer/QParameterMapping>
QT_BEGIN_NAMESPACE
namespace Qt3D {
-class QParameterMapperPrivate : public QNodePrivate
+class QParameterMappingPrivate : public QNodePrivate
{
public:
- QParameterMapperPrivate(QParameterMapper *qq);
+ QParameterMappingPrivate(QParameterMapping *qq);
- Q_DECLARE_PUBLIC(QParameterMapper)
+ Q_DECLARE_PUBLIC(QParameterMapping)
QString m_parameterName;
QString m_shaderVariableName;
- QParameterMapper::Binding m_bindingType;
+ QParameterMapping::Binding m_bindingType;
};
} // Qt3D
QT_END_NAMESPACE
-#endif // QT3D_QPARAMETERMAPPER_P_H
+#endif // QT3D_QPARAMETERMAPPING_P_H
diff --git a/src/render/frontend/qrenderpass.cpp b/src/render/frontend/qrenderpass.cpp
index 0a4e092dc..329cfad85 100644
--- a/src/render/frontend/qrenderpass.cpp
+++ b/src/render/frontend/qrenderpass.cpp
@@ -44,10 +44,9 @@
#include "qrenderpass_p.h"
#include "qparameter.h"
#include "qannotation.h"
-#include "qparametermapper.h"
+#include "qparametermapping.h"
#include "qscenepropertychange.h"
#include "qrenderstate.h"
-#include "qparametermapper_p.h"
#include "private/qnode_p.h"
QT_BEGIN_NAMESPACE
@@ -68,8 +67,8 @@ void QRenderPass::copy(const QNode *ref)
Q_FOREACH (QAnnotation *crit, other->d_func()->m_annotationList)
addAnnotation(qobject_cast<QAnnotation *>(QNodePrivate::get(crit)->clone()));
- Q_FOREACH (QParameterMapper *binding, other->d_func()->m_bindings)
- addBinding(qobject_cast<QParameterMapper *>(QNodePrivate::get(binding)->clone()));
+ Q_FOREACH (QParameterMapping *binding, other->d_func()->m_bindings)
+ addBinding(qobject_cast<QParameterMapping *>(QNodePrivate::get(binding)->clone()));
Q_FOREACH (QRenderState *renderState, other->d_func()->m_renderStates)
addRenderState(qobject_cast<QRenderState *>(QNodePrivate::get(renderState)->clone()));
}
@@ -178,7 +177,7 @@ QList<QAnnotation *> QRenderPass::annotations() const
return d->m_annotationList;
}
-void QRenderPass::addBinding(QParameterMapper *binding)
+void QRenderPass::addBinding(QParameterMapping *binding)
{
Q_D(QRenderPass);
if (!d->m_bindings.contains(binding)) {
@@ -196,7 +195,7 @@ void QRenderPass::addBinding(QParameterMapper *binding)
}
}
-void QRenderPass::removeBinding(QParameterMapper *binding)
+void QRenderPass::removeBinding(QParameterMapping *binding)
{
Q_D(QRenderPass);
if (d->m_changeArbiter != Q_NULLPTR) {
@@ -208,7 +207,7 @@ void QRenderPass::removeBinding(QParameterMapper *binding)
d->m_bindings.removeOne(binding);
}
-QList<QParameterMapper *> QRenderPass::bindings() const
+QList<QParameterMapping *> QRenderPass::bindings() const
{
Q_D(const QRenderPass);
return d->m_bindings;
diff --git a/src/render/frontend/qrenderpass.h b/src/render/frontend/qrenderpass.h
index 30315c494..f8b561a45 100644
--- a/src/render/frontend/qrenderpass.h
+++ b/src/render/frontend/qrenderpass.h
@@ -58,7 +58,7 @@ namespace Qt3D {
class QParameter;
class QRenderState;
-class QParameterMapper;
+class QParameterMapping;
typedef QList<QParameter*> ParameterList;
class QRenderPassPrivate;
@@ -87,9 +87,9 @@ public:
void removeAnnotation(QAnnotation *criterion);
QList<QAnnotation *> annotations() const;
- void addBinding(QParameterMapper *binding);
- void removeBinding(QParameterMapper *binding);
- QList<QParameterMapper *> bindings() const;
+ void addBinding(QParameterMapping *binding);
+ void removeBinding(QParameterMapping *binding);
+ QList<QParameterMapping *> bindings() const;
void addRenderState(QRenderState *state);
void removeRenderState(QRenderState *state);
diff --git a/src/render/frontend/qrenderpass_p.h b/src/render/frontend/qrenderpass_p.h
index 3bdbeebe4..47b4b8934 100644
--- a/src/render/frontend/qrenderpass_p.h
+++ b/src/render/frontend/qrenderpass_p.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3D {
class QParameter;
-class QParameterMapper;
+class QParameterMapping;
class QRenderState;
class QAnnotation;
typedef QList<QParameter*> ParameterList;
@@ -74,7 +74,7 @@ public:
// map Parameter names to GLSL names
QHash<QString, QString> m_parameterNameDict;
QList<QAnnotation *> m_annotationList;
- QList<QParameterMapper *> m_bindings;
+ QList<QParameterMapping *> m_bindings;
QList<QRenderState *> m_renderStates;
QShaderProgram *m_shader;
};
diff --git a/src/render/frontend/render-frontend.pri b/src/render/frontend/render-frontend.pri
index 7f2efe0f3..c3185cbd9 100644
--- a/src/render/frontend/render-frontend.pri
+++ b/src/render/frontend/render-frontend.pri
@@ -17,7 +17,6 @@ HEADERS += \
$$PWD/qsceneloader.h \
$$PWD/qparameter.h \
$$PWD/qparameter_p.h \
- $$PWD/qparametermapper.h \
$$PWD/qcylindermesh.h \
$$PWD/qtorusmesh.h \
$$PWD/qspheremesh.h \
@@ -37,7 +36,6 @@ HEADERS += \
$$PWD/qrenderpass_p.h \
$$PWD/qlayer.h \
$$PWD/qlayer_p.h \
- $$PWD/qparametermapper_p.h \
$$PWD/qopenglfilter.h \
$$PWD/qplanemesh.h \
$$PWD/qplanemesh_p.h \
@@ -63,7 +61,9 @@ HEADERS += \
$$PWD/qannotation.h \
$$PWD/qannotation_p.h \
$$PWD/qabstractmesh_p.h \
- $$PWD/qabstractmesh.h
+ $$PWD/qabstractmesh.h \
+ $$PWD/qparametermapping_p.h \
+ $$PWD/qparametermapping.h
SOURCES += \
$$PWD/qmaterial.cpp \
@@ -78,7 +78,6 @@ SOURCES += \
$$PWD/qeffect.cpp \
$$PWD/qsceneloader.cpp \
$$PWD/qparameter.cpp \
- $$PWD/qparametermapper.cpp \
$$PWD/qcylindermesh.cpp \
$$PWD/qtorusmesh.cpp \
$$PWD/qspheremesh.cpp \
@@ -105,4 +104,5 @@ SOURCES += \
$$PWD/qrendertarget.cpp \
$$PWD/qalphacoverage.cpp \
$$PWD/qannotation.cpp \
- $$PWD/qabstractmesh.cpp
+ $$PWD/qabstractmesh.cpp \
+ $$PWD/qparametermapping.cpp