From ff9aa64c99bf04f7e45ee80c6c9fb4e0e69e9511 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 14 Jan 2013 15:33:24 +0000 Subject: Remove out-dated duplicate logic from qgl.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now use the updated logic for #including the correct GL headers already implemented in QtGui. This is needed to fix compilation of QtOpenGL on CentOS 5.8 and RHEL. Change-Id: Ifdedd13885566016073538f33aa6daf5902c3497 Reviewed-by: Andy Shaw Reviewed-by: Samuel Rødal --- src/opengl/qgl.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/opengl') diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 1d21b42cd5..e2d8bbba16 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -44,6 +44,7 @@ #ifndef QT_NO_OPENGL +#include #include #include #include @@ -54,33 +55,6 @@ QT_BEGIN_HEADER -#if defined(Q_OS_WIN) -# include -#endif - -#if defined(Q_OS_MAC) -# if !defined(Q_OS_IOS) -# include -# else -# if defined(QT_OPENGL_ES_2) -# include -# endif -# endif -#elif defined(QT_OPENGL_ES_2) -# include -# else -# include -# 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 -- cgit v1.2.3 From 06a6d1da589d68d72ef70bc0b19ab9ef39593164 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 17:20:33 +0100 Subject: substitute fixed version numbers in qdocconf files with variables Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion Reviewed-by: Joerg Bornemann --- src/opengl/doc/qtopengl.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/opengl') diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf index 131fdb8968..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.501 +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. -- cgit v1.2.3 From ef7c9b5b525c539d12d17f61b979c1c4e0751076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 5 Feb 2013 08:31:29 +0100 Subject: Fixed missing support for single buffered OpenGL on OS X. Task-number: QTBUG-28804 Change-Id: I426a9bbc08953d777f67a23b050570e9f7d442d7 Reviewed-by: Gunnar Sletta --- src/opengl/qgl_qpa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/opengl') 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()) -- cgit v1.2.3 From c927d6b9e161ee22822dbfb0654f5734c9101aa7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 Feb 2013 16:12:58 +0100 Subject: Rename function to fix symbol clash in static build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename qt_gl_read_framebuffer function to qt_gl_read_frame_buffer in Qt5OpenGL. This fixes an error when linking statically against both Qt5Gui and Qt5OpenGL: Qt5Guid.lib(qopenglframebufferobject.obj) : error LNK2005: "class QImage __cdecl qt_gl_read_framebuffer(class QSize const &,bool,bool)" (?qt_gl_read_framebuffer@@YA?AVQImage@@ABVQSize@@_N1@Z) already defined in Qt5OpenGLd.lib(qgl.obj) Creating library debug\composition.lib and object debug\composition.exp The function was duplicated in 6e28e844 . Change-Id: I9e3b78e0ec5b25264575d563538587b45cd93e86 Reviewed-by: Friedemann Kleint Reviewed-by: Samuel Rødal --- src/opengl/qgl.cpp | 4 ++-- src/opengl/qglframebufferobject.cpp | 6 +++--- src/opengl/qglpixelbuffer.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/opengl') diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 3cb738b9c8..6476e2b26c 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); @@ -4063,7 +4063,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/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(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(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(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); } /*! -- cgit v1.2.3