SDL3-CS
3.2.10
See the version list below for details.
dotnet add package SDL3-CS --version 3.2.10
NuGet\Install-Package SDL3-CS -Version 3.2.10
<PackageReference Include="SDL3-CS" Version="3.2.10" />
<PackageVersion Include="SDL3-CS" Version="3.2.10" />
<PackageReference Include="SDL3-CS" />
paket add SDL3-CS --version 3.2.10
#r "nuget: SDL3-CS, 3.2.10"
#:package SDL3-CS@3.2.10
#addin nuget:?package=SDL3-CS&version=3.2.10
#tool nuget:?package=SDL3-CS&version=3.2.10
🚀 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 |
🤝 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 (3)
Showing the top 3 NuGet packages that depend on SDL3-CS:
| Package | Downloads |
|---|---|
|
3DEngine
3D Game Engine - Vulkan - SDL3 - .NET 10 - C# 14 |
|
|
StreamLayout
Package Description |
|
|
3DEngine.Window
3D Game Engine - Vulkan - SDL3 - .NET 10 - C# 14 |
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.3.5-preview.20251213-114652 | 51 | 12/13/2025 |
| 3.3.5-preview.20251212-135925 | 57 | 12/12/2025 |
| 3.3.5-preview.20251212-134941 | 53 | 12/12/2025 |
| 3.3.3 | 123 | 12/12/2025 |
| 3.3.3-preview.20251204-144801 | 158 | 12/4/2025 |
| 3.3.3-preview.20251108-095121 | 131 | 11/8/2025 |
| 3.3.2.1 | 6,581 | 10/27/2025 |
| 3.3.2 | 340 | 10/26/2025 |
| 3.2.24.1 | 1,240 | 10/17/2025 |
| 3.2.24 | 815 | 10/5/2025 |
| 3.2.20 | 2,920 | 8/5/2025 |
| 3.2.18 | 648 | 7/15/2025 |
| 3.2.16.7 | 256 | 7/10/2025 |
| 3.2.16.6 | 206 | 7/8/2025 |
| 3.2.16.5 | 176 | 7/8/2025 |
| 3.2.16.4 | 266 | 7/1/2025 |
| 3.2.16.3 | 295 | 6/20/2025 |
| 3.2.16.1 | 535 | 6/8/2025 |
| 3.2.16 | 215 | 6/7/2025 |
| 3.2.14.2 | 791 | 5/21/2025 |
| 3.2.14.1 | 222 | 5/19/2025 |
| 3.2.14 | 252 | 5/16/2025 |
| 3.2.12.4 | 282 | 5/14/2025 |
| 3.2.12.3 | 201 | 5/11/2025 |
| 3.2.12.2 | 163 | 5/9/2025 |
| 3.2.12.1 | 593 | 5/8/2025 |
| 3.2.12 | 197 | 5/8/2025 |
| 3.2.10 | 734 | 4/1/2025 |
| 3.2.8.3 | 339 | 3/12/2025 |
| 3.2.8.2 | 492 | 3/11/2025 |
| 3.2.8.1 | 293 | 3/7/2025 |
| 3.2.4.7 | 380 | 3/1/2025 |
| 3.2.4.6 | 529 | 2/18/2025 |
This is a stable bugfix release, with the following changes:
- Added support for SDL_PIXELFORMAT_MJPG to SDL_DuplicateSurface()
- Added SIMD blitters for 8888 to 8888 swizzled format conversion
- Return an error trying to create surfaces with invalid pixel formats
- Handle windows being resized to 0 height on Windows
- Fixed controller GUIDs changing randomly on Windows
- Fixed mixed trigger and body rumble for Xbox controllers on Windows
- Added mappings for the Nintendo Switch Online N64/SEGA/SNES controllers on Linux
- Fixed Nintendo controller face button layout under Steam
- Fixed showing the on-screen keyboard on Steam Deck
- Fixed pen events on iOS after reinitializing SDL
- Fixed building with SDL_LEAN_AND_MEAN
- Fixed a memory leak in memory leak tracking
- Fixed a memory leak calling SDL_GetDisplayUsableBounds() on macOS
- Fixed mouse relative motion speed on non-desktop resolutions under Wayland
- Fixed keyboard grab on XWayland under GNOME
- Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT to control whether XSelectInput() should be called on external windows
- Implemented SDL_GetSystemRAM and SDL_GetNumLogicalCPUCores for the Nintendo 3DS