Notices


Reply
Thread Tools
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#1
Does anyone have an idea how to properly build libSDL on Mer SDK? Mer naturally doesn't provide libglx, but uses libEGL. However by default, configuring libSDL (stable 1.2.15 in my case) produces this:

HTML Code:
checking for OpenGL (GLX) support... no
...
checking for Touchscreen library support... no
Is it normal, or it means that it won't use OpenGL? What is the right way to make it use libEGL instead of libglx?

And also, what about proper way of enabling touchscreen support?
 
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#2
UPDATE: It's a limitation of libSDL 1.2.

Just pulled the latest libSDL 2.0 snapshot - and it configured with detecting libEGL out of the box. It's not a stable version however. So I guess we'll have to wait?

Last edited by shmerl; 2013-06-05 at 14:57.
 

The Following User Says Thank You to shmerl For This Useful Post:
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#3
Anyway, my goal was to build scummvm which requires libSDL as a prerequisite. Did anyone succeed with that?
 

The Following User Says Thank You to shmerl For This Useful Post:
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#4
OK, scummvm got built against libSDL 1.2, and apparently one needs to disable OpenGL there explicitly. In theory it might use GLES, but scummvm doesn't work with libSDL 2.0 yet, and that's what is needed for using the GLES option.

I'll see how this works with Plasma Active (but that will have to wait until some bug fixes, since current devel image on Nexus 7 is in unusable condition and that's what I have now to test Mer builds on).
 

The Following User Says Thank You to shmerl For This Useful Post:
w00t's Avatar
Posts: 1,055 | Thanked: 4,106 times | Joined on Oct 2009 @ Norway
#5
Originally Posted by shmerl View Post
Is it normal, or it means that it won't use OpenGL? What is the right way to make it use libEGL instead of libglx
You probably found this out already, but GLX and EGL are two different things. If it doesn't have EGL support, then you're pretty much SOL - but it sounds like you already got this solved with a version upgrade.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 

The Following User Says Thank You to w00t For This Useful Post:
thp's Avatar
Posts: 1,389 | Thanked: 4,248 times | Joined on Sep 2007 @ Vienna, Austria
#6
Originally Posted by shmerl View Post
OK, scummvm got built against libSDL 1.2, and apparently one needs to disable OpenGL there explicitly. In theory it might use GLES, but scummvm doesn't work with libSDL 2.0 yet, and that's what is needed for using the GLES option.

I'll see how this works with Plasma Active (but that will have to wait until some bug fixes, since current devel image on Nexus 7 is in unusable condition and that's what I have now to test Mer builds on).
You should be able to repurpose the SDL 1.2 port to Harmattan (which includes patched-in OpenGL ES support, which adds OpenGL ES support (although the code might be SGX-specific): https://github.com/harmattan/harmattan-sdl

An example how this is used (use SDL_OPENGLES instead of SDL_OPENGL, etc..) can be found in the Brain Party Harmattan port: https://github.com/harmattan/brainpa...aster/main.cpp

Be sure to pick the right GLES version (1 or 2) using SDL_GL_SetAttribute() with SDL_GL_CONTEXT_MAJOR_VERSION.
 

The Following 3 Users Say Thank You to thp For This Useful Post:
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#7
I'll take a look, thanks. Why didn't OpenGL ES support make it into SDL 1.2 upstream?

Anyway, Scummvm developers said that it doesn't require OpenGL strictly speaking, since it mostly deals with 2D sprites and works decently without hardware acceleration.

Last edited by shmerl; 2013-06-05 at 14:56.
 
javispedro's Avatar
Posts: 2,330 | Thanked: 5,200 times | Joined on Jan 2009 @ Barcelona
#8
Because SDL 1.2 was EOL'd.

SDL 1.3 became SDL 2.0, which I will try to adapt to the Jolla device once it is my hands. Sadly, SDL 2.0's API compatibility with 1.2 was also broken, so it does not help SDL 1.2 programs.

As for the harmattan SDL, the 3D stuff should be quite generic, but the 2D acceleration (aka SDL_HWSURFACE) is both SGX, OMAP and "Maemo X11" specific. The reasoning is that I did not find another way to ensure v-sync in Harmattan without having to resort to a OpenGL surface which uses much more memory (and unlike Qt, etc. SDL 1.2 programs expect their "context" to be kept between focus changes, so dropping it at focus out was not an option).
I believe you should be able to remove the OMAP specific patches (pvr2d-*) without much conflict, but you'll lose 2D v-sync in the process.

Additionally, acelerometer, vibration, etc and all the other non-standard additions are also Harmattan specific, but these are less important. Namely, sensord for accelerometer, which is probably in Mer too, but Vibetonz for vibration, which probably is not in Mer.

Last edited by javispedro; 2013-06-05 at 15:07.
 

The Following 3 Users Say Thank You to javispedro For This Useful Post:
Posts: 1,291 | Thanked: 2,260 times | Joined on May 2011
#9
So you expect that each device will have to provide SDL (let's say we are talking about 2.0+) specifically tailored for it and there is no way to make an efficient generic libEGL variant that could be used by all derivatives based on the same Mer release?
 
javispedro's Avatar
Posts: 2,330 | Thanked: 5,200 times | Joined on Jan 2009 @ Barcelona
#10
Originally Posted by shmerl View Post
So you expect that each device will have to provide SDL (let's say we are talking about 2.0+) specifically tailored for it and there is no way to make an efficient generic libEGL variant that could be used by all derivatives based on the same Mer release?
Oh no, the SDL 2.0 world is much easier because they are already slightly more mobile-oriented. They dropped most of the old-style 2D acceleration, forcing OpenGL everywhere, and are much more EGL friendly (and more crap-mobile-OS *cough* android *cough* friendly by including events such as "EGL context lost").

Depending on how weird the window manager on Mer/Jolla currently is, you will still need to have a Mer/Jolla specific SDL, though. And accelerometer/vibrator need additional consideration. But otherwise nothing HW-specific in there.
 

The Following 2 Users Say Thank You to javispedro For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:27.