title: Initializing NSOpenGLPixelFormat in Swift
body: <p>Apparently I'm the only one to attempt this, as none of my Google searches turned up anything helpful. Assume I'm initializing an attribute array like this:</p>
  
  <pre><code>let glPFAttributes = [
      NSOpenGLPFAAccelerated,
      NSOpenGLPFADoubleBuffer,
      NSOpenGLPFAColorSize, 48,
      NSOpenGLPFAAlphaSize, 16,
      NSOpenGLPFAMultisample,
      NSOpenGLPFASampleBuffers, 1,
      NSOpenGLPFASamples, 4,
      NSOpenGLPFAMinimumPolicy,
      0
  ]
  </code></pre>
  
  <p>These things are all regular Ints, I've checked. Now if I do</p>
  
  <pre><code>let glPixelFormat = NSOpenGLPixelFormat(attributes: glPFAttributes)
  </code></pre>
  
  <p>the compiler gives me this error message: </p>
  
  <blockquote>
    <p>'Int' is not identical to 'NSOpenGLPixelFormatAttribute'</p>
  </blockquote>
  
  <p>If I made a mistake somewhere, I'm not seeing it.</p>