TechnologiesGames & 3D

GLKit

iOSmacOStvOSwatchOSvisionOS

GLKit provides helper utilities that simplify OpenGL ES development on iOS, macOS, and tvOS, covering vector and matrix math, texture loading, rendering effects, and view management. You build and animate scenes with value types such as _GLKVector3, _GLKMatrix4, and _GLKQuaternion, manage transforms through GLKMatrixStack, and load image data into GPU textures with GLKTextureLoader and GLKTextureInfo. Configurable lighting, materials, fog, and transforms are expressed through GLKBaseEffect and effect properties like GLKEffectPropertyLight and GLKEffectPropertyMaterial, while GLKView and GLKViewController handle drawable surface setup and the render loop. GLKit is deprecated in favor of Metal.

Views and View Controllers 4

Configure a drawable OpenGL ES surface and drive its render and update loop.

  • Cl
    GLKView
    A view that manages an OpenGL ES drawable surface and renders its contents.
  • Cl
    GLKViewController
    A view controller that drives the animation and render loop for a GLKView.
  • Pr
    GLKViewDelegate
    A protocol that defines the drawing method a GLKView calls to render its contents.
  • Pr
    GLKViewControllerDelegate
    A protocol that defines the update and frame callbacks a GLKViewController sends each cycle.

Rendering Effects 4

Apply standard lighting, materials, fog, reflection, and skybox shading without writing shaders.

  • Cl
    GLKBaseEffect
    An object that provides standard OpenGL ES lighting, material, texture, and transform shading without custom shaders.
  • Cl
    GLKReflectionMapEffect
    An effect that adds cube-map reflection shading on top of standard lighting and texturing.
  • Cl
    GLKSkyboxEffect
    An effect that renders a cube-mapped skybox surrounding a scene.
  • Pr
    GLKNamedEffect
    A protocol adopted by effects that can prepare and bind their OpenGL ES rendering state.

Effect Properties 6

Describe the lighting, material, texture, fog, and transform state used by an effect.

  • Cl
    GLKEffectProperty
    An abstract base class for objects that describe a configurable aspect of a GLKit effect.
  • Cl
    GLKEffectPropertyLight
    An object that configures a light source used by an effect's lighting computation.
  • Cl
    GLKEffectPropertyMaterial
    An object that defines the surface material properties an effect uses when shading geometry.
  • Cl
    GLKEffectPropertyTexture
    An object that configures a texture unit and its environment mode for an effect.
  • Cl
    GLKEffectPropertyFog
    An object that configures the fog parameters applied by an effect.
  • Cl
    GLKEffectPropertyTransform
    An object that holds the model-view and projection transforms an effect applies to vertices.

Textures 7

Load image data into OpenGL ES textures and inspect the resulting texture details.

  • Cl
    GLKTextureLoader
    An object that loads image data into OpenGL ES textures, synchronously or asynchronously.
  • Cl
    GLKTextureInfo
    An object that describes an OpenGL ES texture produced by the texture loader.
  • St
    GLKTextureLoaderError
    A structure that describes an error produced while loading a texture.
  • En
    GLKTextureTarget
    Constants that identify the OpenGL ES texture target a loaded texture binds to.
  • En
    GLKTextureEnvMode
    Constants that specify how a texture combines with existing fragment color.
  • En
    GLKTextureInfoAlphaState
    Constants that describe the alpha state of a loaded texture's pixel data.
  • En
    GLKTextureInfoOrigin
    Constants that indicate the vertical origin of a loaded texture's image data.

Meshes and Buffers 4

Represent model geometry and allocate the vertex and index buffers that back it.

  • Cl
    GLKMesh
    An object that represents model geometry along with its vertex and submesh buffers.
  • Cl
    GLKSubmesh
    An object that represents a portion of a mesh sharing the same material and index buffer.
  • Cl
    GLKMeshBuffer
    @class GLKMeshBuffer
  • Cl
    GLKMeshBufferAllocator
    @class GLKMeshBufferAllocator

Vectors and Matrices 8

Value types for the vector, matrix, and quaternion math used to build and animate scenes.

  • St
    _GLKVector2
    A two-component vector value type for points, directions, and texture coordinates.
  • St
    _GLKVector3
    A three-component vector value type for positions, normals, and directions.
  • St
    _GLKVector4
    A four-component vector value type for homogeneous coordinates and colors.
  • St
    _GLKMatrix2
    A 2x2 matrix value type used for two-dimensional linear transforms.
  • St
    _GLKMatrix3
    A 3x3 matrix value type used for rotation and normal transforms.
  • St
    _GLKMatrix4
    A 4x4 matrix value type used for model-view and projection transforms.
  • St
    _GLKQuaternion
    A quaternion value type that represents rotations in three dimensions.
  • Cl
    GLKMatrixStack
    An object that manages a stack of transform matrices for building hierarchical model-view transforms.

Vertex Attributes 2

Identify and describe the vertex attributes consumed by GLKit effects.

  • En
    GLKVertexAttrib
    Constants that identify the vertex attributes a GLKit effect can consume.
  • St
    _GLKVertexAttributeParameters
    @struct GLKVertexAttributeParameters

Lighting and Fog Options 2

Constants that select the lighting model and fog computation an effect uses.

  • En
    GLKLightingType
    Constants that specify whether lighting is computed per vertex or per fragment.
  • En
    GLKFogMode
    Constants that specify how an effect computes fog density over distance.

Drawable Surface Formats 4

Constants that specify the color, depth, stencil, and multisampling formats of a view's drawable.

  • En
    GLKViewDrawableColorFormat
    Constants that specify the color buffer format of a view's drawable surface.
  • En
    GLKViewDrawableDepthFormat
    Constants that specify the depth buffer format of a view's drawable surface.
  • En
    GLKViewDrawableStencilFormat
    Constants that specify the stencil buffer format of a view's drawable surface.
  • En
    GLKViewDrawableMultisample
    Constants that specify the multisampling configuration of a view's drawable surface.

Type Aliases 10

  • Ty
    GLKEffectPropertyPrvPtr
  • Ty
    GLKMatrix2
  • Ty
    GLKMatrix3
  • Ty
    GLKMatrix4
  • Ty
    GLKVector2
  • Ty
    GLKVector3
  • Ty
    GLKVector4
  • Ty
    GLKQuaternion
  • Ty
    GLKVertexAttributeParameters
  • Ty
    GLKTextureLoaderCallback
← Games & 3D