IDXGIOutput::GetDisplaySurfaceData Method

Gets a copy of the current display surface.

On Xbox One, this method is not implemented, and returns DXGI_ERROR_UNSUPPORTED.

Note

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.

Syntax

public:
HRESULT GetDisplaySurfaceData(
         IDXGISurface *pDestination
)  

Parameters

pDestination
Type: IDXGISurface *

[in] A pointer to a destination surface (see IDXGISurface).

Return value

Type: HRESULT 

Returns one of the DXGI_ERROR values.

Remarks

Xbox note: This method can only be called when this output is owned by a device.

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

Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).

Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).

See also

IDXGIOutput

IDXGIOutput Members