<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.4.0 - 15.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVDisplayLinkCreateWithCGDisplay(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVDisplayLinkCreateWithCGDisplay"
  },
  "title" : "CVDisplayLinkCreateWithCGDisplay(_:_:)"
}
-->

# CVDisplayLinkCreateWithCGDisplay(_:_:)

Creates a display link for a single display.

```
func CVDisplayLinkCreateWithCGDisplay(_ displayID: CGDirectDisplayID, _ displayLinkOut: UnsafeMutablePointer<CVDisplayLink?>) -> CVReturn
```

## Parameters

`displayID`

The Core Graphics ID of the target display.

`displayLinkOut`

On output, `displayLinkOut` points to the newly created display link.

## Return Value

A Core Video result code. See [Core Video Constants](/documentation/CoreVideo/core-video-constants) for possible values.

## Discussion

Use this call to create a display link for a single display. For more information on the display identifier type, see <doc://com.apple.documentation/documentation/CoreGraphics/CGDirectDisplayID>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)