IDXGIOutput::GetDisplaySurfaceData method (dxgi.h)
[Starting with Direct3D 11.1, we recommend not to use GetDisplaySurfaceData anymore to retrieve the current display surface. Instead, use IDXGIOutput1::GetDisplaySurfaceData1, which supports stereo display mode.]
Gets a copy of the current display surface.
Syntax
HRESULT GetDisplaySurfaceData(
[in] IDXGISurface *pDestination
);
Parameters
[in] pDestination
Type: IDXGISurface*
A pointer to a destination surface (see IDXGISurface).
Return value
Type: HRESULT
Returns one of the DXGI_ERROR values.
Remarks
IDXGIOutput::GetDisplaySurfaceData can only be called when an output is in full-screen mode. If the method succeeds, DXGI fills the destination surface.
Use IDXGIOutput::GetDesc to determine the size (width and height) of the output when you want to allocate space for the destination surface. This is true regardless of target monitor rotation. A destination surface created by a graphics component (such as Direct3D 10) must be created with CPU-write permission (see D3D10_CPU_ACCESS_WRITE). Other surfaces should be created with CPU read-write permission (see D3D10_CPU_ACCESS_READ_WRITE). This method will modify the surface data to fit the destination surface (stretch, shrink, convert format, rotate). The stretch and shrink is performed with point-sampling.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dxgi.h |
Library | DXGI.lib |