From 872af6811b2af366965f49280918d315a1f640ff Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 22 Jan 2020 16:33:23 +0100 Subject: [PATCH] Move QOpenGLBuffer from QtGui to QtOpenGL Task-number: QTBUG-74409 Change-Id: I72c839e54f24810b2bde2385c568921c4e4a2869 Reviewed-by: Laszlo Agocs --- src/gui/.prev_CMakeLists.txt | 1 - src/gui/CMakeLists.txt | 1 - src/gui/opengl/opengl.pri | 2 -- src/opengl/CMakeLists.txt | 1 + src/opengl/opengl.pro | 2 ++ src/{gui => }/opengl/qopenglbuffer.cpp | 4 ++-- src/{gui => }/opengl/qopenglbuffer.h | 6 +++--- src/opengl/qopengltextureblitter.cpp | 2 +- tests/auto/gui/qopengl/tst_qopengl.cpp | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) rename src/{gui => }/opengl/qopenglbuffer.cpp (99%) rename src/{gui => }/opengl/qopenglbuffer.h (97%) diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 1fea63419b8..1aed3d4f85c 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -255,7 +255,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl kernel/qopenglcontext.cpp kernel/qopenglcontext.h kernel/qopenglcontext_p.h kernel/qplatformopenglcontext.cpp kernel/qplatformopenglcontext.h opengl/qopengl.cpp opengl/qopengl.h opengl/qopengl_p.h - opengl/qopenglbuffer.cpp opengl/qopenglbuffer.h opengl/qopenglextensions_p.h opengl/qopenglextrafunctions.h opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 6a9951412c6..9f8adfa51e2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -337,7 +337,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl kernel/qopenglcontext.cpp kernel/qopenglcontext.h kernel/qopenglcontext_p.h kernel/qplatformopenglcontext.cpp kernel/qplatformopenglcontext.h opengl/qopengl.cpp opengl/qopengl.h opengl/qopengl_p.h - opengl/qopenglbuffer.cpp opengl/qopenglbuffer.h opengl/qopenglextensions_p.h opengl/qopenglextrafunctions.h opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri index 4962e57a629..3f971e222a9 100644 --- a/src/gui/opengl/opengl.pri +++ b/src/gui/opengl/opengl.pri @@ -8,7 +8,6 @@ qtConfig(opengl) { HEADERS += opengl/qopengl.h \ opengl/qopengl_p.h \ opengl/qopenglfunctions.h \ - opengl/qopenglbuffer.h \ opengl/qopenglextensions_p.h \ opengl/qopenglversionfunctions.h \ opengl/qopenglversionfunctionsfactory_p.h \ @@ -17,7 +16,6 @@ qtConfig(opengl) { SOURCES += opengl/qopengl.cpp \ opengl/qopenglfunctions.cpp \ - opengl/qopenglbuffer.cpp \ opengl/qopenglversionfunctions.cpp \ opengl/qopenglversionfunctionsfactory.cpp \ opengl/qopenglprogrambinarycache.cpp diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 6063ca58be2..18378a75641 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -7,6 +7,7 @@ qt_add_module(OpenGL SOURCES qopengl2pexvertexarray.cpp qopengl2pexvertexarray_p.h + qopenglbuffer.cpp qopenglbuffer.h qopenglcustomshaderstage.cpp qopenglcustomshaderstage_p.h qopengldebug.cpp qopengldebug.h qopenglengineshadermanager.cpp qopenglengineshadermanager_p.h diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index e2b27984c7f..bf4ba63053b 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -10,6 +10,7 @@ qtConfig(opengles2): CONFIG += opengles2 HEADERS += \ qopengl2pexvertexarray_p.h \ + qopenglbuffer.h \ qopenglcustomshaderstage_p.h \ qopengldebug.h \ qopenglengineshadermanager_p.h \ @@ -36,6 +37,7 @@ HEADERS += \ SOURCES += \ qopengl2pexvertexarray.cpp \ + qopenglbuffer.cpp \ qopenglcustomshaderstage.cpp \ qopenglengineshadermanager.cpp \ qopenglframebufferobject.cpp \ diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/opengl/qopenglbuffer.cpp similarity index 99% rename from src/gui/opengl/qopenglbuffer.cpp rename to src/opengl/qopenglbuffer.cpp index 5387cc06e3a..3f049e5e89c 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/opengl/qopenglbuffer.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 @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE \brief The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects. \since 5.0 \ingroup painting-3D - \inmodule QtGui + \inmodule QtOpenGL Buffer objects are created in the OpenGL server so that the client application can avoid uploading vertices, indices, diff --git a/src/gui/opengl/qopenglbuffer.h b/src/opengl/qopenglbuffer.h similarity index 97% rename from src/gui/opengl/qopenglbuffer.h rename to src/opengl/qopenglbuffer.h index a8107837314..8a099a0320f 100644 --- a/src/gui/opengl/qopenglbuffer.h +++ b/src/opengl/qopenglbuffer.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 QOPENGLBUFFER_H #define QOPENGLBUFFER_H -#include +#include #ifndef QT_NO_OPENGL @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE class QOpenGLBufferPrivate; -class Q_GUI_EXPORT QOpenGLBuffer +class Q_OPENGL_EXPORT QOpenGLBuffer { public: enum Type diff --git a/src/opengl/qopengltextureblitter.cpp b/src/opengl/qopengltextureblitter.cpp index c695ae626d6..b350e8e0e3b 100644 --- a/src/opengl/qopengltextureblitter.cpp +++ b/src/opengl/qopengltextureblitter.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 2ca844cf1b9..8dd8b95daf9 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -31,10 +31,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include