---
title: "CVOpenGLBufferPoolCreateOpenGLBuffer(_:_:_:)"
framework: Core Video
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: "corevideo/cvopenglbufferpoolcreateopenglbuffer(_:_:_:)"
---

# CVOpenGLBufferPoolCreateOpenGLBuffer(_:_:_:)

Creates a new OpenGL buffer from an OpenGL buffer pool.

## Declaration

```swift
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

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

## Discussion

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

## See Also

### Functions

- [CVOpenGLBufferPoolCreate(_:_:_:_:)](corevideo/cvopenglbufferpoolcreate(_:_:_:_:).md)
- [CVOpenGLBufferPoolGetAttributes(_:)](corevideo/cvopenglbufferpoolgetattributes(_:).md)
- [CVOpenGLBufferPoolGetOpenGLBufferAttributes(_:)](corevideo/cvopenglbufferpoolgetopenglbufferattributes(_:).md)
- [CVOpenGLBufferPoolGetTypeID()](corevideo/cvopenglbufferpoolgettypeid().md)
