Comment viewing options

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

OpenTK is a .NET programming library wrapping the OpenGL and OpenAL API, among other things.

From your links above, Mazer Mayhem seems to be written to use the XNA library and some physics library.

So I'd say: lots of work, unless it is really nicely layered into graphics and sound subsystems, which can use OpenGL/AL instead of XNA equivalents.

nitrofurano's picture

Thanks! =)
Btw, i didn't analise the Mazer Mayhem code yet, but i hope the xna-related commands can be easily replaced to OpenTK/OpenGL/OpenAL library commands!
Anyone able to help us?
Thanks again! =)

kanato's picture

I looked through the source code a bit, and it looks like you've got a fair bit of work ahead of you, but it probably won't be too tough. On the plus side, there isn't too much code in the whole project, so that's good.

They use the Xna.Framework.Game class, which is probably about equivalent to OpenTK's GameWindow class, but the semantics are a bit different. Most of the source files reference the Xna libraries, but this mainly seems to be confined to the usage of the math structures (vectors, matrices, and quaternions), which have equivalents in OpenTK. There is a shader that will have to be converted to the OpenGL shading language (perhaps through using a tool like HLSL2GLSL?). They also use the XNA content pipeline, for which there is no equivalent in OpenTK. These two things will probably be the most difficult things to convert and get the semantics right.

flopoloco's picture


I find myself getting bored sometimes by porting pieces of code (from MDX, TaoFramework, ) back and forth, but I am dedicated to learn these stuff. Too bad there is not any material made with OpenTK yet. Such a beautiful library collapsing under it's own weight...

Currently I have put aside OpenTK and C#... I use C++