Contents

CVMetalTextureGetCleanTexCoords(_:_:_:_:_:)

Returns convenient normalized texture coordinates for the part of the image that should be displayed.

Declaration

func CVMetalTextureGetCleanTexCoords(_ image: CVMetalTexture, _ lowerLeft: UnsafeMutablePointer<Float>, _ lowerRight: UnsafeMutablePointer<Float>, _ upperRight: UnsafeMutablePointer<Float>, _ upperLeft: UnsafeMutablePointer<Float>)

Parameters

  • image:

    A CoreVideo Metal texture-based image buffer.

  • lowerLeft:

    An array that holds two float values. Upon return, the array contains the s and t texture coordinates for the lower left corner of the image.

  • lowerRight:

    An array that holds two float values. Upon return, the array contains the s and t texture coordinates for the lower right corner of the image.

  • upperRight:

    An array that holds two float values. Upon return, the array contains the s and t texture coordinates for the upper right corner of the image.

  • upperLeft:

    An array that holds two float values. Upon return, the array contains the s and t texture coordinates for the upper left corner of the image.

Discussion

This function automatically takes into account whether or not the texture is flipped.

See Also

Inspecting Textures