Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

[Announce] SDL w/ X11/EGL/GLES2 backend for Harmattan

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


syrjala at sci

Aug 7, 2012, 11:23 AM

Post #1 of 3 (380 views)
Permalink
[Announce] SDL w/ X11/EGL/GLES2 backend for Harmattan

Some time ago I started fiddling around with SDL. I didn't even want to
think about using the pvr2d stuff, so I decided to implement hardware
acceleration using EGL/GLES2.

I took some version of the harmattan SDL port, removed the pvr2d stuff,
and added the EGL/GLES2 stuff to the X11 video code. It's not very
cleanly added, and I'm sure there are various issues with window
re-creation and whatnot.

Features:
- EGL/GLES2 based, no pvr2d stuff
- Always uses a shadow buffer, because preserved flips aren't supported on
the platform.
- Automagically scales the application content to fullscreen using the GPU.
- Software access to hardware surfaces implemented with glFinish() and
EGL_KHR_lock_surface. I initially tried to use EGL_KHR_fence_sync instead
of glFinish() but there seemed to be some flushing bug left in the driver
causing problems. glFinish() should be OK on pvr, but on some other
hardware it could be a problem. So it's not the most portable solution.
- Supports color keyed and alpha blended blits. Only color keying has
actually been tested.
- some SDL tests, uqm and scummvm seem to work reasonably well

The code is here [1] in case anyone is interested. It was languishing on
my hard drive already for some time, and since I wasn't able to motivate
myself to work on it further, I decided to set if free as is. The git
history is a bit of a mess, but ATM I'm too lazy to clean it up.

[1] https://gitorious.org/harmattan-sdl/sdl

--
Ville Syrjälä
syrjala [at] sci
http://www.sci.fi/~syrjala/
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


marmistrz at linux

Aug 8, 2012, 4:02 AM

Post #2 of 3 (373 views)
Permalink
Re: [Announce] SDL w/ X11/EGL/GLES2 backend for Harmattan [In reply to]

Will this version be able to resize 854x480 apps from Harmattan to 800x480
Fremantle resolution?
--
Marcin



2012/8/7 Ville Syrjälä <syrjala [at] sci>

> Some time ago I started fiddling around with SDL. I didn't even want to
> think about using the pvr2d stuff, so I decided to implement hardware
> acceleration using EGL/GLES2.
>
> I took some version of the harmattan SDL port, removed the pvr2d stuff,
> and added the EGL/GLES2 stuff to the X11 video code. It's not very
> cleanly added, and I'm sure there are various issues with window
> re-creation and whatnot.
>
> Features:
> - EGL/GLES2 based, no pvr2d stuff
> - Always uses a shadow buffer, because preserved flips aren't supported on
> the platform.
> - Automagically scales the application content to fullscreen using the GPU.
> - Software access to hardware surfaces implemented with glFinish() and
> EGL_KHR_lock_surface. I initially tried to use EGL_KHR_fence_sync instead
> of glFinish() but there seemed to be some flushing bug left in the driver
> causing problems. glFinish() should be OK on pvr, but on some other
> hardware it could be a problem. So it's not the most portable solution.
> - Supports color keyed and alpha blended blits. Only color keying has
> actually been tested.
> - some SDL tests, uqm and scummvm seem to work reasonably well
>
> The code is here [1] in case anyone is interested. It was languishing on
> my hard drive already for some time, and since I wasn't able to motivate
> myself to work on it further, I decided to set if free as is. The git
> history is a bit of a mess, but ATM I'm too lazy to clean it up.
>
> [1] https://gitorious.org/harmattan-sdl/sdl
>
> --
> Ville Syrjälä
> syrjala [at] sci
> http://www.sci.fi/~syrjala/
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>


syrjala at sci

Aug 8, 2012, 5:16 AM

Post #3 of 3 (367 views)
Permalink
Re: [Announce] SDL w/ X11/EGL/GLES2 backend for Harmattan [In reply to]

On Wed, Aug 08, 2012 at 01:02:22PM +0200, Marcin Mielniczuk wrote:
> Will this version be able to resize 854x480 apps from Harmattan to 800x480
> Fremantle resolution?

In such a case w/ 858x480 SDL surface and 800x480 screen resolution, the
code would scale it to 800x(480*800/854). So it tries to preserve the
aspect ratio, but it does assume square pixels, so eg. some old 320x200
game port would have distorted aspect ratio.

But if you considering using this on Fremantle you can probably forget it,
since IIRC some of the required EGL/GLES2 features are missing.

> 2012/8/7 Ville Syrjälä <syrjala [at] sci>
>
> > Some time ago I started fiddling around with SDL. I didn't even want to
> > think about using the pvr2d stuff, so I decided to implement hardware
> > acceleration using EGL/GLES2.
> >
> > I took some version of the harmattan SDL port, removed the pvr2d stuff,
> > and added the EGL/GLES2 stuff to the X11 video code. It's not very
> > cleanly added, and I'm sure there are various issues with window
> > re-creation and whatnot.
> >
> > Features:
> > - EGL/GLES2 based, no pvr2d stuff
> > - Always uses a shadow buffer, because preserved flips aren't supported on
> > the platform.
> > - Automagically scales the application content to fullscreen using the GPU.
> > - Software access to hardware surfaces implemented with glFinish() and
> > EGL_KHR_lock_surface. I initially tried to use EGL_KHR_fence_sync instead
> > of glFinish() but there seemed to be some flushing bug left in the driver
> > causing problems. glFinish() should be OK on pvr, but on some other
> > hardware it could be a problem. So it's not the most portable solution.
> > - Supports color keyed and alpha blended blits. Only color keying has
> > actually been tested.
> > - some SDL tests, uqm and scummvm seem to work reasonably well
> >
> > The code is here [1] in case anyone is interested. It was languishing on
> > my hard drive already for some time, and since I wasn't able to motivate
> > myself to work on it further, I decided to set if free as is. The git
> > history is a bit of a mess, but ATM I'm too lazy to clean it up.
> >
> > [1] https://gitorious.org/harmattan-sdl/sdl
> >
> > --
> > Ville Syrjälä
> > syrjala [at] sci
> > http://www.sci.fi/~syrjala/
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers [at] maemo
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >

--
Ville Syrjälä
syrjala [at] sci
http://www.sci.fi/~syrjala/
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.