Contents

CVMetalTextureCacheCreate(_:_:_:_:_:)

Creates a new texture cache.

Declaration

func CVMetalTextureCacheCreate(_ allocator: CFAllocator?, _ cacheAttributes: CFDictionary?, _ metalDevice: any MTLDevice, _ textureAttributes: CFDictionary?, _ cacheOut: UnsafeMutablePointer<CVMetalTextureCache?>) -> CVReturn

Parameters

  • allocator:

    The memory allocator for the texture.

  • cacheAttributes:

    A dictionary specifying options for the cache’s behavior, or NULL to use default options. For applicable keys and values, see Cvmetaltexturecache Cache Attributes.

  • metalDevice:

    The Metal device used to create texture objects.

  • textureAttributes:

    A dictionary specifying options for creating textures from the cache, or NULL to use default options.

  • cacheOut:

    Upon return, contains the newly created texture cache. When this value is NULL, an error occurred in texture creation.

Return Value

Upon successful creation of the texture cache, this function returns kCVReturnSuccess.

See Also

Functions