iOS Developer Library — Pre-Release

Developer

GLKit Framework Reference GLKTextureInfo Class Reference

Options
Deployment Target:

On This Page
Language:

GLKTextureInfo

Inheritance


Conforms To


Import Statement


Swift

import GLKit

Objective-C

@import GLKit;

Availability


Available in iOS 5.0 and later.

When your app loads textures using the GLKTextureLoader class, the texture loader returns information about the textures using GLKTextureInfo objects. Your app never creates GLKTextureInfo objects directly.

  • name name Property

    The OpenGL context’s name for the texture. (read-only)

    Declaration

    Swift

    var name: GLuint { get }

    Objective-C

    @property(readonly) GLuint name

    Discussion

    Your app uses this identifier whenever it wants to bind the texture to a context.

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • target target Property

    The OpenGL binding target for the texture. (read-only)

    Declaration

    Swift

    var target: GLenum { get }

    Objective-C

    @property(readonly) GLenum target

    Discussion

    Your app uses this property as the target value when it binds the texture to a context.

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • height height Property

    The height of the loaded texture. (read-only)

    Declaration

    Swift

    var height: GLuint { get }

    Objective-C

    @property(readonly) GLuint height

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • width width Property

    The width of the loaded texture. (read-only)

    Declaration

    Swift

    var width: GLuint { get }

    Objective-C

    @property(readonly) GLuint width

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • The location of the origin in the loaded texture. (read-only)

    Declaration

    Swift

    var textureOrigin: GLKTextureInfoOrigin { get }

    Objective-C

    @property(readonly) GLKTextureInfoOrigin textureOrigin

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • The state of the alpha component in the loaded texture. (read-only)

    Declaration

    Swift

    var alphaState: GLKTextureInfoAlphaState { get }

    Objective-C

    @property(readonly) GLKTextureInfoAlphaState alphaState

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • A Boolean value that states whether the loaded texture contains mip maps. (read-only)

    Declaration

    Swift

    var containsMipmaps: Bool { get }

    Objective-C

    @property(readonly) BOOL containsMipmaps

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • Values that describe the alpha information stored in a source image’s pixel data.

    Declaration

    Swift

    enum GLKTextureInfoAlphaState : GLint { case None case NonPremultiplied case Premultiplied }

    Objective-C

    enum { GLKTextureInfoAlphaStateNone = 0, GLKTextureInfoAlphaStateNonPremultiplied GLKTextureInfoAlphaStatePremultiplied }; typedef NSUInteger GLKTextureInfoAlphaState;

    Constants

    • None

      GLKTextureInfoAlphaStateNone

      Indicates that the texture has no alpha information.

      Available in iOS 5.0 and later.

    • NonPremultiplied

      GLKTextureInfoAlphaStateNonPremultiplied

      Indicates that the color values in the texture were not premultiplied by the alpha value.

      Available in iOS 5.0 and later.

    • Premultiplied

      GLKTextureInfoAlphaStatePremultiplied

      Indicates that the color values in the texture have already been premultiplied by the alpha value.

      Available in iOS 5.0 and later.

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.

  • The location of the origin in the original source image.

    Declaration

    Swift

    enum GLKTextureInfoOrigin : GLint { case Unknown case TopLeft case BottomLeft }

    Objective-C

    enum { GLKTextureInfoOriginUnknown = 0, GLKTextureInfoOriginTopLeft, GLKTextureInfoOriginBottomLeft }; typedef NSUInteger GLKTextureInfoOrigin;

    Constants

    • Unknown

      GLKTextureInfoOriginUnknown

      The origin of the texture is not supported.

      Available in iOS 5.0 and later.

    • TopLeft

      GLKTextureInfoOriginTopLeft

      The origin of the texture is in the top left corner.

      Available in iOS 5.0 and later.

    • BottomLeft

      GLKTextureInfoOriginBottomLeft

      The origin of the texture is in the bottom left corner.

      Available in iOS 5.0 and later.

    Discussion

    The origin’s position has no effect on how the texture is loaded into the context. If you need to flip the image before loading it, your app must explicitly add the GLKTextureOriginBottomLeft key to the options dictionary provided when loading the texture.

    Import Statement

    Objective-C

    @import GLKit;

    Swift

    import GLKit

    Availability

    Available in iOS 5.0 and later.