Move qglxconvenience to QtOpenGL
Task-number: QTBUG-83255 Change-Id: I7640caf8afbae0a7310a264f333bb3a6cfa3c6ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
d6a724a9b2
commit
e3ce7c87e2
|
|
@ -98,6 +98,16 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_egl
|
|||
qopenglcompositor.cpp qopenglcompositor_p.h
|
||||
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(OpenGL CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
platform/unix/qglxconvenience.cpp platform/unix/qglxconvenience_p.h
|
||||
PUBLIC_LIBRARIES
|
||||
X11::X11
|
||||
)
|
||||
|
||||
|
||||
qt_create_tracepoints(OpenGL qtopengl.tracepoints)
|
||||
qt_add_docs(OpenGL
|
||||
doc/qtopengl.qdocconf
|
||||
)
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_egl
|
|||
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(OpenGL CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
platform/unix/qglxconvenience.cpp platform/unix/qglxconvenience_p.h
|
||||
PUBLIC_LIBRARIES
|
||||
X11::X11
|
||||
)
|
||||
|
||||
qt_create_tracepoints(OpenGL qtopengl.tracepoints)
|
||||
qt_add_docs(OpenGL
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ qtConfig(egl) {
|
|||
qopenglcompositor_p.h
|
||||
}
|
||||
|
||||
include(platform/platform.pri)
|
||||
|
||||
load(qt_module)
|
||||
|
||||
TRACEPOINT_PROVIDER = $$PWD/qtopengl.tracepoints
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \
|
||||
include(unix/unix.pri)
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
|
|
@ -39,21 +39,18 @@
|
|||
|
||||
// We have to include this before the X11 headers dragged in by
|
||||
// qglxconvenience_p.h.
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
|
||||
#include <QtCore/qmetatype.h>
|
||||
#include <QtCore/qtextstream.h>
|
||||
#include "qglxconvenience_p.h"
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
#include <QtCore/qvarlengtharray.h>
|
||||
|
||||
#include <GL/glxext.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(lcGlx, "qt.glx")
|
||||
|
||||
enum {
|
||||
XFocusOut = FocusOut,
|
||||
XFocusIn = FocusIn,
|
||||
|
|
@ -81,6 +78,10 @@ enum {
|
|||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(lcGlx, "qt.glx")
|
||||
|
||||
QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit, int flags)
|
||||
{
|
||||
QList<int> spec;
|
||||
|
|
@ -461,3 +462,5 @@ bool qglx_reduceFormat(QSurfaceFormat *format)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
|
|
@ -44,29 +44,50 @@
|
|||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QList>
|
||||
#include <QSurfaceFormat>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtGui/qsurfaceformat.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum QGlxFlags
|
||||
{
|
||||
QGLX_SUPPORTS_SRGB = 0x01
|
||||
};
|
||||
|
||||
QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
GLXFBConfig qglx_findConfig(Display *display, int screen, QSurfaceFormat format, bool highestPixelFormat = false, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
|
||||
void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display, GLXFBConfig config, int flags = 0);
|
||||
void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display, XVisualInfo *visualInfo, int flags = 0);
|
||||
bool qglx_reduceFormat(QSurfaceFormat *format);
|
||||
Q_OPENGL_EXPORT QList<int> qglx_buildSpec(const QSurfaceFormat &format,
|
||||
int drawableBit = GLX_WINDOW_BIT,
|
||||
int flags = 0);
|
||||
|
||||
Q_OPENGL_EXPORT XVisualInfo *qglx_findVisualInfo(Display *display, int screen,
|
||||
QSurfaceFormat *format,
|
||||
int drawableBit = GLX_WINDOW_BIT,
|
||||
int flags = 0);
|
||||
|
||||
Q_OPENGL_EXPORT GLXFBConfig qglx_findConfig(Display *display, int screen,
|
||||
QSurfaceFormat format,
|
||||
bool highestPixelFormat = false,
|
||||
int drawableBit = GLX_WINDOW_BIT,
|
||||
int flags = 0);
|
||||
|
||||
Q_OPENGL_EXPORT void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display,
|
||||
GLXFBConfig config, int flags = 0);
|
||||
|
||||
Q_OPENGL_EXPORT void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display,
|
||||
XVisualInfo *visualInfo, int flags = 0);
|
||||
|
||||
Q_OPENGL_EXPORT bool qglx_reduceFormat(QSurfaceFormat *format);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGLXCONVENIENCE_H
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
QMAKE_USE += xlib
|
||||
|
||||
HEADERS += \
|
||||
platform/unix/qglxconvenience_p.h
|
||||
|
||||
SOURCES += \
|
||||
platform/unix/qglxconvenience.cpp
|
||||
|
||||
QMAKE_USE += xlib
|
||||
|
|
@ -9,9 +9,6 @@ endif()
|
|||
if(QT_FEATURE_egl)
|
||||
add_subdirectory(eglconvenience)
|
||||
endif()
|
||||
if(QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2)
|
||||
add_subdirectory(glxconvenience)
|
||||
endif()
|
||||
if(QT_FEATURE_kms)
|
||||
add_subdirectory(kmsconvenience)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -13,9 +13,6 @@ endif()
|
|||
if(QT_FEATURE_egl)
|
||||
add_subdirectory(eglconvenience)
|
||||
endif()
|
||||
if(QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2)
|
||||
add_subdirectory(glxconvenience)
|
||||
endif()
|
||||
if(QT_FEATURE_kms)
|
||||
add_subdirectory(kmsconvenience)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
# Generated from glxconvenience.pro.
|
||||
|
||||
#####################################################################
|
||||
## GlxSupport Module:
|
||||
#####################################################################
|
||||
|
||||
qt_add_module(GlxSupport
|
||||
STATIC
|
||||
INTERNAL_MODULE
|
||||
SOURCES
|
||||
qglxconvenience.cpp qglxconvenience_p.h
|
||||
DEFINES
|
||||
QT_NO_CAST_FROM_ASCII
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
X11::X11
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:glxconvenience.pro:<TRUE>:
|
||||
# MODULE = "glx_support"
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# Generated from glxconvenience.pro.
|
||||
|
||||
qt_find_package(X11) # special case
|
||||
|
||||
#####################################################################
|
||||
## GlxSupport Module:
|
||||
#####################################################################
|
||||
|
||||
qt_add_module(GlxSupport
|
||||
STATIC
|
||||
INTERNAL_MODULE
|
||||
SOURCES
|
||||
qglxconvenience.cpp qglxconvenience_p.h
|
||||
DEFINES
|
||||
QT_NO_CAST_FROM_ASCII
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
X11::X11
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:glxconvenience.pro:<TRUE>:
|
||||
# MODULE = "glx_support"
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
TARGET = QtGlxSupport
|
||||
MODULE = glx_support
|
||||
|
||||
QT = core-private gui-private
|
||||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
|
||||
QMAKE_USE += xlib
|
||||
|
||||
HEADERS += qglxconvenience_p.h
|
||||
SOURCES += qglxconvenience.cpp
|
||||
|
||||
load(qt_module)
|
||||
|
|
@ -12,8 +12,6 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid)|qtConf
|
|||
|
||||
qtConfig(egl): \
|
||||
SUBDIRS += eglconvenience
|
||||
qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \
|
||||
SUBDIRS += glxconvenience
|
||||
qtConfig(kms): \
|
||||
SUBDIRS += kmsconvenience
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_
|
|||
SOURCES
|
||||
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::GlxSupportPrivate
|
||||
Qt::OpenGLPrivate
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_
|
|||
SOURCES
|
||||
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::GlxSupportPrivate
|
||||
Qt::OpenGLPrivate
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ OTHER_FILES += offscreen.json
|
|||
qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2) {
|
||||
SOURCES += qoffscreenintegration_x11.cpp
|
||||
HEADERS += qoffscreenintegration_x11.h
|
||||
QT += glx_support-private
|
||||
QT += opengl-private
|
||||
}
|
||||
|
||||
PLUGIN_TYPE = platforms
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <QtGlxSupport/private/qglxconvenience_p.h>
|
||||
#include <QtOpenGL/private/qglxconvenience_p.h>
|
||||
|
||||
#include <qpa/qplatformsurface.h>
|
||||
#include <qsurface.h>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ qt_internal_add_plugin(QXcbGlxIntegrationPlugin
|
|||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::GlxSupportPrivate
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
Qt::OpenGLPrivate
|
||||
Qt::XcbQpaPrivate
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
#include <QtGui/QOffscreenSurface>
|
||||
|
||||
#include "qglxintegration.h"
|
||||
#include <QtGlxSupport/private/qglxconvenience_p.h>
|
||||
#include <QtOpenGL/private/qglxconvenience_p.h>
|
||||
|
||||
#include "qxcbglintegration.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#include "qxcbglxwindow.h"
|
||||
|
||||
#include "qxcbscreen.h"
|
||||
#include <QtGlxSupport/private/qglxconvenience_p.h>
|
||||
#include <QtOpenGL/private/qglxconvenience_p.h>
|
||||
#include <QDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
TARGET = qxcb-glx-integration
|
||||
|
||||
include(../gl_integrations_plugin_base.pri)
|
||||
QT += glx_support-private
|
||||
QT += opengl-private
|
||||
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue