2014-10-28 17:50 GMT+01:00 gsmolder <gsmol...@vub.ac.be>:
> Hi,
>
>
> I'm trying to use Qt Quick 2 on an ARM device (Odroid U3) so I have compiled
> Qt 5.3.2 on it. Unfortunately, when I run my application in X11 I get the
> following error :
> QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL
> are enabled
>
> Running glxgears shows a smooth animation so I guess GLX should be enabled
> on my system.
>
> Here is my configuration:
>
> ./configure -nomake examples -nomake tests -skip qtconnectivity -skip
> qtenginio -skip qtlocation -skip qtmultimedia -skip qtquick1 -skip qtsensors
> -skip qtserialport -skip qtsvg -skip qttools -skip qtwebkit -skip
> qtwebsockets -opengl es2
>
>
> OpenGL / OpenVG:
> EGL .................. yes
> OpenGL ............... yes (OpenGL ES 2.x)
> OpenVG ............... no
>
> QPA backends:
> DirectFB ............. no
> EGLFS ................ yes
> KMS .................. no
> LinuxFB .............. yes
> XCB .................. yes (system library)
> EGL on X ........... no
> GLX ................ yes
> 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 ................ no
> XShape ............. yes
> XSync .............. yes
> XVideo ............. yes
>
> Of course my application is unable to run so I'm desperately in search of a
> solution. Can someone help me in some way ?
>
>
> Thanks !
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
Your error comes from:
https://qt.gitorious.org/qt/qtbase/source/209a75f2d071e0977b6c0a8a2ce5d6eb0ff95b8c:src/plugins/platforms/xcb/qxcbintegration.cpp#L274
So neither XCB_USE_EGL nor XCB_USE_GLX is defined.
Even if configure detected glx it seems that it is not used when
opengles2 is used:
See
https://qt.gitorious.org/qt/qtbase/source/209a75f2d071e0977b6c0a8a2ce5d6eb0ff95b8c:src/plugins/platforms/xcb/xcb-plugin.pro#L85
The more interesting is why you don't have egl on X. In Tizen some old
OS snapshots have broken egl headers hence egl on x test doesn't pass.
I created simple patch for that, maybe you could use it(see
attachment).
Check the output of your configure tests(configure -verbose) and pay
attention on egl.
Hope it helps.
Cheers,
Tomasz
diff --git a/configure b/configure
index 74ff31e..f92d57a 100755
--- a/configure
+++ b/configure
@@ -607,6 +607,7 @@ CFG_OPENVG_SHIVA=auto
CFG_OPENVG_ON_OPENGL=auto
CFG_EGL=auto
CFG_EGL_X=auto
+CFG_FORCE_EGL_X=no
CFG_FONTCONFIG=auto
CFG_FREETYPE=auto
CFG_HARFBUZZ=qt
@@ -1490,6 +1491,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ force-eglx)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_FORCE_EGL_X=yes
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
pch)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PRECOMPILE="$VAL"
@@ -5213,7 +5221,7 @@ if [ "$CFG_EGL" != "no" ]; then
fi # detect EGL support
if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
CFG_EGL=yes
- if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
+ if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL || [ "$CFG_FORCE_EGL_X" == "yes" ]; then
CFG_EGL_X=yes
else
CFG_EGL_X=no
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest