Qt OpenGl context on raspberry pi -


i'm writing program qt5 opengl context. works on desktop (fedora 23). have run on pi 2. download qt5 every source code , compiled natively on pi. when tried compile , run program on pi throws following error:

qxcbintegration: cannot create platform opengl context, neither glx nor egl enabled 

in qt forums saw in raspberry pi xcb cant integrate egl in anyway. when configuring qt source codes egl on x option no. glx enabled. there anyway set qxcbintegration use glx on pi?

i trying fix xcb , egl integration. tried recompile egl-x11 test in config.tests/qpa directory of qtbase see errors. output was:

g++ -c -pipe -o2 -wall -w -fpic  -i. -isystem /usr/include/libdrm -i../../../mkspecs/linux-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 ‘eglnativedisplaytype {aka void*}’ ‘display* {aka _xdisplay*}’ [-fpermissive] egl-x11.cpp:49:11: error: invalid conversion ‘eglnativedisplaytype {aka void*}’ ‘display* {aka _xdisplay*}’ [-fpermissive] egl-x11.cpp:50:79: error: invalid conversion ‘window {aka long unsigned int}’ ‘eglnativewindowtype {aka void*}’ [-fpermissive] egl-x11.cpp:51:26: error: invalid conversion ‘eglnativewindowtype {aka void*}’ ‘window {aka long unsigned int}’ [-fpermissive] /usr/include/x11/xlib.h:2251:12: error:   initializing argument 2 of ‘int xdestroywindow(display*, window)’ [-fpermissive] makefile:530: recipe target 'egl-x11.o' failed make: *** [egl-x11.o] error 1 

is there way fix xcb , egl integration?

if neither egl nor glx integration possible on raspberry pi can run application on pi?

you'll need have raspberry pi 2. , you'll have recompile qt library it.

it'll run using qt eglfs platform integration uses egl. means 1 fullscreen qt application, no desktop environment.

haven't built library on raspberry, i've done cross-compile of qt library. requires raspberry sysroot configure qt against it:

./configure -opengl es2 -device linux-rasp-pi2-g++ -sysroot "$r" -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -make tools ... <lots of other options> 

if correct stuff installed in sysroot, detect , configure correctly.


Comments