Created
September 5, 2014 13:36
-
-
Save shvyrev/54f869a1136c52999683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LPDIRECT3DSURFACE9 Surface; | |
D3DXIMAGE_FILEFORMAT FileFormat; | |
// Grab the current image in our front buffer. | |
d3d_device->CreateOffscreenPlainSurface( ScreenWidth, ScreenHeight, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &Surface, NULL ); | |
// Copy everything from the front buffer to our surface. | |
d3d_device->GetFrontBufferData( 0, Surface ); | |
// Write the contents of the surface to the given file. | |
D3DXSaveSurfaceToFile("hero", D3DXIFF_PNG, Surface, NULL, NULL); | |
Surface->Release( ); | |
Surface = NULL; |
donotfeedaslender
commented
Jul 18, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment