TextureVertexProtocol

public protocol TextureVertexProtocol

Used to specify vertex information when calling cogl_polygon()

The TextureVertexProtocol protocol exposes the methods and properties of an underlying CoglTextureVertex instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see TextureVertex. Alternatively, use TextureVertexRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying CoglTextureVertex instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • _ptr Default implementation

    Typed pointer to the underlying CoglTextureVertex instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the CoglTextureVertex instance.

    Declaration

    Swift

    var _ptr: UnsafeMutablePointer<CoglTextureVertex>! { get }
  • Required Initialiser for types conforming to TextureVertexProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TextureVertex Record: TextureVertexProtocol extension (methods and fields)

  • polygon(nVertices:useColor:) Extension method

    Draws a convex polygon using the current source material to fill / texture with according to the texture coordinates passed.

    If use_color is true then the color will be changed for each vertex using the value specified in the color member of CoglTextureVertex. This can be used for example to make the texture fade out by setting the alpha value of the color.

    All of the texture coordinates must be in the range [0,1] and repeating the texture is not supported.

    Because of the way this function is implemented it will currently only work if either the texture is not sliced or the backend is not OpenGL ES and the minifying and magnifying functions are both set to COGL_MATERIAL_FILTER_NEAREST.

    Declaration

    Swift

    @inlinable
    func polygon(nVertices: Int, useColor: CoglBool)
  • x Extension method

    Model x-coordinate

    Declaration

    Swift

    @inlinable
    var x: CFloat { get set }
  • y Extension method

    Model y-coordinate

    Declaration

    Swift

    @inlinable
    var y: CFloat { get set }
  • z Extension method

    Model z-coordinate

    Declaration

    Swift

    @inlinable
    var z: CFloat { get set }
  • tx Extension method

    Texture x-coordinate

    Declaration

    Swift

    @inlinable
    var tx: CFloat { get set }
  • ty Extension method

    Texture y-coordinate

    Declaration

    Swift

    @inlinable
    var ty: CFloat { get set }
  • color Extension method

    The color to use at this vertex. This is ignored if use_color is false when calling cogl_polygon()

    Declaration

    Swift

    @inlinable
    var color: CoglColor { get set }