Qt embedded integration with OpenGL ES problem

Hi, All

We compiled Qt for OpenGL ES, And we modified the Qt source file
pvrqwswsegl.c, ‘cause we couldn’t compile successfully without these
changes, we couldn’t found any definition about
“WSEGL_CAP_WINDOWS_USE_MBX_SYNC” or “WSEGL_CAP_PIXMAPS_USE_MBX_SYNC”.

Original:

/* Capability information for the display */

/*static WSEGLCaps const wseglDisplayCaps[] = {

\{WSEGL\_CAP\_WINDOWS\_USE\_MBX\_SYNC, 1\},

\{WSEGL\_CAP\_PIXMAPS\_USE\_MBX\_SYNC, 1\},

\{WSEGL\_NO\_CAPS, 0\}

};*/

Now:

static WSEGLCaps const wseglDisplayCaps[] = {

\{WSEGL\_CAP\_WINDOWS\_USE\_HW\_SYNC, 1\},

\{WSEGL\_CAP\_PIXMAPS\_USE\_HW\_SYNC, 1\},

\{WSEGL\_NO\_CAPS, 0\}

};

We only found some definitions in “#include <wsegl.h>” like this, so
we changed above according below definitions:

typedef enum WSEGLCapsType_TAG

{

WSEGL_NO_CAPS = 0,

WSEGL_CAP_MIN_SWAP_INTERVAL = 1, /* System default value = 1 */

WSEGL_CAP_MAX_SWAP_INTERVAL = 2, /* System default value = 1 */

WSEGL_CAP_WINDOWS_USE_HW_SYNC = 3, /* System default value = 0 (FALSE) */

WSEGL_CAP_PIXMAPS_USE_HW_SYNC = 4, /* System default value = 0 (FALSE) */

} WSEGLCapsType;

The building is ok, when we tested hellogl_es example in Ot, we got
some troubles rendering image, with many different color flashing on
the widget, and twinkling very fast. Do you think that it’s the
problem what we have done to Qt sources?

If yes, how should the really structure be (I mean the “static
WSEGLCaps const wseglDisplayCaps[]” what I have mentioned above ) ?

If the original structure arguments are right, why it can’t found the
definition of WSEGL_CAP_PIXMAPS_USE_MBX_SYNC and
WSEGL_CAP_WINDOWS_USE_MBX_SYNC?

please give me some advices, and any help is highly appreciated.

Thanks

Best Regards

Favor Tang wrote:

we couldn’t found any definition about
“WSEGL_CAP_WINDOWS_USE_MBX_SYNC” or “WSEGL_CAP_PIXMAPS_USE_MBX_SYNC”.

MBX is older PowerVR architecture, beagleboard has SGX not MBX. From the missing definitions it looks like your Qt for OpenGL ES sources may be written with MBX chip in mind.

Frantisek

I could run OpenGL ES Example in QT embedded 4.5.1 following below procedure. Hopefully this will help some. I used qt-embedded-linux-opensource-src-4.5.1 and GFX SDK 3.00.00.08.

On host PC

(1) For below mentioned error replace MBX by HW - this is what is defined in new headers.

Fix in qt-embedded-linux-opensource-src-4.5.1/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c

WSEGL_CAP_WINDOWS_USE_HW_SYNC and WSEGL_CAP_PIXMAPS_USE_HW_SYNC instead.

(2) I had to comment following #if !defined in qt-embedded-linux-opensource-src-4.5.1/src/opengl/qglscreen_qws.h in order to build against the latest GFX SDK.

//#if !defined(EGL_VERSION_1_3) && !defined(QEGL_NATIVE_TYPES_DEFINED)
#undef EGLNativeWindowType
#undef EGLNativePixmapType
#undef EGLNativeDisplayType
typedef NativeWindowType EGLNativeWindowType;
typedef NativePixmapType EGLNativePixmapType;
typedef NativeDisplayType EGLNativeDisplayType;
#define QEGL_NATIVE_TYPES_DEFINED 1
//#endif

(3) Added following lines to qt-embedded-linux-opensource-src-4.5.1/mkspecs/qws/linux-arm-g++/qmake.conf

QMAKE_INCDIR_OPENGL = /home1/pratheesh/sdk/release/usr/include/GLES
#QMAKE_INCDIR_OPENGL = /home1/pratheesh/sdk/release/usr/include/GLES2
QMAKE_LIBDIR_OPENGL = /home1/pratheesh/sdk/release/usr/lib
QMAKE_LIBS_OPENGL_QT = -lEGL -lGLES_CM -lIMGegl -lsrv_um
#QMAKE_LIBS_OPENGL_QT = -lEGL -lGLESv2 -lIMGegl -lsrv_um

(4) While configuring I used below options - currently tried GLES1.1

./configure -embedded arm -little-endian -fast -D QT_QWS_CLIENTBLIT -depths 16,24,32 -xplatform qws/linux-arm-g++ -arch arm -no-xinerama -no-xkb -opengl es1 -plugin-gfx-powervr

-D QT_QWS_CLIENTBLIT is important as mentioned in src/plugins/gfxdrivers/powervr/README without this I was getting powervr: driver not found error.

On target

(5) Make sure that you have installed Graphics SDK and can run the demos. i.e load the SGX kernel modules from SDK before running QT.

(6) Create/modify /etc/powerver.ini as shown below

[default]
WindowSystem=libpvrQWSWSEGL.so

(7)cd /usr/local/Trolltech/QtEmbedded-4.5.1-arm/examples/opengl/hello
gl_es

./hellogl_es -qws -display powervr

This should do the trick. Alternatively use export QWS_DISPLAY="powervr" instead of -display powervr.

Regards,
Pratheesh

Some updates on this based on the feedback I got so far.

(1) Specifying -D QT_NO_QWS_CURSOR option while configuring is mandatory for the demo to work which was missing from the documentation below.

(2)Upcoming Graphics SDK release (Hopefully sometime in mid July) is needed for this to work. Sorry for the confusion - To be honest, I did not expect the deltas between .08 and next release candidate to affect this demo. I have tested this on beagleboard RevC1D with ES3.x silicon (SGX core version has been changed in ES3.x) and binaries built for ES3.x.

Next Graphics SDK release will be having 2 sets of binaries for ES2.x and ES3.x.
Regards,
Pratheesh

Hi Pratheesh / All,

I am using OMAP3530-OSK board with LSP linux-02.01.01.08 with
toolchian 2008q1.

I am trying to rebuild the Graphics SDK Kernel lodable modules with
2008q1 and w.r.t LSP linux-02.01.01.08.

I am getting the following warnings while building omaplfb.ko and
bc_example.ko -- "PVRGetBufferClassJTable" AND
"PVRGetDisplayClassJTable" are undefined respectively.

And when i try to insmod the .kos i am getting the following errors

1. insmod pvrsrvkm.ko
<3>pvrsrvkm: unknown relocation: 43
pvrsrvkm: unknown relocation: 43
insmod: cannot insert 'pvrsrvkm.ko': invalid module format

2. insmod pvrsrvkm.ko
<3>pvrsrvkm: unknown relocation: 43
pvrsrvkm: unknown relocation: 43
insmod: cannot insert 'pvrsrvkm.ko': invalid module format

3. insmod pvrsrvkm.ko
<3>pvrsrvkm: unknown relocation: 43
pvrsrvkm: unknown relocation: 43
insmod: cannot insert 'pvrsrvkm.ko': invalid module format

Please let me know if this Graphics SDK can be re-build w.r.t LSP
linux-02.01.01.08 and used?

Thank you,
santosh

HI All,

Good Day..!
Have any body tried to compile GTK on Beagle borad...?
Please yes please respond..

Thanks,
Arun

Arun,

yes, GTK+X runs on BB.

Thanks and Regards,
HarishKumar.V

Hi Harish,

Thanks for info…

Do you have Source customized / the binary… link details.

Thanks

Arun

Hi,

I have built the libraries from source.

i have used the toolchain ,

#arm-none-linux-gnueabi-gcc -v
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

the libraries and sample applications based on gtk+X, cannot be uploaded via mail. the size is large.

I see how to send this.

Thanks and Regards,
HarishKumar.V

Thanks for the info Harish.

Off course it should be of large size. May be possible to upload into beagleboard.org .

In the mean time is it possible for you to share the source code download links and the configuration patches

Regards,

Arun

Santosh,

Can you please try rebuilding the SGX modules using Makefile in GFX_Linux_KM folder and copy them to appropriate location in the target.

Regards,
Pratheesh

Hi Pratheesh,

Seems like you are very Good into it, lot of people finding difficulty
in installing linux building Qt for OpenGL ES etc (..including me :frowning:

It would be really very very helpful for many of us if you could post
a step by step write up which includes steps required to install linux
on BB, Build Qt for BB etc.

Or at the least post any existing link for this?

Best
Efan Harris

Where di you get the OpenGL library for ARM from? Can you please share
it with me?

Thanks,
Vink