IDXGISurface2 interface (dxgi1_2.h)
The IDXGISurface2 interface extends the IDXGISurface1 interface by adding support for subresource surfaces and getting a handle to a shared resource.
Inheritance
The IDXGISurface2 interface inherits from IDXGISurface1. IDXGISurface2 also has these types of members:
Methods
The IDXGISurface2 interface has these methods.
IDXGISurface2::GetResource Gets the parent resource and subresource index that support a subresource surface. |
Remarks
An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call IDXGIOutput::GetDisplaySurfaceData. Then, call QueryInterface on the IDXGISurface object that IDXGIOutput::GetDisplaySurfaceData returns to retrieve the IDXGISurface2 interface.
Any object that supports IDXGISurface also supports IDXGISurface2.
The runtime automatically creates an IDXGISurface2 interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an IDXGISurface2 interface when you call ID3D11Device::CreateTexture2D to create a 2D texture. To retrieve the IDXGISurface2 interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface. In this call, you must pass the identifier of IDXGISurface2. If the 2D texture has only a single MIP-map level and does not consist of an array of textures, QueryInterface succeeds and returns a pointer to the IDXGISurface2 interface pointer. Otherwise, QueryInterface fails and does not return the pointer to IDXGISurface2.
You can call the IDXGIResource1::CreateSubresourceSurface method to create an IDXGISurface2 interface that refers to one subresource of a stereo resource.
Requirements
Requirement | Value |
---|---|
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] |
Target Platform | Windows |
Header | dxgi1_2.h |