2013-04-03 16:15:53 +00:00
|
|
|
This is SDL2#, a C# wrapper for SDL2.
|
|
|
|
|
2013-04-04 08:59:07 +00:00
|
|
|
Project Website: https://github.com/flibitijibibo/SDL2-CS
|
|
|
|
|
2013-04-03 16:15:53 +00:00
|
|
|
License
|
|
|
|
-------
|
|
|
|
SDL2 and SDL2# are released under the zlib license. See LICENSE for details.
|
|
|
|
|
2013-04-15 19:49:17 +00:00
|
|
|
SDL2# currently uses parts of OpenTK, which is released under the MIT license.
|
|
|
|
See opentk.LICENSE for details.
|
|
|
|
|
2013-04-03 16:15:53 +00:00
|
|
|
About SDL2
|
|
|
|
----------
|
|
|
|
For more information about SDL2, visit the SDL wiki:
|
|
|
|
|
|
|
|
http://wiki.libsdl.org/moin.fcg/FrontPage
|
|
|
|
|
|
|
|
About the C# Wrapper
|
|
|
|
--------------------
|
|
|
|
The C# wrapper was written to be used for MonoGame's desktop platforms. However,
|
2013-04-08 18:28:13 +00:00
|
|
|
this is written in a way that can be used for any general C# application.
|
2013-04-03 16:15:53 +00:00
|
|
|
|
2013-04-12 16:06:56 +00:00
|
|
|
The wrapper provides bindings for the following libraries:
|
2013-04-03 16:15:53 +00:00
|
|
|
- SDL2
|
|
|
|
- SDL2_image
|
|
|
|
- SDL2_mixer
|
|
|
|
- SDL2_ttf
|
|
|
|
|
2013-04-17 16:03:02 +00:00
|
|
|
We also provide bindings for OpenGL and OpenAL, taken from OpenTK.
|
2013-04-12 16:06:56 +00:00
|
|
|
|
2013-04-04 08:32:42 +00:00
|
|
|
Note that SDL2# will not provide every single SDL2 function. This is due to
|
|
|
|
limitations in the C# language that would cause major conflicts with the native
|
|
|
|
SDL2 library and its extensions.
|
|
|
|
|
2013-04-08 18:28:13 +00:00
|
|
|
SDL2# is a pure port of the C headers. The naming schemes for this library will
|
|
|
|
be exactly as they are done in the C library, with little-to-no concern for
|
|
|
|
"appropriate" C# style. The namespace indicates that this is SDL2, the class
|
|
|
|
names will indicate which library file the function/type/value exists in, and
|
|
|
|
everything else will be as close to the C version as technically possible.
|
|
|
|
|
2014-06-22 18:42:33 +00:00
|
|
|
Using MiniTK
|
|
|
|
------------
|
|
|
|
To use the OpenGL/OpenAL bindings, simply use them as you were with OpenTK,
|
|
|
|
but after calling SDL_GL_CreateContext, add the following lines:
|
|
|
|
|
|
|
|
OpenTK.Graphics.GraphicsContext.CurrentContext = yourContextIntPtr;
|
|
|
|
GL.LoadAll();
|
|
|
|
|
|
|
|
This will load the OpenTK entry points. It is strongly recommended that you
|
|
|
|
load your own entry points using SDL_GL_GetProcAddress and delegates, but
|
|
|
|
this has been provided for OpenTK compatibility.
|
|
|
|
|
2013-04-03 16:15:53 +00:00
|
|
|
Roadmap
|
|
|
|
-------
|
2013-04-04 08:59:55 +00:00
|
|
|
To see the current roadmap for SDL2#, visit the GitHub issues page:
|
2013-04-04 08:59:07 +00:00
|
|
|
|
|
|
|
https://github.com/flibitijibibo/SDL2-CS/issues
|