makeTexture(descriptor:)
Creates a texture on the heap.
Declaration
func makeTexture(descriptor: MTLTextureDescriptor) -> (any MTLTexture)?Parameters
- descriptor:
A descriptor object that describes the properties of the texture.
Return Value
A new texture object backed by heap memory, or nil if the heap memory is full.
Discussion
You can call the method with the following restrictions:
The heap’s type needs to be MTLHeapType.automatic
The texture’s CPU cache mode option needs to match the heap’s cpuCacheMode property
The texture’s storage mode option needs to be MTLStorageMode.memoryless, or match the heap’s storageMode property