Texture Loading Options

Keys to specify in a textureOperations dictionary.

Topics

Constants

let GLKTextureLoaderApplyPremultiplication: String

This key specifies whether the data in the image should be premultiplied before being loaded into the sharegroup. The value for this key is an NSNumber object that specifies a boolean value. If false, the data is loaded into the sharegroup without being modified. If true, the red, green and blue components of each pixel are multiplied by the alpha value. If the key is not specified, the default value is false. Never specify true for a texture that is in a compressed format.

let GLKTextureLoaderGenerateMipmaps: String

This key specifies whether mipmaps should be created for the texture. The value for this key is an NSNumber object that specifies a boolean value. If false, only the texture is loaded. If true, a full set of mipmap levels are generated for the texture when the texture is created. The GL_TEXTURE_MIN_FILTER parameter for the texture is changed to GL_LINEAR_MIPMAP_LINEAR when mipmaps are generated. If the key is not specified, the default value is false.

let GLKTextureLoaderOriginBottomLeft: String

This key specifies whether the image data should be vertically flipped to match OpenGL’s coordinate system. The value for this key is an NSNumber object that specifies a boolean value. If false, the image data is not flipped. If true, the image data is flipped before being loaded. If the key is not specified, the default value is false.

let GLKTextureLoaderGrayscaleAsAlpha: String

This key specifies whether the image data in a grayscale image should be treated as alpha information. The value for this key is an NSNumber object that specifies a boolean value. If false, the image data is treated as luminance data. If true, the image data is treated as alpha data. The default value is false. This key is ignored if the source image is not a grayscale image.

let GLKTextureLoaderSRGB: String

This key specifies whether the image data in the texture should be treated as sRGB data. The value for this key is an NSNumber object that specifies a boolean value. If false, the image data is treated as linear pixel data. If true, the image data is treated as sRGB pixel data. The default value is false.

Deprecated