OpenTK.Graphics 5.0.0-pre.16

Prefix Reserved
This is a prerelease version of OpenTK.Graphics.
dotnet add package OpenTK.Graphics --version 5.0.0-pre.16
                    
NuGet\Install-Package OpenTK.Graphics -Version 5.0.0-pre.16
                    
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="OpenTK.Graphics" Version="5.0.0-pre.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenTK.Graphics" Version="5.0.0-pre.16" />
                    
Directory.Packages.props
<PackageReference Include="OpenTK.Graphics" />
                    
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 OpenTK.Graphics --version 5.0.0-pre.16
                    
#r "nuget: OpenTK.Graphics, 5.0.0-pre.16"
                    
#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 OpenTK.Graphics@5.0.0-pre.16
                    
#: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=OpenTK.Graphics&version=5.0.0-pre.16&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OpenTK.Graphics&version=5.0.0-pre.16&prerelease
                    
Install as a Cake Tool

OpenTK.Graphics

OpenGL and OpenGL ES bindings for dotnet.

Read more about how to use OpenTK at: https://opentk.net/

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 (28)

Showing the top 5 NuGet packages that depend on OpenTK.Graphics:

Package Downloads
OpenTK

The Open Toolkit is set of fast, low-level C# bindings for OpenGL, OpenGL ES, OpenAL and OpenCL. It runs on all major platforms and powers hundreds of apps, games and scientific research. It provides bindings for GLFW windowing, input and a game loop, and is the perfect start for your own game engine. OpenTK comes with simple and easy to follow tutorials for learning *modern* OpenGL. These are written by the community and represent all of the best practices to get you started. Learn how to use OpenTK here: https://opentk.net/learn/index.html Sample projects that accompany the tutorial can be found here: https://github.com/opentk/LearnOpenTK We have a very active discord server, if you need help, want to help, or are just curious, come join us! https://discord.gg/6HqD48s

OpenTK.GLControl

A WinForms control designed to wrap the OpenTK 4.x APIs.

GLWidget

GLWigdet for GTKSharp, using Opentk.

OpenTK.WinForms

A WinForms control designed to wrap the OpenTK 4.x APIs.

BioGTK

A .NET application & library for editing & annotating various microscopy image formats. Supports all bioformats supported images. Integrates with ImageJ, running ImageJ filters & macro functions. Supports Windows, Linux and Mac.

GitHub repositories (7)

Showing the top 7 popular GitHub repositories that depend on OpenTK.Graphics:

Repository Stars
ValveResourceFormat/ValveResourceFormat
Source 2 Viewer is an all-in-one tool to browse VPK archives, view, extract, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more.
SFML/SFML.Net
Official binding of SFML for .Net languages
BoyBaykiller/IDKEngine
OpenGL Toy-"Engine" with Wavefront Path Tracer and Rasterizer with Voxel Cone Tracing/Global Illumination
hybridizer-io/hybridizer-basic-samples
Examples of C# code compiled to GPU by hybridizer
seto77/ReciPro
The software ReciPro makes various crystallographic calculations, visualizes a crystal structure, simulates diffraction patterns and TEM image, indexes diffraction spots, plots stereographic projection, and so on.
MrScautHD/Raylib-CSharp
A fast, Cross-platform Raylib C# Wrapper.
bezo97/IFSRenderer
3D IFS fractal renderer and editor
Version Downloads Last Updated
5.0.0-pre.16 99 5/17/2026
5.0.0-pre.15 4,887 8/24/2025
5.0.0-pre.14 1,033 7/11/2025
5.0.0-pre.13 7,989 11/11/2024
5.0.0-pre.12 2,773 9/25/2024
5.0.0-pre.11 1,878 8/9/2024
5.0.0-pre.10 6,918 3/7/2024
5.0.0-pre.9 3,472 10/16/2023
5.0.0-pre.8 18,208 10/28/2022
4.9.4 1,089,968 3/17/2025
4.9.3 87,595 12/10/2024
4.9.2 8,574 12/10/2024
4.9.1 11,368 12/2/2024
4.8.2 498,541 12/2/2023
4.8.1 42,284 9/27/2023
4.8.0 59,738 7/17/2023
4.7.7 132,150 2/23/2023
4.7.6 9,206 2/22/2023
4.7.5 105,675 9/8/2022
4.7.4 74,356 6/17/2022
Loading failed

Update to .NET 10. (@NogginBops)
Migrate to `slnx` solution. (@NogginBops)
Remove paket from the build system and use `dotnet pack` instead. (@NogginBops)
Update descriptions and READMEs of packages to be consistent. (@NogginBops)
Removed `OpenTK.Input` package and namespace. (@NogginBops)
Enable source link for OpenTK packages. (@NogginBops)
Unified the OpenAL and OpenGL bindings generator code and simplified it significantly. (@NogginBops)
Make `VectorN.ComponentMin` and `VectorN.ComponentMax` properly NaN propagating. (@NogginBops)
Add `VectorN.ComponentMinNumber`, `VectorN.ComponentMinNative`, `VectorN.ComponentMaxNumber`, and `VectorN.ComponentMaxNative`. (@NogginBops)
Reworked `Box2/i/d` and `Box3/i/d` structs significantly. (@NogginBops)
Made `Min` and `Max` raw fields.
Changed `BoxN.Contains` to actually test if the box is completely contained. For the old behavior use `BoxN.IntersectsWith` or `BoxN.Touches`.
Add `BoxN.Empty` to represent empty boxes for use in bounding box calculations.
Add `BoxN.Zero` to represent point at (0, 0).
Add `BoxN.IsEmpty`, `BoxN.IsPoint`, and `BoxN.HasZeroArea`, `Box2.Area`, and `Box3.Volume` properties.
Removed `BoxN.Top`, `BoxN.Right`, `BoxN.Bottom`, `BoxN.Left`, `BoxN.X`, `BoxN.Y`, `BoxN.SizeX`, `BoxN.SizeY`, `BoxN.CenteredSize`, `BoxN.IsZero` properties.
Removed setters for `BoxN.Width`, `BoxN.Height`, `BoxN.Size`, `BoxN.Location` properties.
Added `BoxN.DistanceToNearestPointInBox`, `BoxN.DistanceToNearestEdge`,  `BoxN.SignedDistanceToNearestEdge`, `BoxN.NearestPointInBox`, and `BoxN.NearestPointOnEdge`.
Added `BoxNi.EuclidianDistanceToNearestPointInBox`, `BoxNi.EuclidianDistanceToNearestEdge`, `BoxNi.ManhattanDistanceToNearestEdge`, `BoxNi.SignedEuclidianDistanceToNearestEdge`, and `BoxNi.SignedManhattanDistanceToNearestEdge`.
Changed `BoxN.Round`, `BoxN.Floor`, and `BoxN.Ceiling` to return `BoxN` instead of `BoxNi`.
Added `BoxN.FloorCeiling` that floors min point and ceilings the max point.
OpenAL bindings changes**:
Add documentation to ALC and AL enums. (@NogginBops)
Add OpenAL specification and extension specificiation links to OpenAL function documentation. (@NogginBops)
Fix typo `AL.DopperFactor` -> `AL.DopplerFactor`. (@NogginBops)
Capitalization of "1D", "2D", and "3D" is now correct. (@NogginBops)
Add version info to enum members. (@NogginBops)
Add back `ALC.GetContextAttributes` and `ALC.GetStringList` (@NogginBops)
Change `AL.SourceQueueBuffers`  and `AL.SourceUnqueueBuffers` to take `int` instead of `uint`. (@NogginBops)
Fixed capitalization of many acronyms in the OpenAL bindings. (@NogginBops)
Document original enum name in inline enum documentation. (@NogginBops)
Vulkan bindings changes**:
Updates vulkan bindings to 1.4.352. (@NogginBops)
Capitalization of "1D", "2D", and "3D" is now correct. (@NogginBops)
Fix underlying type for dispatchable handles on 32-bit platforms. (@NogginBops)
Added inline documentation annotations for optional and extern sync parameters. (@NogginBops)
Fix 64-bit enums with values larger than `int.MaxValue` having the wrong values. (@NogginBops)
Properly XML escape documentation comments for struct members. (@NogginBops)
OpenGL bindings changes**:
Capitalization of "1D", "2D", and "3D" is now correct. (@NogginBops)
Fix inline documentation now working correctly being included in the nuget package. (@NogginBops)
Fix extension documentation links sometimes being broken. (@NogginBops)
Remove GLES2 functions from OpenGL namespace that had snuck in and vice versa. (@NogginBops)
Make `GL.ObjectLabel` and `GL.ObjectPtrLabel` take an `int` parameter instead of `uint` for the OpenGL object. (@NogginBops)
Make `GL.ObjectPtrLabel` correctly take a `GLSync` parameter. (@NogginBops)
Add `GL.GetShaderInfoLog` and `GL.GetProgramInfoLog` overloads returning a `string`. (@NogginBops)
Capitalization of "1D" is now correct. (@NogginBops)
Add `ClipOrigin` and `ClipDepthMode` to the `GetPName` enum. (@NogginBops)
Removed extension functions marked for compatibility profile from `OpenTK.Graphics.OpenGL`. (@NogginBops)
Updated to latest OpenGL 4 documentation. Notably `GL.DrawElements` now correctly documents `indices` as being an offset and not a pointer to the index data itself. (@NogginBops)
Add version info to enum members. (@NogginBops)
Document original enum name in inline enum documentation. (@NogginBops)
PAL2 changes**:
Added `Toolkit.Window.GetOpenGLContext` to get OpenGL context from a window handle if one has been created. (@NogginBops)
Added `Toolkit.OpenGL.GetWindow` to get the window that was used to create a OpenGL context. (@NogginBops)
Rework `Toolkit.Joystick` to handle arbitrary number of buttons and axes. (@NogginBops)
`Toolkit.Joystick` is only implemented in the Win32 and SDL backends so far.
Add `Toolkit.Gamepad` for xbox style gamepad support. (@NogginBops)
`Toolkit.Gamepad` only works *partially* in the Win32 backend so far.
Changed `Toolkit.Keyboard.GetActiveKeyboardLayout` to `Toolkit.Keyboard.GetActiveInputLanguage`. (@NogginBops)
Changed `Toolkit.Keyboard.GetAvailableKeyboardLayouts` to `Toolkit.Keyboard.GetInstalledInputLanguages`. (@NogginBops)
Add `DisplayValuesChangedEvent` which is sent when various properties of displays change. (@NogginBops)
Add `ClientPosition` property to `MouseButtonDownEventArgs` and `MouseButtonUpEventArgs`. (@NogginBops)
Add `Clicks` property to `MouseButtonDownEventArgs` and `MouseButtonUpEventArgs` for detecting double-clicks. (@NogginBops)
Replaced `EventQueue` with `Toolkit.Event` and remove some unused apis from `EventQueue`. (@NogginBops)
win32:
Fix issue where non-integer refresh rates would cause `ExclusiveFullscreen` to fail. (@NogginBops)
Partial fix to high polling rate mice having large impact on framerate. (@JoeTwizzle, @NogginBops)
Added `ToolkitOptions.Windows.MaxWindowMessagesPerFrame` to limit the number of events processed in a frame, can help with high polling rate mice performance. (@JoeTwizzle, @NogginBops)
Fix bug where changing the window border mode would give the window focus. (@NogginBops)
macOS:
Fix issue with missing entry point `objc_msgSend_stret` on apple silicon. (@NogginBops)
x11:
Read `Xft.dpi` setting for `Toolkit.Display.GetDisplayScale` and `Toolkit.Window.GetContentScale`. (@NogginBops)
Made `Toolkit.Shell.AllowScreenSaver(false, ...)` a little more likely to work. (@NogginBops)
Use freedesktop UPower dbus service, if available, for more reliable battery information. (@NogginBops)
Use gsettings, if available, to get more accurate keyboard layout information. (@NogginBops)