SDL2#: C# Bindings for SDL2

For the last couple of months, I’ve been developing C# bindings for SDL2
and its extensions (currently just Image, Mixer and TTF), which I have
decided to call SDL2#:

This is designed to be as pure of a port of the C API as possible, so
you can expect SDL2# code to read pretty similarly to SDL2 code in C/C++.

For OpenGL/OpenAL bindings, we currently take the bindings from OpenTK.
This was done to simplify the SDL2 port of MonoGame; in the future I
would like to rewrite these bindings to look more like the bindings
found in the LWJGL, both to improve the look and feel of those parts of
the library and to improve the licensing for SDL2# (while the original
parts of the library are under the zlib license, the OpenTK components
are still under the MIT license).

A good example project using SDL2# is MonoGame-SDL2, which you can find
here:

As for an example game, Capsized just shipped with MonoGame-SDL2 today
in Humble Indie Bundle 8!

SDL2# actually made MonoGame so portable that we can now compile an
MG-SDL2 game one time and have the resulting assemblies run on
Windows/Mac/Linux while still keeping everything compliant with the OS
it’s being run on (for instance, savedata on Linux follows the XDG spec
and OSX uses ‘~/Library/Application Data/’). Pretty neat stuff!

SDL2# is still technically in “Beta”, but if you’re a C# developer who
wants to use SDL2, I encourage you to give it a try. Bugs (as well as
roadmap items) can be found/reported on the GitHub issues page:

Let me know if you find a use for SDL2#!

Ethan Lee
@flibitijibibo
http://www.flibitijibibo.com/