the Fiddler's picture

The Open Toolkit library 0.9.6

Download: opentk-0.9.6.html
Size: 405 bytes
md5_file hash: 84b182dd81dcae257adee95fce421374
First released: 26 March, 2009 - 00:03
Last updated: 26 March, 2009 - 00:06

This release introduces:

  1. Automatic OpenGL error checking;
  2. Generics for improved type-safety in the OpenGL bindings
  3. Bug fixes related to OpenGL 3.0 contexts on Linux
  4. Improved documentation in OpenTK.Graphics
  5. A new EFX example ("EFX: Reverb").

Please report any issues you encounter at

[Known issues]

This release cannot be compiled on Mono due to a compiler bug ( Please use the precompiled binaries included in the release package.

[API changes]

Please note that binary compatibility is not preserved between beta releases.

OpenTK 0.9.6 replaces object overloads in OpenTK.Graphics with generics. For example GL.CallLists changes from:

void CallLists(int n, object data)


void CallLists<T>(int n, ref T data) where T : struct
void CallLists<T>(int n, T[] data) where T : struct
void CallLists<T>(int n, T[,] data) where T : struct
void CallLists<T>(int n, T[,,] data) where T : struct

This change is intended to improve performance (no boxing) and type-safety in the OpenGL bindings.

This is a breaking change in the following cases:

Case: You pass parameters to the relevant function by value.
Solution: Please pass the parameters by reference.

Case: You use 4d or higher-dimension arrays.
Solution: Consider reducing the dimension of the array. If this is not possible, please pin the array and pass a pointer instead.

Case: You use jagged arrays.
Solution: Jagged arrays are not safe for use with OpenGL. Please change to multi-dimension arrays.

Case: You use objects that do not satisfy the struct constraint.
Solution: Reference types are not safe for use with OpenGL. Please use pure value types instead.

Pure value types are value types that recursively reference other value types only. For example, the following are pure value types:

struct Vector3 { public float X, Y, Z; }
struct Color4 { public float R, G, B, A; }
struct Vertex {
	public Vector3 Position;
	public Color4 Color;

while the following are not:

// reference type
class Player { public Vector3 Position; }
// value type that contains reference type
struct Item { public Player Player; }

Only pure value types are safe for use with OpenGL. Future OpenTK releases will contain additional runtime checks to enforce this constraint.


[Legend: complete('+') | WIP('*') | missing('-')]
OpenTK 0.9.5 -> 0.9.6
+ Bind
	+ Improved heuristics for inline OpenGL documentation.
	* Void pointers are now mapped to generic arrays (T[]) or references (ref T), where T : struct. Work in progress (see
	+ Generated bindings now automatically check for OpenGL errors, when compiled in debug mode.
	+ Disabled all generator modes except for GL.
+ OpenTK
	+ Fixed all build warnings (apart from missing documentation comments).
	+ Graphics
		+ Improved inline documentation.
		+ Added automatic OpenGL error checking in debug builds.
		+ Replaced object overloads with generics for improved type-safety and performance.
		+ Updated to version 48 specs (fixed some problems with the transform feedback extension).
	+ Platform
		+ Fixed GLX context attributes in the GLX_ARB_create_context code path.
		+ Revert to the legacy GLX code path for pre-GL3.0 contexts (AMD drivers do not support vsync on GL3.0+).
	+ Audio
		+ AudioContext now initializes the maximum number of effect slots supported by the drivers.
		+ Added IsSynchronized property.
+ Examples
	+ New OpenAL example (EFX reverb).