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