Texture

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKTexture)
open class Texture : NSObject

A Texture manages an OpenGL texture. It is responsible for allocating and deallocting the necessary memory.

  • The name of the texture.

    Declaration

    Swift

    open var textureName: GLuint { get }
  • Creates a new texture from the given image.

    Declaration

    Swift

    public init(cgImage: CGImage, forceRGB: Bool)

    Parameters

    cgImage

    The image to create a texture for.

    forceRGB

    Set to true if the image should be RGB, false otherwise.

  • Frees all allocated OpenGL resources.

    Declaration

    Swift

    open func freeGLResources()