Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDXGIOutput1::GetDisplaySurfaceData1 method

Copies the display surface (front buffer) to a user-provided resource.

Syntax


HRESULT GetDisplaySurfaceData1(
  [in] IDXGIResource *pDestination
);

Parameters

pDestination [in]

A pointer to a resource interface that represents the resource to which GetDisplaySurfaceData1 copies the display surface.

Return value

Returns one of the error codes described in the DXGI_ERROR topic.

Remarks

GetDisplaySurfaceData1 is similar to IDXGIOutput::GetDisplaySurfaceData except GetDisplaySurfaceData1 takes an IDXGIResource and IDXGIOutput::GetDisplaySurfaceData takes an IDXGISurface.

GetDisplaySurfaceData1 returns an error if the input resource is not a 2D texture (represented by the ID3D11Texture2D interface) with an array size (ArraySize member of the D3D11_TEXTURE2D_DESC structure) that is equal to the swap chain buffers.

The original IDXGIOutput::GetDisplaySurfaceData and the updated GetDisplaySurfaceData1 behave exactly the same. GetDisplaySurfaceData1 was required because textures with an array size equal to 2 (ArraySize = 2) do not implement IDXGISurface.

You can call GetDisplaySurfaceData1 only when an output is in full-screen mode. If GetDisplaySurfaceData1 succeeds, it fills the destination resource.

Use IDXGIOutput::GetDesc to determine the size (width and height) of the output when you want to allocate space for the destination resource. This is true regardless of target monitor rotation. A destination resource created by a graphics component (such as Direct3D 11) must be created with CPU write permission (see D3D11_CPU_ACCESS_WRITE). Other surfaces can be created with CPU read-write permission (D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE). GetDisplaySurfaceData1 modifies the surface data to fit the destination resource (stretch, shrink, convert format, rotate). GetDisplaySurfaceData1 performs the stretch and shrink with point sampling.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]

Header

DXGI1_2.h

Library

DXGI.lib

See also

IDXGIOutput1

 

 

Show:
© 2017 Microsoft