#if defined(XCB_USE_EGL)
#include "QtPlatformSupport/private/qeglplatformcontext_p.h"
+#elif defined (XCB_USE_GLX)
+#include "qglxintegration.h"
#endif
QT_BEGIN_NAMESPACE
insert("connection",QXcbNativeInterface::Connection);
insert("screen",QXcbNativeInterface::Screen);
insert("eglcontext",QXcbNativeInterface::EglContext);
+ insert("glxcontext",QXcbNativeInterface::GLXContext);
}
};
case EglContext:
result = eglContextForContext(context);
break;
+ case GLXContext:
+ result = glxContextForContext(context);
+ break;
default:
break;
}
#endif
}
+void *QXcbNativeInterface::glxContextForContext(QOpenGLContext *context)
+{
+ Q_ASSERT(context);
+#if defined(XCB_USE_GLX)
+ QGLXContext *glxPlatformContext = static_cast<QGLXContext *>(context->handle());
+ return glxPlatformContext->glxContext();
+#else
+ Q_UNUSED(context);
+ return 0;
+#endif
+
+}
+
QT_END_NAMESPACE
Connection,
Screen,
GraphicsDevice,
- EglContext
+ EglContext,
+ GLXContext
};
QXcbNativeInterface();
void *screenForWindow(QWindow *window);
void *graphicsDeviceForWindow(QWindow *window);
static void *eglContextForContext(QOpenGLContext *context);
+ static void *glxContextForContext(QOpenGLContext *context);
private:
const QByteArray m_genericEventFilterType;