aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-16 14:22:36 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-11-29 10:10:27 +0000
commite579076bb36e6594003b2ade7f3d062944ef6f47 (patch)
tree1c00c8a02c638582d342504f3bebd45dbcd46be1 /src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
parent4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (diff)
Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/util/qsgvertexcolormaterial.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgvertexcolormaterial.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
index 847ec289d8..8c305d7fd4 100644
--- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qsgvertexcolormaterial.h"
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
# include <qopenglshaderprogram.h>
#endif
QT_BEGIN_NAMESPACE
@@ -55,7 +55,7 @@ public:
private:
virtual void initialize();
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
int m_matrix_id;
int m_opacity_id;
#endif
@@ -66,7 +66,7 @@ QSGMaterialType QSGVertexColorMaterialShader::type;
QSGVertexColorMaterialShader::QSGVertexColorMaterialShader()
: QSGMaterialShader()
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/vertexcolor.vert"));
setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/vertexcolor.frag"));
#endif
@@ -74,7 +74,7 @@ QSGVertexColorMaterialShader::QSGVertexColorMaterialShader()
void QSGVertexColorMaterialShader::updateState(const RenderState &state, QSGMaterial * /*newEffect*/, QSGMaterial *)
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
if (state.isOpacityDirty())
program()->setUniformValue(m_opacity_id, state.opacity());
@@ -93,7 +93,7 @@ char const *const *QSGVertexColorMaterialShader::attributeNames() const
void QSGVertexColorMaterialShader::initialize()
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
m_matrix_id = program()->uniformLocation("matrix");
m_opacity_id = program()->uniformLocation("opacity");
#endif