Hello There, Guest! Register
Enjoy our site and services? You may donate to help fund server and domain costs. Donate Here for special benefits. You have donated $

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
opengl ES, Qt
So far I only saw pure SDL with software rendering homebrew (doom, duke3d)

Anyone tried to build Qt application? Possibly with OpenGL ES integration? Or pure framebuffer EGL/openGL ES? Or with SDL GL integration?

Looks like the device has MALI 3d chip and games are written in Qt 4 and use accelerated 3d via QT.

I started with enabling Qt and mesa3d in buildroot and will try to build some Qt based example (preferably with 3d) and test it on the device but if anyone already tried and has some results then don't hesitate to reply.
So after building QT in buildroot including opengl mesa etc and transferring rootfs to LeapTV I noticed the Qt version on device is Qt embedded and all libraries have E in name but buildroot demos link to libs with missing E, so I made soft links like this
cd /usr/lib
ln -s libEGL.so libEGL.so.1
ln -s libQtCoreE.so.4 libQtCore.so.4
ln -s libQtNetworkE.so.4 libQtNetwork.so.4
ln -s libQtGuiE.so.4 libQtGui.so.4
ln -s libQtWebKitE.so.4 libQtWebKit.so.4
and now examples seems to link fine
LF/Bulk/ProgramFiles/THDS-0x00410035-000000 # ldd application
ldd: can't open cache '/etc/ld.so.cache'
libEGL.so.1 => /usr/lib/libEGL.so.1 (0xb6e12000)
libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0xb5a8c000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb51a3000)
libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xb5085000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb4d8d000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb4d71000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb4ca9000)
libm.so.0 => /lib/libm.so.0 (0xb4c95000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb4c84000)
libc.so.0 => /lib/libc.so.0 (0xb4c16000)
libdl.so.0 => /lib/libdl.so.0 (0xb4c0a000)
librt.so.0 => /lib/librt.so.0 (0xb4bfe000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb4b6f000)
libgstapp-0.10.so.0 => /usr/lib/libgstapp-0.10.so.0 (0xb4b5c000)
libgstinterfaces-0.10.so.0 => /usr/lib/libgstinterfaces-0.10.so.0 (0xb4b47000)
libgstpbutils-0.10.so.0 => /usr/lib/libgstpbutils-0.10.so.0 (0xb4b21000)
libgstvideo-0.10.so.0 => /usr/lib/libgstvideo-0.10.so.0 (0xb4b02000)
libgstbase-0.10.so.0 => /usr/lib/libgstbase-0.10.so.0 (0xb4aa8000)
libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0 (0xb49d3000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb4999000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb48b3000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb488d000)
libz.so.1 => /usr/lib/libz.so.1 (0xb4872000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb47f9000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb47ee000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb6f51000)
libffi.so.5 => /usr/lib/libffi.so.5 (0xb47e3000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb47d9000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb46c7000)
libintl.so.8 => /usr/lib/libintl.so.8 (0xb46b7000)
libiconv.so.2 => /usr/lib/libiconv.so.2 (0xb45d0000)
liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0 (0xb4564000)

Also in Duke3d i just replaced "application" executable with link to some Qt example but it simply hangs on Loading ... screen doing nothing. It does not crash, just hang so I need to kill its pid from telnet shell to get back to launcher. Tried few random demos/examples with same result. So sadly no success on first try :-)
Oh, it works somehow. Looks like there are more screens/framebuffers or something. When I run the appstore advertisement screen and then run any qt demo application from telnet it opens just fine on that screen. Same when launching anything and there is this green leapfrog logo with spinning stars, I see the Qt app opened there as well as on that controller disconnected screen. But the main launcher or the duke3d loading screen is probably different one so nothing seen there.


sadly when trying glesv2 hello I see this
/LF/Bulk/buildroot/usr/share/qt/examples/opengl # ./hellogl_es2/hellogl_es2
/LF/Bulk/buildroot/usr/share/qt/examples/opengl/hellogl_es2/hellogl_es2: can't resolve symbol '_ZN16QGLShaderProgramC1EP7QObject'
and other 3d demos either show blank screen or crash :-(
Yeah, I saw that the leapfrog stuff uses GLES and QT, but haven't had a play with that yet. Was going to try a quake or duke GL version, but just been busy with other stuff.

Glad you managed to get something working Smile
well done!

(01-14-2016, 03:02 AM)is0-mick Wrote: Yeah, I saw that the leapfrog stuff uses GLES and QT, but haven't had a play with that yet. Was going to try a quake or duke GL version, but just been busy with other stuff.

Glad you managed to get something working Smile
well done!


will try more, and btw - qt4-embedded-4.8.4-r51.3 is in the opensource archive too :-)

Also looks like there is MALI SDK freely available here http://malideveloper.arm.com/resources/s...for-linux/ but so far I failed to build it. it needs X11 even for arm target
Just noticed your post about the framebuffers.

Yes there's 3. I think fb0 is main, fb1 is overlay, and fb2 is the feed for the camera, but I also think you can change the order of them etc looking at the fbctrl command.

The fbctrl command lets you mess about with a few things, and gives a nice help screen.
Also drawrect-fb and drawtext-fb which I've used for debugging or for showing a message such as "loading".

I've tried a different approach: trying to get an OpenGL context with just EGL.   I'm still trying to decipher the whole stack though.

For sure the hardware speaks fbdev since we have /dev/fb* devices.  
There is a mali kernel module loaded, which hopefully is the fbdev fork and not the X fork cause there is no sign of X.
The EGL and GLES libs are copies of libMali.so, which is right.
It is not using directfb.

With a simple test program, I can get EGL to spit out some info:

EGL API version: 1.4

EGL vendor string: ARM
EGL version string: 1.4 Linux-r3p2-01rel0
EGL client APIs: OpenGL_ES
EGL extensions string:
    EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness

But then fails on:

Error: eglCreatePixmapSurface failed Error:0x00003009

I can get various similar errors by changing flags or trying eglCreateWindowSurface instead of pixmap.  All of which add up to "the buffer or window is bad".

I even tried patching and using SDL with some Mali support I found on the web, but it fails exactly the same way.

My next step is going to be using the exposed extensions to create a NativePixmapType via EGL_KHR_image_pixmap and feeding that to eglCreatePixmapSurface to see if it likes my buffers any better.  If anyone wants the source to play with just let me know and I'll paste it somewhere.

I didn't realize what a mess 3D on embedded Linux is before this adventure.

Forum Jump: