aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/util/qsgflatcolormaterial.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgflatcolormaterial.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
index 2ce27275cd..8ab7669891 100644
--- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
@@ -39,7 +39,7 @@
#include "qsgflatcolormaterial.h"
#include <private/qsgmaterialshader_p.h>
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
# include <qopenglshaderprogram.h>
#endif
@@ -57,7 +57,7 @@ public:
private:
virtual void initialize();
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
int m_matrix_id;
int m_color_id;
#endif
@@ -68,7 +68,7 @@ QSGMaterialType FlatColorMaterialShader::type;
FlatColorMaterialShader::FlatColorMaterialShader()
: QSGMaterialShader(*new QSGMaterialShaderPrivate)
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.vert"));
setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/flatcolor.frag"));
#endif
@@ -76,7 +76,7 @@ FlatColorMaterialShader::FlatColorMaterialShader()
void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
Q_ASSERT(oldEffect == 0 || newEffect->type() == oldEffect->type());
QSGFlatColorMaterial *oldMaterial = static_cast<QSGFlatColorMaterial *>(oldEffect);
QSGFlatColorMaterial *newMaterial = static_cast<QSGFlatColorMaterial *>(newEffect);
@@ -109,7 +109,7 @@ char const *const *FlatColorMaterialShader::attributeNames() const
void FlatColorMaterialShader::initialize()
{
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
m_matrix_id = program()->uniformLocation("matrix");
m_color_id = program()->uniformLocation("color");
#endif