*D3D中把场景保存为图片的方法
IDirect3DSurface9 *pBackBuffer;
// 取得后缓存表面
Device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
// 将后缓存表面保存为文件(D3DXIFF_*为保存的图片格式,有BMP,JPG,TGA,PNG,DDS等)
D3DXSaveSurfaceToFile("paper.jpg", D3DXIFF_JPG, pBackBuffer, NULL, NULL);
pBackBuffer->Release();
// 取得后缓存表面
Device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
// 将后缓存表面保存为文件(D3DXIFF_*为保存的图片格式,有BMP,JPG,TGA,PNG,DDS等)
D3DXSaveSurfaceToFile("paper.jpg", D3DXIFF_JPG, pBackBuffer, NULL, NULL);
pBackBuffer->Release();