<!--
{
  "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/prepareToDraw()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GLKSkyboxEffect(im)prepareToDraw"
  },
  "title" : "prepareToDraw()"
}
-->

# prepareToDraw()

Prepares an effect for rendering.

```
func prepareToDraw()
```

## Discussion

When the skybox shader is bound, the following state variables are altered:

- `GL_CURRENT_PROGRAM`
- `GL_TEXTURE_BINDING_CUBE_MAP`
- `GL_VERTEX_ARRAY_BINDING_OES`
- `GL_VERTEX_ATTRIB_ARRAY_ENABLED`

Your application is responsible for saving and restoring these variables, if necessary for it to execute correctly.

---

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)