Contents

CVOpenGLESTextureGetCleanTexCoords(_:_:_:_:_:)

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

Declaration

func CVOpenGLESTextureGetCleanTexCoords(_ image: CVOpenGLESTexture, _ lowerLeft: UnsafeMutablePointer<GLfloat>, _ lowerRight: UnsafeMutablePointer<GLfloat>, _ upperRight: UnsafeMutablePointer<GLfloat>, _ upperLeft: UnsafeMutablePointer<GLfloat>)

Parameters

  • image:

    The OpenGLES texture-based image buffer whose normalized texture coordinates are desired.

  • lowerLeft:

    An array of two GLfloats where the s and t normalized texture coordinates of the lower left corner of the image will be stored.

  • lowerRight:

    An array of two GLfloats where the s and t normalized texture coordinates of the lower right corner of the image will be stored.

  • upperRight:

    An array of two GLfloats where the s and t normalized texture coordinates of the upper right corner of the image will be stored.

  • upperLeft:

    An array of two GLfloats where the s and t normalized texture coordinates of the upper left corner of the image will be stored.

Discussion

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

See Also

Inspecting Textures