1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| LPDIRECT3DSURFACE9 pSurface;
m_pd3dDevice->GetBackBuffer( 0,0, D3DBACKBUFFER_TYPE_MONO, &pSurface );
/* Get the back buffer description. */
D3DSURFACE_DESC desc;
pSurface->GetDesc( &desc );
/* Copy the back buffer into a surface of a type we support. */
LPDIRECT3DSURFACE9 pCopy;
m_pd3dDevice->CreateOffscreenPlainSurface( desc.Width, desc.Height, D3DFMT_R8G8B8, D3DPOOL_DEFAULT, &pCopy ,NULL);
D3DXLoadSurfaceFromSurface( pCopy, NULL, NULL, pSurface, NULL, NULL, D3DX_DEFAULT, 0 );
pSurface->Release();
/* Update desc from the copy. */
pCopy->GetDesc( &desc ); |
Partager