SDL3-CS
3.4.10.2
See the version list below for details.
dotnet add package SDL3-CS --version 3.4.10.2
NuGet\Install-Package SDL3-CS -Version 3.4.10.2
<PackageReference Include="SDL3-CS" Version="3.4.10.2" />
<PackageVersion Include="SDL3-CS" Version="3.4.10.2" />
<PackageReference Include="SDL3-CS" />
paket add SDL3-CS --version 3.4.10.2
#r "nuget: SDL3-CS, 3.4.10.2"
#:package SDL3-CS@3.4.10.2
#addin nuget:?package=SDL3-CS&version=3.4.10.2
#tool nuget:?package=SDL3-CS&version=3.4.10.2
About
SDL3-CS is a C# wrapper for SDL3. The managed SDL3-CS package contains the C# wrapper, while native binaries are published as platform-specific package families.
Latest Release
Current stable release: SDL3-CS 3.4.10.2.
| Package family | Version |
|---|---|
SDL3-CS |
3.4.10.2 |
SDL3-CS.<Platform> |
3.4.10.2 |
SDL3-CS.<Platform>.Image |
3.4.4.2 |
SDL3-CS.<Platform>.Mixer |
3.2.4.2 |
SDL3-CS.<Platform>.TTF |
3.2.2.2 |
SDL3-CS.<Platform>.Shadercross |
3.0.0.2 |
Documentation
Supported Platforms
The managed wrapper targets .NET 7, .NET 8, .NET 9, and .NET 10.
| Platform family | Native package suffix | Supported RIDs / ABIs | Notes |
|---|---|---|---|
| Windows | Windows |
win-x86, win-x64, win-arm64 |
Dynamic SDL libraries for desktop Windows apps. |
| Linux | Linux |
linux-x64, linux-arm64 |
Built against glibc 2.28 or newer. |
| macOS | MacOS |
osx-x64, osx-arm64 |
Dynamic SDL libraries for Intel and Apple Silicon macOS apps. |
| Android | Android |
android-arm, android-arm64, android-x86, android-x64 |
Includes the SDL Android bridge in SDL3-CS.Android. |
| iOS | iOS |
ios-arm64, iossimulator-arm64, iossimulator-x64 |
Static native assets are linked through package buildTransitive targets. |
| tvOS | tvOS |
tvos-arm64, tvossimulator-arm64, tvossimulator-x64 |
Static native assets are linked through package buildTransitive targets. |
Installation
Install the managed wrapper:
dotnet add package SDL3-CS
Add the native package family that matches your target platform. For a Windows desktop app:
dotnet add package SDL3-CS.Windows
dotnet add package SDL3-CS.Windows.Image
dotnet add package SDL3-CS.Windows.TTF
dotnet add package SDL3-CS.Windows.Mixer
dotnet add package SDL3-CS.Windows.Shadercross
Replace Windows with Linux, MacOS, Android, iOS, or tvOS.
| Platform | SDL | SDL_image | SDL_ttf | SDL_mixer | SDL_shadercross |
|---|---|---|---|---|---|
| Windows | SDL3-CS.Windows |
SDL3-CS.Windows.Image |
SDL3-CS.Windows.TTF |
SDL3-CS.Windows.Mixer |
SDL3-CS.Windows.Shadercross |
| Linux | SDL3-CS.Linux |
SDL3-CS.Linux.Image |
SDL3-CS.Linux.TTF |
SDL3-CS.Linux.Mixer |
SDL3-CS.Linux.Shadercross |
| macOS | SDL3-CS.MacOS |
SDL3-CS.MacOS.Image |
SDL3-CS.MacOS.TTF |
SDL3-CS.MacOS.Mixer |
SDL3-CS.MacOS.Shadercross |
| Android | SDL3-CS.Android |
SDL3-CS.Android.Image |
SDL3-CS.Android.TTF |
SDL3-CS.Android.Mixer |
SDL3-CS.Android.Shadercross |
| iOS | SDL3-CS.iOS |
SDL3-CS.iOS.Image |
SDL3-CS.iOS.TTF |
SDL3-CS.iOS.Mixer |
SDL3-CS.iOS.Shadercross |
| tvOS | SDL3-CS.tvOS |
SDL3-CS.tvOS.Image |
SDL3-CS.tvOS.TTF |
SDL3-CS.tvOS.Mixer |
SDL3-CS.tvOS.Shadercross |
Android applications use MainActivity : Org.Libsdl.App.SDLActivity, override GetLibraries(), and run SDL from the managed Main() override.
Example
using SDL3;
namespace CreateWindow;
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 renderer: {SDL.GetError()}");
return;
}
SDL.SetRenderDrawColor(renderer, 100, 149, 237, 255);
SDL.RenderClear(renderer);
SDL.RenderPresent(renderer);
SDL.DestroyRenderer(renderer);
SDL.DestroyWindow(window);
SDL.Quit();
}
}
Feedback and Contributions
Open an issue or start a discussion for bugs, ideas, and questions.
See the repository README for the full project overview.
| 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (13)
Showing the top 5 NuGet packages that depend on SDL3-CS:
| Package | Downloads |
|---|---|
|
3DEngine
3D Game Engine - Vulkan - SDL3 - .NET 10 - C# 14 |
|
|
Bliss
A fast, Cross-platform .NET 10 C# 14 Render Framework. |
|
|
SdlVulkan.Renderer
Package Description |
|
|
StreamLayout
Package Description |
|
|
Brine2D.Audio.SDL
SDL3_mixer audio implementation for Brine2D. Provides sound effects and music playback via SDL3_mixer. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SDL3-CS:
| Repository | Stars |
|---|---|
|
Valkirie/HandheldCompanion
ControllerService
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.5.0-preview.20260213-150035 | 3,163 | 2/13/2026 |
| 3.5.0-preview.20260205-181613 | 101 | 2/5/2026 |
| 3.5.0-preview.20260205-180437 | 116 | 2/5/2026 |
| 3.5.0-preview.20260205-174352 | 107 | 2/5/2026 |
| 3.5.0-preview.20260112-122507 | 259 | 1/12/2026 |
| 3.4.10.2 | 44 | 6/14/2026 |
| 3.4.10.1 | 62 | 6/13/2026 |
| 3.4.2 | 5,148 | 3/17/2026 |
| 3.3.7 | 6,925 | 1/12/2026 |
| 3.3.7-preview.20251222-111333 | 199 | 12/22/2025 |
| 3.3.6 | 2,067 | 12/22/2025 |
| 3.3.5-preview.20251213-114652 | 234 | 12/13/2025 |
| 3.3.5-preview.20251212-135925 | 127 | 12/12/2025 |
| 3.3.5-preview.20251212-134941 | 116 | 12/12/2025 |
| 3.3.3 | 784 | 12/12/2025 |
| 3.3.3-preview.20251204-144801 | 208 | 12/4/2025 |
| 3.3.3-preview.20251108-095121 | 193 | 11/8/2025 |
| 3.3.2.1 | 7,417 | 10/27/2025 |
| 3.3.2 | 398 | 10/26/2025 |
| 3.2.24.1 | 1,415 | 10/17/2025 |