Fix GLX on non-linux X11 systems
Some parts of the GLX code is only enabled for Linux. This makes builds on other X11 supported platforms break when GLX is found. To fix this enable these parts of the code when Qt feature xcb-glx-plugin is enabled. xcb-glx-plugin has to be made public in order for QT_CONFIG(xcb_glx_plugin) to work correctly in these parts of the code. Change-Id: I6bf78b6a64787ed88c8e2fae40675244c9198c37 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
67c3f3f4ff
commit
7266bd459e
@ -874,7 +874,7 @@ qt_feature("xcb" PRIVATE
|
|||||||
AUTODETECT NOT APPLE
|
AUTODETECT NOT APPLE
|
||||||
CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11
|
CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11
|
||||||
)
|
)
|
||||||
qt_feature("xcb-glx-plugin" PRIVATE
|
qt_feature("xcb-glx-plugin" PUBLIC
|
||||||
LABEL "GLX Plugin"
|
LABEL "GLX Plugin"
|
||||||
CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
|
CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
|
||||||
EMIT_IF QT_FEATURE_xcb
|
EMIT_IF QT_FEATURE_xcb
|
||||||
|
@ -1371,7 +1371,7 @@
|
|||||||
"label": "GLX Plugin",
|
"label": "GLX Plugin",
|
||||||
"emitIf": "features.xcb",
|
"emitIf": "features.xcb",
|
||||||
"condition": "features.xcb-xlib && features.opengl && !features.opengles2",
|
"condition": "features.xcb-xlib && features.opengl && !features.opengles2",
|
||||||
"output": [ "privateFeature" ]
|
"output": [ "publicFeature" ]
|
||||||
},
|
},
|
||||||
"xcb-glx": {
|
"xcb-glx": {
|
||||||
"label": " XCB GLX",
|
"label": " XCB GLX",
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSOpenGLContext);
|
Q_FORWARD_DECLARE_OBJC_CLASS(NSOpenGLContext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if QT_CONFIG(xcb_glx_plugin)
|
||||||
struct __GLXcontextRec; typedef struct __GLXcontextRec *GLXContext;
|
struct __GLXcontextRec; typedef struct __GLXcontextRec *GLXContext;
|
||||||
#endif
|
#endif
|
||||||
#if QT_CONFIG(egl)
|
#if QT_CONFIG(egl)
|
||||||
@ -85,7 +85,7 @@ struct Q_GUI_EXPORT QWGLContext
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) || defined(Q_CLANG_QDOC)
|
#if QT_CONFIG(xcb_glx_plugin) || defined(Q_CLANG_QDOC)
|
||||||
struct Q_GUI_EXPORT QGLXContext
|
struct Q_GUI_EXPORT QGLXContext
|
||||||
{
|
{
|
||||||
QT_DECLARE_NATIVE_INTERFACE(QGLXContext)
|
QT_DECLARE_NATIVE_INTERFACE(QGLXContext)
|
||||||
|
@ -127,7 +127,7 @@ struct Q_GUI_EXPORT QWindowsGLIntegration
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if QT_CONFIG(xcb_glx_plugin)
|
||||||
struct Q_GUI_EXPORT QGLXIntegration
|
struct Q_GUI_EXPORT QGLXIntegration
|
||||||
{
|
{
|
||||||
QT_DECLARE_NATIVE_INTERFACE(QGLXIntegration)
|
QT_DECLARE_NATIVE_INTERFACE(QGLXIntegration)
|
||||||
|
@ -55,7 +55,7 @@ using namespace QNativeInterface::Private;
|
|||||||
|
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if QT_CONFIG(xcb_glx_plugin)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QNativeInterface::QGLXContext
|
\class QNativeInterface::QGLXContext
|
||||||
@ -110,7 +110,7 @@ QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBased
|
|||||||
return QGuiApplicationPrivate::platformIntegration()->call<
|
return QGuiApplicationPrivate::platformIntegration()->call<
|
||||||
&QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext);
|
&QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext);
|
||||||
}
|
}
|
||||||
#endif // defined(Q_OS_LINUX)
|
#endif // QT_CONFIG(xcb_glx_plugin)
|
||||||
|
|
||||||
#if QT_CONFIG(egl)
|
#if QT_CONFIG(egl)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user