aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-06-02 16:49:43 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-06-02 16:08:56 +0000
commita48ca7e319bb7ad95a31638b2493560a58a4b8a3 (patch)
tree67d6fac7b963f0d5cbdf7534a5d1c8ea39fd3a1c
parent0669e48a2fe4640e05844df8aa36bf2a85db411d (diff)
Avoid ifdefed enum
Do it like in QSGGeometry: use the values directly to avoid the GL header dependency. Change-Id: Ia83dea5cbbab7dfee8b88d1b01fcfcb51ad41fc1 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h13
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareninepatchnode_p.h2
2 files changed, 4 insertions, 11 deletions
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index 5d7ed2ad2d..680ba85aa1 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -93,19 +93,12 @@ public:
Repeat
};
Q_ENUM(WrapMode)
-#ifndef QT_NO_OPENGL
- enum Format {
- Alpha = GL_ALPHA,
- RGB = GL_RGB,
- RGBA = GL_RGBA
- };
-#else
+ // Equivalents to GL_ALPHA and similar type constants.
enum Format {
Alpha = 0x1906,
- RGB,
- RGBA
+ RGB = 0x1907,
+ RGBA = 0x1908
};
-#endif
Q_ENUM(Format)
enum TextureMirroring {
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareninepatchnode_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwareninepatchnode_p.h
index 62559c933c..bc7aec1b5a 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwareninepatchnode_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareninepatchnode_p.h
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
class QSGSoftwareNinePatchNode : public QSGNinePatchNode
{
-public:
+public:
QSGSoftwareNinePatchNode();
void setTexture(QSGTexture *texture) override;