SdlVulkan.Renderer 1.8.331

This package has a SemVer 2.0.0 package version: 1.8.331+b38cd8d02387d70b148e4a209a5557b17b44c63b.
There is a newer version of this package available.
See the version list below for details.
dotnet add package SdlVulkan.Renderer --version 1.8.331
                    
NuGet\Install-Package SdlVulkan.Renderer -Version 1.8.331
                    
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="SdlVulkan.Renderer" Version="1.8.331" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SdlVulkan.Renderer" Version="1.8.331" />
                    
Directory.Packages.props
<PackageReference Include="SdlVulkan.Renderer" />
                    
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 SdlVulkan.Renderer --version 1.8.331
                    
#r "nuget: SdlVulkan.Renderer, 1.8.331"
                    
#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 SdlVulkan.Renderer@1.8.331
                    
#: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=SdlVulkan.Renderer&version=1.8.331
                    
Install as a Cake Addin
#tool nuget:?package=SdlVulkan.Renderer&version=1.8.331
                    
Install as a Cake Tool

SdlVulkan.Renderer

SDL3 + Vortice.Vulkan rendering library built on DIR.Lib primitives.

Types

  • SdlVulkanWindow — SDL3 window with Vulkan instance and surface lifecycle. Creates maximized, resizable windows with Vulkan surface.
  • VulkanContext — Vulkan device, swapchain, command buffers, sync management. MaxFramesInFlight = 2 with per-frame vertex buffers.
  • VkRendererRenderer<VulkanContext> implementation with FillRectangle, DrawRectangle, FillEllipse, DrawText. Exposes FontAtlasDirty for callers to trigger redraws after glyph rasterization.
  • VkPipelineSet — GLSL 450 shader compilation and Vulkan pipeline creation (flat, textured, ellipse)
  • VkFontAtlas — Dynamic glyph atlas with FreeType2 rasterization and Vulkan texture upload. Supports grow (512→2048), deferred eviction, and skipUnflushed to prevent sampling stale GPU texture data.

Font Atlas Lifecycle

Per frame:

  1. BeginFrame() — handles deferred eviction if atlas was full last frame
  2. Flush(cmd) — uploads dirty staging region to GPU via vkCmdCopyBufferToImage
  3. DrawText(...)GetGlyph(...) — cache hit returns UV coords; miss rasterizes into staging
  4. GetGlyph(..., skipUnflushed: true) — in draw loops, returns zero-width for glyphs not yet uploaded

Thread safety: vkDeviceWaitIdle() before reusing the shared upload buffer (prevents race with MaxFramesInFlight = 2).

Diagnostic logging (Console.Error): [FontAtlas] / [VkRenderer] prefixed lines for Flush, Grow, EvictAll, cache miss, Resize. Capture with 2>stderr.log.

Usage

using SdlVulkan.Renderer;

using var window = SdlVulkanWindow.Create("My App", 800, 600);
window.GetSizeInPixels(out var w, out var h);

var ctx = VulkanContext.Create(window.Instance, window.Surface, (uint)w, (uint)h);
var renderer = new VkRenderer(ctx, (uint)w, (uint)h);

while (running)
{
    if (!renderer.BeginFrame(bgColor)) { renderer.Resize(w, h); continue; }
    renderer.FillRectangle(rect, color);
    renderer.DrawText("Hello", fontPath, 14f, white, layout);
    renderer.EndFrame();
    if (renderer.FontAtlasDirty) needsRedraw = true;
}

Dependencies

License

MIT

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

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.4.441 51 5/1/2026
3.4.431 39 4/25/2026
3.4.421 255 4/21/2026
3.3.411 31 4/21/2026
3.2.381 56 4/20/2026
3.1.371 124 4/16/2026
3.0.351 35 4/16/2026
3.0.341 39 4/15/2026
1.8.331 32 4/14/2026
1.8.311 38 4/14/2026
1.8.301 30 4/14/2026
1.8.291 32 4/13/2026
1.7.281 98 4/7/2026
1.6.271 37 4/7/2026
1.6.261 198 4/1/2026
1.6.251 36 4/1/2026
1.6.242 29 3/31/2026
1.6.231 30 3/31/2026
1.6.221 29 3/31/2026
1.6.211 31 3/31/2026
Loading failed