the Fiddler's picture

The Open Toolkit library 1.1

The Open Toolkit 1.1
16 February 2014

Download Installer
Download Nuget
Download Source Code


This is the first stable release for OpenTK 1.1

New features:
1. support for OpenGL 4.4 and OpenGL ES 3.0
2. strongly-typed enums for OpenGL ES 2.0 and 3.0
3. new, faster OpenGL bindings based on hand-optimized IL
4. a new SDL2 backend for improved platform compatibility
5. new Joystick and GamePad APIs under OpenTK.Input
6. improved startup time and reduced memory consumption
7. inline documentation for all OpenGL and OpenGL ES core functions
8. a greatly expanded math library
9. numerous bugfixes for Mac OS X, Windows 8 and Linux
10. ANGLE support for Windows systems without OpenGL drivers
11. support for Retina / high-DPI monitors
12. monolinker can now be used to reduce the size of OpenTK.dll
13. precompiled binaries for optional dependencies (OpenAL, SDL2, monolinker)

Users of OpenTK 1.0 and 1.1 beta are strongly encouraged to upgrade to OpenTK 1.1 stable.

[Release schedule]
The next release is scheduled for March 16.

The current focus lies on adding support for Xamarin.Android and iOS.

[Resolved issues]

Please refer to the following pages for a complete list:

OpenTK 1.1 contains the following changes compared to 1.1 rc2:
- [Graphics] Improved support for VB.Net.
- [Win] KeyPress events should only be raised for printable characters.
- [All] Reduced installer size.
- [All] Updated manual and API reference for OpenTK 1.1.

[Known issues]
- [all] Keyboard API exposes ushort parameter.
- [SDL2] does not support OpenTK.GLControl.
- [Mac/Carbon] does not support Retina resolutions. Please use the SDL2 backend instead.
- [Mac/Carbon] does not support OpenGL 3.x/4.x. Please use the SDL2 backend instead.

[Report an issue]

Help us improve OpenTK by reporting bugs or by contributing your skills.

Don’t forget to mention your operating system and GPU! If possible, try to attach a small, self-contained test case that reproduces the bug.

[API compatibility]

Most projects will be able to upgrade to OpenTK 1.1 without any modifications. However, due to updates in the official OpenGL specification and due to bugfixes in the binding generator, a number of OpenGL signatures have changed between OpenTK 1.0 and 1.1.

Modified signatures have been marked with the [Obsolete] attribute. A warning message will be generated with instructions on a suggested replacement.

In a small number of cases, using the original signature would lead to incorrect results or a crash. These cases will generate a compile-time error now. If you use any of the following signatures, please apply the suggested modification:

Namespace OpenTK.Graphics.OpenGL
Change signature:
- GL.MultiDrawArrays (`out` -> `ref`)
- GL.Amd.DeletePerfMonitors (`out` -> `ref`)

Change signature (may cause crash):
- GL.Apple.ObjectPurgeable (returns `AppleObjectPurgeable` instead of `IntPtr`)
- GL.Ext.SeparableFilter2D
- GL.Ibm.EdgeFlagPointerList (`bool[]` -> `bool*[]`)
- GL.NV.TransformFeedbackVaryings (`string[]` -> `int[]`)

Change return type:
- GL.WaitSync (returns `WaitSyncFlags` instead of `ArbSync`)

Namespace OpenTK.Graphics.ES11
Change return type:
- GL.GetError (`ErrorCode` instead of `All`)

Change `ref` parameters to `out`:
- GL.GenBuffers
- GL.GenTextures
- GL.GetBoolean
- GL.GetBufferParameter
- GL.GetClipPlane
- GL.GetClipPlanex
- GL.GetFixed
- GL.GetFloat
- GL.GetInteger
- GL.GetLight
- GL.GetLightx
- GL.GetMaterial
- GL.GetMaterialx
- GL.GetTexEnv
- GL.GetTexEnvx
- GL.GetTexParameter
- GL.GetTexParameterx
- GL.Oes.GenFramebuffers
- GL.Oes.GetClipPlane
- GL.Oes.GetClipPlanex
- GL.Oes.GetFixed
- GL.Oes.GetFramebufferAttachmentParameter
- GL.Oes.GetLightx
- GL.Oes.GetMaterialx
- GL.Oes.GetRenderbufferParameter
- GL.Oes.GetTexEnvx
- GL.Oes.GetTexGen
- GL.Oes.GetTexGenx
- GL.Oes.GetTexParameterx
- GL.Oes.QueryMatrixx
- GL.NV.GenFences
- GL.NV.GetFence

Change namespace:
- GL.ClipPlanefIMG -> GL.Img.ClipPlane
- GL.DisableDriverControlQCOM -> GL.Qcom.DisableDriverControl

Namespace OpenTK.Graphics.ES20.GL
Change signature (may cause crash):
- GL.NV.GetFence now takes three parameters instead of two

Change `ref` parameters to `out`:
- GL.GetActiveAttrib
- GL.GetActiveUniform
- GL.GetAttachedShaders
- GL.GetProgramInfoLog
- GL.GetShaderInfoLog
- GL.GetShaderSource
- GL.Amd.GetPerfMonitorCounterData
- GL.Amd.GetPerfMonitorCounters
- GL.Amd.GetPerfMonitorCounterString
- GL.Amd.GetPerfMonitorGroup
- GL.Amd.GetPerfMonitorGroupString
- GL.Amd.SelectPerfMonitorCounters

Change namespace:
- GL.DisableDriverControlQCOM -> GL.Qcom.DisableDriverControl
- GL.GetDriverControlsQCOM -> GL.Qcom.GetDriverControls
- GL.GetDriverControlStringQCOM -> GL.Qcom.GetDriverControlString


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flopoloco's picture

Epic release. Well done Fiddler and all other contributors, good work.

JTalton's picture

Great work. It is much appreciated! High DPI support! Improved controller support! Faster bindings! SDL backend!

the Fiddler's picture

Equally as important are the less visible changes, e.g. the reduction in memory consumption (500KB in 5K objects instead of 1.5MB in 30K objects) and the huge amount of stability improvements across all platforms. OpenTK now works with all kinds of weird setups and drivers, including remote desktops, multi-GPU systems etc etc.

The other great thing is that you can now strip the dll using monolinker (included under opentk/Dependencies/managed). For a moderate application, this reduces OpenTK.dll from ~3900KB to <600KB. If you are not using OpenTK.Platform (e.g. you are using SDL or GLFW), OpenTK.dll goes down to 190KB!

Combine with il-repack or ilmerge and this becomes a great way to distribute self-contained applications.

JTalton's picture

Yes those are equally great and important items.

BTW I took a look at the Generator.Rewrite project. Wonderful!

I have use il-merge but I have not used monolinker. I understand the premise, but just have not gotten to the point that I need it yet. Are there plans for any tutorials on best practices for merging with il-repack and optimizing the size with mono-linker?

Is there any documentation on the SDL2 backend support? I assume that I just download the official binaries for windows and put them in the executable directory. For OSX is the same true or does it need to be installed? What are the major pros/cons with using the SDL2 backend?

I know these are new features and unless I am missing it, maybe we just need to add OpenTK documentation for them. Maybe creating issue trackers for adding documentation?

I am also interested in hearing about the future support for Xamarin.Android and iOS.

Thanks again!

the Fiddler's picture

The SDL2 backend and monolinker are described in opentk/Dependencies/Readme.txt. Precompiled versions are included under opentk/Dependencies for convenience.

Please submit an issue regarding documentation, we are indeed missing docs on deployment strategies.

Regarding Xamarin.Android and iOS, I am gradually merging the changes from mono/opentk. The difficulty is that mono/opentk is based on an old fork from svn, with various incompatible changes on top (e.g. it includes a wildly different public Matrix3 API). Even worse, the Android and iOS versions are actually maintained in different, incompatible branches. Sorting through this mess without breaking applications takes significant effort.