https://github.com/0x0ade/sdl2droid-cs
An opera in three parts: SDL2 + SDL2-CS + Xamarin.Android
https://github.com/0x0ade/sdl2droid-cs
Last synced: about 2 months ago
JSON representation
An opera in three parts: SDL2 + SDL2-CS + Xamarin.Android
- Host: GitHub
- URL: https://github.com/0x0ade/sdl2droid-cs
- Owner: 0x0ade
- License: zlib
- Created: 2017-01-05T11:16:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-11T21:52:38.000Z (over 6 years ago)
- Last Synced: 2025-03-14T20:50:45.314Z (about 2 months ago)
- Language: Java
- Size: 938 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDL2Droid-CS
### An opera in three parts: SDL2 + SDL2-CS + Xamarin.Android
#### zlib-licensed
#### clone recursively
----#### TL;DR:
* Run `/SDL2Droid-CS-Native/buildnative.sh`
* Compile `/SDL2Droid-CS-Java/` into `/SDL2Droid-CS-JBindings/Jars/SDL2Droid-CS-Java.jar`
* Change `/SDL2Droid-CS/Bootstrap.cs`, `/SDL2Droid-CS/Resources/` and `/SDL2Droid-CS/MainActivity.cs`
* Compile SDL2Droid-CS using Xamarin.Android (f.e. via Xamarin for Visual Studio).#### /SDL2Droid-CS-Native/
*What:* SDL2 `Android.mk` makefile and "wrapper" code (SDL_main returning to C# managed land)
*Why:* Xamarin for Visual Studio has got some problems with compiling native libraries on its own.
*Compilation:* Run `buildnative.sh` (cygwin-compatible) from inside `/SDL2Droid-CS-Native/`. That's it.
#### /SDL2Droid-CS-Java/
*What:* Original SDL2 `SDLActivity.java` interoperating with native SDL2 code
*Why:* SDL2's native side is prepared for the JNI bindings in `SDLActivity.java` - let's just reuse them!
*Compilation:* In your favourite Java IDE, produce a compiled .jar artifact and place it into `/SDL2Droid-CS-JBindings/Jars/`
#### /SDL2Droid-CS/ and /SDL2Droid-CS-JBindings/
*What:* The Mono side of things: Main C# code and SDLActivity bindings.
*Why:* Why not?
*Compilation:*
* Load the solution in Visual Studio with the "Xamarin for Visual Studio" extension installed.
* Modify `/SDL2Droid-CS/Bootstrap.cs` for your main code, `/SDL2Droid-CS/Resources/` for any strings / icons / ... and `/SDL2Droid-CS/MainActivity.cs` for the launch config (f.e. orientation).
* Compile as you would any other Xamarin.Android project.