<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNView/eaglContext",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNView(py)eaglContext"
  },
  "title" : "eaglContext"
}
-->

# eaglContext

The OpenGL ES context that the view uses to render its contents.

```
var eaglContext: EAGLContext? { get set }
```

## Discussion

If you use OpenGL ES for custom rendering (see the [`SCNShadable`](/documentation/SceneKit/SCNShadable), [`SCNNodeRendererDelegate`](/documentation/SceneKit/SCNNodeRendererDelegate), and [`SCNSceneRendererDelegate`](/documentation/SceneKit/SCNSceneRendererDelegate) protocols), you can use this property to share OpenGL ES resources between the context used for rendering the scene and other OpenGL ES contexts your app uses. For details on sharing OpenGL ES resources, see [An EAGL Sharegroup Manages OpenGL ES Objects for the Context](https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/WorkingwithOpenGLESContexts/WorkingwithOpenGLESContexts.html#//apple_ref/doc/uid/TP40008793-CH2-SW5). (SceneKit automatically shares its own OpenGL ES resources between multiple [`SCNView`](/documentation/SceneKit/SCNView) instances in your app as needed.)

If you supply your own <doc://com.apple.documentation/documentation/OpenGLES/EAGLContext> object for a SceneKit view, specify the OpenGL ES 2.0 or 3.0 API when creating it. SceneKit supports OpenGL ES 3.0, but some features are disabled when rendering in an OpenGL ES 3.0 context. SceneKit does not support OpenGL ES 1.1.

---

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)