CVMetalTextureCacheCreate(_:_:_:_:_:)
Creates a new texture cache.
Declaration
func CVMetalTextureCacheCreate(_ allocator: CFAllocator?, _ cacheAttributes: CFDictionary?, _ metalDevice: any MTLDevice, _ textureAttributes: CFDictionary?, _ cacheOut: UnsafeMutablePointer<CVMetalTextureCache?>) -> CVReturnParameters
- allocator:
The memory allocator for the texture.
- cacheAttributes:
A dictionary specifying options for the cache’s behavior, or
NULLto 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
NULLto 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.