qtqtwayland

Why QtCompositor is failed to initialize EGL display?


Am trying to run QWaylandCompositor example code "qwindow-compositor" on Kaby Lake system and Sky Lake system. But It shows as

QtCompositor: Failed to initialize EGL display. Could not get EglDisplay for window.

What I need to do resolve this?


Solution

  • From the README

    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.

    The X Composite buffer integration should work on all modern X servers. It can be used with either EGL or GLX as the OpenGL backend. This must match the backend used by the xcb platform plugin. (Normally GLX is the default for Qt applications running on X11.) To use the X Composite buffer sharing with EGL, start the compositor as follows:

    QT_XCB_GL_INTEGRATION=xcb_egl QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=xcomposite-egl ./pure-qml
    

    Just exchange pure-qml with qwindow-compositor