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

# CVOpenGLBufferPoolCreateOpenGLBuffer(_:_:_:)

Creates a new OpenGL buffer from an OpenGL buffer pool.

```
func CVOpenGLBufferPoolCreateOpenGLBuffer(_ allocator: CFAllocator?, _ openGLBufferPool: CVOpenGLBufferPool, _ openGLBufferOut: UnsafeMutablePointer<CVOpenGLBuffer?>) -> CVReturn
```

## Parameters

`allocator`

The allocator to use for creating the buffer.  May be `NULL` to specify the default allocator.

`openGLBufferPool`

The OpenGL buffer pool that should create the new OpenGL buffer.

`openGLBufferOut`

On output, `OpenGLBufferOut` points to the new OpenGL buffer.

## Return Value

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

## Discussion

The function creates a new OpenGL buffer using the OpenGL buffer attributes specified in the [`CVOpenGLBufferPoolCreate(_:_:_:_:)`](/documentation/CoreVideo/CVOpenGLBufferPoolCreate(_:_:_:_:)) call. This buffer has default attachments as specified in the `openGLBufferAttributes` parameter of [`CVOpenGLBufferPoolCreate(_:_:_:_:)`](/documentation/CoreVideo/CVOpenGLBufferPoolCreate(_:_:_:_:)) (using either the `kCVBufferPropagatedAttachmentsKey` or `kCVBufferNonPropagatedAttachmentsKey` attributes).

---

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)