[SDL] Are there any working SDL Android examples?

Forest Hale havoc at ghdigital.com
Mon Jul 25 02:59:48 PDT 2011

I'm not at liberty to show my current work on this, but I can assure you it does work in SDL 1.3...

The Unimplemented OpenGL ES API notices *always* indicate you have the incorrect context version, which has to be fixed in SDLActivity.java .

Make sure the initEGL function in SDLActivity.java has this code where it calls CreateContext:
             int EGL_CONTEXT_CLIENT_VERSION=0x3098;
             int contextAttrs[] = new int[]
             EGL_CONTEXT_CLIENT_VERSION, majorVersion,
             EGLContext ctx = egl.eglCreateContext(dpy, config, EGL10.EGL_NO_CONTEXT, contextAttrs);
             if (ctx == EGL10.EGL_NO_CONTEXT) {
                 Log.e("SDL", "Couldn't create context");
                 return false;

The version I pulled from hg seems to pass null instead of contextAttrs (and does not have the contextAttrs array itself).

Another issue I have come across is lack of multitouch input, all touch events are being passed as mouse events not finger events, I'll be looking at this issue in the coming days.

On 07/25/2011 12:19 AM, William Dyce wrote:
> Hi again,
> Still no real success with either this port or Peyla's 1.2 branch. I'm considering switching to OpenGL instead, which will be a real pain, but if I can't trust the middle-ware there's very little I
> can do as an application programmer. No offence - I really like SDL but... well, it's just not working.
> Just to be sure though: are there actually any applications at all, with source, that use the port? That is, aside from the "Alien Shooter" example which won't display graphics on my hardware ("called
> unimplemented Open GL ES API"). If I could just get hold of one program that functions correctly I could figure out what's going wrong here.
> Has anybody succeeded in making this work on real hardware?
> William
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

More information about the SDL mailing list