Created
May 11, 2013 23:14
-
-
Save anonymous/5561765 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Paint(IntPtr srcBuffer, int srcRowSpan, AweRect srcRect, AweRect destRect) | |
{ | |
var graphics = GameSession.Current.Services.Get<GraphicsManager>(); | |
var pixelSize = srcRowSpan / srcRect.Width; //4 | |
var stream = new DataStream(srcBuffer, srcRect.Width * srcRect.Height * pixelSize, true, false); | |
var box = new DataBox(srcRowSpan, 0, stream); | |
graphics.Device.ImmediateContext.UpdateSubresource(box, texture, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment