Initializer

init(size:)

Initializes an empty texture with a specific size.

Declaration

init(size: CGSize)

Parameters

size

The size of the texture, in pixels.

Return Value

An empty mutable texture.

Discussion

You must call the modifyPixelData(_:) method at least once before using this texture.

See Also

Creating an Empty Mutable Texture

init(size: CGSize, pixelFormat: Int32)

Initializes an empty texture with a specific size and format.