Class

NSOpenGLPixelBuffer

An object that provides access to accelerated offscreen rendering.

Overview

Using offscreen rendering you could, for example, draw into the pixel buffer, then use the contents as a texture map elsewhere. Typically you initialize an NSOpenGLPixelBuffer object using the initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh: method and attach the resulting object to an OpenGL context with the setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen: method of NSOpenGLContext.

Every NSOpenGLPixelBuffer object wraps a low-level, platform-specific Core OpenGL (CGL) pixel buffer object. Your application can retrieve the CGL pixel buffer by calling the CGLPBufferObj method. For more information on the underling CGL pixel buffer, see CGL.

Topics

Initializing an OpenGL Pixel Buffer

initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:

Returns an NSOpenGLPixelBuffer object initialized with the specified parameters.

initWithCGLPBufferObj:

Initializes and returns an NSOpenGLPixelBuffer object that encapsulates an existing CGL pixel buffer object.

Obtaining Information About an OpenGL Pixel Buffer

CGLPBufferObj

Returns the underlying CGLPBufferObj object associated with the NSOpenGLPixelBuffer object.

pixelsHigh

Returns the height of the receiver’s texture (in pixels).

pixelsWide

Returns the width of the receiver’s texture (in pixels).

textureInternalFormat

Returns the internal format of the receiver’s texture.

textureMaxMipMapLevel

Returns the maximum mipmap level of the receiver’s texture.

textureTarget

Returns the texture target of the receiver.

Relationships

Inherits From

See Also

OpenGL

NSOpenGLContext

An object that represents an OpenGL graphics context, into which all OpenGL calls are rendered.

NSOpenGLLayer

A subclass of CAOpenGLLayer that is suitable for rendering OpenGL into layers.

NSOpenGLPixelFormat

An object that specifies the types of buffers and other attributes of the NSOpenGLContext.