Type Method

cubeMapWithContentsOfFiles:options:error:

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

Declaration

+ (GLKTextureInfo *)cubeMapWithContentsOfFiles:(NSArray<id> *)paths options:(NSDictionary<NSString *,NSNumber *> *)options error:(NSError * _Nullable *)outError;

Parameters

filePaths

An array of NSURL or NSString objects that provide the paths to the six files that make up the cube map.

textureOperations

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

outError

If an error occurs, upon return contains an NSError object that describes the problem.

If you are not interested in this information, pass NULL.

Return Value

A texture info object that describes the loaded texture or nil if an error occurred.

Discussion

The array of file paths must include six entries for the six faces of the cube map. The URLs should be arranged in the following order: Right(+x), Left(-x), Top(+y), Bottom(-y), Front(+z), Back(-z). This coordinate system is left-handed if you think of yourself within the cube. The coordinate system is right-handed if you think of yourself outside of the cube.

This class method loads the texture into the sharegroup attached to the current context for the thread this method is called on.

See Also

Loading Cube Maps from Files

+ cubeMapWithContentsOfFile:options:error:

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

Deprecated
- cubeMapWithContentsOfFile:options:queue:completionHandler:

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

Deprecated
- cubeMapWithContentsOfFiles:options:queue:completionHandler:

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

Deprecated