BSGameLib.Sdl3.Interop 1.0.4-preview

This is a prerelease version of BSGameLib.Sdl3.Interop.
dotnet add package BSGameLib.Sdl3.Interop --version 1.0.4-preview
                    
NuGet\Install-Package BSGameLib.Sdl3.Interop -Version 1.0.4-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BSGameLib.Sdl3.Interop" Version="1.0.4-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BSGameLib.Sdl3.Interop" Version="1.0.4-preview" />
                    
Directory.Packages.props
<PackageReference Include="BSGameLib.Sdl3.Interop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BSGameLib.Sdl3.Interop --version 1.0.4-preview
                    
#r "nuget: BSGameLib.Sdl3.Interop, 1.0.4-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BSGameLib.Sdl3.Interop@1.0.4-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BSGameLib.Sdl3.Interop&version=1.0.4-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BSGameLib.Sdl3.Interop&version=1.0.4-preview&prerelease
                    
Install as a Cake Tool

BSGameLib.Sdl3.Interop

.NET bindings for SDL3, SDL3_image and SDL3_mixer: every function, struct and enum, generated from the SDL headers, plus a few helpers. BSGameLib.Game is built on it, and it is usable without the engine.

The native libraries come with it: BSGameLib.Sdl3.Native for SDL3 on Windows, Linux and macOS, and BSGameLib.MoltenVK.Native for Vulkan on macOS. They are copied beside your executable for the platform you build or publish for.

  • BSGameLib.Sdl3.Interop.Generated: the static classes SDL, SDL_image and SDL_mixer, and their types, as raw P/Invoke.
  • BSGameLib.Sdl3.Interop.Manual: Sdl.Check and Sdl.GetError for error handling, constants, key codes and the Vulkan helpers.
using BSGameLib.Sdl3.Interop.Generated;
using BSGameLib.Sdl3.Interop.Manual;
using static BSGameLib.Sdl3.Interop.Generated.SDL;
using static BSGameLib.Sdl3.Interop.Manual.SdlConstants;

unsafe
{
  Sdl.Check(SDL_Init(SDL_INIT_VIDEO));

  SDL_Window* window;
  fixed (byte* title = "Hello SDL3\0"u8)
    window = Sdl.Check(SDL_CreateWindow((sbyte*)title, 800, 600, SDL_WINDOW_RESIZABLE));

  var running = true;
  SDL_Event e;
  while (running)
    while (SDL_PollEvent(&e) != 0)
      if (e.type == (uint)SDL_EventType.SDL_EVENT_QUIT)
        running = false;

  SDL_DestroyWindow(window);
  SDL_Quit();
}

The bindings use pointers, so a project using them sets <AllowUnsafeBlocks>true</AllowUnsafeBlocks>.

Documentation: https://docs.burningstormstudios.com/

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BSGameLib.Sdl3.Interop:

Package Downloads
BSGameLib.Game

A 2D game engine for .NET on SDL3, with Vulkan and OpenGL renderers, shaders compiled at build, content, input, audio, localization and Dear ImGui.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4-preview 58 11/9/2026