diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-13 11:58:07 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-14 14:24:57 +0100 |
commit | e65cd6f3794e12e6bc5c2ee985eae8e70ff5f333 (patch) | |
tree | 8965835c375422d63b2ccfa927b31a56e64bda1d /src/opengl | |
parent | d1ee7189553e13337b198fe4ba66d79fb7a7f41d (diff) | |
parent | e95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/concurrent/doc/qtconcurrent.qdocconf
src/corelib/doc/qtcore.qdocconf
src/corelib/global/qglobal.h
src/dbus/doc/qtdbus.qdocconf
src/dbus/qdbusmessage.h
src/gui/doc/qtgui.qdocconf
src/gui/image/qimagereader.cpp
src/network/doc/qtnetwork.qdocconf
src/opengl/doc/qtopengl.qdocconf
src/opengl/qgl.h
src/plugins/platforms/windows/qwindowswindow.cpp
src/printsupport/doc/qtprintsupport.qdocconf
src/sql/doc/qtsql.qdocconf
src/testlib/doc/qttestlib.qdocconf
src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
src/widgets/doc/qtwidgets.qdocconf
src/xml/doc/qtxml.qdocconf
Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/doc/qtopengl.qdocconf | 2 | ||||
-rw-r--r-- | src/opengl/qgl.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qgl.h | 27 | ||||
-rw-r--r-- | src/opengl/qgl_qpa.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 6 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer.cpp | 4 |
6 files changed, 10 insertions, 35 deletions
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf index 0ccc25ab49..d0f49fd602 100644 --- a/src/opengl/doc/qtopengl.qdocconf +++ b/src/opengl/doc/qtopengl.qdocconf @@ -39,7 +39,7 @@ qhp.qtopengl.file = qtopengl.qhp # Namespace for the output file. This namespace is used to distinguish between # different documentation files in Creator/Assistant. -qhp.qtopengl.namespace = org.qt-project.qtopengl.510 +qhp.qtopengl.namespace = org.qt-project.qtopengl.$QT_VERSION_TAG # Title for the package, will be the main title for the package in # Assistant/Creator. diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 402fdfa33f..aded7c1c27 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1637,7 +1637,7 @@ static void convertFromGLImage(QImage &img, int w, int h, bool alpha_format, boo img = img.mirrored(); } -QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha) +QImage qt_gl_read_frame_buffer(const QSize &size, bool alpha_format, bool include_alpha) { QImage img(size, (alpha_format && include_alpha) ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32); @@ -4046,7 +4046,7 @@ QImage QGLWidget::grabFrameBuffer(bool withAlpha) int w = width(); int h = height(); if (format().rgba()) - res = qt_gl_read_framebuffer(QSize(w, h), format().alpha(), withAlpha); + res = qt_gl_read_frame_buffer(QSize(w, h), format().alpha(), withAlpha); return res; } diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 7624a13d97..727e15de88 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -44,6 +44,7 @@ #ifndef QT_NO_OPENGL +#include <QtGui/qopengl.h> #include <QtWidgets/qwidget.h> #include <QtGui/qpaintengine.h> #include <QtOpenGL/qglcolormap.h> @@ -52,32 +53,6 @@ #include <QtGui/QSurfaceFormat> -#if defined(Q_OS_WIN) -# include <QtCore/qt_windows.h> -#endif - -#if defined(Q_OS_MAC) -# if !defined(Q_OS_IOS) -# include <OpenGL/gl.h> -# else -# if defined(QT_OPENGL_ES_2) -# include <OpenGLES/ES2/gl.h> -# endif -# endif -#elif defined(QT_OPENGL_ES_2) -# include <GLES2/gl2.h> -# else -# include <GL/gl.h> -# endif - -#if defined(QT_OPENGL_ES_2) -# ifndef GL_DOUBLE -# define GL_DOUBLE GL_FLOAT -# endif -# ifndef GLdouble -typedef GLfloat GLdouble; -# endif -#endif QT_BEGIN_NAMESPACE diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index 44df7d109c..0a24654624 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -100,7 +100,7 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format) retFormat.setRedBufferSize(format.redBufferSize()); if (format.depth()) retFormat.setDepthBufferSize(format.depthBufferSize() == -1 ? 1 : format.depthBufferSize()); - retFormat.setSwapBehavior(format.doubleBuffer() ? QSurfaceFormat::DoubleBuffer : QSurfaceFormat::DefaultSwapBehavior); + retFormat.setSwapBehavior(format.doubleBuffer() ? QSurfaceFormat::DoubleBuffer : QSurfaceFormat::SingleBuffer); if (format.sampleBuffers()) retFormat.setSamples(format.samples() == -1 ? 4 : format.samples()); if (format.stencil()) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index ee932d1ab9..9a3e2a80ac 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE -extern QImage qt_gl_read_framebuffer(const QSize&, bool, bool); +extern QImage qt_gl_read_frame_buffer(const QSize&, bool, bool); #define QGL_FUNC_CONTEXT const QGLContext *ctx = QGLContext::currentContext(); #define QGL_FUNCP_CONTEXT const QGLContext *ctx = QGLContext::currentContext(); @@ -1081,7 +1081,7 @@ QImage QGLFramebufferObject::toImage() const if (!d->valid) return QImage(); - // qt_gl_read_framebuffer doesn't work on a multisample FBO + // qt_gl_read_frame_buffer doesn't work on a multisample FBO if (format().samples() != 0) { QGLFramebufferObject temp(size(), QGLFramebufferObjectFormat()); @@ -1094,7 +1094,7 @@ QImage QGLFramebufferObject::toImage() const bool wasBound = isBound(); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->bind(); - QImage image = qt_gl_read_framebuffer(d->size, format().internalTextureFormat() != GL_RGB, true); + QImage image = qt_gl_read_frame_buffer(d->size, format().internalTextureFormat() != GL_RGB, true); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->release(); diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 36b9e60937..e514e34552 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -108,7 +108,7 @@ QT_BEGIN_NAMESPACE -extern QImage qt_gl_read_framebuffer(const QSize&, bool, bool); +extern QImage qt_gl_read_frame_buffer(const QSize&, bool, bool); QGLContext* QGLPBufferGLPaintDevice::context() const @@ -391,7 +391,7 @@ QImage QGLPixelBuffer::toImage() const const_cast<QGLPixelBuffer *>(this)->makeCurrent(); if (d->fbo) d->fbo->bind(); - return qt_gl_read_framebuffer(d->req_size, d->format.alpha(), true); + return qt_gl_read_frame_buffer(d->req_size, d->format.alpha(), true); } /*! |