Winapi/OGL port. Lots of improvements