summaryrefslogtreecommitdiffstats
path: root/src/render/lights/qabstractlight_p.h
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2016-04-27 12:39:15 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-04-28 11:28:56 +0000
commit42bc3d429a470ec678948a19da1af5a67fe0080c (patch)
treeadf2a31505fc9f45ff0385e24490645fc7b82acc /src/render/lights/qabstractlight_p.h
parent665afce109016328ce3702a9d116e250b250f6ef (diff)
QAbstractLight now inherits directly QComponent
We are turning the relationship between QAbstractLight and QShaderData from a "is-a" to a "has-a". For that we relay all the properties of the light to its internal shader data dynamic properties. Interestingly it also removes a couple of special handling for lights which aren't needed anymore. Change-Id: Ia937b8934f94ce318e02901d90ac340e172cbc75 Task-number: QTBUG-51489 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/lights/qabstractlight_p.h')
-rw-r--r--src/render/lights/qabstractlight_p.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/render/lights/qabstractlight_p.h b/src/render/lights/qabstractlight_p.h
index d605951ac..a903f43f6 100644
--- a/src/render/lights/qabstractlight_p.h
+++ b/src/render/lights/qabstractlight_p.h
@@ -51,7 +51,8 @@
// We mean it.
//
-#include <private/qshaderdata_p.h>
+#include <private/qcomponent_p.h>
+#include <qshaderdata.h>
QT_BEGIN_NAMESPACE
@@ -59,15 +60,19 @@ namespace Qt3DRender {
class QAbstractLight;
-class Q_AUTOTEST_EXPORT QAbstractLightPrivate : public QShaderDataPrivate
+class Q_AUTOTEST_EXPORT QAbstractLightPrivate : public Qt3DCore::QComponentPrivate
{
public:
QAbstractLightPrivate(QAbstractLight::Type type);
Q_DECLARE_PUBLIC(QAbstractLight)
QAbstractLight::Type m_type;
- QColor m_color;
- float m_intensity;
+ QShaderData *m_shaderData;
+};
+
+struct QAbstractLightData
+{
+ Qt3DCore::QNodeId shaderDataId;
};
}