MaterialWrapMode

public extension MaterialWrapMode
  • Cast constructor, converting any binary integer to a MaterialWrapMode.

    Declaration

    Swift

    @inlinable
    init!<I>(_ raw: I) where I : BinaryInteger

    Parameters

    raw

    The raw integer value to initialise the enum from

  • The texture will be repeated. This is useful for example to draw a tiled background.

    Declaration

    Swift

    static let `repeat`: CoglMaterialWrapMode
  • The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.

    Declaration

    Swift

    static let clampToEdge: CoglMaterialWrapMode
  • Cogl will try to automatically decide which of the above two to use. For cogl_rectangle(), it will use repeat mode if any of the texture coordinates are outside the range 0→1, otherwise it will use clamp to edge. For cogl_polygon() it will always use repeat mode. For cogl_vertex_buffer_draw() it will use repeat mode except for layers that have point sprite coordinate generation enabled. This is the default value.

    Declaration

    Swift

    static let automatic: CoglMaterialWrapMode