![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
romain
![]() |
![]() |
Hi all,
I experience somme difficulties to match the good driver and to have a working application. My application is based on SDL2 and works fine on my computer. I have compiled : - SDL 2.0.1 - SDL image 2.0.0 - SDL ttf 2.0.12 (and freetype 2.5.0.1 needed by SDL ttf) On the embedded platform called Utilite, I get this output from my software :
I found this command :
And now I have this error :
When compiling SDL2 I have choosen to configure with --disable-video-x11 to force the use of an accelerated driver. I don't remember the behaviour with a standard configure/make/make install; I check it now. |
||||||||||||||||||
|
![]() |
![]() |
![]() |
![]() |
romain
![]() |
![]() |
Can an admin correct the mistake "OpelGL ES2" in "GLES2" please ?
![]() |
||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
It may be that you found a bug, please fill one in Bugzilla and attach your config.log and SDL_config.h files. Thanks!
2013/11/7 romain
-- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Done. https://bugzilla.libsdl.org/show_bug.cgi?id=2226
Back to what brought me here, how can I choose the "driver" to use to render my software ? ![]() Thanks ![]() |
||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
neoaggelos
![]() |
![]() |
Use the hint SDL_HINT_RENDER_DRIVER
-- Aggelos Kolaitis On 11 Îοε 2013, at 6:29 μ.μ., "romain" wrote:
|
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Thanks neoaggelos.
I've added
SDL_SetHint() gives no error, but it didn't change the output of the 3 others :
If I use this command (the only one working, I tried x11 for example, but it's not recognized) :
When I compiled SDL I could see in the configure log :
And I was wondering : is EGL mandatory for GLES2 ? That could explain why the render driver cannot be used... |
||||||||||||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
Depends on the platform, but most likely yes. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Ok, this also explains why I couldn't compile the GLES2 mesa demos (es2gears, glmark2-es2)...
I tried to install some libs, and got errors :
This package "gpu-viv-bin-mx6q 3.0.35" is the current driver I'm using ? What should I do ? |
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
2013/11/12 romain
Looking at this: https://github.com/Freescale/meta-fsl-arm/tree/master/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q It seems that gpu-viv-bin-mx6q ought to provide everything you need. What do you get from: dpkg -S egl.h -- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Hum, yes it should...
|
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
Can you post your configure line and config.log ?
2013/11/12 romain
-- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
But I think the parameters have no effect because EGL and GLES2 are not detected :
|
||||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Hi all, the last post didn't reach the mailing list because of it's length. You can read it here : http://forums.libsdl.org/viewtopic.php?t=9713#40613
Configure call :
And the config.log in a nutshell :
|
||||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
It seems that some guys have successfully run (compiled?) es2_info on Utilite.
I tried to compile mesa demos (es2gears, es2_info, ...) on the Utilite but the configure cannot find neither EGL or GLES2... Those headers should be included in the Vivante drivers... How can I verify that ? |
||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
4 days later and still trying to find a solution.
I found that bug reported in 09/2013 related to the lack of OpenGL headers in the Vivante drivers : https://bugzilla.yoctoproject.org/show_bug.cgi?id=5098 Is EGL part of OpenGL ? And do I need EGL to have a working SDL and to run my OpenGL/GLES2 - based application ? Thanks ;-) Thanks to the Utilite team, here is the result of some commands :
![]() |
||||||||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
EGL is a system designed to support OpenGL (it's the middle man between the hardware and system specific implementations and the OpenGL API). Whether you need EGL or not depends on the platform you want to run on, but most likely, yes, you need it.
From your earlier messages, it seemed like the configure script couldn't find egl.pc, the package config specification for EGL. What's the full output of dpkg -S gpu-viv-bin-mx6q ? 2013/11/19 romain
-- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Here is the full output :
Apparently the Vivante GC2000 GPU supports both OpenGL and GLES2, so SDL should be able to handle both, isn't it ? I'm also playing with environment variables, but the manual isn't rich in what I should put in them (I tested with dummy/x11/opengl/software...) SDL_RENDER_DRIVER SDL_VIDEO_DRIVER |
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
I'm sorry, I pasted the wrong command :)
Try: dpkg-query -L gpu-viv-bin-mx6q 2013/11/19 romain
-- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
No problem
![]() Here it is :
|
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
It seems there's no egl.pc, so the problem comes down to a buggy package, but maybe you can work around it. Try sticking these files in /usr/lib/pkgconfig : https://github.com/Freescale/meta-fsl-arm/tree/master/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q
You may need to play around with your system to find the solution that works for you, it's not something that can be fixed from the SDL side. 2013/11/19 romain
-- Gabriel. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Thanks Gabriel. I tried that but it messed up the video and it ended with no display at reboot. I had to remove those files.
As you said, the problem is outside of SDL because even glxgears isn't working... I'll get in contact with Utilite team and see if they have a solution. Thanks ! |
||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Back from my contact with Utilite's team, I got an updated image to play with.
This image seems to implement an updated version of the driver from Vivante for the i.MX6 SoC, and trying to enable EGL support give the same result :
From what I understand, EGL isn't platform dependant, and doesn't seem related to the GPU driver. Any suggestions on what I can do is welcome ![]() |
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
gabomdq
![]() |
![]() |
2013/12/9 romain
It looks like you are still having conflicts between dev packages, I would try not installing libegl1-mesa-dev and seeing what happens. Or remove gpu-viv-ubt0 and install libegl1-mesa-dev, or force an overwrite, or extract manually to some other directory, you know the usual crazy stuff you go through when cross compiling :) But, any of this combinations should work given semi sane headers end up being installed along with a usable pkgconfig file...while there are differences between EGL platforms, I think that to cross compile SDL it should all work out fine if you just nail the number of bits the processor uses (32 vs 64), and maybe not even that is required :) -- Gabriel. |
||||||||||||
|
![]() |
SDL2 + OpelGL ES2 + Freescale i.MX6 | ![]() |
Jonas Kulla
Guest
![]() |
![]() |
2013/12/9 romain
No, the EGL _API_ is platform independent. The _implementation_ is very much platform dependent as it handles all the little differences behind your back for you. |
||||||||||||
|
![]() |
![]() |
romain
![]() |
![]() |
Thanks, I'll try to manually replace the files and force the package installation, but I agree with you gabomdq on the small chances of success...
I can direcly compile on the target, so I don't have to setup a cross compiling environment (for the moment). Thanks Jonas for those infos. I found that Mesa does provide EGL. I'm not really sure of what Mesa is : is it "simply" libraries, or drivers too ? Assuming the first case, I decided to follow this and to build EGL/Mesa (after all this seems to be all I need) : http://www.mesa3d.org/egl.html But unfortunatly the configure ends with this error :
I don't see why an intel package is required here as I'm on an ARM platform... But I couldn't find a workaround... Would you agree this could be a good lead ? |
||||||||||||
|