DisplayDevice.CreatePrimary(DisplayTarget, DisplayPrimaryDescription) Method

Definition

Creates a primary surface (or just "primary") for use with the display controller. The resulting primary surface is compatible with a DisplayScanout, which is used for presenting content directly to the screen.

public:
 virtual DisplaySurface ^ CreatePrimary(DisplayTarget ^ target, DisplayPrimaryDescription ^ desc) = CreatePrimary;
DisplaySurface CreatePrimary(DisplayTarget const& target, DisplayPrimaryDescription const& desc);
public DisplaySurface CreatePrimary(DisplayTarget target, DisplayPrimaryDescription desc);
function createPrimary(target, desc)
Public Function CreatePrimary (target As DisplayTarget, desc As DisplayPrimaryDescription) As DisplaySurface

Parameters

target
DisplayTarget

An active DisplayTarget, which is used to determine which source the primary will be optimized for.

desc
DisplayPrimaryDescription

A description of the primary surface to create, such as width, height, and pixel format.

Returns

A DisplaySurface value.

Remarks

A primary surface is usually optimized by display hardware for scanout on only a single DisplaySource, so the DisplayTarget used to create the primary should also be the one used to create the DisplaySource and DisplayScanout objects. Otherwise, presentation of the surface or creation of the DisplayScanout may fail.

Applies to