Jump to content

  • Log In with Google      Sign In   
  • Create Account


[XNA] Get the render target data and write it in a bytemap efficiently


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 LemonBiscuit   Members   -  Reputation: 147

Like
0Likes
Like

Posted 14 March 2014 - 08:40 AM

Hi,

 

I'm trying to embedd my XNA Game into a WPF application.

For that, I'm getting all the pixels displayed on the actual render target, then write them in a writeable bitmap and display it on my WPF application.

(I followed this tutorial: http://remember.waralan.fr/?p=497 (Not in English though))

 

It works fine, but this line takes a lot of CPU:

 

m_renderTarget2D.GetData(m_bytes);

 

 

And so I lose a lot of FPS.

 

I don't have any idea how I could get all pixels on the screen any other way... have you?

 

Thanks



Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 3211

Like
0Likes
Like

Posted 14 March 2014 - 11:42 AM

There is a sample in the XNA education catalog just for this:

 

http://xbox.create.msdn.com/en-US/education/catalog/sample/winforms_series_1






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS