![]() |
[Mer] Building libSDL with libEGL and Mer SDK?
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 And also, what about proper way of enabling touchscreen support? |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
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? |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
Anyway, my goal was to build scummvm which requires libSDL as a prerequisite. Did anyone succeed with that?
|
Re: [Mer] Building libSDL with libEGL and Mer SDK?
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). |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
Quote:
|
Re: [Mer] Building libSDL with libEGL and Mer SDK?
Quote:
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. |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
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. |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
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. |
Re: [Mer] Building libSDL with libEGL and Mer SDK?
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?
|
Re: [Mer] Building libSDL with libEGL and Mer SDK?
Quote:
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. |
All times are GMT. The time now is 22:33. |
vBulletin® Version 3.8.8