Starting with OpenGL 4.1 and the ARB_ES2_compatibility extension, desktop contexts can execute OpenGL|ES code. This fallback will allow platforms to execute OpenGL|ES code even if EGL is not available (e.g. Nvidia/Windows).
Some drivers / operating systems export ES entry points as extensions on regular "desktop" GraphicsContexts. Attempt to load them even if the user has not explicitly asked for an ES context.
If SDL2 is supported, the PlatformFactory will now use it for creating the OpenGL ES context. Previously, it would revert to the native drivers when GraphicsContextFlag.Embedded was specified.
MouseMove no longer leaves the window borders when the cursor is
invisible. MouseButtonUp events are now reported even when they occur
outside the window. This aligns SDL2 behavior with the native drivers.
SDL_GL_MakeCurrent(IntPtr.Zero, IntPtr.Zero) is the correct way to
remove the current OpenGL context from the calling thread. Fixes
threaded rendering on Windows.
Using a separate, isolated process protects against incompatible interactions between the Example Browser (WinForms) and the executing example (native or SDL). It also protects the main GUI from crashes in the example code.
Git commit hashcodes are not compatible with the 16bit integer values found in .Net version numbers. Use the git commit count as a version number instead.
Added IDisposable interface to all classes holding native data that must be freed. OpenTK.Toolkit.Init() now returns an IDisposable instance that can be used to cleanup all native data held by OpenTK. This is useful when re-initializing OpenTK (possibly in a new AppDomain), as is the case in the Example browser.
SDL2 will refuse to create an OpenGL context on a window with the SDL_WINDOW_FOREIGN flag (i.e. windows that are passed to SDL2 through SDL_CreateWindowFrom). This must be fixed upstream.
On some systems, the Windows Raw Input driver fails to find the name of
a mouse device, causing a NRE. Since the name is not vital information,
a dummy name is generated as a workaround.
SDL2 does not report keydown and keyup events on modifiers keys until
you release them. Attempted to fix this using SDL_GetModifierState, but
this does not appear to work. Should hit upstream.
This resolves the issue where different layouts would return different
keys when pressing the same physical key. A new API must be introduced
for text input.
The SDL surface is no longer needed and will cause a memory leak if not
freed. Additionally, the decoded BitmapData should not be unlocked until
after updating the window icon, as it may be moved by the GC otherwise.
SDL2 suffers many of the issues we encountered when implementing
OpenTK.Platform.Windows. Workarounds are now in place to make
WindowState changes behave reasonably.
Wgl is implemented using the regular DllImport + delegate approach, in
order to support extensions. The delegates have not been armed at this
point, so we need to use the DllImport directly.
The whole wgl API should be revisited (we are using only a tiny
portion.)
The file had been added to the source tree, but was missing from the
OpenTK.Examples project configuration, causing hi-dpi mode to fail on
the examples window.