Instance Method

cubeMap(withContentsOfFile:options:queue:completionHandler:)

Asynchronously loads a cube map texture image from a single file and creates a new texture from the data.

Declaration

func cubeMap(withContentsOfFile path: String, options: [String : NSNumber]? = nil, queue: DispatchQueue?, completionHandler block: @escaping GLKTextureLoaderCallback)

Parameters

fileName

A path to the file to load.

textureOperations

A dictionary that describes any additional steps you want the texture loader to take when loading the texture. See Texture Loading Options.

queue

A dispatch queue that your block is called on when the task completes. If NULL is passed, the block is called on the main dispatch queue.

block

A block to be called when the task completes.

Discussion

This method is identical to cubeMap(withContentsOfFile:options:), except that it loads the texture asynchronously. When this method is called, it creates a new background task to handle the request and then returns control to your app. Later, when the task is complete, GLKit calls your completion handler on the queue you provided.

See Also

Loading Cube Maps from Files

class func cubeMap(withContentsOfFile: String, options: [String : NSNumber]?) -> GLKTextureInfo

Loads a cube map texture image from a single file and creates a new texture from the data.

Deprecated
class func cubeMap(withContentsOfFiles: [Any], options: [String : NSNumber]?) -> GLKTextureInfo

Loads a cube map texture image from a series of files and creates a new texture from the data.

Deprecated
func cubeMap(withContentsOfFiles: [Any], options: [String : NSNumber]?, queue: DispatchQueue?, completionHandler: GLKTextureLoaderCallback)

Asynchronously loads a cube map texture image from a series of files and creates a new texture from the data.

Deprecated