Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandbrcmeglintegration.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDBRCMEGLINTEGRATION_H
5#define QWAYLANDBRCMEGLINTEGRATION_H
6
7#include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h>
8#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
9#include <wayland-client-core.h>
10
11#include <EGL/egl.h>
12#include <EGL/eglext.h>
13
14#include <EGL/eglext_brcm.h>
15
16#include <QtCore/qglobal.h>
17
18struct qt_brcm;
19
20QT_BEGIN_NAMESPACE
21
22class QWindow;
23
24namespace QtWaylandClient {
25
26class QWaylandWindow;
27
29{
30public:
33
34 void initialize(QWaylandDisplay *waylandDisplay) override;
35
36 bool supportsThreadedOpenGL() const override { return true; }
37 bool supportsWindowDecoration() const override { return false; }
38
39 QWaylandWindow *createEglWindow(QWindow *window);
40 QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override;
41 QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay contextDisplay, QOpenGLContext *shareContext) const override;
42
43 EGLDisplay eglDisplay() const;
44
45 struct qt_brcm *waylandBrcm() const;
46
50
51 void *nativeResource(NativeResource resource) override;
52 void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override;
53
54private:
55 static void wlDisplayHandleGlobal(void *data, struct ::wl_registry *registry, uint32_t id, const QString &interface, uint32_t version);
56
57 struct wl_display *m_waylandDisplay = nullptr;
58 struct qt_brcm *m_waylandBrcm = nullptr;
59
60 EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
61
62 QWaylandDisplay *m_display = nullptr;
63};
64
65}
66
67QT_END_NAMESPACE
68
69#endif // QWAYLANDBRCMEGLINTEGRATION_H
PFNEGLCREATEGLOBALIMAGEBRCMPROC eglCreateGlobalImageBRCM
PFNEGLDESTROYGLOBALIMAGEBRCMPROC eglDestroyGlobalImageBRCM
void * nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override
QOpenGLContext * createOpenGLContext(EGLContext context, EGLDisplay contextDisplay, QOpenGLContext *shareContext) const override
void * nativeResource(NativeResource resource) override
QPlatformOpenGLContext * createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override
void initialize(QWaylandDisplay *waylandDisplay) override