Note that there are some explanatory texts on larger screens.

plurals
  1. PO.NET/Mono HW Accelerated Graphics with Software Fallback
    primarykey
    data
    text
    <h2>Background</h2> <p>As far as I know, <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation" rel="nofollow noreferrer">WPF</a> 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 <a href="http://en.wikipedia.org/wiki/XAML" rel="nofollow noreferrer">XAML</a>.</p> <p>The reason I don't like it, and why I didn't even bother learning it, is that while <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="nofollow noreferrer">Windows Forms</a> is a Microsoft technology, and inferior to WPF, it is cross-platform through <a href="http://en.wikipedia.org/wiki/Mono_%28software%29" rel="nofollow noreferrer">Mono</a>, something that's not true for WPF, and probably will never be.<br> There's <a href="http://www.gnu.org/s/dotgnu/danger.html" rel="nofollow noreferrer">debate</a> 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.</p> <h2>Question</h2> <p>Is there any <strong>library</strong> for <strong>.NET</strong> <em>and</em> <strong>Mono</strong> that will let me use basic <strong>hardware acceleration</strong> (think alpha compositing, fast pixel manipulation, etc) with a <strong>software fallback</strong> for systems without the required GPUs/drivers?</p> <p>In short: <em>fast</em> graphics on non-ancient desktops and modern laptops, but <em>usable</em> graphics on low-end <a href="http://en.wikipedia.org/wiki/Netbook" rel="nofollow noreferrer">netbooks</a> and similar devices. <strong>This is not for game development</strong>.</p> <h2>Further Notes</h2> <p>There are several tricks to make GDI+ faster. Set/GetPixel are much improved by <a href="http://www.bobpowell.net/lockingbits.htm" rel="nofollow noreferrer">raw pointer access</a>.<br> The pixel format used can improve rendering greatly, <a href="http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixelformat.aspx" rel="nofollow noreferrer">32bppPArgb</a> (32-bit with 8-bit Alpha and RGB values <a href="http://en.wikipedia.org/wiki/Alpha_compositing#Description" rel="nofollow noreferrer">Pre-multiplied by the alpha</a>).<br> There are <a href="http://www.gamedev.net/topic/467752-maximizing-gdi-speed/page__p__4082948#entry4082948" rel="nofollow noreferrer">other</a> <a href="http://stereopsis.com/doubleblend.html" rel="nofollow noreferrer">tricks</a> that can get faster speeds, but managed GDI+ is still slow for some purposes.</p> <h2>Frameworks I'm Aware Of</h2> <ul> <li><a href="http://unity3d.com" rel="nofollow noreferrer">Unity3D</a> - <del>AFAIK does not support Mono.</del> Does. Shareware with free version.</li> <li><a href="http://sourceforge.net/projects/taoframework/" rel="nofollow noreferrer">TAO Framework</a> - Looks a bit complicated, and does not seem to support sofware rendering.</li> <li><a href="http://www.opentk.com/" rel="nofollow noreferrer">OpenTK</a> - Active, well-developed, and better than TAO, but no software fallback either.</li> <li><a href="http://cs-sdl.sourceforge.net/" rel="nofollow noreferrer">SDL.NET</a> - Same problem as above.</li> <li><a href="http://code.google.com/p/monoxna/" rel="nofollow noreferrer">MonoXNA</a> - Same as above.</li> <li><a href="http://irrlicht.sourceforge.net/" rel="nofollow noreferrer">Irrlicht</a> - "It is completely cross-platform, using D3D, OpenGL and its own software renderer".</li> <li><a href="http://www.silverlight.net/" rel="nofollow noreferrer">Silverlight</a>/<a href="http://www.mono-project.com/Moonlight" rel="nofollow noreferrer">Moonlight</a> - Suggested by <a href="https://stackoverflow.com/a/8513483/124119">dthorpe</a>. Alpha quality, no support whatsoever.</li> <li><a href="http://www.mono-project.com/Mono.Cairo" rel="nofollow noreferrer">Mono.Cairo</a> - Suggested by <a href="https://stackoverflow.com/a/8513693/124119">Mark H</a>.</li> <li><a href="http://www.antigrain.com/" rel="nofollow noreferrer">AGG</a> - High quality, very efficient software rendering, implemented in C++ with an unofficial <a href="http://agg-sharp.sourceforge.net/" rel="nofollow noreferrer">C# port</a>.</li> <li><a href="http://axiom3d.net/wiki/index.php/Main_Page" rel="nofollow noreferrer">Axiom3D</a> - Ogre port. Supports Mono, open-source and seems alive. Promising.</li> </ul> <hr> <p>My current choice is <del>to try Irrlicht, but only because I see no alternative. Is there?<br> Besides, even though it seems to support software rendering, I don't know how's the state of it in it's <a href="http://sourceforge.net/projects/irrlichtlime/" rel="nofollow noreferrer">.NET/Mono wrapper</a>, and the support link of it is a <a href="http://irrlicht.sourceforge.net/forum/viewtopic.php?t=38512" rel="nofollow noreferrer">forum post</a>.</del><br> <strong><em>none at the moment.</em></strong> </p> <p>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.</p> <p>Please excuse the length of this question.</p> <hr> <p><strong>Edit:</strong> Since this question had two really constructive answers, I'll wait some days and tick the most upvoted one as the accepted answer.</p> <p>In another news, it seems OpenGL is <a href="http://www.mesa3d.org/" rel="nofollow noreferrer">implemented in software</a>, both by OS vendors as by third parties, and these implementations will be used by OpenGL frameworks in the lack of third party drivers.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload