interop::CreateDirect3D11SurfaceFromDXGISurface 함수(windows.graphics.directx.direct3d11.interop.h)

IDXGISurfaceIDirect3DSurface 인스턴스를 만듭니다.

통사론

HRESULT CreateDirect3D11SurfaceFromDXGISurface(
        IDXGISurface *dgxiSurface,
  [out] IInspectable **graphicsSurface
);

매개 변수

dgxiSurface

[out] graphicsSurface

형식: IInspectable**

IDXGISurface래핑하는 IDirect3DSurface 인스턴스입니다.

반환 값

형식: HRESULT

함수가 성공하면 S_OK반환합니다. 그렇지 않으면 HRESULT오류 코드반환합니다.

발언

C++/WinRT것이 좋습니다. C++/CX를 사용하는 경우 CreateDirect3D11DeviceFromDXGIDevice대신 CreateDirect3DSurface 호출해야 합니다. WRL을 사용하는 경우 이 코드 예제와 같이 CreateDirect3D11DeviceFromDXGIDevice 사용할 수 있습니다.

using namespace Microsoft::WRL;
ComPtr<ABI::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface> surface;
ComPtr<IInspectable> inspectableSurface;
If (SUCCEEDED(CreateDirect3D11SurfaceFromDXGISurface(dxgiSurface, &inspectableSurface))
{
    hr = inspectableSurface.As(&surface);
}

요구 사항

요구
대상 플랫폼 Windows
헤더 windows.graphics.directx.direct3d11.interop.h
라이브러리 D3D11.lib
DLL D3D11.dll

참고 항목

Core 함수