Monday, September 10, 2012

Updating a Writeable bitmap in SIlverlight as fast as possible

Updating a Writeable bitmap in SIlverlight as fast as possible

I am currently doing this

        int[] buffer = WriteableBmp.Pixels;         System.Array.Copy( MainWarpScene.Scene.renderPipeline.screen.pixels, buffer, buffer.Length );          WriteableBmp.Invalidate(); 

In essence I am copying an existing pixel buffer (modified in realtime) to the Writeable Bitmap via the array copy method.

It's very fast see http://www.alansimes.com/warp3dsilverlighttestpage.html for an example (click and drag the scene), but is it the best way of doing it?

Answers & Comments...




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog