- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
GetScreenShot()
{
std::string NameScreen = ToString(GameLevel->EngineName) + "_" + ToString(GTime->GetTimeDays()) + "_" + ToString(GTime->GetTimeHours()) + "_" + ToString(GTime->GetTimeSec()) + ".bmp";
IDirect3DTexture9 *tex;
IDirect3DSurface9 *surf;
D3DVIEWPORT9 vp;
Device->GetViewport(&vp);
if FAILED(Device->CreateTexture(vp.Width, vp.Height, 1, 0, D3DFMT_A8R8G8B8,D3DPOOL_SYSTEMMEM, &tex, NULL ))
Beep(1000,100);
if FAILED(tex->GetSurfaceLevel(0, &surf))
Beep(500,100);
if FAILED(Device->GetFrontBufferData(0, surf))
Beep(200,100);
D3DXSaveSurfaceToFile(ToPointChar(ToString(Pather::CutPath()) + "\\ScreenShots\\" + NameScreen), D3DXIFF_BMP, surf, NULL, NULL);
surf->Release();
tex->Release();
}