SDL3-CS
3.2.12.4
See the version list below for details.
dotnet add package SDL3-CS --version 3.2.12.4
NuGet\Install-Package SDL3-CS -Version 3.2.12.4
<PackageReference Include="SDL3-CS" Version="3.2.12.4" />
<PackageVersion Include="SDL3-CS" Version="3.2.12.4" />
<PackageReference Include="SDL3-CS" />
paket add SDL3-CS --version 3.2.12.4
#r "nuget: SDL3-CS, 3.2.12.4"
#addin nuget:?package=SDL3-CS&version=3.2.12.4
#tool nuget:?package=SDL3-CS&version=3.2.12.4
🚀 About
This is SDL3#, a C# wrapper for SDL3.
📚 Documentation
For more information about SDL3, visit the SDL wiki.
📝 Installation
git clone https://github.com/edwardgushchin/SDL3-CS
cd SDL3-CS
dotnet build -c Release
or
dotnet add package SDL3-CS
Optional:
dotnet add package SDL3-CS.Native
dotnet add package SDL3-CS.Native.Image
dotnet add package SDL3-CS.Native.TTF
dotnet add package SDL3-CS.Native.Mixer
🎓 Examples
using SDL3;
namespace Create_Window;
internal static class Program
{
[STAThread]
private static void Main()
{
if (!SDL.Init(SDL.InitFlags.Video))
{
SDL.LogError(SDL.LogCategory.System, $"SDL could not initialize: {SDL.GetError()}");
return;
}
if (!SDL.CreateWindowAndRenderer("SDL3 Create Window", 800, 600, 0, out var window, out var renderer))
{
SDL.LogError(SDL.LogCategory.Application, $"Error creating window and rendering: {SDL.GetError()}");
return;
}
SDL.SetRenderDrawColor(renderer, 100, 149, 237, 0);
var loop = true;
while (loop)
{
while (SDL.PollEvent(out var e))
{
if ((SDL.EventType)e.Type == SDL.EventType.Quit)
{
loop = false;
}
}
SDL.RenderClear(renderer);
SDL.RenderPresent(renderer);
}
SDL.DestroyRenderer(renderer);
SDL.DestroyWindow(window);
SDL.Quit();
}
}
More examples can be found here.
✅ Readiness
Library | Stage |
---|---|
SDL3 | |
SDL_image | |
SDL_mixer | |
SDL_tff | |
SDL_shadercross |
🤝 Feedback and Contributions
Do you have an idea or found a bug? Please open an issue or start a discussion.
Please note we have a code of conduct, please follow it in all your interactions with the project.
If you have any feedback, please reach out to us at eduardgushchin@yandex.ru.
We also have a chat in Telegram, where I am ready to answer any of your questions.
💻 Authors
- Eduard Gushchin - Initial work - edwardgushchin
See also the list of contributors who participated in this project.
📃 License
SDL3 and SDL3# are released under the zlib license. See LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
3.2.16.7 | 0 | 7/10/2025 |
3.2.16.6 | 63 | 7/8/2025 |
3.2.16.5 | 51 | 7/8/2025 |
3.2.16.4 | 189 | 7/1/2025 |
3.2.16.3 | 234 | 6/20/2025 |
3.2.16.1 | 478 | 6/8/2025 |
3.2.16 | 162 | 6/7/2025 |
3.2.14.2 | 695 | 5/21/2025 |
3.2.14.1 | 180 | 5/19/2025 |
3.2.14 | 205 | 5/16/2025 |
3.2.12.4 | 235 | 5/14/2025 |
3.2.12.3 | 153 | 5/11/2025 |
3.2.12.2 | 123 | 5/9/2025 |
3.2.12.1 | 552 | 5/8/2025 |
3.2.12 | 157 | 5/8/2025 |
3.2.10 | 681 | 4/1/2025 |
3.2.8.3 | 284 | 3/12/2025 |
3.2.8.2 | 388 | 3/11/2025 |
3.2.8.1 | 245 | 3/7/2025 |
3.2.4.7 | 348 | 3/1/2025 |
3.2.4.6 | 463 | 2/18/2025 |
This is a stable bugfix release, with the following changes:
- Fixed crash if SDL_BlitSurfaceScaled() is used with a surface that has no pixels
- Removed timeout in SDL_RunOnMainThread()
- Allow rendering a zero sized source rectangle in the SDL render API
- Fixed texture colorspace when creating a texture from a surface with the SDL render API
- Renamed SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8 to SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER
- Allow a NULL shader entry point for SDL_GPUShaderCreateInfo, defaulting to the one used by SDL_shadercross
- Fixed failing to create a GPU device if the D3D12 debug layers aren't available on Windows
- Added support for the share button on the GameSir-K1 FLUX controller
- Added support for the PowerA Battle Dragon Advanced Wireless Controller
- Added support for the HORI Taiko No Tatsujin Drum Controller
- Fixed the Keychron K1 Pro System Control keyboard being detected as a joystick
- Fixed right mouse button emulation when using a Wacom tablet in Windows Ink mode
- Fixed missing simulated mouse events using a Wacom tablet when Windows Ink mode is disabled
- Fixed process I/O redirection to NUL on Windows
- Key events are now sent for dead keys on X11
- Improved handling of window management edge conditions on X11
- Fixed message box location on multi-monitor configurations on X11
- Fixed XInput2 mouse tracking outside the window on X11
- Fixed window focus after showing a file dialog on macOS
- Ignore mouse clicks and motion on tooltip windows on macOS
- Fixed message boxes shown on a background thread on iOS
- Fixed Android audio crackling introduced in 3.2.10
- Fixed handling of SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY
- Fixed A/B/X/Y buttons on Nintendo 3DS
- Fixed building for Xbox One