I​Direct3​DSurface I​Direct3​DSurface I​Direct3​DSurface Interface

Definition

This represents an IDXGISurface and can be used to interop between Windows Runtime components that need to exchange IDXGISurface references.

public : interface IDirect3DSurfacepublic interface IDirect3DSurfacePublic Interface IDirect3DSurface
Inheritance
IClosableIDisposableIDisposable
IDirect3DSurfaceIDirect3DSurfaceIDirect3DSurface
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Examples

First include the necessary headers and namespaces:

#include <Windows.Graphics.DirectX.Direct3D11.interop.h>
#include <dxgi.h>
using namespace Windows::Graphics::DirectX::Direct3D11;
using namespace Microsoft::WRL;

To get the native DirectX surface that is wrapped by a Direct3DSurface:

IDirect3DSurface^ d3dSurface = ...;  
ComPtr<IDXGISurface> nativeSurface;
HRESULT hr = GetDXGIInterface(d3dSurface, nativeSurface.GetAddressOf());

To create a new Direct3DSurface object wrapping a native DirectX surface:

ComPtr<IDXGISurface> nativeSurface = ...;
IDirect3DSurface^ d3dSurface = CreateDirect3DSurface(nativeSurface.Get());

Remarks

To move back and forth between IDirect3DSurface and IDXGISurface, use the CreateDirect3DSurface and GetDXGIInterface(IDirect3DSurface^, DXGIType**) functions.

Properties

Description Description Description

Gets a Direct3DSurfaceDescription describing the surface.

public : Direct3DSurfaceDescription Description { get; }public Direct3DSurfaceDescription Description { get; }Public ReadOnly Property Description As Direct3DSurfaceDescription
Attributes

See Also