Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. XCB, EGL on X for Raspberry
Forum Updated to NodeBB v4.3 + New Features

XCB, EGL on X for Raspberry

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 2 Posters 8.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    noname123
    wrote on last edited by
    #1

    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

    CNC control - pv-automation.com

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leonardo
      wrote on last edited by
      #2

      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.

      N 1 Reply Last reply
      0
      • L Leonardo

        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.

        N Offline
        N Offline
        noname123
        wrote on last edited by
        #3

        @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.

        CNC control - pv-automation.com

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leonardo
          wrote on last edited by
          #4

          You can have it running on X. Just make sure you have all the required libraries when compiling Qt.

          http://doc.qt.io/qt-5/linux-requirements.html

          1 Reply Last reply
          0
          • N Offline
            N Offline
            noname123
            wrote on last edited by
            #5

            @Leonardo
            Just installed all packages listed in http://doc.qt.io/qt-5/linux-requirements.html

            I'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

            CNC control - pv-automation.com

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Leonardo
              wrote on last edited by
              #6

              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.

              N 1 Reply Last reply
              0
              • L Leonardo

                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.

                N Offline
                N Offline
                noname123
                wrote on last edited by
                #7

                @Leonardo
                Hi, I have -v already.
                Here is result regarding EGL on X

                EGL-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.

                CNC control - pv-automation.com

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Leonardo
                  wrote on last edited by Leonardo
                  #8

                  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. :-(

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    noname123
                    wrote on last edited by noname123
                    #9

                    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

                    CNC control - pv-automation.com

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved