ultraviolet icon indicating copy to clipboard operation
ultraviolet copied to clipboard

Update to SDL3

Open jayrulez opened this issue 1 year ago • 7 comments

https://github.com/libsdl-org/SDL/blob/main/docs/README-migration.md

jayrulez avatar Aug 13 '23 01:08 jayrulez

You can take look here for sdl3 bindings: https://github.com/amerkoleci/Alimer.Bindings.SDL

amerkoleci avatar Aug 13 '23 06:08 amerkoleci

You can take look here for sdl3 bindings: https://github.com/amerkoleci/Alimer.Bindings.SDL

Thanks!

I'll check it out.

Ultraviolet currently uses a patched build of SDL2 for Android. I'll either needs to drop the patch and modify UV to use stock SDL on Android, or create a similar patch.

https://github.com/UltravioletFramework/ultraviolet-sdl2/commit/53e4146d4555e0e607096151de3e01d37bc75ddb

jayrulez avatar Aug 13 '23 16:08 jayrulez

I'll also need bindings for the gesture detection functionality that was dropped in SDL3. Perhaps that could be implemented in C# instead of bindings. https://github.com/libsdl-org/SDL_gesture

jayrulez avatar Aug 13 '23 16:08 jayrulez

@tlgkccampbell Do you remember why you patched SDL instead of using the standard SDL main?

jayrulez avatar Aug 13 '23 20:08 jayrulez

@jayrulez The unpatched version expects SDL_main to live in a dynamically-linked native library, which isn't something Ultraviolet can accomodate. I needed some way to bootstrap into the .NET code, so I changed the Activity's initialization process to invoke a Java method that could be overridden using the Xamarin bindings instead. I don't know if there's a better way to do this in modern .NET/SDL.

tlgkccampbell avatar Aug 13 '23 20:08 tlgkccampbell

Thanks! I will look into this in the next week or so. It would be ideal if I could drop the patch, but the patch is very small so it's not a big deal if I have to keep it around.

jayrulez avatar Aug 13 '23 20:08 jayrulez

https://github.com/dotnet/Silk.NET looks like this project uses an unpatched version of SDL for Android. I'll check out how they do it there.

jayrulez avatar Aug 14 '23 06:08 jayrulez