![]() |
VOOZH | about |
dotnet add package Blitter --version 0.7.0
NuGet\Install-Package Blitter -Version 0.7.0
<PackageReference Include="Blitter" Version="0.7.0" />
<PackageVersion Include="Blitter" Version="0.7.0" />Directory.Packages.props
<PackageReference Include="Blitter" />Project file
paket add Blitter --version 0.7.0
#r "nuget: Blitter, 0.7.0"
#:package Blitter@0.7.0
#addin nuget:?package=Blitter&version=0.7.0Install as a Cake Addin
#tool nuget:?package=Blitter&version=0.7.0Install as a Cake Tool
Blitter is a small, friendly 2D & 3D graphics programming library for .NET, built on top of SDL3 (via the SDL3-CS bindings) and integrated with SkiaSharp. It wraps SDL3 in clean, idiomatic C# so you can focus on drawing things and making them move instead of wrestling with native interop and low-level GPU concepts.
⚠️ Early days. Blitter is in ongoing development. The API will likely go through changes. Use at your own risk — and have fun.
A bouncing red square.
using Blitter;
var window = new Window2D(800, 600)
{
Title = "Bouncing Square",
BackgroundColor = Color.Black,
CloseKey = Key.Escape
};
float x = 0, vx = 200; // pixels per second
await window.RunAsync(rd =>
{
x += vx * rd.ElapsedSecondsSinceLastRender;
if (x < 0 || x > window.Size.Width - 100)
vx = -vx;
rd.DrawColor = Color.Red;
rd.DrawFillRect(new Rect(x, 250, 100, 100));
});
A spinning, colored triangle rendered with a built-in shader.
using System.Numerics;
using Blitter;
var triangle = Mesh.Create<ColorVertex3D>(
[
new(new Vertex3D( 0.0f, 0.5f, 0f), Color.Red),
new(new Vertex3D( 0.5f, -0.5f, 0f), Color.Green),
new(new Vertex3D(-0.5f, -0.5f, 0f), Color.Blue),
]);
var window = new Window3D
{
Title = "Spinning Triangle",
BackgroundColor = Color.Black,
FullScreen = true,
CloseKey = Key.Escape
};
await window.RunAsync(r =>
{
var transform = Matrix4x4
.CreateRotationZ(r.ElapsedSecondsSinceStart)
.Scale(0.8f);
r.DrawMesh(triangle, transform);
});
For full documentation and samples see the project repository:
https://github.com/mattwar/Blitter
The samples/ folder contains runnable single-file examples covering meshes, textures, blend/depth/cull modes, debug text, split-screen, render-to-image, and more.
MIT. See LICENSE and THIRD-PARTY-NOTICES.md in the repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.