XCB, EGL on X for Raspberry
-
Hi,
I have compiled Qt5.3.2 for Cubieboard (allwinner A20) with QPA backend options -
"XCB , EGL on X". My application (with some GL-widgets) works fine on it.Now I'm trying to get it working for Raspberry PI2.
I managed to compile Qt5.4.1 with "EGLFS", but "EGL on X" is "no".
So my application is closed on start with message -
"EGLFS: OpenGL windows cannot be mixed with others."Any advice is really appreciated.
Regards -
On EGLFS you're only allowed to have 1 window. Maybe you're trying to open another window or to show a message dialog. See:
http://doc.qt.io/qt-5/embedded-linux.html#eglfs
There are further restrictions for OpenGL-based windows. As of Qt 5.3, eglfs supports a single, fullscreen GL window (for example, an OpenGL-based QWindow, a QQuickView or a QGLWidget). Opening additional OpenGL windows or mixing such windows with QWidget-based content is not supported and will terminate the application with an error message.
-
@Leonardo Thank you for the link. Now I understand what happens, but don't know what is solution.
I have 2-3 GLWidgets and many QWidgets in my applicaton. I suppose I need "EGL on X" to get it working (as I have it on Cubieboard) ?
Is it possible to build Qt for Raspberry with this option ?
Will it work if I make top level widget a GLWidget instead of QMainWindow ?Anyway thanks for you help.
-
You can have it running on X. Just make sure you have all the required libraries when compiling Qt.
-
@Leonardo
Just installed all packages listed in http://doc.qt.io/qt-5/linux-requirements.htmlI've got after Qt configure almost everything, but not "EGL on X" unfortunately.
QPA backends:.
DirectFB ............. yes
EGLFS ................ yes
KMS .................. no
LinuxFB .............. no
XCB .................. yes (bundled copy)
EGL on X ........... no
GLX ................ no
MIT-SHM ............ yes
Xcb-Xlib ........... yes
Xcursor ............ yes (loaded at runtime)
Xfixes ............. yes (loaded at runtime)
Xi ................. no
Xi2 ................ yes
Xinerama ........... yes (loaded at runtime)
Xrandr ............. yes (loaded at runtime)
Xrender ............ yes
XKB ................ yes
XShape ............. yes
XSync .............. yes
XVideo ............. yes -
Hi. Add the -v parameter to your ./configure . Maybe that will give you some hint about what's missing. Then, please post the complete output here.
-
@Leonardo
Hi, I have -v already.
Here is result regarding EGL on XEGL-X11 auto-detection... ()
/opt/cb2/generic/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/opt/cb2/rootfs-pi2 -O2 -Wall -W -fPIE -I.
-I/opt/cb2/rootfs-pi2/opt/vc/include -I/opt/cb2/rootfs-pi2/opt/vc/include/interface/vcos/pthreads
-I/opt/cb2/rootfs-pi2/opt/vc/include/interface/vmcs_host/linux -I../../../mkspecs/devices/linux-rasp-pi-g++ -o egl-x11.o egl-x11.cpp
egl-x11.cpp: In function ‘int main(int, char**)’:
egl-x11.cpp:47:20: error: invalid conversion from ‘EGLNativeDisplayType {aka void*}’ to ‘Display* {aka _XDisplay*}’ [-fpermissive]
egl-x11.cpp:49:11: error: invalid conversion from ‘EGLNativeDisplayType {aka void*}’ to ‘Display* {aka _XDisplay*}’ [-fpermissive]
egl-x11.cpp:50:79: error: invalid conversion from ‘Window {aka long unsigned int}’ to ‘EGLNativeWindowType {aka void*}’ [-fpermissive]
egl-x11.cpp:51:26: error: invalid conversion from ‘EGLNativeWindowType {aka void*}’ to ‘Window {aka long unsigned int}’ [-fpermissive]
In file included from egl-x11.cpp:36:0:
/opt/cb2/rootfs-pi2/usr/include/X11/Xlib.h:2243:12: error: initializing argument 2 of ‘int XDestroyWindow(Display*, Window)’ [-fpermissive]
Makefile:263: recipe for target 'egl-x11.o' failed
gmake: *** [egl-x11.o] Error 1
EGL-X11 disabled. -
Hi. I don't have experience with Raspberry, so I don't know this error. I'm sorry. I also have a Cubieboard, and I could compile Qt 5.4.1 for it with no big problems. So in your case it must be something related specifically to Raspberry. Please, take a look here:
https://forum.qt.io/topic/36771/qt-5-2-raspberry-compile/7
If what they say is true still today, then I guess it will not be possible for you to have EGL on X. :-(
-
Actually I expected something like this.
I heard Raspberry Pi2 official support announced for Qt5.5, so still hope The Qt will include EGL on X support for Pi2.
Thanks for your support