Framework

GLKit

Speed up OpenGL ES or OpenGL app development. Use math libraries, background texture loading, pre-created shader effects, and a standard view and view controller to implement your rendering loop.

Overview

The GLKit framework provides functions and classes that reduce the effort required to create new shader-based apps or to port existing apps that rely on fixed-function vertex or fragment processing provided by earlier versions of OpenGL ES or OpenGL.

GLKit Features

GLKit provides functionality in four key areas:

  • Texture loading allows your app to easily load textures from a variety of sources. Textures can even be loaded asynchronously in the background with just a few lines of code. For more information, see GLKTexture​Loader.

  • Math libraries provide commonly used vector, quaternion and matrix operations. These implementations are optimized to provide great performance.

  • Effects provide standard implementations of common shader effects. You configure the effect and the associated vertex data; the effect creates and loads an appropriate shader. GLKit includes three effects: The GLKBase​Effect class implements a critical subset of the OpenGL ES 1.1 shading and lighting model, the GLKReflection​Map​Effect class extends the base effect to include reflection mapping support, and the GLKSkybox​Effect class provides an implementation of a skybox effect.

  • Views and View Controllers provide a standard implementation of an OpenGL ES view and a corresponding view controller. This reduces the amount of code needed to create an iOS app that use OpenGL ES. For more information, see GLKView and GLKView​Controller.

On iOS, GLKit requires an OpenGL ES 2.0 context. In macOS, GLKit requires an OpenGL context that supports the OpenGL 3.2 Core Profile.

Symbols

Texture Loading

GLKTexture​Info

Information about OpenGL textures created by the GLKTexture​Loader class.

GLKTexture​Loader

A utility class that simplifies loading OpenGL or OpenGL ES texture datas from a variety of image file formats.

OpenGL ES View Rendering

GLKView

A default implementation for views that draw their content using OpenGL ES.

GLKView​Delegate

Drawing callback methods for use with a GLKView object.

GLKView​Controller

A view controller that manages an OpenGL ES rendering loop.

GLKView​Controller​Delegate

Rendering loop callback methods for use with a GLKView​Controller object.

Shader-Based Rendering Effects

GLKNamed​Effect

A standard interface for objects that provide shader-based OpenGL rendering effects.

GLKBase​Effect

A simple lighting and shading system for use in shader-based OpenGL rendering.

GLKReflection​Map​Effect

A lighting and shading system that supports reflection mapping for use in shader-based OpenGL rendering.

GLKSkybox​Effect

A simple skybox visual effect for use in shader-based OpenGL rendering.

Rendering Effect Parameters

GLKEffect​Property

The abstract superclass for configuration information used in GLKit rendering effects.

GLKEffect​Property​Fog

Fog drawing information for use in GLKit rendering effects.

GLKEffect​Property​Light

Lighting information for use in GLKit rendering effects.

GLKEffect​Property​Texture

Texture drawing parameters for use in GLKit rendering effects.

GLKEffect​Property​Material

Surface appearance properties for use in GLKit rendering effects.

GLKEffect​Property​Transform

Coordinate transform information for use in GLKit rendering effects.

GLKit Effects Constants

Math Utilties

GLKMatrix​Stack

An opaque type that represents a stack of 4 x 4 matrices, providing support for hierarchical transform modeling and similar tasks.

GLKMatrix3GLKMatrix4GLKVector2GLKVector3GLKVector4GLKQuaternionGLKit Math Utilities