Encodes a command to copy image data from a source buffer into a destination texture.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
The source buffer for the copy operation.
The byte location in the source buffer where the copying starts. The location must be aligned to the size of the destination texture's pixel format. The value must be a multiple of the destination texture's pixel size, in bytes.
This specifies the stride in bytes between rows of the source buffer memory. The value must be a multiple of the destination texture's pixel size, in bytes. The value must be less than or equal to
32,767multiplied by the destination texture’s pixel size.
For 3D textures and 2D array textures, the stride in bytes between 2D images of the source buffer memory. The value must be a multiple of the destination texture's pixel size, in bytes.
The number of source pixels, in width, height, and depth, to copy to the destination texture. When you copy to a 1D texture, height and depth must be
1. When you copy to a 2D texture, depth must be
The destination texture for the copy operation. The value must not be a
istexture and must not have a PVRTC pixel format.
A zero-based value that specifies which texture slice is the destination.
For a cube texture, slice is a value between
5, inclusive, that defines which cube face is the destination.
For a texture array, slice is the index for the array element.
For a cube texture array, slice is a value that defines both a cube face and an array index. The general equation for determining the correct value of slice is:
For example, the third face of a fifth cube is equal to
(3-1) + (5-1)*6 = 26.
If the texture type is neither an array nor a cube, use
The mipmap level of the destination texture.
The destination texture origin where the copying starts.
destination to select a single image of the destination texture.
If the texture’s pixel format is a compressed format, then
source must be a multiple of the pixel format’s block size or be clamped to the edge of the texture if the block extends outside the bounds of a texture. For a compressed format,
source is the number of bytes from the start of one row of blocks to the start of the next row of blocks.
This method cannot be used if the destination texture has a PVRTC pixel format.
This method is equivalent to
options set to