IHolographicQuadLayerInterop::CreateDirect3D12ContentBufferResource method (windows.graphics.holographic.interop.h)

The CreateDirect3D12ContentBufferResource method creates a Direct3D 12 resource for use as a back buffer for the corresponding HolographicQuadLayer API object.

The D3D12_RESOURCE_DESC structure can contain any set of valid initial values. Any values that won't work with this quad layer object will be overridden in the struct indicated by pTexture2DDesc, which is not an optional parameter. The resource is created so that it is already committed to a heap.

Syntax

HRESULT CreateDirect3D12ContentBufferResource(
  ID3D12Device        *pDevice,
  D3D12_RESOURCE_DESC *pTexture2DDesc,
  ID3D12Resource      **ppTexture2DResource
);

Parameters

pDevice

Type: ID3D12Device*

A Direct3D 12 device, which will be used to create the resource.

pTexture2DDesc

Type: D3D12_RESOURCE_DESC*

The Direct3D 12 resource description. This parameter is not optional.

CreateDirect3D12ContentBufferResource adjusts the description as needed to comply with platform requirements, such as buffer size or format restrictions, which are determined at runtime. Your application should inspect the descriptor for the texture returned in ppCreatedTexture2DResource, and respond appropriately to any differences from what was specified.

ppTexture2DResource

Type: ID3D12Resource**

If successful, the Direct3D 12 2D texture resource for use as a content buffer. Otherwise, nullptr.

Return value

S_OK if successful, otherwise returns an HRESULT error code indicating the reason for failure. Also see COM Error Codes (UI, Audio, DirectX, Codec).

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Header windows.graphics.holographic.interop.h