MaterialLayerProtocol

public protocol MaterialLayerProtocol

The MaterialLayerProtocol protocol exposes the methods and properties of an underlying CoglMaterialLayer 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 MaterialLayer. Alternatively, use MaterialLayerRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying CoglMaterialLayer instance.

    Declaration

    Swift

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

    Typed pointer to the underlying CoglMaterialLayer instance.

    Default Implementation

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

    Declaration

    Swift

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

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

MaterialLayer Record: MaterialLayerProtocol extension (methods and fields)

  • getMagFilter() Extension method

    Queries the currently set downscaling filter for a material later

    get_mag_filter is deprecated: No replacement

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getMagFilter() -> CoglMaterialFilter
  • getMinFilter() Extension method

    Queries the currently set downscaling filter for a material layer

    get_min_filter is deprecated: No replacement

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getMinFilter() -> CoglMaterialFilter
  • getTexture() Extension method

    Extracts a texture handle for a specific layer.

    <note>In the future Cogl may support purely GLSL based layers; for those layers this function which will likely return COGL_INVALID_HANDLE if you try to get the texture handle from them. Considering this scenario, you should call cogl_material_layer_get_type() first in order check it is of type COGL_MATERIAL_LAYER_TYPE_TEXTURE before calling this function.</note>

    get_texture is deprecated: No replacement

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getTexture() -> CoglHandle!
  • getType() Extension method

    Retrieves the type of the layer

    Currently there is only one type of layer defined: COGL_MATERIAL_LAYER_TYPE_TEXTURE, but considering we may add purely GLSL based layers in the future, you should write code that checks the type first.

    get_type is deprecated: No replacement

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getType() -> CoglMaterialLayerType
  • getWrapModeP() Extension method

    Gets the wrap mode for the ‘p’ coordinate of texture lookups on this layer. ‘p’ is the third coordinate.

    get_wrap_mode_p is deprecated: Use cogl_pipeline_layer_get_wrap_mode_p() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getWrapModeP() -> CoglMaterialWrapMode
  • getWrapModeS() Extension method

    Gets the wrap mode for the ‘s’ coordinate of texture lookups on this layer.

    get_wrap_mode_s is deprecated: Use cogl_pipeline_layer_get_wrap_mode_s() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getWrapModeS() -> CoglMaterialWrapMode
  • getWrapModeT() Extension method

    Gets the wrap mode for the ‘t’ coordinate of texture lookups on this layer.

    get_wrap_mode_t is deprecated: Use cogl_pipeline_layer_get_wrap_mode_t() instead

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getWrapModeT() -> CoglMaterialWrapMode
  • magFilter Extension method

    Queries the currently set downscaling filter for a material later

    get_mag_filter is deprecated: No replacement

    Declaration

    Swift

    @inlinable
    var magFilter: CoglMaterialFilter { get }
  • minFilter Extension method

    Queries the currently set downscaling filter for a material layer

    get_min_filter is deprecated: No replacement

    Declaration

    Swift

    @inlinable
    var minFilter: CoglMaterialFilter { get }
  • texture Extension method

    Extracts a texture handle for a specific layer.

    <note>In the future Cogl may support purely GLSL based layers; for those layers this function which will likely return COGL_INVALID_HANDLE if you try to get the texture handle from them. Considering this scenario, you should call cogl_material_layer_get_type() first in order check it is of type COGL_MATERIAL_LAYER_TYPE_TEXTURE before calling this function.</note>

    get_texture is deprecated: No replacement

    Declaration

    Swift

    @inlinable
    var texture: CoglHandle! { get }
  • type Extension method

    Retrieves the type of the layer

    Currently there is only one type of layer defined: COGL_MATERIAL_LAYER_TYPE_TEXTURE, but considering we may add purely GLSL based layers in the future, you should write code that checks the type first.

    get_type is deprecated: No replacement

    Declaration

    Swift

    @inlinable
    var type: CoglMaterialLayerType { get }
  • wrapModeP Extension method

    Gets the wrap mode for the ‘p’ coordinate of texture lookups on this layer. ‘p’ is the third coordinate.

    get_wrap_mode_p is deprecated: Use cogl_pipeline_layer_get_wrap_mode_p() instead

    Declaration

    Swift

    @inlinable
    var wrapModeP: CoglMaterialWrapMode { get }
  • wrapModeS Extension method

    Gets the wrap mode for the ‘s’ coordinate of texture lookups on this layer.

    get_wrap_mode_s is deprecated: Use cogl_pipeline_layer_get_wrap_mode_s() instead

    Declaration

    Swift

    @inlinable
    var wrapModeS: CoglMaterialWrapMode { get }
  • wrapModeT Extension method

    Gets the wrap mode for the ‘t’ coordinate of texture lookups on this layer.

    get_wrap_mode_t is deprecated: Use cogl_pipeline_layer_get_wrap_mode_t() instead

    Declaration

    Swift

    @inlinable
    var wrapModeT: CoglMaterialWrapMode { get }