IDXGISurface1 interface (dxgi.h)

The IDXGISurface1 interface extends the IDXGISurface by adding support for using Windows Graphics Device Interface (GDI) to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface.


The IDXGISurface1 interface inherits from IDXGISurface. IDXGISurface1 also has these types of members:


The IDXGISurface1 interface has these methods.


Returns a device context (DC) that allows you to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface using Windows Graphics Device Interface (GDI).

Releases the GDI device context (DC) that is associated with the current surface and allows you to use Direct3D to render.


This interface is not supported by DXGI 1.0, which shipped in Windows Vista and Windows Server 2008. DXGI 1.1 support is required, which is available on Windows 7, Windows Server 2008 R2, and as an update to Windows Vista with Service Pack 2 (SP2) (KB 971644) and Windows Server 2008 (KB 971512).

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 IDXGISurface1 interface.

Any object that supports IDXGISurface also supports IDXGISurface1.

The runtime automatically creates an IDXGISurface1 interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an IDXGISurface1 interface when you call ID3D11Device::CreateTexture2D or ID3D10Device::CreateTexture2D to create a 2D texture. To retrieve the IDXGISurface1 interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface or ID3D10Texture2D::QueryInterface. In this call, you must pass the identifier of IDXGISurface1. 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 IDXGISurface1 interface pointer. Otherwise, QueryInterface fails and does not return the pointer to IDXGISurface1.


Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dxgi.h

See also

DXGI Interfaces