initWithCGLPBufferObj:
Initializes and returns an OpenGL pixel buffer object that encapsulates an existing CGL pixel buffer object.
Declaration
- (NSOpenGLPixelBuffer *) initWithCGLPBufferObj:(CGLPBufferObj) pbuffer;Parameters
- pbuffer:
The CGL pixel buffer object to wrap.
Return Value
An initialized NSOpenGLPixelBuffer object.
Discussion
If your application already has a CGL pixel buffer object, you can wrap it inside an NSOpenGLPixelBuffer object by using this initializer. This method retains the CGL pixel buffer object by calling the CGLRetainPBuffer function.
Your application should not call CGLDestroyPBuffer to dispose of the CGL pixel buffer object. Instead, your application should call CGLReleasePBuffer to decrement its reference count.