Jump to content
  • Advertisement
Sign in to follow this  
The Riddler

GetRenderTargetData, UpdateSurface, StretchRect and D3DPOOL

This topic is 3050 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Need help ASAP!! Due tomorrow I want to collect the BackBuffer contents into a Surface in D3DPOOL_DEFAULT Firstly I create an OffscreenSurface with the RenderTarget Surface Descriptor. I then use GetRenderTargetData to capture the contents. This returns S_OK and I can confirm the copy worked by dumping that surface to a BMP file with D3DXSaveSurfaceToFile. However StretchRect states that textures must exist in the D3DPOOL_DEFAULT to operate, and my OffScreenSurface must exist in D3DPOOL_SYSTEMMEM to capture the RenderTarget. I need StretchRect to re-size chunks of the surface... At the moment I have a D3DX loaded texture, lock a surface of that and then tear that into chunks. How do I move my captured screen data onto this surface??? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Can't you just StretchRect directly from the back buffer to your surface in D3DPOOL_DEFAULT?

Share this post


Link to post
Share on other sites

Do you actually need your data on the CPU side of things? If not, you could forget about using all these (relatively slow) functions and just use a sprite or something like that to draw parts of your captured screen onto various chunk-sized render targets.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!