Contents

setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:

Attaches the specified pixel buffer to the OpenGL context.

Declaration

- (void) setPixelBuffer:(NSOpenGLPixelBuffer *) pixelBuffer cubeMapFace:(GLenum) face mipMapLevel:(GLint) level currentVirtualScreen:(GLint) screen;

Parameters

  • pixelBuffer:

    The pixel buffer to attach.

  • face:

    For pixel buffers with a texture target of GL_CUBE_MAP, this parameter should be zero or one of the following values:

    • GL_TEXTURE_CUBE_MAP_POSITIVE_X

    • GL_TEXTURE_CUBE_MAP_POSITIVE_Y

    • GL_TEXTURE_CUBE_MAP_POSITIVE_Z

    • GL_TEXTURE_CUBE_MAP_NEGATIVE_X

    • GL_TEXTURE_CUBE_MAP_NEGATIVE_Y

    • GL_TEXTURE_CUBE_MAP_NEGATIVE_Z

  • level:

    The desired mipmap level for rendering. This value must be less than or equal to the maximum texture mipmap level of pixelBuffer (accessible through an NSOpenGLPixelBuffer object’s Texturemaxmipmaplevel method).

  • screen:

    The virtual screen of the receiver (if applicable) should be set to the same value as the current virtual screen you are using for rendering onscreen

Discussion

The NSOpenGLPixelBuffer object gives the receiver access to accelerated offscreen rendering in the pixel buffer, which is primarily used for textures.

See Also

Related Documentation

Working with Pixel Buffers