After i render my X file i try to save the back buffer to a file, as seen below. But i recieve the following error
Error 5
Error in the application.
in directx 8.1 i had it working fine. does anyone know why this is not working, or if there are any issues with directx9 and surfaceloader?
thanks
save backbuffer to image
Dim surf As Microsoft.DirectX.Direct3D.Surface
surf = g_D3DDevice.GetBackBuffer(0, 0, BackBufferType.Mono)
Dim destRect As System.Drawing.Rectangle
destRect.X = 0
destRect.Width = g_width
destRect.Y = 0
destRect.Height = g_height
surf2 = g_D3DDevice.CreateOffscreenPlainSurface(1024, 1024, Mode.Format, Pool.Default)
SurfaceLoader.FromSurface(surf2, surf, destRect, Filter.None, 0)
SurfaceLoader.Save("C:\test.bmp", ImageFileFormat.Bmp, surf)
Error 5
Error in the application.
in directx 8.1 i had it working fine. does anyone know why this is not working, or if there are any issues with directx9 and surfaceloader?
thanks
save backbuffer to image
Dim surf As Microsoft.DirectX.Direct3D.Surface
surf = g_D3DDevice.GetBackBuffer(0, 0, BackBufferType.Mono)
Dim destRect As System.Drawing.Rectangle
destRect.X = 0
destRect.Width = g_width
destRect.Y = 0
destRect.Height = g_height
surf2 = g_D3DDevice.CreateOffscreenPlainSurface(1024, 1024, Mode.Format, Pool.Default)
SurfaceLoader.FromSurface(surf2, surf, destRect, Filter.None, 0)
SurfaceLoader.Save("C:\test.bmp", ImageFileFormat.Bmp, surf)