Type Method

textureWithContentsOfURL:options:error:

Loads a 2D texture image from a URL and creates a new texture from the data.

Declaration

+ (GLKTextureInfo *)textureWithContentsOfURL:(NSURL *)url options:(NSDictionary<NSString *,NSNumber *> *)options error:(NSError * _Nullable *)outError;

Parameters

filePath

A URL 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.

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

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 a Texture From a URL

- textureWithContentsOfURL:options:queue:completionHandler:

Asynchronously loads a 2D texture image from a URL and creates a new texture from the data.

Deprecated