Opentk Versions Save

The Open Toolkit library is a fast, low-level C# wrapper for OpenGL, OpenAL & OpenCL. It also includes windowing, mouse, keyboard and joystick input and a robust and fast math library, giving you everything you need to write your own renderer or game engine. OpenTK can be used standalone or inside a GUI on Windows, Linux, Mac.

5.0-pre.10

2 months ago

Merged OpenTK 4.8.2 onto 5.0-pre.10. (@NogginBops) This means that all changes from 4.8.2 are also in this release. Moved OpenTK.Color3 to OpenTK.Mathematics.Color3. (@NogginBops) Fix NativeWindow so it properly loads OpenGL bindings without crashing. (@NogginBops) Fix bindings generator locale issue that caused wrong results on certain locales. (@utkumaden) Changed the name of some enum group to be more like OpenTK 4 groups. Notable examples are BufferTargetARB -> BufferTarget and BlendEquationModeEXT -> BlendEquationMode. (@NogginBops) Fix WGL and GLX bindings and loading. (@NogginBops) Change EGL bindings to DllImport for libEGL instead of libEGL.dll. (@NogginBops) Made bindings generator correctly bind function taking GLX opaque struct pointers like Display*. (@NogginBops) Fixed WGL GetProcAddress bindings to correctly marshal strings. (@NogginBops) Platform Abstraction Layer 2.0 (PAL2): Removed internal locks from EventQueue. (@utkumaden) Add IWindowComponent.GetBounds/SetBounds + client bounds versions. (@NogginBops) Add functions for getting native handles from PAL2 handles. (@NogginBops) Added functions and event data for keyboard modifiers. (@NogginBops) Win32: Fix sticky RightControl, LeftAlt, and RightAlt keys. (@NogginBops) Win32: Fix duplicate TextInput events when using IME. (@NogginBops) Win32: Fix CanIncludeInClipboardHistory and CanUploadToCloudClipboard. (@NogginBops) X11: Implemented X11KeyboardComponent.GetKeyboardModifiers(). (@NogginBops) X11: Implemented X11MouseComponent.GetMouseState(). (@NogginBops) X11: Implemented X11ShellComponent.GetPreferredTheme(). (@NogginBops) X11: Implemented ClipboardUpdate, DisplayConnectionChanged, FileDrop, KeyDown, and KeyUp events. (@NogginBops) macOS: Implemented MacOSWindowComponent.GetIcon/SetIcon. (@NogginBops) macOS: Implemented MacOSWindowComponent.SetSize/SetClientSize. (@NogginBops) macOS: Implemented MacOSWindowComponent.[Set/Get][Max/Min]ClientSize. (@NogginBops) macOS: Implemented MacOSWindowComponent.GetDisplay. (@NogginBops) macOS: Implemented window hit test callback for HitType.Draggable. (@NogginBops) macOS: Implemented MacOSWindowComponent.SetCursor. (@NogginBops) macOS: Implemented MacOSMouseComponent.SetPosition. (@NogginBops) macOS: Implemented MacOSDisplayComponent fully. (@NogginBops) macOS: Implemented MacOSCursorComponent fully. (@NogginBops) macOS: Implemented basic KeyDown/KeyUp. (@NogginBops) macOS: Implemented MacOSKeyboardComponent.GetKeyboardState/GetKeyboardModifiers. (@NogginBops) macOS: Implemented MacOSIconComponent fully. (@NogginBops) macOS: Implemented MacOSShellComponent fully. (@NogginBops) macOS: Implemented Focus, WindowMove/WindowResize, WindowModeChange, MouseEnter, KeyDown/KeyUp, TextInput, ThemeChange, and DisplayConnectionChanged events. (@NogginBops) ANGLE: Made ANGLEOpenGLComponent work with the X11 backend. (@NogginBops)

4.8.2

5 months ago

FIX: Fixed issue where setting NativeWindow.WindowState = WindowState.Normal while fullscreen would not exit fullscreen. (@Th3Dilli) API: Added NativeWindow.FramebufferSize, NativeWindow.OnFramebufferResize, and NativeWindow.FramebufferResize to be able to properly get the framebuffer size of the window (useful on macos where framebuffer size is not equal to client size). (@NogginBops) API: Added GameWindowSettings.Win32SuspendTimerOnDrag propery that allows the internal timer to be suspended while the window is moved or resized. Without this dragging the window will cause an abnormally large time delta since the last frame. (@MV10) API: Made NativeWindowSettings.Size obsolete in favour of NativeWindowSettings.ClientSize (NativeWindowSettings.Size has always set the client size of the window, this namechange just makes this clear). (@MV10) API: Added ability to override OpenAL and OpenCL native library search path by setting OpenALLibraryNameContainer.OverridePath or OpenCLLibraryNameContainer.OverridePath. (@NogginBops) API: Added NativeWindowSettings.AutoIconify and NativeWindow.AutoIconify property to control if the window gets minimized if it loses focus while fullscreen. (@MV10) API: Added missing enums to GetPName. (@BoyBaykiller) FIX: Fixed an issue where creating a NativeWindow on wayland would freeze in the constructor. (@Th3Dilli) BREAKING: Re-implemented Box2/3.Inflate to work like System.Drawing.Rectangle.Inflate. The old behaviour can be found using Box2/3.Extend, as the previous obsoletion message stated. (@MV10, @NogginBops) Add example of how to implement IBindingsContext in the documentation comments on IBindingsContext. (@utkumaden) Internal changes to make the build system simpler and easier to modify. (@NogginBops) Internal changes from Math to MathF where appropriate. (@MV10)

5.0-pre.9

6 months ago

Merged PAL2 into OpenTK 5.0. Platform Abstraction Layer 2.0 is an experimental api that represents the future of windowing in OpenTK. (@NogginBops, @utkumaden) To learn more visit: https://nogginbops.github.io/opentk.net/learn/pal2/Introduction.html (will be https://opentk.net/learn/pal2/Introduction.html in the future). Merged OpenTK 4.8.1 onto 5.0-pre.9. (@NogginBops) This means that all changes make between 4.7.6 to 4.8.1 are also in this release. BREAKING: Disabled generation of typesafe handles by default. (@NogginBops) They are still available optionally when running the generator, but will not be part of the nuget package. API: Lots of GL functions are now properly overloaded with math types. (@NogginBops) API: Where applicable System.Numerics overloads have been added to GL functions. (@NogginBops) FIX: LinearMipmapLinear is no longer a member in TextureWrapMode. (@NogginBops) FIX: GL.CreateShaderProgram now properly returns an int. (@NogginBops) API: Added GL.TransformFeedbackVaryings(int, int, string[], TransformFeedbackBufferMode) manual overload. (@NogginBops) API: Implemented IEquatable<> on all typesafe handle types. (@NogginBops) FIX: Started using OperatingSystem.Is* internally instead of RuntimeInformation.IsOSPlatform. (@O1L) API: Added Wgl and Glx bindings (automatic loading the symbols for these APIs is broken, but will be fixed in the next preview). (@NogginBops) API: Made all function pointers directly accessibly in GLPointers, GLXPointers, and WGLPointers classes. (@NogginBops)

4.8.1

7 months ago

API: Added NativeWindow.HasTransparentFramebuffer to be able to check if a transparent framebuffer was created successfully. (@NogginBops) API: Added missing enum entries in OpenCL.ContextProperties. (@NogginBops) FIX: NativeWindowSettings.StartVisible = false has been fixed and should now work as expected. (@NogginBops) FIX: Fixed issue where JoystickState.GetAxis returned buttons instead of axes. (@NogginBops) FIX: Fixed issue where self-contained dotnet publish would break due to duplicate libglfw.so files. (@Th3Dilli) FIX: Setting NativeWindow.WindowState will now be reflected in OnResize event caused by it. (@NogginBops) FIX: GameWindow.UpdateTime is now correctly updated, fixing an issue that first appeared in 4.7.1. (@NogginBops) FIX: Fixed typo in deprecation message for GameWindow.RenderFrequency. (@postmeback)

4.8.0

9 months ago

BREAKING: Renamed the OpenTK.OpenAL assembly to OpenTK.Audio.OpenAL to match the namespace (this also changes the nuget package name from OpenTK.OpenAL to OpenTK.Audio.OpenAL). (@NogginBops) BREAKING: Make OpenAL extensions nested classes of AL and ALC instead of being namespaces to more closely match the OpenGL bindings. (@NogginBops) BREAKING: Removed AL.BindBufferToSource, AL.GetSourceState, AL.GetSourceType, and ALC.GetAvailableSamples that doesn't exist in the OpenAL API (use AL.Get* and ALC.Get* instead). (@Khhs167, @NogginBops) BREAKING: NativeWindow.Location, NativeWindow.Size, and NativeWindow.Bounds now correctly refer to the external size and location of the window. (@NogginBops) BREAKING: Removed a few functions marked [Obsolete] since at least 4.7.2 but some even older. (@NogginBops) BREAKING: Removed OpenTK.Core.Utils.Swap<T>, use MathHelper.Swap<T> instead. (@NogginBops) API: Rename Box.Inflate to Box.Extend, and mark Box.Inflate as obsolete so we can change the behavior of Box.Inflate in future versions. (@NogginBops) API: Added GameWindow.TimeSinceLastUpdate() and GameWindow.ResetTimeSinceLastUpdate() which are useful when dealing with the modal move/resize loop on windows. (@NogginBops) API: Added NativeWindow.RawMouseInput and NativeWindow.SupportsRawMouseInput for activating raw mouse input. (@NogginBops) API: Added opt-in preliminary GLFW Wayland support through the environment variable OPENTK_4_USE_WAYLAND (it's broken when used with GameWindow or NativeWindow in this version). (@NogginBops) API: Updated the GameWindow run loop to be much more accurate. Exposed GameWindow.ExpectedSchedulerPeriod to tell OpenTK how accurate Thread.Sleep can be expected to be (this defaults to good defaults for Windows, Linux, and macos). (@NogginBops) FIX: Cleaned up some internal OpenGL definitions (doesn't change any bindings). (@BoyBayKiller) API: Expose MouseCursor.StandardShape as public. (@NogginBops) API: Add VectorNi.EuclideanLengthSquared. (@NogginBops) FIX: Added helpful exception message to NativeWindow when running with trimmed assemblies with a workaround for the issue. (@NogginBops) FIX: Fixed an issue where starting NativeWindow as a fullscreen window and then going to a normal window would throw an exception. (@NogginBops)

4.7.7

1 year ago

FIX: ToString() on all math types no longer throw NullReferenceException. (@NogginBops)

4.7.6

1 year ago

BREAKING: Changed the default value of NativeWindowSettings.Flags from ContextFlags.Default to ContextFlags.ForwardCompatible for better out of the box macos support. (@NogginBops) API: Added NativeWindowSettings.TransparentFramebuffer and NativeWindowSettings.VSync. (@NogginBops) API: Component-wise Lerp methods for float and double vector types. (@g7ChoGXh) API: Implemented IFormattable for most OpenTK.Mathematics types. (@g7ChoGXh) API: Add bindings for EXT_fragment_shading_rate. (@BoyBaykiller) API: Added casts from Vector2i and Vector2 to System.Drawing.Point/System.Drawing.Size and System.Drawing.PointF/System.Drawing.SizeF respectively. (@NogginBops) API: Added missing entries in SizedInternalFormat. (@BoyBaykiller) API: BinaryFormat now contains the ShaderBinaryFormatSpirV enum value. (@NogginBops) FIX: Many fixes related to NativeWindow.WindowState. Most notably, going from fullscreen to maximized and back works correctly. (@NogginBops) FIX: MonitorInfo.WorkArea now gives the correct values. (@utkumaden) FIX: Spelling and formatting corrections in documentation. (@sg-wizard-maker) FIX: Math types now change their formatting when CurrentCulture is changed. (@g7ChoGXh) FIX: Matrix4x3/Matrix4x3d now print their final row. (@NogginBops) FIX: On Windows, setting GameWindowSettings.UpdateFrequency and GameWindowSettings.RenderFrequency should be more accurate. For details see documentation for GameWindow.Run(). (@NogginBops) The OpenTK solution should now build directly in Visual Studio with no need to run build.cmd any more. (@NogginBops)

5.0-pre.8

1 year ago

Merged 5.0 with 4.7.5, this means that all changes made between 4.6.5 to 4.7.5 are also in this release. Functions with bool parameters and return values are now correctly bound. Enum groups now document a few functions where they are used. The singular overload of GenQuries is now correctly named GenQuery. Deduplicated internal function pointers to reduce the final binary size. Fixes a few functions like glTexImage3D that took an int parameter when it should have taken an enum instead.

3.3.3

1 year ago
  • OpenTK no longers alters the dll search path be default on windows platforms. Separate folders for x86 and x64 dlls can now be optionally turned on by using ToolkitOptions.SetWindowsDLLPathAnyCPU = true, see documentation comment for more details. (@NogginBops)
  • New feature that allows you to use virtual keys on windows. This can be toggled on using GameWindowFlags.UseVirtualKeys. See https://github.com/opentk/opentk/pull/1360 for more details. (@tyronx)
  • Deprecated Vector3 Transform(Matrix3 mat, Vector3 vec) (right multiplication) because of a bug meant this function was doing a left multiplication. Instead two new functions TransformRow and TransformColumn that handle the left and right multiplication correctly. (@NogginBops)
  • A lot of enum entries where added to enums where they where missing. For example SizedInternalFormat now contains all allowed formats and GetTextureParameter now contains TextureMaxAnisotropy. (@NogginBops)

4.7.5

1 year ago

BREAKING: Removed the ALTest class from the OpenAL namespace. This was an internal test class that was accidentally included in the package. (@NogginBops) API: Deprecated Box.Contains function in favor of Box.ContainsInclusive and Box.ContainsExclusive to explicitly state if the box boundary sould be considered contained. (@NogginBops, @Oribow) API: Exposed EGL bindings to match the WGL bindings. (@NogginBops) API: Box2, Box2d, Box2i, Box3, Box3d, and Box3i now support XML serialization. (@NogginBops) API: Added ProgramBinaryLength to the GetProgramParameterName enum. (@NogginBops) FIX: MathHelper.ClampAngle and MathHelper.ClampRadians now return correct results. (@FlashX64) FIX: MathHelper.NormalizeRadians now return correct results. (@FlashX64) FIX: OpenAL now correctly loads on FreeBSD. (@Partmedia) Clarify in the readme that running on Windows requires "Visual C++ Redistributable 2015" (@NogginBops) Update to GLFW 3.3.8 (@NogginBops)