<!--
{
  "availability" : [
    "iOS: 5.0.0 - 12.0.0",
    "iPadOS: 5.0.0 - 12.0.0",
    "macOS: 10.8.0 - 10.14.0",
    "tvOS: 9.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKSkyboxEffect",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GLKSkyboxEffect"
  },
  "title" : "GLKSkyboxEffect"
}
-->

# GLKSkyboxEffect

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

```
class GLKSkyboxEffect
```

## Overview

The [`GLKSkyboxEffect`](/documentation/GLKit/GLKSkyboxEffect) provides a standard skybox effect for your application. Unlike the [`GLKBaseEffect`](/documentation/GLKit/GLKBaseEffect) class, the skybox does not require your application to configure and submit vertex data. Instead, it creates its own vertex data based on the configuration data you supply.

At initialization time, your application first creates a compatible context and makes it current. Then, it creates new skybox effect, configures its properties, and calls its [`prepareToDraw()`](/documentation/GLKit/GLKSkyboxEffect/prepareToDraw()) method. Binding the effect causes a shader to be compiled and bound to the current context.

At rendering time, your application calls the effect’s [`prepareToDraw()`](/documentation/GLKit/GLKSkyboxEffect/prepareToDraw()) method to prepare the effect and then calls its [`draw()`](/documentation/GLKit/GLKSkyboxEffect/draw()) method to draw the sky box.

## Topics

### Naming the Effect

[`label`](/documentation/GLKit/GLKSkyboxEffect/label)

A string used to name your effect.

### Preparing the Effect for Rendering

[`-  prepareToDraw`](/documentation/GLKit/GLKSkyboxEffect/prepareToDraw())

Prepares an effect for rendering.

### Drawing the Skybox

[`-  draw`](/documentation/GLKit/GLKSkyboxEffect/draw())

Draws the skybox.

### Configuring the Skybox

[`textureCubeMap`](/documentation/GLKit/GLKSkyboxEffect/textureCubeMap)

The texture to apply to the skybox.

[`center`](/documentation/GLKit/GLKSkyboxEffect/center)

The center of the skybox.

[`xSize`](/documentation/GLKit/GLKSkyboxEffect/xSize)

The width of the skybox.

[`ySize`](/documentation/GLKit/GLKSkyboxEffect/ySize)

The height of the skybox.

[`zSize`](/documentation/GLKit/GLKSkyboxEffect/zSize)

The depth of the skybox.

### Setting the Skybox Transform

[`transform`](/documentation/GLKit/GLKSkyboxEffect/transform)

The transform applied before drawing the skybox.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`GLKNamedEffect`](/documentation/GLKit/GLKNamedEffect)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)