Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Check out the previous question <a href="https://stackoverflow.com/questions/8713864/high-performance-graphics-using-the-wpf-visual-layer/8714107#8714107">High Performance Graphics using the WPF Visual Layer</a> for a good related discussion. While WPF provides a great framework for rich vector graphics, it lacks somewhat for real-time 2D performance. </p> <p>There are workarounds, for instance, depending on your scene complexity you may get away with using <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.drawingvisual.aspx" rel="nofollow noreferrer">DrawingVisuals</a> or virtualized Shape classes (WPF Vector graphics) to draw your sprites. Going a little lower level, you could cache sprites using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.bitmapcache%28v=vs.95%29.aspx" rel="nofollow noreferrer">BitmapCache</a> mode available in .NET4.0, or pre-prendering them to Bitmaps and using various <a href="https://stackoverflow.com/questions/9317460/bitmap-performance-optimization-patterns/9467543#9467543">optimization patterns</a> to improve throughput. </p> <p>Going lower level still, you can mix Vector/Raster graphics using the fantantastic <a href="http://writeablebitmapex.codeplex.com/" rel="nofollow noreferrer">WriteableBitmapEx</a> project, or Vector/GPU graphics using the <a href="http://www.codeproject.com/Articles/28526/Introduction-to-D3DImage" rel="nofollow noreferrer">D3DImage</a>. </p> <p>Regarding how to update your scene, you'll need to write a primitive game engine where on the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.compositiontarget.rendering.aspx" rel="nofollow noreferrer">CompositionTarget.Rendering</a> event (fired on redraw of the screen) you get the updated parameters and compute positions/orientations of your sprites. Something that might help with this is this great <a href="http://physicshelper.codeplex.com/" rel="nofollow noreferrer">codeplex project</a> which integrates WPF/Silverlight and Farseer physics. </p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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