[SDL] SDL Android: "Call to unimplemented OpenGL ES API"

Manuel Massing m.massing at warped-space.de
Fri Jul 22 10:52:35 PDT 2011

Hi William,

> Thanks for the reply Forest - where is the context specified, do you know?
> There are a lot of source files in the port - I'm guessing one of the Java
> glue files, right? I've used the SDK before but this is my first NDK
> project - guess I'm not going to avoid hacking around with things...

you will find the OpenGL ES context initialization code inside


but as you have noticed, it is fairly limited (it does not support OpenGL ES
2.0 correctly).

To support more general context intialization, I have used the
EGLConfigChooser from GLSurfaceView.java (which is part of the
offical android opengl framework so it should be well tested on actual
devices) - see the attached patch. 

Caveat: although easily remedied, the patch currently uses hardcoded values
for preferred rgb and depth-buffer bit depths (mirroring the default preferred
config in GLSurfaceView).

Select the EGL version using SDL_GL_SetAttribute, e.g. for OpenGL ES 2.0:


It would be great if someone could submit this patch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDL-GLESv2-android.diff
Type: text/x-patch
Size: 9133 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110722/f68fd8b6/attachment-0008.bin>

More information about the SDL mailing list