diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-16 14:22:36 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-29 10:10:27 +0000 |
commit | e579076bb36e6594003b2ade7f3d062944ef6f47 (patch) | |
tree | 1c00c8a02c638582d342504f3bebd45dbcd46be1 /src/quick/scenegraph/coreapi/qsgmaterial.h | |
parent | 4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (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/coreapi/qsgmaterial.h')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h index 114651653f..c002cd5d5e 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.h +++ b/src/quick/scenegraph/coreapi/qsgmaterial.h @@ -41,7 +41,7 @@ #define QSGMATERIAL_H #include <QtQuick/qtquickglobal.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) # include <QtGui/qopenglshaderprogram.h> #endif #include <QtGui/QMatrix4x4> @@ -84,7 +84,7 @@ public: QRect deviceRect() const; float determinant() const; float devicePixelRatio() const; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QOpenGLContext *context() const; #endif private: @@ -101,7 +101,7 @@ public: // First time a material is used, oldMaterial is null. virtual void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); virtual char const *const *attributeNames() const = 0; // Array must end with null. -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) inline QOpenGLShaderProgram *program() { return &m_program; } #endif protected: @@ -110,19 +110,19 @@ protected: friend class QSGDefaultRenderContext; friend class QSGBatchRenderer::ShaderManager; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void setShaderSourceFile(QOpenGLShader::ShaderType type, const QString &sourceFile); void setShaderSourceFiles(QOpenGLShader::ShaderType type, const QStringList &sourceFiles); virtual void compile(); #endif virtual void initialize() { } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) virtual const char *vertexShader() const; virtual const char *fragmentShader() const; #endif private: -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QOpenGLShaderProgram m_program; #endif QScopedPointer<QSGMaterialShaderPrivate> d_ptr; |