Sign in to follow this  
The Riddler

GetRenderTargetData, UpdateSurface, StretchRect and D3DPOOL

Recommended Posts

The Riddler    122
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
remigius    1172

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this