Global Variable

MTKTextureLoaderOptionGenerateMipmaps

A key used to specify whether the texture loader should generate mipmaps for the texture.

Declaration

MTKTextureLoaderOption MTKTextureLoaderOptionGenerateMipmaps;

Discussion

The value for this key is an NSNumber object containing a boolean value.

If the value is YES, the resulting texture will be created with mipmaps. If the file being loaded contains data for mipmaps (such as in a PVR or KTX file), specifying this option will overwrite the existing mipmap data in the loaded texture.

This option can be used only if the pixel format of the texture is filterable and color-renderable; see the Pixel Format Capabilities for more information.

This option also implies that MTKTextureLoaderOptionAllocateMipmaps is YES. Specifying this option causes the MTKTextureLoader object to submit work to the GPU on your behalf.

See Also

Specifying Mipmap Options

MTKTextureLoaderOptionAllocateMipmaps

A key used to specify whether the texture loader should allocate memory for mipmaps in the texture.