Function

MTLRegionMake2D

Returns a 2D, rectangular region for image or texture data.

Declaration

MTLRegion MTLRegionMake2D(NSUInteger x, NSUInteger y, NSUInteger width, NSUInteger height);

Parameters

x

The x coordinate of one corner of a 2D rectangular block of image or texture data.

y

The y coordinate of one corner of a 2D rectangular block of image or texture data.

width

The width of a 2D rectangular block of image or texture data, in pixels.

height

The height of a 2D rectangular block of image or texture data, in pixels.

Return Value

A 2D rectangular region.

See Also

Basic Geometric Types

MTLOrigin

A location of a pixel in an image or texture relative to the upper-left corner, whose coordinates are (0,0).

MTLRegion

A rectangular block of pixels in an image or texture, defined by its upper-left corner and its size.

MTLSize

A set of dimensions that declare the size of an object, such as an image, texture, threadgroup, or grid.

MTLOriginMake

Returns the location of a pixel in an image or texture.

MTLRegionMake1D

Returns a 1D region for image or texture data.

MTLRegionMake3D

Returns a 3D, cubic region for image or texture data.

MTLSizeMake

Returns the specified size of an object, such as a texture or threadgroup.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software