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

IDXGISurface에서 IDirect3DSurface의 instance 만듭니다.

구문

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

매개 변수

dgxiSurface

[out] graphicsSurface

형식: IInspectable**

IDXGISurface를 래핑하는 IDirect3DSurface instance.

반환 값

형식: 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

추가 정보

핵심 함수