I'm trying to make a screenshot with a timestamp but for some users they sometimes don't get the timestamp on the image :S
From the WndProc I call the CreateScreenshot function which looks as following:
lpD3DDevice->BeginScene(); lpD3DDevice->Clear(ZBUFFER | STENCIL); draw timestamp as text... lpD3DDevice->EndScene(); lpD3DDevice->Present(...); LPDIRECT3DSURFACE9 lpSurface; lpD3DDevice->GetRenderTarget( 0, &lpSurface ); D3DXSaveSurfaceToFile( fileName, D3DXIFF_PNG, lpSurface, 0, 0 ); lpSurface->Release();
I'm not sure why sometimes this doesn't work. Can it be possible it has to do with the monitor vsync? Like it ignores the new rendered frame..
Thanks for reading ;)