summaryrefslogtreecommitdiff
path: root/README
blob: 1c784c7f68e9dc856981b447a75c73898a7d9539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
This is the QtWayland module.

The QtWayland module consists of two parts:

Wayland platform plugin:
    Enables Qt applications to be run as Wayland clients.

QtWaylandCompositor API:
    Enables the creation of Wayland compositors using Qt and QtQuick.

To build the QtWayland module you need the external dependencies:
xkbcommon - http://xkbcommon.org/
wayland - http://wayland.freedesktop.org/

QtWaylandCompositor supports loading client buffer integrations that don't use
the wayland-egl interfaces. These client buffer integrations are picked up by
QtWaylandCompositor as plugins. To specify what plugin to load use the environment
variable QT_WAYLAND_CLIENT_BUFFER_INTEGRATION in the environment where the
compositor is started. The compositor will broadcast to the clients which
hardware integration to load when using the generic platformplugin "wayland". If
no client buffer integration is specified, then the wayland-egl plugin will be
loaded. Please note that no Weston clients will work if the non standard
wayland-egl client buffer integration is used.

Available client buffer integrations are:
wayland-egl (this is the default)
linux-dmabuf-unstable-v1
brcm

Testing a Qt-based compositor on X11:

Most QWidget-based applications will use shared memory buffers, which work on
all hardware. OpenGL and Qt Quick applications need a way to send graphics
memory buffers from client to server. There are many options, and not all
options work on all hardware.

Using wayland-egl requires support from the driver. Intel integrated graphics
are supported through the standard Mesa drivers. For NVidia, driver version
364.12 or newer is required, and Qt must be configured with "-opengl es2".
Run the compositor as follows:

QT_XCB_GL_INTEGRATION=xcb_egl QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=wayland-egl ./minimal-qml

Please note that some NVidia drivers may require early EGL initialization. Qt
clients normally use the buffer integration communicated by the compositor.
To set the client-side buffer integration manually, run clients with
"-platform wayland-egl".

Shell Integration:

Some platforms, especially non-desktop ones, use a custom Wayland shell
extension. These are tailored to the specific embedded form factor better than
the generic wl_shell or xdg_shell extensions that target desktop systems.
Custom shell protocols are added through shell integration plugins.

Which shell integration to use is determined by the QT_WAYLAND_SHELL_INTEGRATION
environment variable. If no shell is specified, the default is to try shells in
the following order: xdg-shell, xdg-shell-v6, wl-shell and then ivi-shell.

Example Usage:

Starting the hellowindow example application (one of the examples for qtbase)
with ivi-shell integration:

    QT_WAYLAND_SHELL_INTEGRATION=ivi-shell ./hellowindow -platform wayland

Available Shell Integrations:

    * ivi-shell
    * wl-shell (deprecated)
    * xdg-shell
    * fullscreen-shell-v1