Reply to thread

You are hereby declared as HERO




I was not able to make TextureLoader work but you put me on the track that lead me right to the solution!


Here is the code that takes a snapshot from the current suface and saves it to the disk (can be executed before Device.Present()):

-------------------------------------------------------------------------------------------

Surface renderTarget = device.GetRenderTarget(0);

Surface destTarget = device.CreateOffscreenPlainSurface(ClientRectangle.Width,ClientRectangle.Height,graphicsSettings.WindowedDisplayMode.Format,Pool.SystemMemory);

device.GetRenderTargetData(renderTarget,destTarget);

SurfaceLoader.Save(@"c:\temp\test.bmp",ImageFileFormat.Bmp,destTarget);

-------------------------------------------------------------------------------------------

You have saved my day!!!!!!!!!!!!!!!


Back
Top