init(size:pixelFormat:)
Initializes an empty texture with a specific size and format.
Declaration
init(size: CGSize, pixelFormat format: Int32)Parameters
- size:
The size of the texture, in pixels.
- format:
A Core Video format code. Three codes are supported: Kcvpixelformattype_32rgba, Kcvpixelformattype_64rgbahalf, and Kcvpixelformattype_128rgbafloat for byte, half-float, and float components respectively.
Return Value
An empty mutable texture.
Discussion
You must call the modifyPixelData(_:) method at least once before using this texture.