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.
-
Untyped pointer to the underlying
CoglTextureVertexinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
_ptrDefault implementationTyped pointer to the underlying
CoglTextureVertexinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
CoglTextureVertexinstance.Declaration
Swift
var _ptr: UnsafeMutablePointer<CoglTextureVertex>! { get } -
Required Initialiser for types conforming to
TextureVertexProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
polygon(nVertices:Extension methoduseColor: ) Draws a convex polygon using the current source material to fill / texture with according to the texture coordinates passed.
If
use_coloristruethen the color will be changed for each vertex using the value specified in the color member ofCoglTextureVertex. 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) -
xExtension methodModel x-coordinate
Declaration
Swift
@inlinable var x: CFloat { get set } -
yExtension methodModel y-coordinate
Declaration
Swift
@inlinable var y: CFloat { get set } -
zExtension methodModel z-coordinate
Declaration
Swift
@inlinable var z: CFloat { get set } -
txExtension methodTexture x-coordinate
Declaration
Swift
@inlinable var tx: CFloat { get set } -
tyExtension methodTexture y-coordinate
Declaration
Swift
@inlinable var ty: CFloat { get set } -
colorExtension methodThe color to use at this vertex. This is ignored if use_color is
falsewhen callingcogl_polygon()Declaration
Swift
@inlinable var color: CoglColor { get set }
View on GitHub
Install in Dash
TextureVertexProtocol Protocol Reference