One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

TextureResource.Contents.MipmapLevel

struct · iOS 18.0+ · SDK 27.1

struct MipmapLevel

An object that references the pixel data for a single mipmap of a texture.

Members (5)

static · iOS 18.0+

mip

TypeScript
static mipUnsafeBufferOffsetSizeBytesPerRowBytesPerImage(buffer: SDKHandle, offset: number, size: number, bytesPerRow: number, bytesPerImage: number): Promise<TextureResource_Contents_MipmapLevel>
Swift declaration
static func mip(unsafeBuffer buffer: any MTLBuffer, offset: Int = 0, size: Int, bytesPerRow: Int, bytesPerImage: Int) -> TextureResource.Contents.MipmapLevel

Specifies a multi-image mipmap level of a texture resource with pixel data that RealityKit copies from a Metal buffer. - Parameters: - buffer: The source buffer. Don't modify this buffer while using it as the source of a copy operation. - offset: The byte position in the source buffer where the copying starts. The offset needs to be a multiple of the destination texture's pixel size, in bytes. - size: The number of bytes in the source buffer (starting from `offset`) available for copying. - 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. - bytesPerImage: The stride in bytes between image planes of texture data that RealityKit stores in the source buffer, needed for 3D texture mipmaps. The value needs to be a multiple of the destination texture's pixel size, in bytes. > Important: A ``MipmapLevel`` that you create with this function and use to create a ``TextureResource`` copies from the source buffer. That copy occurs when initializing the texture resource. The caller is responsible for ensuring that the system doesn't modify the source Metal buffer while copying it to a texture.

static · iOS 18.0+

mip

TypeScript
static mipUnsafeBufferOffsetSizeBytesPerRow(buffer: SDKHandle, offset: number, size: number, bytesPerRow: number): Promise<TextureResource_Contents_MipmapLevel>
Swift declaration
static func mip(unsafeBuffer buffer: any MTLBuffer, offset: Int = 0, size: Int, bytesPerRow: Int) -> TextureResource.Contents.MipmapLevel

Specifies a single mipmap level of a texture resource with pixel data that RealityKit copies from a Metal buffer. - Parameters: - buffer: The source buffer. Don't modify this buffer while using it as the source of a copy operation. - offset: The byte position in the source buffer where the copying starts. The offset needs to be a multiple of the destination texture's pixel size, in bytes. - size: The number of bytes in the source buffer (starting from `offset`) available for copying. - 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. > Important: A ``MipmapLevel`` that you create with this function and use to create a ``TextureResource`` copies from the source buffer. That copy occurs when initializing the texture resource. The caller is responsible for ensuring that the system doesn't modify the source Metal buffer while copying it to a texture.

static · iOS 18.0+

mip

TypeScript
static mipDataBytesPerRowBytesPerImage(data: ArrayBuffer, bytesPerRow: number, bytesPerImage: number): Promise<TextureResource_Contents_MipmapLevel>
Swift declaration
static func mip(data: Data, bytesPerRow: Int, bytesPerImage: Int) -> TextureResource.Contents.MipmapLevel

Specifies a multi-image mipmap level of a texture resource with pixel data that RealityKit copies from a byte buffer. - 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. - bytesPerImage: The stride in bytes between image planes of texture data that RealityKit stores in the source buffer, needed for 3D texture mipmaps. The value needs to be a multiple of the destination texture's pixel size, in bytes.

static · iOS 18.0+

mip

TypeScript
static mipDataBytesPerRow(data: ArrayBuffer, bytesPerRow: number): Promise<TextureResource_Contents_MipmapLevel>
Swift declaration
static func mip(data: Data, bytesPerRow: Int) -> TextureResource.Contents.MipmapLevel

Specifies a single mipmap level of a texture resource with pixel data that RealityKit copies from a byte buffer. - 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.

static · iOS 18.0+

mip

TypeScript
static mipSlices(slices: Array<TextureResource_Contents_Slice>): Promise<TextureResource_Contents_MipmapLevel>
Swift declaration
static func mip(slices: [TextureResource.Contents.Slice]) -> TextureResource.Contents.MipmapLevel

Specifies a single mipmap level of a 2D or 3D texture resource that slices provide. - Parameters: - slices: The source slices. A 2D array texture requires one slice per `arrayLength`. A cube texture requires six slices, containing faces `[+X, -X, +Y, -Y, +Z, -Z]`. 2D and 3D textures need a single slice, and you can build their `MipmapLevel` with `mip(buffer:offset:size:bytesPerRow:)` or `mip(data:bytesPerRow)`.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →