Ranvier.Wgpu.Sdl
0.2.0
See the version list below for details.
dotnet add package Ranvier.Wgpu.Sdl --version 0.2.0
NuGet\Install-Package Ranvier.Wgpu.Sdl -Version 0.2.0
<PackageReference Include="Ranvier.Wgpu.Sdl" Version="0.2.0" />
<PackageVersion Include="Ranvier.Wgpu.Sdl" Version="0.2.0" />
<PackageReference Include="Ranvier.Wgpu.Sdl" />
paket add Ranvier.Wgpu.Sdl --version 0.2.0
#r "nuget: Ranvier.Wgpu.Sdl, 0.2.0"
#:package Ranvier.Wgpu.Sdl@0.2.0
#addin nuget:?package=Ranvier.Wgpu.Sdl&version=0.2.0
#tool nuget:?package=Ranvier.Wgpu.Sdl&version=0.2.0
Ranvier.Wgpu.Sdl
Opt-in zero-copy GPU texture bridge binding Ranvier.Wgpu 3D scenes directly onto Ranvier.View.WebCore.Sdl DOM elements with natural HTML, CSS, and SVG overlay compositing.
Install
dotnet add package Ranvier.Wgpu.Sdl --version 0.2.0
Use Ranvier.Wgpu.Sdl.Traced when building against Ranvier.View.WebCore.Sdl.Traced.
Quick Start
open System
open Ranvier.View.WebCore.Sdl
open Ranvier.Wgpu
open Ranvier.Wgpu.Sdl
use window = Window.Create("Ranvier + Wgpu", 1280, 800)
let viewport = window.Host.Document.getElementById "viewport"
use wgpu = window |> WgpuSdlSurface.createContext
use subscription =
viewport
|> WgpuSdlSurface.lend window wgpu (fun surface ->
let pass = ScenePass.create camera |> ScenePass.withBatches [| batch |]
pass |> WgpuSdlSurface.render surface |> ignore
{ new IDisposable with member _.Dispose() = () })
Requirements
FSharp.Core 10.1.401 or later, which ships with .NET SDK 10.0.401. With an older SDK, restore reports NU1605;
add <PackageReference Update="FSharp.Core" Version="10.1.401" /> to the consuming project.
Custom shaders
WgpuSdlSurface.CreateContext(window, customWgsl = wgsl) passes custom WGSL to the context. Build it with
Shaders.composeScene, feed it application data with context.SetUserUniforms, and check it in a test with
WgpuContext.ValidateWgsl, which opens no window. The limits of the engine (no textures, line-list lines, discs
not depth-sorted) are listed in the Ranvier.Wgpu README.
| Product | Versions 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. |
-
net10.0
- FSharp.Core (>= 10.1.401)
- Ranvier.View.WebCore.Sdl (>= 0.1.0)
- Ranvier.Wgpu (>= 0.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ranvier.Wgpu.Sdl:
| Package | Downloads |
|---|---|
|
Ranvier.D5.Wgpu.Sdl
Native SDL3 + WebGPU interactive 3D plot host view for Ranvier.D5.Wgpu over Ranvier.Wgpu.Sdl and Ranvier.View.WebCore.Sdl. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Pre-1.0 release. The API may change before 1.0.