diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h index 7281451924..0dace49a33 100644 --- a/examples/opengl/paintedwindow/paintedwindow.h +++ b/examples/opengl/paintedwindow/paintedwindow.h @@ -52,7 +52,7 @@ #include #include -#include +#include #include diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 933a8eae6d..1f950e27c0 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -258,7 +258,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl opengl/qopenglbuffer.cpp opengl/qopenglbuffer.h opengl/qopenglextensions_p.h opengl/qopenglextrafunctions.h - opengl/qopenglframebufferobject.cpp opengl/qopenglframebufferobject.h opengl/qopenglframebufferobject_p.h opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h opengl/qopenglshaderprogram.cpp opengl/qopenglshaderprogram.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 3e93b1ddea..5b812628ea 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -340,7 +340,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl opengl/qopenglbuffer.cpp opengl/qopenglbuffer.h opengl/qopenglextensions_p.h opengl/qopenglextrafunctions.h - opengl/qopenglframebufferobject.cpp opengl/qopenglframebufferobject.h opengl/qopenglframebufferobject_p.h opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h opengl/qopenglshaderprogram.cpp opengl/qopenglshaderprogram.h diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri index 8d91a9e4b2..00ac48fa75 100644 --- a/src/gui/opengl/opengl.pri +++ b/src/gui/opengl/opengl.pri @@ -8,8 +8,6 @@ qtConfig(opengl) { HEADERS += opengl/qopengl.h \ opengl/qopengl_p.h \ opengl/qopenglfunctions.h \ - opengl/qopenglframebufferobject.h \ - opengl/qopenglframebufferobject_p.h \ opengl/qopenglbuffer.h \ opengl/qopenglshaderprogram.h \ opengl/qopenglextensions_p.h \ @@ -21,7 +19,6 @@ qtConfig(opengl) { SOURCES += opengl/qopengl.cpp \ opengl/qopenglfunctions.cpp \ - opengl/qopenglframebufferobject.cpp \ opengl/qopenglbuffer.cpp \ opengl/qopenglshaderprogram.cpp \ opengl/qopenglversionfunctions.cpp \ diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index acad98a681..6fa346ff89 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -11,6 +11,7 @@ qt_add_module(OpenGL qopengldebug.cpp qopengldebug.h qopenglengineshadermanager.cpp qopenglengineshadermanager_p.h qopenglengineshadersource_p.h + qopenglframebufferobject.cpp qopenglframebufferobject.h qopenglframebufferobject_p.h qopenglgradientcache.cpp qopenglgradientcache_p.h qopenglpaintdevice.cpp qopenglpaintdevice.h qopenglpaintdevice_p.h qopenglpaintengine.cpp qopenglpaintengine_p.h diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 2a5d7edbee..f7224da13b 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -15,6 +15,8 @@ HEADERS += \ qopengldebug.h \ qopenglengineshadermanager_p.h \ qopenglengineshadersource_p.h \ + qopenglframebufferobject.h \ + qopenglframebufferobject_p.h \ qopenglgradientcache_p.h \ qopenglpaintdevice.h \ qopenglpaintdevice_p.h \ @@ -35,6 +37,7 @@ SOURCES += \ qopengl2pexvertexarray.cpp \ qopenglcustomshaderstage.cpp \ qopenglengineshadermanager.cpp \ + qopenglframebufferobject.cpp \ qopenglgradientcache.cpp \ qopenglpaintdevice.cpp \ qopenglpaintengine.cpp \ diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/opengl/qopenglframebufferobject.cpp similarity index 99% rename from src/gui/opengl/qopenglframebufferobject.cpp rename to src/opengl/qopenglframebufferobject.cpp index d7a6d32218..d39f5b5b75 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/opengl/qopenglframebufferobject.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -156,7 +156,7 @@ QT_BEGIN_NAMESPACE \class QOpenGLFramebufferObjectFormat \brief The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object. - \inmodule QtGui + \inmodule QtOpenGL \since 5.0 @@ -808,7 +808,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext \class QOpenGLFramebufferObject \brief The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer object. \since 5.0 - \inmodule QtGui + \inmodule QtOpenGL \ingroup painting-3D @@ -1405,7 +1405,7 @@ static QImage qt_gl_read_framebuffer(const QSize &size, GLenum internal_format, return QImage(); } -Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha) +Q_OPENGL_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha) { return qt_gl_read_framebuffer(size, alpha_format ? GL_RGBA : GL_RGB, include_alpha, true); } diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/opengl/qopenglframebufferobject.h similarity index 96% rename from src/gui/opengl/qopenglframebufferobject.h rename to src/opengl/qopenglframebufferobject.h index 161054d1bf..da3347eaec 100644 --- a/src/gui/opengl/qopenglframebufferobject.h +++ b/src/opengl/qopenglframebufferobject.h @@ -3,7 +3,7 @@ ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -40,9 +40,7 @@ #ifndef QOPENGLFRAMEBUFFEROBJECT_H #define QOPENGLFRAMEBUFFEROBJECT_H -#include - -#ifndef QT_NO_OPENGL +#include #include #include @@ -65,7 +63,7 @@ QT_BEGIN_NAMESPACE class QOpenGLFramebufferObjectPrivate; class QOpenGLFramebufferObjectFormat; -class Q_GUI_EXPORT QOpenGLFramebufferObject +class Q_OPENGL_EXPORT QOpenGLFramebufferObject { Q_DECLARE_PRIVATE(QOpenGLFramebufferObject) public: @@ -161,7 +159,7 @@ private: }; class QOpenGLFramebufferObjectFormatPrivate; -class Q_GUI_EXPORT QOpenGLFramebufferObjectFormat +class Q_OPENGL_EXPORT QOpenGLFramebufferObjectFormat { public: QOpenGLFramebufferObjectFormat(); @@ -195,6 +193,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_OPENGL - #endif // QOPENGLFRAMEBUFFEROBJECT_H diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/opengl/qopenglframebufferobject_p.h similarity index 97% rename from src/gui/opengl/qopenglframebufferobject_p.h rename to src/opengl/qopenglframebufferobject_p.h index 644bb6c59b..df87734a58 100644 --- a/src/gui/opengl/qopenglframebufferobject_p.h +++ b/src/opengl/qopenglframebufferobject_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -51,7 +51,6 @@ // We mean it. // -#include #include #include #include @@ -147,6 +146,7 @@ public: inline GLuint fbo() const { return fbo_guard ? fbo_guard->id() : 0; } }; +Q_OPENGL_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); QT_END_NAMESPACE diff --git a/src/opengl/qopenglwidget.cpp b/src/opengl/qopenglwidget.cpp index b334ba867b..cf22a5e2df 100644 --- a/src/opengl/qopenglwidget.cpp +++ b/src/opengl/qopenglwidget.cpp @@ -39,7 +39,6 @@ #include "qopenglwidget.h" #include -#include #include #include #include @@ -47,12 +46,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -930,8 +931,6 @@ void QOpenGLWidgetPrivate::invalidateFbo() } } -extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); - QImage QOpenGLWidgetPrivate::grabFramebuffer() { Q_Q(QOpenGLWidget); diff --git a/src/opengl/qopenglwindow.cpp b/src/opengl/qopenglwindow.cpp index 5da20dc559..f473d849cf 100644 --- a/src/opengl/qopenglwindow.cpp +++ b/src/opengl/qopenglwindow.cpp @@ -38,13 +38,15 @@ ****************************************************************************/ #include "qopenglwindow.h" -#include #include #include #include #include #include #include + +#include +#include #include #include @@ -508,8 +510,6 @@ GLuint QOpenGLWindow::defaultFramebufferObject() const return 0; } -extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); - /*! Returns a copy of the framebuffer. diff --git a/src/platformsupport/platformcompositor/qopenglcompositor.cpp b/src/platformsupport/platformcompositor/qopenglcompositor.cpp index 635bf0107f..abfaca3f9c 100644 --- a/src/platformsupport/platformcompositor/qopenglcompositor.cpp +++ b/src/platformsupport/platformcompositor/qopenglcompositor.cpp @@ -37,8 +37,8 @@ ** ****************************************************************************/ +#include #include -#include #include #include diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index cf839e1931..03508056f3 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -26,11 +26,11 @@ ** ****************************************************************************/ +#include #include #include #include #include -#include #include #include #include