Nice looking fog effect

Windows.Forms can run cross-platform, too.

I was curious about the project, so I’ve ported it for you: download here.

I simply switched from Tao.SimpleOpenGlControl to OpenTK.GLControl. Porting the OpenGL calls took a littile time, but the process uncovered several issues (invalid parameters to OpenGL functions - OpenTK catches those automatically). I’ve also simplified the main loop a little - no need for background threads, you can use Application.Idle (better performance, too).

The only remaining issue is case-sensitivity when loading the bitmaps from disk. Just something to keep in mind on new projects.

Have fun!

Thank you very much, I seriously don’t know what to say :slight_smile:

Seems, I’ll have to take a look at OpenTK :wink: Although I’m curious as to what were those incorrect parameters.

That’s a really neat trick with the Application.Idle. Really improved performance.

No need to say anything, I had half an hour to burn and was curious to see how feasible a Tao->OpenTK port is (verdict: it really isn’t, unless you have written an all-encompassing abstraction layer :slight_smile: ).

On the other hand, it is actually very easy to move from Tao.SimpleOpenGlControl to OpenTK.GLControl: add the new control, remove the old and add a SwapBuffers() call to the paint event. The rest of the code (e.g. Tao.OpenGl) will continue to work as if nothing’s changed, which is very nice for established projects. It seems the compatibility efforts have paid off.