slice(data:bytesPerRow:)
Specifies a single mipmap level slice of a texture resource with pixel data that RealityKit copies from a byte buffer.
Declaration
static func slice(data: Data, bytesPerRow: Int) -> TextureResource.Contents.SliceParameters
- data:
The source buffer.
- bytesPerRow:
The stride in bytes between rows of texture data that RealityKit stores in the source buffer. The value needs to be a multiple of the destination texture’s pixel size, in bytes.