SirTony.OpenTK.SkiaSharp
1.2.1
dotnet add package SirTony.OpenTK.SkiaSharp --version 1.2.1
NuGet\Install-Package SirTony.OpenTK.SkiaSharp -Version 1.2.1
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="SirTony.OpenTK.SkiaSharp" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SirTony.OpenTK.SkiaSharp" Version="1.2.1" />
<PackageReference Include="SirTony.OpenTK.SkiaSharp" />
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 SirTony.OpenTK.SkiaSharp --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SirTony.OpenTK.SkiaSharp, 1.2.1"
#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.
#addin nuget:?package=SirTony.OpenTK.SkiaSharp&version=1.2.1
#tool nuget:?package=SirTony.OpenTK.SkiaSharp&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenTK.SkiaSharp
OpenGL + SkiaSharp integration for .NET
Basic Example
using SirTony.OpenTK.SkiaSharp;
using SkiaSharp;
// set up OpenTK settings
var gameWindowSettings = new GameWindowSettings();
var nativeWindowSettings = new NativeWindowSettings
{
Title = "OpenTK + SkiaSharp",
ClientSize = new( 1280, 720 ),
Vsync = VSyncMode.On,
};
// create the window
using var window = new MyWindow( gameWindowSettings, nativeWindowSettings );
// you can use the render event instead inheriting the class
window.RenderFrame += ( e, canvas ) =>
{
// canvas.Clear( SKColors.CornflowerBlue );
// Draw something here
};
// run the main event loop
window.Run();
// we can inherit SKWindow and override the OnRenderFrame method to draw on the canvas
internal sealed class MyWindow : SKWindow
{
public MyWindow( GameWindowSettings gameWindowSettings, NativeWindowSettings nativeWindowSettings )
: base( gameWindowSettings, nativeWindowSettings )
{ }
protected override void OnRenderFrame( FrameEventArgs e, SKCanvas canvas )
{
canvas.Clear( SKColors.CornflowerBlue );
// Draw something here
base.OnRenderFrame( e, canvas );
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- OpenTK (>= 4.9.3)
- SkiaSharp (>= 3.116.1)
- SkiaSharp.NativeAssets.Linux (>= 3.116.1)
-
net9.0
- OpenTK (>= 4.9.3)
- SkiaSharp (>= 3.116.1)
- SkiaSharp.NativeAssets.Linux (>= 3.116.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.