Instance Method

createTexture:fromView:internalFormat:

Creates a new texture from the contents of the specified view.

Declaration

- (void)createTexture:(GLenum)target fromView:(NSView *)view internalFormat:(GLenum)format;

Parameters

target

The identifier for the new texture.

view

The view to use to generate the texture. This parameter must be either an NSOpenGLView object or some other kind of NSView object that’s associated with an NSOpenGLContext object.

format

The format for the texture, interpreted as a GLenum data type.

Discussion

The new texture is assigned the identifier in the target parameter and is associated with the receiver's context.