Contents

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.Slice

Parameters

  • 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.

See Also

Creating a texture slice