0

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?

Murphy
  • 3,827
  • 4
  • 21
  • 35
  • 1
    On what qt platform plugin are you running the compositor (i.e. inside X11 or another wayland compositor, or from a tty)? Also, what version of Qt do you have? – bobbaluba Feb 22 '18 at 13:32
  • Qt Playform am using is X11. and am using Qt Creator 4.4.1 Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit) – Sherlin N. G. Feb 23 '18 at 06:10
  • You're most likely getting this because you're running it within X11, please update your question so my answer below makes sense :) – bobbaluba Feb 23 '18 at 10:35

2 Answers2

1

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

bobbaluba
  • 3,584
  • 2
  • 31
  • 45
1

In my case following libraries were missing on my system

libgles2-mesa libgles2-mesa-dev