Intensive graphics application in C# (with .NET/Mono)
If you were writing a 2d graphics intensive application in C# (like animation software or a music sequencer with automated graphics control), which one would be a better choice for graphics library?
I'd like to develo开发者_如何学编程p a cross-platform application (at least portable on Windows 7, Linux), and I'd like to use only C#, avoiding mixing code in C++ (due also to interop issues).
I've already give a try to OpenTK, but it lacks of documentation, and it seems to be not very stable (using Mono it makes me sometimes crash the X server!!!)... And maybe I'm wrong, but I feel it is not a long supported library and it is going to die...
Is there a good and stable OpenGL wrapper for .NET/Mono?
I know there is a porting of Silverlight on Mono (Moonlight), but I read that has bad performance.
Thank you.
There is irrlicht library but we decided to use OpenTK in our projects. Desipe some drawbacks in newest version (1.0) it works quite stable on Win7 and it works on Linux as well.
You can use SDL.NET which is a .NET binding for the Simple DirectMedia Layer, a library used to create fast 2D games.
Another way could be GTK#, but I don't know about its graphics performance.
Right now, and for your purposes, I'd recommend MonoXNA
Alternatively, CSGL (OpenGL wrapper for .NET/Mono)
It's been a while since I looked into cross platform gaming with .NET but when I was considering doing so I the Unity Game Development Tool looked quite attractive. I'm guessing that underneath they are using OpenGL and I don't know exactly where Unity stands in terms of whether they really provide their own Graphics API or whether it is more about providing a set of integrated tools for game development. If you haven't looked into it before though it is worth taking a peek.
Since you are looking for something active and supported, how about Qt? It has .NET support. It is not something that I have personally used, but they have certainly been around a long time.
I would only consider OpenGL if you really need 3D. Have you looked at Cairo? Also, as far as I know, System.Drawing works equally well on mono + gtk as it does on windows with .Net.
If you are keen you can try Moonlight.Desktop, the stable version works quite well with silverlight 2.0 controls, the beta supports silverlight 3.0 and some from 4.0, I've made a number of small apps that work like this in mono on linux and windows but there was a bit of manual hacking of build scripts to get my projects built.
Unless you have a reason not to do so, I would try to do a basic silverlight desktop app on windows and have a gtk# shell for linux/mono while all the time keeping a core (model + controller) assembly project building for both platforms.
Csgl is perfectly stable...
...since it is no longer developed.
I really recommend the TAO Framework. It is cross-Platform (linux, mac os, windows) and still developed. It is quite huge and has alot of features.
Irrlicht and (mono-)Xna are designed for wirting games.
精彩评论