---
title: "CVDisplayLinkCreateWithOpenGLDisplayMask(_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvdisplaylinkcreatewithopengldisplaymask(_:_:)"
---

# CVDisplayLinkCreateWithOpenGLDisplayMask(_:_:)

Creates a display link from an OpenGL display mask.

## Declaration

```swift
func CVDisplayLinkCreateWithOpenGLDisplayMask(_ mask: CGOpenGLDisplayMask, _ displayLinkOut: UnsafeMutablePointer<CVDisplayLink?>) -> CVReturn
```

## Parameters

- `mask`: The OpenGL display mask describing the available displays.
- `displayLinkOut`: On output, displayLinkOut points to the newly created display link.

## Return Value

Return Value A Core Video result code. See Core Video Constants for possible values.

## Discussion

Discussion Using this function avoids having to call the Core Graphics function CGOpenGLDisplayMaskToDisplayID.

## See Also

### Creating Display Links

- [CVDisplayLinkCreateWithCGDisplay(_:_:)](corevideo/cvdisplaylinkcreatewithcgdisplay(_:_:).md)
- [CVDisplayLinkCreateWithCGDisplays(_:_:_:)](corevideo/cvdisplaylinkcreatewithcgdisplays(_:_:_:).md)
- [CVDisplayLinkCreateWithActiveCGDisplays(_:)](corevideo/cvdisplaylinkcreatewithactivecgdisplays(_:).md)
