Domanda

I'm wondering what is the best way to render a polygon to WPF-compatable BitmapSource using DirectX (preferably SharpDX)?

I have to render tens of thousands of polygons like this offscreen to BitmapSource then include in a WPF applicatoin and need the fastest possible way to do it. The rendering must be performed off-screen for later showing in a WPF Image OR exporting to file.

enter image description here

(not actual size. Polygon size ranges from 16x16 to 24x24 pixels)

Any suggestions welcome!

È stato utile?

Soluzione

WPF has its own ability to render shapes and does so using DirectX as DirectX is the underlying technology behind WPF. Here is a link to some some sample code for using SharpDX in WPF.

http://directx4wpf.codeplex.com/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top