summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/doc/qtopengl.qdocconf2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/qgl.cpp35
-rw-r--r--src/opengl/qgl.h16
-rw-r--r--src/opengl/qglframebufferobject.cpp2
-rw-r--r--src/opengl/qglfunctions.cpp5
-rw-r--r--src/opengl/qglshaderprogram.cpp6
-rw-r--r--src/opengl/qglshaderprogram.h11
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
9 files changed, 28 insertions, 53 deletions
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf
index 6ff6cae2cb..2d38a5d2af 100644
--- a/src/opengl/doc/qtopengl.qdocconf
+++ b/src/opengl/doc/qtopengl.qdocconf
@@ -23,6 +23,8 @@ depends += qtdoc qtcore qtgui qtwidgets qmake
examplesinstallpath = opengl
+tagfile = qtopengl.tags
+
# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
# Qt Assistant and/or Qt Creator.
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index d1ed621790..abf5b8ea48 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -160,7 +160,7 @@ public:
void setTranslateZ(GLfloat z);
private:
- Q_DISABLE_COPY(QGL2PaintEngineEx)
+ Q_DISABLE_COPY_MOVE(QGL2PaintEngineEx)
};
class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate, protected QOpenGLExtensions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ba4a1dcaa1..8ef53afaea 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3880,12 +3880,9 @@ void QGLContext::doneCurrent()
*/
QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(QGLFormat::defaultFormat(), this), shareWidget);
}
@@ -3893,12 +3890,9 @@ QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFl
\internal
*/
QGLWidget::QGLWidget(QGLWidgetPrivate &dd, const QGLFormat &format, QWidget *parent, const QGLWidget *shareWidget, Qt::WindowFlags f)
- : QWidget(dd, parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(dd, parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(format, this), shareWidget);
}
@@ -3935,12 +3929,9 @@ QGLWidget::QGLWidget(QGLWidgetPrivate &dd, const QGLFormat &format, QWidget *par
QGLWidget::QGLWidget(const QGLFormat &format, QWidget *parent, const QGLWidget* shareWidget,
Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(format, this), shareWidget);
}
@@ -3971,12 +3962,9 @@ QGLWidget::QGLWidget(const QGLFormat &format, QWidget *parent, const QGLWidget*
*/
QGLWidget::QGLWidget(QGLContext *context, QWidget *parent, const QGLWidget *shareWidget,
Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(context, shareWidget);
}
@@ -4131,14 +4119,14 @@ void QGLWidget::swapBuffers()
/*!
\fn const QGLContext* QGLWidget::overlayContext() const
- Returns the overlay context of this widget, or 0 if this widget
- has no overlay.
+ Returns the overlay context of this widget, or \nullptr if this
+ widget has no overlay.
\sa context()
*/
const QGLContext* QGLWidget::overlayContext() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -5169,6 +5157,15 @@ QPaintEngine *QGLWidget::paintEngine() const
void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget)
{
+ Q_Q(QGLWidget);
+ q->setAttribute(Qt::WA_PaintOnScreen);
+ q->setAttribute(Qt::WA_NoSystemBackground);
+ q->setAutoFillBackground(true); // for compatibility
+
+ mustHaveWindowHandle = 1;
+ q->setAttribute(Qt::WA_NativeWindow);
+ q->setWindowFlag(Qt::MSWindowsOwnDC);
+
initContext(context, shareWidget);
}
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index a1ba0485e0..f5accbeb3c 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -51,22 +51,6 @@
#include <QtGui/QSurfaceFormat>
-#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLenum
-typedef unsigned int GLenum;
-#undef GLclampf
-typedef float GLclampf;
-#undef GLsizei
-typedef int GLsizei;
-#undef GLboolean
-typedef bool GLboolean;
-#endif
-
-
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 0b2ddf97fe..b2158ebfaa 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -211,7 +211,7 @@ QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat()
If the desired amount of samples per pixel is not supported by the hardware
then the maximum number of samples per pixel will be used. Note that
- multisample framebuffer objects can not be bound as textures. Also, the
+ multisample framebuffer objects cannot be bound as textures. Also, the
\c{GL_EXT_framebuffer_multisample} extension is required to create a
framebuffer with more than one sample per pixel.
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index 7fe7102510..f22f9f470b 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -170,7 +170,8 @@ QGLFunctions::QGLFunctions()
/*!
Constructs a function resolver for \a context. If \a context
- is null, then the resolver will be created for the current QGLContext.
+ is \nullptr, then the resolver will be created for the current
+ QGLContext.
An object constructed in this way can only be used with \a context
and other contexts that share with it. Use initializeGLFunctions()
@@ -305,7 +306,7 @@ bool QGLFunctions::hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const
/*!
Initializes GL function resolution for \a context. If \a context
- is null, then the current QGLContext will be used.
+ is \nullptr, then the current QGLContext will be used.
After calling this function, the QGLFunctions object can only be
used with \a context and other contexts that share with it.
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 545df8fa44..35f60318be 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -3169,7 +3169,8 @@ GLenum QGLShaderProgram::geometryOutputType() const
Language (GLSL) are supported on this system; false otherwise.
The \a context is used to resolve the GLSL extensions.
- If \a context is null, then QGLContext::currentContext() is used.
+ If \a context is \nullptr, then QGLContext::currentContext() is
+ used.
*/
bool QGLShaderProgram::hasOpenGLShaderPrograms(const QGLContext *context)
{
@@ -3207,7 +3208,8 @@ void QGLShaderProgram::shaderDestroyed()
this system; false otherwise.
The \a context is used to resolve the GLSL extensions.
- If \a context is null, then QGLContext::currentContext() is used.
+ If \a context is \nullptr, then QGLContext::currentContext() is
+ used.
\since 4.7
*/
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index dfdef44b54..3ce88197d2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -46,17 +46,6 @@
#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
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index 9efcecd25f..1a32f24d70 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -80,7 +80,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QGraphicsShaderEffect)
- Q_DISABLE_COPY(QGraphicsShaderEffect)
+ Q_DISABLE_COPY_MOVE(QGraphicsShaderEffect)
friend class QGLCustomShaderEffectStage;
};