objc2_metal_kit

Static MTKTextureLoaderOptionGenerateMipmaps

Source
pub unsafe static MTKTextureLoaderOptionGenerateMipmaps: &'static MTKTextureLoaderOption
Available on crate feature MTKTextureLoader only.
Expand description

Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to generate mipmaps when creating the texture

If the boolean value specified with this string is true, the resulting Metal 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 only be used if the pixel format of the texture is color filterable and color renderable. This option implies MTKTextureLoaderOptionAllocateMipmaps. Specifying this option will cause the MTKTextureLoader to submit work to the GPU on behalf of the caller.

See also Appleā€™s documentation