Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

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



#2 phil_t   Members   

8005
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.