ICompositorInterop2::CreateCompositionTexture method (windows.ui.composition.interop.h)

Important

Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Creates a composition texture referencing the passed-in Direct3D texture.

Syntax

HRESULT CreateCompositionTexture(
  IUnknown            *d3dTexture,
  ICompositionTexture **compositionTexture
);

Parameters

d3dTexture

Type: _In_ IUnknown*

A Direct3D texture (an ID3D11Texture2D resource) to create a composition texture for.

compositionTexture

Type: _In_ IDCompositionTexture**

Retrieves the composition texture object.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. If you try to create a composition texture for a Direct3D texture that's backed by a Direct3D device that doesn't support composition textures, then CreateCompositionTexture returns E_INVALIDARG.

Requirements

Requirement Value
Header windows.ui.composition.interop.h

See also