Instance Method

initWithCGLPixelFormatObj:

Returns an NSOpenGLPixelFormatobject initialized with using an existing CGL pixel format object.

Declaration

- (NSOpenGLPixelFormat *)initWithCGLPixelFormatObj:(CGLPixelFormatObj)format;

Parameters

format

An existing CGL pixel format object.

Return Value

An intialized NSOpenGLPixelFormat object that wraps the CGL pixel format object.

Discussion

If your application already has a low-level CGL pixel format object, you can create an NSOpenGLPixelFormat object to wrap it by calling this initializer. The NSOpenGLPixelFormat object retains the CGL pixel format object by calling the CGLRetainPixelFormat function.

Your application should not call CGLDestroyPixelFormat to dispose of the CGL pixel format object. Instead, your application should call CGLReleasePixelFormat to decrement its reference count.

See Also

Creating an NSOpenGLPixelFormat Object

- initWithData:

Returns an NSOpenGLPixelFormat object initialized with specified pixel format attribute data.

Deprecated
- initWithAttributes:

Returns an NSOpenGLPixelFormat object initialized with specified pixel format attributes.

Deprecated