TextureSpec

@objc(GSTextureSpec)
public class TextureSpec : NSObject

GL texture dimensions specification.

  • Texture width in pixels, ‘0’ if not specified.

    Declaration

    Swift

    public let width: Int
  • Texture height in pixels, ‘0’ if not specified.

    Declaration

    Swift

    public let height: Int
  • Texture aspect ratio width, ‘0’ if not specified.

    Declaration

    Swift

    public let ratioNumerator: Int
  • Texture aspect ratio height, ‘0’ if not specified.

    Declaration

    Swift

    public let ratioDenominator: Int
  • Request a GL texture with some dimensions as the source.

    Declaration

    Swift

    public static let sourceDimensions: TextureSpec
  • Request a GL texture with 4/3 aspect ratio.

    Declaration

    Swift

    public static let aspectRatio43: TextureSpec
  • Request a GL texture with 16/9 aspect ratio.

    Declaration

    Swift

    public static let aspectRatio169: TextureSpec
  • Requests a GL texture with specific dimensions.

    Declaration

    Swift

    public static func fixedSize(width: Int, height: Int) -> TextureSpec

    Parameters

    width

    texture width

    height

    texture height

    Return Value

    a new TextureSpec instance

  • Requests a GL texture with specific aspect ratio.

    Declaration

    Swift

    public static func fixedAspectRatio(ratioNumerator: Int, ratioDenominator: Int) -> TextureSpec

    Parameters

    ratioNumerator

    texture aspect ratio numerator value

    ratioDenominator

    texture aspect ration denominator value

    Return Value

    a new TextureSpec instance

  • Requests a GL texture with specific aspect ratio.

    Declaration

    Swift

    public static func sourceAspectRatio(width: Int) -> TextureSpec

    Parameters

    width

    texture width, in pixels

    Return Value

    a new TextureSpec instance