summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <[email protected]>2019-12-11 14:50:40 +0100
committerJohan Klokkhammer Helsing <[email protected]>2020-01-22 09:40:59 +0100
commitf3ecda32e0f7bd21b44e7737d2939dcce2c26517 (patch)
treea9e51f4d507b3b0d92a742157e3c654999cde2fa
parent06bb315beb6c2c398223cfe52cbc7f66e14a8557 (diff)
Move QOpenGLPaintEngine and related classes from QtGui to QtOpenGL
Also moves the openglwindow test to the opengl folder, as it makes use of these classes. Task-number: QTBUG-74409 Change-Id: Id9f0013cedcc8bd1e87122c005641d7298525045 Reviewed-by: Laszlo Agocs <[email protected]>
-rw-r--r--examples/gui/gui.pro2
-rw-r--r--examples/opengl/opengl.pro1
-rw-r--r--examples/opengl/openglwindow/main.cpp (renamed from examples/gui/openglwindow/main.cpp)0
-rw-r--r--examples/opengl/openglwindow/openglwindow.cpp (renamed from examples/gui/openglwindow/openglwindow.cpp)0
-rw-r--r--examples/opengl/openglwindow/openglwindow.h (renamed from examples/gui/openglwindow/openglwindow.h)0
-rw-r--r--examples/opengl/openglwindow/openglwindow.pri (renamed from examples/gui/openglwindow/openglwindow.pri)1
-rw-r--r--examples/opengl/openglwindow/openglwindow.pro (renamed from examples/gui/openglwindow/openglwindow.pro)2
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.pro2
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.cpp2
-rw-r--r--examples/widgets/windowcontainer/windowcontainer.cpp2
-rw-r--r--examples/widgets/windowcontainer/windowcontainer.pro2
-rw-r--r--src/gui/opengl/opengl.pri21
-rw-r--r--src/opengl/opengl.pro21
-rw-r--r--src/opengl/qopengl2pexvertexarray.cpp (renamed from src/gui/opengl/qopengl2pexvertexarray.cpp)2
-rw-r--r--src/opengl/qopengl2pexvertexarray_p.h (renamed from src/gui/opengl/qopengl2pexvertexarray_p.h)3
-rw-r--r--src/opengl/qopenglcustomshaderstage.cpp (renamed from src/gui/opengl/qopenglcustomshaderstage.cpp)2
-rw-r--r--src/opengl/qopenglcustomshaderstage_p.h (renamed from src/gui/opengl/qopenglcustomshaderstage_p.h)6
-rw-r--r--src/opengl/qopenglengineshadermanager.cpp (renamed from src/gui/opengl/qopenglengineshadermanager.cpp)4
-rw-r--r--src/opengl/qopenglengineshadermanager_p.h (renamed from src/gui/opengl/qopenglengineshadermanager_p.h)7
-rw-r--r--src/opengl/qopenglengineshadersource_p.h (renamed from src/gui/opengl/qopenglengineshadersource_p.h)3
-rw-r--r--src/opengl/qopenglgradientcache.cpp (renamed from src/gui/opengl/qopenglgradientcache.cpp)4
-rw-r--r--src/opengl/qopenglgradientcache_p.h (renamed from src/gui/opengl/qopenglgradientcache_p.h)3
-rw-r--r--src/opengl/qopenglpaintdevice.cpp (renamed from src/gui/opengl/qopenglpaintdevice.cpp)4
-rw-r--r--src/opengl/qopenglpaintdevice.h (renamed from src/gui/opengl/qopenglpaintdevice.h)6
-rw-r--r--src/opengl/qopenglpaintdevice_p.h (renamed from src/gui/opengl/qopenglpaintdevice_p.h)5
-rw-r--r--src/opengl/qopenglpaintengine.cpp (renamed from src/gui/opengl/qopenglpaintengine.cpp)16
-rw-r--r--src/opengl/qopenglpaintengine_p.h (renamed from src/gui/opengl/qopenglpaintengine_p.h)5
-rw-r--r--src/opengl/qopenglshadercache_p.h (renamed from src/gui/opengl/qopenglshadercache_p.h)4
-rw-r--r--src/opengl/qopengltexturecache.cpp (renamed from src/gui/opengl/qopengltexturecache.cpp)4
-rw-r--r--src/opengl/qopengltexturecache_p.h (renamed from src/gui/opengl/qopengltexturecache_p.h)6
-rw-r--r--src/opengl/qopengltextureglyphcache.cpp (renamed from src/gui/opengl/qopengltextureglyphcache.cpp)6
-rw-r--r--src/opengl/qopengltextureglyphcache_p.h (renamed from src/gui/opengl/qopengltextureglyphcache_p.h)6
-rw-r--r--src/opengl/qopengltextureuploader.cpp (renamed from src/gui/opengl/qopengltextureuploader.cpp)2
-rw-r--r--src/opengl/qopengltextureuploader_p.h (renamed from src/gui/opengl/qopengltextureuploader_p.h)6
-rw-r--r--src/opengl/qopenglwidget.cpp6
-rw-r--r--src/opengl/qopenglwindow.cpp2
-rw-r--r--src/plugins/platforms/minimalegl/minimalegl.pro1
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp2
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp3
-rw-r--r--tests/auto/other/lancelot/lancelot.pro1
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro2
-rw-r--r--tests/benchmarks/gui/painting/lancebench/lancebench.pro2
43 files changed, 90 insertions, 91 deletions
diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro
index b8080c20751..275adc804d4 100644
--- a/examples/gui/gui.pro
+++ b/examples/gui/gui.pro
@@ -6,5 +6,3 @@ CONFIG += no_docs_target
SUBDIRS += analogclock
SUBDIRS += rasterwindow
-qtHaveModule(gui):qtConfig(opengl): \
- SUBDIRS += openglwindow
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index 89b3e1d86e0..74c39a1e27e 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -2,6 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = hellowindow \
paintedwindow \
+ openglwindow \
qopenglwindow
qtHaveModule(widgets) {
diff --git a/examples/gui/openglwindow/main.cpp b/examples/opengl/openglwindow/main.cpp
index 03a6ece06f9..03a6ece06f9 100644
--- a/examples/gui/openglwindow/main.cpp
+++ b/examples/opengl/openglwindow/main.cpp
diff --git a/examples/gui/openglwindow/openglwindow.cpp b/examples/opengl/openglwindow/openglwindow.cpp
index bac887dca00..bac887dca00 100644
--- a/examples/gui/openglwindow/openglwindow.cpp
+++ b/examples/opengl/openglwindow/openglwindow.cpp
diff --git a/examples/gui/openglwindow/openglwindow.h b/examples/opengl/openglwindow/openglwindow.h
index 8db943ddde3..8db943ddde3 100644
--- a/examples/gui/openglwindow/openglwindow.h
+++ b/examples/opengl/openglwindow/openglwindow.h
diff --git a/examples/gui/openglwindow/openglwindow.pri b/examples/opengl/openglwindow/openglwindow.pri
index 45b0b0cd299..30320df3b71 100644
--- a/examples/gui/openglwindow/openglwindow.pri
+++ b/examples/opengl/openglwindow/openglwindow.pri
@@ -1,3 +1,4 @@
+QT += opengl
INCLUDEPATH += $$PWD
SOURCES += $$PWD/openglwindow.cpp
HEADERS += $$PWD/openglwindow.h
diff --git a/examples/gui/openglwindow/openglwindow.pro b/examples/opengl/openglwindow/openglwindow.pro
index 93f18f3d3f8..8b1ae71c14f 100644
--- a/examples/gui/openglwindow/openglwindow.pro
+++ b/examples/opengl/openglwindow/openglwindow.pro
@@ -3,5 +3,5 @@ include(openglwindow.pri)
SOURCES += \
main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/gui/openglwindow
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/openglwindow
INSTALLS += target
diff --git a/examples/opengl/paintedwindow/paintedwindow.pro b/examples/opengl/paintedwindow/paintedwindow.pro
index 1846aa4049c..569eebe674c 100644
--- a/examples/opengl/paintedwindow/paintedwindow.pro
+++ b/examples/opengl/paintedwindow/paintedwindow.pro
@@ -1,3 +1,5 @@
+QT += opengl
+
HEADERS += paintedwindow.h
SOURCES += paintedwindow.cpp main.cpp
diff --git a/examples/widgets/painting/shared/arthurwidgets.cpp b/examples/widgets/painting/shared/arthurwidgets.cpp
index c7c851270bd..e24130e4640 100644
--- a/examples/widgets/painting/shared/arthurwidgets.cpp
+++ b/examples/widgets/painting/shared/arthurwidgets.cpp
@@ -62,8 +62,8 @@
#include <QRegularExpression>
#include <QOffscreenSurface>
#include <QOpenGLContext>
-#include <QOpenGLPaintDevice>
#if QT_CONFIG(opengl)
+#include <QtOpenGL/QOpenGLPaintDevice>
#include <QtOpenGL/QOpenGLWindow>
#endif
diff --git a/examples/widgets/windowcontainer/windowcontainer.cpp b/examples/widgets/windowcontainer/windowcontainer.cpp
index b920c854200..f7c146e2a93 100644
--- a/examples/widgets/windowcontainer/windowcontainer.cpp
+++ b/examples/widgets/windowcontainer/windowcontainer.cpp
@@ -60,7 +60,7 @@
#include <QWidget>
-// Making use of the class from the opengl example in gui.
+// Making use of the class from the openglwindow example
class Window : public OpenGLWindow
{
Q_OBJECT
diff --git a/examples/widgets/windowcontainer/windowcontainer.pro b/examples/widgets/windowcontainer/windowcontainer.pro
index 9ac7e4a5abf..664ac938a20 100644
--- a/examples/widgets/windowcontainer/windowcontainer.pro
+++ b/examples/widgets/windowcontainer/windowcontainer.pro
@@ -6,4 +6,4 @@ QT += widgets
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/windowcontainer
INSTALLS += target
-include(../../gui/openglwindow/openglwindow.pri)
+include(../../opengl/openglwindow/openglwindow.pri)
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index 26060ea5df3..d9f0e0d6cc7 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -10,20 +10,9 @@ qtConfig(opengl) {
opengl/qopenglfunctions.h \
opengl/qopenglframebufferobject.h \
opengl/qopenglframebufferobject_p.h \
- opengl/qopenglpaintdevice.h \
- opengl/qopenglpaintdevice_p.h \
opengl/qopenglbuffer.h \
opengl/qopenglshaderprogram.h \
opengl/qopenglextensions_p.h \
- opengl/qopenglgradientcache_p.h \
- opengl/qopengltexturecache_p.h \
- opengl/qopenglengineshadermanager_p.h \
- opengl/qopengl2pexvertexarray_p.h \
- opengl/qopenglpaintengine_p.h \
- opengl/qopenglengineshadersource_p.h \
- opengl/qopenglcustomshaderstage_p.h \
- opengl/qopengltextureglyphcache_p.h \
- opengl/qopenglshadercache_p.h \
opengl/qopenglversionfunctions.h \
opengl/qopenglversionfunctionsfactory_p.h \
opengl/qopenglvertexarrayobject.h \
@@ -31,7 +20,6 @@ qtConfig(opengl) {
opengl/qopengltexture.h \
opengl/qopengltexture_p.h \
opengl/qopengltexturehelper_p.h \
- opengl/qopengltextureuploader_p.h \
opengl/qopenglpixeltransferoptions.h \
opengl/qopenglextrafunctions.h \
opengl/qopenglprogrambinarycache_p.h
@@ -39,23 +27,14 @@ qtConfig(opengl) {
SOURCES += opengl/qopengl.cpp \
opengl/qopenglfunctions.cpp \
opengl/qopenglframebufferobject.cpp \
- opengl/qopenglpaintdevice.cpp \
opengl/qopenglbuffer.cpp \
opengl/qopenglshaderprogram.cpp \
- opengl/qopenglgradientcache.cpp \
- opengl/qopengltexturecache.cpp \
- opengl/qopenglengineshadermanager.cpp \
- opengl/qopengl2pexvertexarray.cpp \
- opengl/qopenglpaintengine.cpp \
- opengl/qopenglcustomshaderstage.cpp \
- opengl/qopengltextureglyphcache.cpp \
opengl/qopenglversionfunctions.cpp \
opengl/qopenglversionfunctionsfactory.cpp \
opengl/qopenglvertexarrayobject.cpp \
opengl/qopengltextureblitter.cpp \
opengl/qopengltexture.cpp \
opengl/qopengltexturehelper.cpp \
- opengl/qopengltextureuploader.cpp \
opengl/qopenglpixeltransferoptions.cpp \
opengl/qopenglprogrambinarycache.cpp
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index a726db2be96..6c2a9698209 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -10,11 +10,32 @@ qtConfig(opengl): CONFIG += opengl
qtConfig(opengles2): CONFIG += opengles2
HEADERS += \
+ qopengl2pexvertexarray_p.h \
+ qopenglcustomshaderstage_p.h \
qopengldebug.h \
+ qopenglengineshadermanager_p.h \
+ qopenglengineshadersource_p.h \
+ qopenglgradientcache_p.h \
+ qopenglpaintdevice.h \
+ qopenglpaintdevice_p.h \
+ qopenglpaintengine_p.h \
+ qopenglshadercache_p.h \
+ qopengltexturecache_p.h \
+ qopengltextureglyphcache_p.h \
+ qopengltextureuploader_p.h \
qopenglwindow.h \
qtopenglglobal.h
SOURCES += \
+ qopengl2pexvertexarray.cpp \
+ qopenglcustomshaderstage.cpp \
+ qopenglengineshadermanager.cpp \
+ qopenglgradientcache.cpp \
+ qopenglpaintdevice.cpp \
+ qopenglpaintengine.cpp \
+ qopengltexturecache.cpp \
+ qopengltextureglyphcache.cpp \
+ qopengltextureuploader.cpp \
qopenglwindow.cpp \
qopengldebug.cpp
diff --git a/src/gui/opengl/qopengl2pexvertexarray.cpp b/src/opengl/qopengl2pexvertexarray.cpp
index 04781f63c7f..df0fb764c91 100644
--- a/src/gui/opengl/qopengl2pexvertexarray.cpp
+++ b/src/opengl/qopengl2pexvertexarray.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
diff --git a/src/gui/opengl/qopengl2pexvertexarray_p.h b/src/opengl/qopengl2pexvertexarray_p.h
index 5dc060ff3d0..3ef26e908d8 100644
--- a/src/gui/opengl/qopengl2pexvertexarray_p.h
+++ b/src/opengl/qopengl2pexvertexarray_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 @@
#ifndef QOPENGL2PEXVERTEXARRAY_P_H
#define QOPENGL2PEXVERTEXARRAY_P_H
-#include <QtGui/private/qtguiglobal_p.h>
#include <QRectF>
#include <private/qdatabuffer_p.h>
diff --git a/src/gui/opengl/qopenglcustomshaderstage.cpp b/src/opengl/qopenglcustomshaderstage.cpp
index a95a0a57673..7a32b2fbc00 100644
--- a/src/gui/opengl/qopenglcustomshaderstage.cpp
+++ b/src/opengl/qopenglcustomshaderstage.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
diff --git a/src/gui/opengl/qopenglcustomshaderstage_p.h b/src/opengl/qopenglcustomshaderstage_p.h
index ce3e9efd237..255c115e3c3 100644
--- a/src/gui/opengl/qopenglcustomshaderstage_p.h
+++ b/src/opengl/qopenglcustomshaderstage_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,7 @@
// We mean it.
//
-#include <QtGui/private/qtguiglobal_p.h>
+#include <QtOpenGL/qtopenglglobal.h>
#include <QOpenGLShaderProgram>
QT_BEGIN_NAMESPACE
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
class QPainter;
class QOpenGLCustomShaderStagePrivate;
-class Q_GUI_EXPORT QOpenGLCustomShaderStage
+class Q_OPENGL_EXPORT QOpenGLCustomShaderStage
{
Q_DECLARE_PRIVATE(QOpenGLCustomShaderStage)
public:
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/opengl/qopenglengineshadermanager.cpp
index a569975486e..09bd9ff0962 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/opengl/qopenglengineshadermanager.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
@@ -40,7 +40,7 @@
#include "qopenglengineshadermanager_p.h"
#include "qopenglengineshadersource_p.h"
#include "qopenglpaintengine_p.h"
-#include "qopenglshadercache_p.h"
+#include <private/qopenglshadercache_p.h>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtCore/qthreadstorage.h>
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/opengl/qopenglengineshadermanager_p.h
index 14c79f5de36..71e62142789 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/opengl/qopenglengineshadermanager_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
@@ -220,7 +220,6 @@
#ifndef QOPENGLENGINE_SHADER_MANAGER_H
#define QOPENGLENGINE_SHADER_MANAGER_H
-#include <QtGui/private/qtguiglobal_p.h>
#include <QOpenGLShader>
#include <QOpenGLShaderProgram>
#include <QPainter>
@@ -255,7 +254,7 @@ static const GLuint QT_PMV_MATRIX_3_ATTR = 5;
class QOpenGLEngineShaderProg;
-class Q_GUI_EXPORT QOpenGLEngineSharedShaders
+class Q_OPENGL_EXPORT QOpenGLEngineSharedShaders
{
Q_GADGET
public:
@@ -406,7 +405,7 @@ public:
}
};
-class Q_GUI_EXPORT QOpenGLEngineShaderManager : public QObject
+class Q_OPENGL_EXPORT QOpenGLEngineShaderManager : public QObject
{
Q_OBJECT
public:
diff --git a/src/gui/opengl/qopenglengineshadersource_p.h b/src/opengl/qopenglengineshadersource_p.h
index 3ac599b6c23..49d17c8d79d 100644
--- a/src/gui/opengl/qopenglengineshadersource_p.h
+++ b/src/opengl/qopenglengineshadersource_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
@@ -52,7 +52,6 @@
#ifndef QOPENGL_ENGINE_SHADER_SOURCE_H
#define QOPENGL_ENGINE_SHADER_SOURCE_H
-#include <QtGui/private/qtguiglobal_p.h>
#include "qopenglengineshadermanager_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/gui/opengl/qopenglgradientcache.cpp b/src/opengl/qopenglgradientcache.cpp
index 3aa4c0d2e60..7a932a19bbc 100644
--- a/src/gui/opengl/qopenglgradientcache.cpp
+++ b/src/opengl/qopenglgradientcache.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
@@ -44,7 +44,7 @@
#include <QtCore/qmutex.h>
#include <QtCore/qrandom.h>
#include "qopenglfunctions.h"
-#include "qopenglextensions_p.h"
+#include <private/qopenglextensions_p.h>
#ifndef GL_RGBA16
#define GL_RGBA16 0x805B
diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/opengl/qopenglgradientcache_p.h
index 1d34223bdd7..da070ae2337 100644
--- a/src/gui/opengl/qopenglgradientcache_p.h
+++ b/src/opengl/qopenglgradientcache_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 <QtGui/private/qtguiglobal_p.h>
#include <QMultiHash>
#include <QObject>
#include <private/qopenglcontext_p.h>
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/opengl/qopenglpaintdevice.cpp
index 3920a10467d..811425cf692 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/opengl/qopenglpaintdevice.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
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLPaintDevice
\brief The QOpenGLPaintDevice class enables painting to an OpenGL context using QPainter.
\since 5.0
- \inmodule QtGui
+ \inmodule QtOpenGL
\ingroup painting-3D
diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/opengl/qopenglpaintdevice.h
index 54118f29262..f4e1ce4a2e5 100644
--- a/src/gui/opengl/qopenglpaintdevice.h
+++ b/src/opengl/qopenglpaintdevice.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,7 +40,7 @@
#ifndef QOPENGLPAINTDEVICE_H
#define QOPENGLPAINTDEVICE_H
-#include <QtGui/qtguiglobal.h>
+#include <QtOpenGL/qtopenglglobal.h>
#ifndef QT_NO_OPENGL
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLPaintDevicePrivate;
-class Q_GUI_EXPORT QOpenGLPaintDevice : public QPaintDevice
+class Q_OPENGL_EXPORT QOpenGLPaintDevice : public QPaintDevice
{
Q_DECLARE_PRIVATE(QOpenGLPaintDevice)
public:
diff --git a/src/gui/opengl/qopenglpaintdevice_p.h b/src/opengl/qopenglpaintdevice_p.h
index 3683ebebaca..f4f02e7b573 100644
--- a/src/gui/opengl/qopenglpaintdevice_p.h
+++ b/src/opengl/qopenglpaintdevice_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 <QtGui/private/qtguiglobal_p.h>
#include <qopenglpaintdevice.h>
QT_BEGIN_NAMESPACE
@@ -59,7 +58,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLContext;
class QPaintEngine;
-class Q_GUI_EXPORT QOpenGLPaintDevicePrivate
+class Q_OPENGL_EXPORT QOpenGLPaintDevicePrivate
{
public:
QOpenGLPaintDevicePrivate(const QSize &size);
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp
index b53c9a3eab0..4168067e8fa 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/opengl/qopenglpaintengine.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
@@ -62,8 +62,8 @@
// #define QT_OPENGL_CACHE_AS_VBOS
-#include "qopenglgradientcache_p.h"
-#include "qopengltexturecache_p.h"
+#include <private/qopenglgradientcache_p.h>
+#include <private/qopengltexturecache_p.h>
#include "qopenglpaintengine_p.h"
#include "qopenglpaintdevice_p.h"
@@ -81,9 +81,9 @@
#include <private/qstatictext_p.h>
#include <private/qtriangulator_p.h>
-#include "qopenglengineshadermanager_p.h"
-#include "qopengl2pexvertexarray_p.h"
-#include "qopengltextureglyphcache_p.h"
+#include <private/qopenglengineshadermanager_p.h>
+#include <private/qopengl2pexvertexarray_p.h>
+#include <private/qopengltextureglyphcache_p.h>
#include <QDebug>
@@ -110,7 +110,7 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
+Q_OPENGL_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
////////////////////////////////// Private Methods //////////////////////////////////////////
@@ -1348,7 +1348,7 @@ void QOpenGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
d->fill(path);
}
-Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
void QOpenGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/opengl/qopenglpaintengine_p.h
index 81f17572b2c..9dc92e38105 100644
--- a/src/gui/opengl/qopenglpaintengine_p.h
+++ b/src/opengl/qopenglpaintengine_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 <QtGui/private/qtguiglobal_p.h>
#include <QDebug>
#include <qopenglpaintdevice.h>
@@ -109,7 +108,7 @@ public:
QRect rectangleClip;
};
-class Q_GUI_EXPORT QOpenGL2PaintEngineEx : public QPaintEngineEx
+class Q_OPENGL_EXPORT QOpenGL2PaintEngineEx : public QPaintEngineEx
{
Q_DECLARE_PRIVATE(QOpenGL2PaintEngineEx)
public:
diff --git a/src/gui/opengl/qopenglshadercache_p.h b/src/opengl/qopenglshadercache_p.h
index 0f730602b0d..88efa342164 100644
--- a/src/gui/opengl/qopenglshadercache_p.h
+++ b/src/opengl/qopenglshadercache_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,7 @@
#ifndef QOPENGLSHADERCACHE_P_H
#define QOPENGLSHADERCACHE_P_H
-#include <QtGui/private/qtguiglobal_p.h>
+#include <QtOpenGL/qtopenglglobal.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/opengl/qopengltexturecache.cpp b/src/opengl/qopengltexturecache.cpp
index ef07dbe109a..5256c429e06 100644
--- a/src/gui/opengl/qopengltexturecache.cpp
+++ b/src/opengl/qopengltexturecache.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
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qopengltexturecache_p.h"
-#include "qopengltextureuploader_p.h"
+#include <private/qopengltextureuploader_p.h>
#include <qmath.h>
#include <qopenglfunctions.h>
#include <private/qimagepixmapcleanuphooks_p.h>
diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/opengl/qopengltexturecache_p.h
index 88ef06e744a..14e03ebea17 100644
--- a/src/gui/opengl/qopengltexturecache_p.h
+++ b/src/opengl/qopengltexturecache_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,7 @@
#ifndef QOPENGLTEXTURECACHE_P_H
#define QOPENGLTEXTURECACHE_P_H
-#include <QtGui/private/qtguiglobal_p.h>
+#include <QtOpenGL/qtopenglglobal.h>
#include <QHash>
#include <QObject>
#include <QCache>
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLCachedTexture;
-class Q_GUI_EXPORT QOpenGLTextureCache : public QOpenGLSharedResource
+class Q_OPENGL_EXPORT QOpenGLTextureCache : public QOpenGLSharedResource
{
public:
static QOpenGLTextureCache *cacheForContext(QOpenGLContext *context);
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/opengl/qopengltextureglyphcache.cpp
index 41027d26e05..66fd3a75077 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/opengl/qopengltextureglyphcache.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
@@ -38,9 +38,9 @@
****************************************************************************/
#include "qopengltextureglyphcache_p.h"
-#include "qopenglpaintengine_p.h"
+#include <private/qopenglpaintengine_p.h>
#include "private/qopenglengineshadersource_p.h"
-#include "qopenglextensions_p.h"
+#include <private/qopenglextensions_p.h>
#include <qrgb.h>
#include <private/qdrawhelper_p.h>
diff --git a/src/gui/opengl/qopengltextureglyphcache_p.h b/src/opengl/qopengltextureglyphcache_p.h
index 4bea4a463a7..15ecd6209bb 100644
--- a/src/gui/opengl/qopengltextureglyphcache_p.h
+++ b/src/opengl/qopengltextureglyphcache_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,7 @@
// We mean it.
//
-#include <QtGui/private/qtguiglobal_p.h>
+#include <QtOpenGL/qtopenglglobal.h>
#include <private/qtextureglyphcache_p.h>
#include <private/qopenglcontext_p.h>
#include <qopenglshaderprogram.h>
@@ -107,7 +107,7 @@ public:
int m_height;
};
-class Q_GUI_EXPORT QOpenGLTextureGlyphCache : public QImageTextureGlyphCache
+class Q_OPENGL_EXPORT QOpenGLTextureGlyphCache : public QImageTextureGlyphCache
{
public:
QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat glyphFormat, const QTransform &matrix, const QColor &color = QColor());
diff --git a/src/gui/opengl/qopengltextureuploader.cpp b/src/opengl/qopengltextureuploader.cpp
index 9e393bc47a5..469ddc56c17 100644
--- a/src/gui/opengl/qopengltextureuploader.cpp
+++ b/src/opengl/qopengltextureuploader.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2018 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
diff --git a/src/gui/opengl/qopengltextureuploader_p.h b/src/opengl/qopengltextureuploader_p.h
index 0dcf709d7e5..cea6d97658e 100644
--- a/src/gui/opengl/qopengltextureuploader_p.h
+++ b/src/opengl/qopengltextureuploader_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2018 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
@@ -52,14 +52,14 @@
#define QOPENGLTEXTUREUPLOADER_P_H
#include <QtCore/qsize.h>
-#include <QtGui/private/qtguiglobal_p.h>
+#include <QtOpenGL/qtopenglglobal.h>
#include <QtGui/private/qopenglcontext_p.h>
QT_BEGIN_NAMESPACE
class QImage;
-class Q_GUI_EXPORT QOpenGLTextureUploader
+class Q_OPENGL_EXPORT QOpenGLTextureUploader
{
public:
enum BindOption {
diff --git a/src/opengl/qopenglwidget.cpp b/src/opengl/qopenglwidget.cpp
index a6c63ae034e..91e9fd545d6 100644
--- a/src/opengl/qopenglwidget.cpp
+++ b/src/opengl/qopenglwidget.cpp
@@ -45,14 +45,16 @@
#include <QtGui/QWindow>
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
-#include <QtGui/QOpenGLPaintDevice>
#include <QtGui/qpa/qplatformwindow.h>
#include <QtGui/qpa/qplatformintegration.h>
+#include <QtOpenGL/QOpenGLPaintDevice>
+
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qopenglextensions_p.h>
#include <QtGui/private/qfont_p.h>
-#include <QtGui/private/qopenglpaintdevice_p.h>
#include <QtGui/private/qopenglcontext_p.h>
+#include <QtOpenGL/private/qopenglpaintdevice_p.h>
+
#include <QtWidgets/private/qwidget_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qopenglwindow.cpp b/src/opengl/qopenglwindow.cpp
index 8cdf134bfdd..9328d9b46a6 100644
--- a/src/opengl/qopenglwindow.cpp
+++ b/src/opengl/qopenglwindow.cpp
@@ -39,7 +39,6 @@
#include "qopenglwindow.h"
#include <QtGui/QOpenGLFramebufferObject>
-#include <QtGui/QOpenGLPaintDevice>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLTextureBlitter>
#include <QtGui/private/qpaintdevicewindow_p.h>
@@ -47,6 +46,7 @@
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QMatrix4x4>
#include <QtGui/QOffscreenSurface>
+#include <QtOpenGL/QOpenGLPaintDevice>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro
index b7dde9069f6..3f6ae4e2487 100644
--- a/src/plugins/platforms/minimalegl/minimalegl.pro
+++ b/src/plugins/platforms/minimalegl/minimalegl.pro
@@ -21,6 +21,7 @@ HEADERS = qminimaleglintegration.h \
qminimaleglscreen.h
qtConfig(opengl) {
+ QT += opengl
SOURCES += qminimaleglbackingstore.cpp
HEADERS += qminimaleglbackingstore.h
}
diff --git a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
index dc8dd74312c..2319762f31a 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
@@ -40,7 +40,7 @@
#include "qminimaleglbackingstore.h"
#include <QtGui/QOpenGLContext>
-#include <QtGui/QOpenGLPaintDevice>
+#include <QtOpenGL/QOpenGLPaintDevice>
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index 722c99ee0b3..604aa59d8a9 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qopengl
-QT += gui-private core-private testlib
+QT += opengl gui-private core-private testlib
SOURCES += tst_qopengl.cpp
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index ede1e58a53c..3b39c8c4740 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -26,14 +26,13 @@
**
****************************************************************************/
-
+#include <QtOpenGL/QOpenGLPaintDevice>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QOpenGLFramebufferObject>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLFunctions_4_2_Core>
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLBuffer>
-#include <QtGui/QOpenGLPaintDevice>
#include <QtGui/QOpenGLTexture>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
diff --git a/tests/auto/other/lancelot/lancelot.pro b/tests/auto/other/lancelot/lancelot.pro
index 6ece7315edd..5b9117983ab 100644
--- a/tests/auto/other/lancelot/lancelot.pro
+++ b/tests/auto/other/lancelot/lancelot.pro
@@ -1,6 +1,7 @@
CONFIG += testcase
TARGET = tst_lancelot
QT += testlib gui-private
+qtConfig(opengl): QT += opengl
SOURCES += tst_lancelot.cpp \
paintcommands.cpp
diff --git a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
index 039f5a71b8f..f78dc510bff 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
+++ b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
TARGET = tst_qopenglwidget
-QT += opengl gui-private core-private testlib widgets
+QT += opengl opengl-private gui-private core-private testlib widgets
SOURCES += tst_qopenglwidget.cpp
diff --git a/tests/benchmarks/gui/painting/lancebench/lancebench.pro b/tests/benchmarks/gui/painting/lancebench/lancebench.pro
index 6458c508613..5647d26de34 100644
--- a/tests/benchmarks/gui/painting/lancebench/lancebench.pro
+++ b/tests/benchmarks/gui/painting/lancebench/lancebench.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = tst_bench_lancebench
QT += testlib gui-private
-
+qtConfig(opengl): QT += opengl
SOURCES += tst_lancebench.cpp