OpenGL with C#

April 14, 2010 Bartosz Jablonski

Have you ever tried to find OpenGL library for C#? Well designed and up to date wrapper for the managed code would be enough. Actually, when you try to google “OpenGL C#“, the results are far from what is expected.

Long, long time ago I used to work with CsGL – that was one of the first OpenGL wrappers for .NET environment. Bad news are that its development has been stopped quite soon. Even worse was the fact, that basically it completely didn’t work with .NET 2.0… However it is still number one in many Google keywords like “opengl c#“.

That work was being continued by some contributors (Randy Ridge). Tao framework was another one very good library created both for .NET and Mono. Similarly the development has stopped and the last known release is dated to November 2005.

Recently I have found a very promising project called The Open Toolkit library (OpenTK). Which is a C# library wrapping most of the OpenGL, OpenCL and OpenAL functions. The RC1 version has been released on March 2010, so I believe that it will still be developed actively now. One of its great features (which simply does not exist in other wrappers of this kind) is the support for .NET types and classes for all OpenGL settings (yes – finally you can use Color class instead of RGB components only). It runs on different platforms and supports all .NET languages.

Definitely worth checking!

Last posts