<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenGLView/defaultPixelFormat()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOpenGLView(cm)defaultPixelFormat"
  },
  "title" : "defaultPixelFormat()"
}
-->

# defaultPixelFormat()

Returns a default [`NSOpenGLPixelFormat`](/documentation/AppKit/NSOpenGLPixelFormat) object.

```
class func defaultPixelFormat() -> NSOpenGLPixelFormat
```

## Return Value

A pixel format object with no attributes set.

## Discussion

Typically used with the initializer [`init(frame:pixelFormat:)`](/documentation/AppKit/NSOpenGLView/init(frame:pixelFormat:)), this object has no attributes set.

---

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)