Qt and OpenGL ES
-
Hmmm.
These are the includes; (you will need most of these..)
@
ael@ael-laptop:/tftp/nfsshare/rootfs/usr/include$ ls -ls EGL
total 44
12 -rwxr-xr-x 1 root root 10027 2010-10-21 14:22 eglext.h
4 -rwxr-xr-x 1 root root 1394 2010-10-21 14:22 eglfslext.h
16 -rwxr-xr-x 1 root root 13285 2010-10-21 14:22 egl.h
8 -rwxr-xr-x 1 root root 5175 2010-10-21 14:22 eglplatform.h
4 -rwxr-xr-x 1 root root 3958 2010-10-21 14:22 eglplatformX.h
ael@ael-laptop:/tftp/nfsshare/rootfs/usr/include$ ls -ls GLES
total 92
4 -rwxr-xr-x 1 root root 509 2010-10-21 14:22 egl.h
8 -rwxr-xr-x 1 root root 7925 2010-10-21 14:22 gl_extensions.h
40 -rwxr-xr-x 1 root root 37743 2010-10-21 14:22 glext.h
36 -rwxr-xr-x 1 root root 35151 2010-10-21 14:22 gl.h
4 -rwxr-xr-x 1 root root 1076 2010-10-21 14:22 glplatform.h
ael@ael-laptop:/tftp/nfsshare/rootfs/usr/include$ ls -ls GLES2
total 72
12 -rwxr-xr-x 1 root root 8298 2010-10-21 14:22 gl2amdext.h
24 -rwxr-xr-x 1 root root 22330 2010-10-21 14:22 gl2ext.h
32 -rwxr-xr-x 1 root root 32549 2010-10-21 14:22 gl2.h
4 -rwxr-xr-x 1 root root 1027 2010-10-21 14:22 gl2platform.h
ael@ael-laptop:/tftp/nfsshare/rootfs/usr/include$ ls -ls KHR
total 12
12 -rwxr-xr-x 1 root root 9832 2010-10-21 14:22 khrplatform.h@and these are the libraries;
@-rw-r--r-- 1 root root 13291114 2010-10-22 11:28 libgles20.so
-rwxr-xr-x 1 root root 713474 2010-10-21 14:22 libGLESv1_CM.so
-rwxr-xr-x 1 root root 13291114 2010-10-21 14:22 libGLESv2.so
-rwxr-xr-x 1 root root 261229 2010-10-21 14:54 libegl13.so
-rwxr-xr-x 1 root root 261229 2010-10-21 14:22 libEGL.so
-rwxr-xr-x 1 root root 97846 2010-10-21 14:22 libgsl.so@i had some problems with the naming of these libs, so you can see (according to the size) that some are duplicates.
OpenGL ES is maintained by "Khronos":http://www.khronos.org/opengles/
You may need to compile them for arm yourself, if you do not find these libraries pre compiled (for your architecture).What hardware do you intend this to be used on? Maybe the manufacturer have some information?
-
Hi.
Thank you very much .
I want to compile this to s3c-arm6410 board . I have cross-compiled qt embedded and picogl(one of the tinygl wrote by somebody) successfully, and run the examples on board .
So,I think it's ok to use this on the board. Maybe I should serch more infomations to make sure. -
Hi.
I have no idea about this . Whether I should get the headers one by one frome "Knronos ":http://www.khronos.org/registry/ and put them in packages then compile them or I just need to download a tar.gz which include all the headers and libs.And I have a puzzle . I can run the picogl(one of the opengl es) examples on the board already, why does the EGL must be included? Is EGL necessary ?
I brought you too many troubles .Thanks for your time .
-
I you find a tar.gz with all headers and libs included thats good. As the error msg say; EGL is required for OpenGL ES to manage contexts & surfaces.
Apart from that, i have no idea.
I can always send you the files i have here, which are compiled for ARM.I did some searching for EGL for linux, and found this package;
"libegl1-mesa-dev":http://packages.debian.org/experimental/libegl1-mesa-devSimiliar for GLES, GLES2.
"libgles1-mesa-dev":http://packages.debian.org/experimental/libgles1-mesa-dev
"libgles2-mesa-dev":http://packages.debian.org/experimental/libgles2-mesa-devThese contain both headers and libraries.
You probably need other packages as well, but these may possibly solve the problem at hand.- almagest
-
Thank you so much .
But I got this error now:
g++ -Wl,-O1 -o opengles1 opengles1.o -L/usr/lib -L/usr/lib/dri -lGLES_CM
/usr/bin/ld: cannot find -lGLES_CMI think there is something wrong with my qmake.conf. How can I solve it ?
-s
-
This means that you have to locate where libGLES_CM.so is at. (locate libGLES)
In my case, i just made a copy of the file with a slightly differing name.
In the libgles1-mesa-dev package, i see that there exist a file named;
/usr/lib/libGLESv1_CM.somake a copy of this file named libGLES_CM.so, then give it a go.
- almagest
-
Hi. almagest.
I am sorry to bother you again. But I am totally crashed . I have tried so many ways and always failed.
I don't know how to compile mesa with arm-linux-gcc the tool I used. And the sources from "gl1-mesa-dev":http://packages.debian.org/experimental/libegl1-mesa-dev was built by gcc can't be used with qt embedded. So, I must compile mesa with arm-linux-gcc , or any other way to compile
opengl es with qt embedded ? -
Hi.
Thanks for your help so much .
I have made some progress.
I cross compiled several libs for my platform included the libs you listed, but when I cross compile qt embedded with these libs , I got those errors:
/home/spidermanma/opengl-lib/lib/libEGL.so: undefined reference todlclose@@GLIBC_2.4' /home/spidermanma/opengl-lib/lib/libEGL.so: undefined reference to
dlopen@@GLIBC_2.4'
/home/spidermanma/opengl-lib/lib/libEGL.so: undefined reference todlerror@@GLIBC_2.4' /home/spidermanma/opengl-lib/lib/libEGL.so: undefined reference to
dlsym@@GLIBC_2.4'
collect2: ld returned 1 exit status
make: *** [egl4gles1] error 1
EGL (GLES/egl.h) disabledI'll be very glad to get any advice .
-s -
I really dont understand this, i was under the impression that you could download "[libegl1-mesa-dev]":http://packages.debian.org/experimental/armel/libegl1-mesa-dev for the arm system, and point qmake to the folders where you save those files.
Don't mix these files with the ones present in the /usr/include and /usr/lib directories though.
My guess would be that either the egl.h or libEGL.so is wrong in your situation.
You are certain that your crosscompiler is set up correctly? (since you state that you compile the libs yourself?)A.
-
Thank you so much sincerely ,you help me a lot.
The errors are still there, I was totally wrong . I had compiled mesa by gcc, not arm-linux-gcc, and it absolutely didn't work .
I had downloaded the libs you showed to me "here":http://packages.debian.org/experimental/armel/libegl1-mesa-dev before and had put them into /usr/lib already . So ,I think that the errors I posted are bugs of the libEGL.so .
Now , I have no idea about this. I am really crashed this time. I have compiled this evil qt more than two weeks.
You know ,I am a newbie. I think I must do more research about this(compile qt embedded and opengl) first , and then work on it .Hmmm....Thank you again, almagest.
-s
-
No fear. Im relatively new to this myself, but like you, i was a bit hasty at one point, and ended up reinstalling my whole os as a cleanup. Then proceeded to do every step with alot of caution.
Keep me/us/the world updated on how things are proceeding.
One of the main problems with qt and embedded technology, as far as i see it, is that people do not post their experiences on the web. Sure, some people are very good at it, but more info makes it easier for people like you and me.
Keep up the good work!
A. -
Hi.
I don't know what to say,you are really a good guider and kind heart friend.
You know what,you cheer me up. And fortunately, I have made a little progress:I have rebuilt mesa7.5 by arm-linux-g++ ,thought I haven't completely succeeded,
I got several libs ,such as libEGL.so, etc . So, I copied them and put into the package with other libs which I have download before from "here":http://packages.debian.org/experimental/armel/libegl1-mesa-dev . Then , I configure qt embedded with these libs like this:./configure -embedded arm -xplatform qws/linux-arm-g++ --prefix=/home/mx/qte/built -opengl es1 -nomake demos -no-libtiff -no-gif -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -no-dbus -no-cups -no-dbus -no-cups -no-qt3support -no-phonon -no-pch -no-openssl -no-nis -no-scripttools -no-script -no-javascript-jit -no-stl -qt-mouse-linuxtp -fast -little-endian -no-separate-debug-info -depths 8,16 -L/home/spidermanma/opengl-lib/lib -I/home/spidermanma/opengl-lib/include -v
But there is still a error :
/usr/local/arm/4.3.1-eabi-armv6/usr/bin-ccache/../lib/gcc/arm-samsung-linux-gnueabi/4.3.1/../../../../arm-samsung-linux-gnueabi/bin/ld: warning: libX11.so.6, needed by /home/spidermanma/opengl-lib/lib/libEGL.so, not found (try using -rpath or -rpath-link)
/home/spidermanma/opengl-lib/lib/libEGL.so: undefined reference to `XOpenDisplay'
collect2: ld returned 1 exit status
make: *** [egl4gles1] error 1
EGL (GLES/egl.h) disabledAs far as I know , XOpenDisplay is a important function. Why doesn't such a important function undefined in libEGL.so ? Do I miss some files ,or is there something wrong with my header egl.h ?
-
First of all, is it intended that you use X11 as a window manager on the device? I choose to not use it, since Qt would take care of all my needs in that sense. - Just a thought.
In any case, by looking at the output you printed;
... warning: libX11.so.6, needed by /home/spidermanma/opengl-lib/lib/libEGL.so, not found ...
probably implies that the library containing the XOpenDisplay (X11) needs the corresponding library libX11.so.6 to work properly. Look for the library, and make sure it is reachable by the compiler. -
Yes,you are right.I found X11 libs and put them into the right package . Eventually , I configure qt embedded successfully . It's a long time I have worked on it, this is a big step for me . Thanks to your help, I make it .
I will run command 'make' tomorrow , because there are some other libs(such as tslib, etc.) should be added into qt libs .
But , if X11 is not necessary as you mentioned , how can I remove it and configure it without errors ? Can I configure qt embedded without X11 ? -
Hi, almagest.
I have built qt with opengl es . But I got a error again, when I run opengl examples.
The error :libEGL debug: dlopen(/mnt/nfs/builtQte2/lib/egl/egl_glx.so)
libEGL warning: GLX: XOpenDisplay failed
libEGL debug: EGL user error 0x3001 (other) in eglInitializeQEglContext::defaultDisplay(): Cannot initialize EGL display: "Not initialized (0x3001)"
I compiled X11 before , since I didn't know that it is not necessary . But what can I use as a driver for libEGL without X11 ? What can I do with this error , if I use X11 ? I am so glad to get any idea from you.
-s
-
Thank you very much all the same . Maybe this is something special with my platform .
-s
-
Have you tried to run a opengles2 example that does not use qt?
Then you can prove that at least some parts are working as they should.I have an example written in c++ that i used to show a rotating triangle. Like you, i have problems running opengles2 within the qt environment.
-
Hi
I am sorry to reply so late , because of my classes and homework .I have run opengles examples on my platform and it's good . I have read a article "here":http://labs.qt.nokia.com/2010/08/05/hitching-qtembedded-to-a-framebuffer-opengl-es-2-abstraction/ . It seems that every kind of platform has its own EGL driver as QScreen management . Just like WSEGL for powervr . So , I think we have the same problem that we don't have the right EGL driver .
This is what I think . I don't know whether it is right or not . How can get the right driver or any other solution to me , if I am right ? What cause this error , if I am wrong ?
-s
-
Hi,
I got similar error as below,@QEgl::display(): Cannot initialize EGL display: "Not initialized (0x3001)"
QEglContext::chooseConfig(): Could not find a suitable EGL configuration
Requested: "type=es2 rgba=8,8,8,0 surface-type=window"
Available: @Have you solved your problem?