So, how is OpenTK development progressing?
The winter semester is finally coming to an end this week at my university (after a three-month occupation as protest against the education system reforms), and free time is a scarce commodity... That said, I'm still developing OpenTK: right now, I'm a working on a new cross-platform build system to get rid of the scripts and batch files (anyone know the name of the sadist who devised the batch file syntax?). I've also squashed quite a lot of bugs in the OpenTK.Platform.* bindings, and OpenTK will hopefully become 64-bit compatible very soon. FxCop is a great tool for things like this!
The next OpenTK version (0.3.7) will contain the new build system, these bug-fixes, and some other minor refinements of the GL API (like a new GLenum type which will hold all opengl enumerants - useful for functions that can take varying opengl enums, without any type-checking). It will also contain a new, more involved example application, which demonstrates several concepts (texturing, fonts, mouse and keyboard interaction) - many thanks to mr.morphic for providing his code!
Now, a new, highly experimental branch, contains some nice updates regarding OpenTK integration with the underlying windowing system. The code is still unstable (that's why it's in a separate branch!), but it already shows promise. The new code will allow three different levels of integration with .Net/Mono and the underlying windowing system:
- on the lowest level, the OpenTK code interacts directly with the OS' to create an opengl context. The GLContext is a thin abstraction of an opengl context. Most context handling functions will be exposed in a cross-platform way, but no window will be created. This way, you'll be able to use GLContext with any windowing toolkit (hopefully), or even create a window-less opengl context (maybe :-) ).
- one level up, there is the GLControl. This will encapsulate the raw GLContext in a Windows.Form control, while also providing cross-platform methods for resolution and display mode changing (fullscreen, windowed). You'll be able to host multiple GLControls inside a WinForm application as well as perform any operation a standard user control allows (have you ever seen a 3d rendering as part of a Visual GUI designer? Stay tuned for pictures!)
- On the highest level, there is the Framework. At it's heart, the Framework is a WinForm that hosts a single GLControl. However, the Framework automatically takes care of many tedious programming tasks, like defining and hooking a game loop, handling the logic/rendering speed and several other nice things. The Framework provides the easiest way to create an opengl applcation, but is the most limited in many regards (e.g. only one GLControl).
All three levels will be cross-platform. The GLContext and GLControl implementations are already working on windows - but the real challenge is X (Windows.Forms weren't designed with X in mind, which means there are some hacks we have to do to get opengl support on a WinForm in Mono/X).
That's all for now. Coming next week, I'll have more free time to update this site and work on OpenTK, and hopefully there will be some very positive results soon.