Page 1 of 1

Screen image to and from memory buffer

PostPosted: Oct 6, 2004 @ 7:17am
by nightcat

PostPosted: Oct 7, 2004 @ 1:50am
by Kzinti
You need to create a rasterizer (or use the display's one) to blit to your surface:

1) Create the surface you want to blit to
2) display->SetRenderTarget( your surface );
3) Blit the backbuffer to it with display->Blit( backbuffer );
4) Restore the rasterizer to the backbuffer (display->SetRenderTarget(0)

To bring back your saved copy to the screen, and assuming your render target is back to the backbuffer, a simply display->Blit( your surface ) will do.

Let me know if anything isn't clear to you.