As far as I know, WPF does hardware-accelerated drawing if possible, with a fallback to software rendering if the user does not have DirectX 9+. That is a very interesting idea, and I even like the idea of XAML.
The reason I don't like it, and why I didn't even bother learning it, is that while Windows Forms is a Microsoft technology, and inferior to WPF, it is cross-platform through Mono, something that's not true for WPF, and probably will never be.
There's debate around whether a .NET WinForms wrapper for Linux/OS X will hit a patent brick wall in the future, but that's outside of the scope of this question.
Is there any library for .NET and Mono that will let me use basic hardware acceleration (think alpha compositing, fast pixel manipulation, etc) with a software fallback for systems without the required GPUs/drivers?
In short: fast graphics on non-ancient desktops and modern laptops, but usable graphics on low-end netbooks and similar devices. This is not for game development.
There are several tricks to make GDI+ faster. Set/GetPixel are much improved by raw pointer access.
The pixel format used can improve rendering greatly, 32bppPArgb (32-bit with 8-bit Alpha and RGB values Pre-multiplied by the alpha).
There are other tricks that can get faster speeds, but managed GDI+ is still slow for some purposes.
My current choice is to try Irrlicht, but only because I see no alternative. Is there?
Besides, even though it seems to support software rendering, I don't know how's the state of it in it's .NET/Mono wrapper, and the support link of it is a forum post.
none at the moment.
Besides there is a further problem: I have no idea how to "abstract" around a graphics library. If further on I realize I've made the wrong choice, I won't know what to do.
Please excuse the length of this question.
Edit: Since this question had two really constructive answers, I'll wait some days and tick the most upvoted one as the accepted answer.
In another news, it seems OpenGL is implemented in software, both by OS vendors as by third parties, and these implementations will be used by OpenGL frameworks in the lack of third party drivers.
How about cairo? It has multiple back-ends, including OpenGL, GDI, X, and Quartz, and should work on nearly any device. Mono.Cairo implements a .NET wrapper for it, but I'm unsure whether this allows switching back-end through code, or whether it requires rebuilding for each system.
Cairo is used as the back-end for Moonlight, Gtk+, and Mono's System.Drawing implementation.
One framework set not mentioned in your lineup is Silverlight. It's hardware accelerated on Windows, and Moonlight is now hardware accelerated on Linux. Not sure about software fallback, but I imagine they have to have fallback since they were both designed for very broad consumer use.
How about OpenTK but then using http://www.mesa3d.org/? It's been a long time since I looked at mesa3d but it provides a software-rendering capability to OpenGL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With