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

William Dyce wilbefast at gmail.com
Fri Jul 22 19:41:52 PDT 2011


Sorry, that's SDL 1.2, not 1.6 ;)

On 23 July 2011 12:41, William Dyce <wilbefast at gmail.com> wrote:

> Hi Manuel,
>
>
> 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.
>>
>
> No luck with the patch I'm afraid - in fact the app now instantly crashes
> rather than simply running without any graphics. No sound, I get the error
> *:
>
> *
>>
>> *"AudioPolicyManagerBase: Unknown stream type"*
>>
>
> That's on the HW: everything still works fine on the emulator. That said
> the aliens.c example doesn't use SDL_OPENGL, so I don't think adding
> SDL_GL_SetAttribute would do anything.
> Are there any complete apps using this code-base that I could try out? I
> really just want to get something, anything, to actually run on the hardware
> - then I can work from there. So far though even the simplest example
> available just vibrates and crashes.
>
> Well, I did manage to get OpenTyrian working the other day on the real
> device, but that uses Peyla's SDL1.6 port<http://www.anddev.org/sdl_port_for_android_sdk-ndk_16-t9218.html>rather than this one.
>
> William
>
>
> On 23 July 2011 03:52, Manuel Massing <m.massing at warped-space.de> wrote:
>
>> 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
>>
>>        android-project/src/org/libsdl/app/SDLActivity.java
>>
>> 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:
>>
>>        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
>>        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
>>
>> It would be great if someone could submit this patch.
>>
>> cheers,
>>
>>        Manuel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110723/cd9d05c4/attachment-0008.htm>


More information about the SDL mailing list