diff options
Diffstat (limited to 'src/opengl/qglshaderprogram.h')
-rw-r--r-- | src/opengl/qglshaderprogram.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h index f95017d09c..dfdef44b54 100644 --- a/src/opengl/qglshaderprogram.h +++ b/src/opengl/qglshaderprogram.h @@ -46,6 +46,17 @@ #include <QtGui/qvector4d.h> #include <QtGui/qmatrix4x4.h> +#if defined(Q_CLANG_QDOC) +#undef GLfloat +typedef double GLfloat; +#undef GLint +typedef int GLint; +#undef GLuint +typedef unsigned int GLuint; +#undef GLenum +typedef unsigned int GLenum; +#endif + QT_BEGIN_NAMESPACE @@ -64,8 +75,8 @@ public: }; Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit) - explicit QGLShader(QGLShader::ShaderType type, QObject *parent = Q_NULLPTR); - QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = Q_NULLPTR); + explicit QGLShader(QGLShader::ShaderType type, QObject *parent = nullptr); + QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = nullptr); virtual ~QGLShader(); QGLShader::ShaderType shaderType() const; @@ -82,7 +93,7 @@ public: GLuint shaderId() const; - static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = Q_NULLPTR); + static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = nullptr); private: friend class QGLShaderProgram; @@ -100,8 +111,8 @@ class Q_OPENGL_EXPORT QGLShaderProgram : public QObject { Q_OBJECT public: - explicit QGLShaderProgram(QObject *parent = Q_NULLPTR); - explicit QGLShaderProgram(const QGLContext *context, QObject *parent = Q_NULLPTR); + explicit QGLShaderProgram(QObject *parent = nullptr); + explicit QGLShaderProgram(const QGLContext *context, QObject *parent = nullptr); virtual ~QGLShaderProgram(); bool addShader(QGLShader *shader); @@ -286,7 +297,7 @@ public: void setUniformValueArray(const char *name, const QMatrix4x3 *values, int count); void setUniformValueArray(const char *name, const QMatrix4x4 *values, int count); - static bool hasOpenGLShaderPrograms(const QGLContext *context = Q_NULLPTR); + static bool hasOpenGLShaderPrograms(const QGLContext *context = nullptr); private Q_SLOTS: void shaderDestroyed(); |