Protocols
The following protocols are available globally.
-
The
See more_ColorSizeCheckProtocol
protocol exposes the methods and properties of an underlying_CoglColorSizeCheck
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_ColorSizeCheck
. Alternatively, use_ColorSizeCheckRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol _ColorSizeCheckProtocol
-
The
See more_MatrixSizeCheckProtocol
protocol exposes the methods and properties of an underlying_CoglMatrixSizeCheck
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_MatrixSizeCheck
. Alternatively, use_MatrixSizeCheckRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol _MatrixSizeCheckProtocol
-
The
See more_TextureVertexSizeCheckProtocol
protocol exposes the methods and properties of an underlying_CoglTextureVertexSizeCheck
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_TextureVertexSizeCheck
. Alternatively, use_TextureVertexSizeCheckRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol _TextureVertexSizeCheckProtocol
-
The
See moreBitmapProtocol
protocol exposes the methods and properties of an underlyingCoglBitmap
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeBitmap
. Alternatively, useBitmapRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol BitmapProtocol
-
A structure for holding a color definition. The contents of the CoglColor structure are private and should never by accessed directly.
The
See moreColorProtocol
protocol exposes the methods and properties of an underlyingCoglColor
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeColor
. Alternatively, useColorRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol ColorProtocol
-
The
See moreEulerProtocol
protocol exposes the methods and properties of an underlyingCoglEuler
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeEuler
. Alternatively, useEulerRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol EulerProtocol
-
The
See moreMaterialProtocol
protocol exposes the methods and properties of an underlyingCoglMaterial
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeMaterial
. Alternatively, useMaterialRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol MaterialProtocol
-
The
See moreMaterialLayerProtocol
protocol exposes the methods and properties of an underlyingCoglMaterialLayer
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeMaterialLayer
. Alternatively, useMaterialLayerRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol MaterialLayerProtocol
-
A CoglMatrix holds a 4x4 transform matrix. This is a single precision, column-major matrix which means it is compatible with what OpenGL expects.
A CoglMatrix can represent transforms such as, rotations, scaling, translation, sheering, and linear projections. You can combine these transforms by multiplying multiple matrices in the order you want them applied.
The transformation of a vertex (x, y, z, w) by a CoglMatrix is given by:
x_new = xx * x + xy * y + xz * z + xw * w y_new = yx * x + yy * y + yz * z + yw * w z_new = zx * x + zy * y + zz * z + zw * w w_new = wx * x + wy * y + wz * z + ww * w
Where w is normally 1
<note>You must consider the members of the CoglMatrix structure read only, and all matrix modifications must be done via the cogl_matrix API. This allows Cogl to annotate the matrices internally. Violation of this will give undefined results. If you need to initialize a matrix with a constant other than the identity matrix you can use
cogl_matrix_init_from_array()
.</note>The
See moreMatrixProtocol
protocol exposes the methods and properties of an underlyingCoglMatrix
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeMatrix
. Alternatively, useMatrixRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol MatrixProtocol
-
The
See moreOffscreenProtocol
protocol exposes the methods and properties of an underlyingCoglOffscreen
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeOffscreen
. Alternatively, useOffscreenRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol OffscreenProtocol
-
The
See moreQuaternionProtocol
protocol exposes the methods and properties of an underlyingCoglQuaternion
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeQuaternion
. Alternatively, useQuaternionRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol QuaternionProtocol
-
The
See moreTextureProtocol
protocol exposes the methods and properties of an underlyingCoglTexture
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeTexture
. Alternatively, useTextureRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol TextureProtocol
-
Used to specify vertex information when calling
cogl_polygon()
The
See moreTextureVertexProtocol
protocol exposes the methods and properties of an underlyingCoglTextureVertex
instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, seeTextureVertex
. Alternatively, useTextureVertexRef
as a lighweight,unowned
reference if you already have an instance you just want to use.Declaration
Swift
public protocol TextureVertexProtocol