---
title: "init(eaglContext:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/cicontext/init(eaglcontext:)-8ajef"
---

# init(eaglContext:)

Creates a Core Image context from an EAGL context.

## Declaration

```swift
init(eaglContext: EAGLContext)
```

## Parameters

- `eaglContext`: The EAGL context to render to.

## Return Value

Return Value A Core Image context that targets OpenGL ES.

## Discussion

Discussion The OpenGL ES context must support OpenGL ES 2.0. All drawing performed using the methods listed in Drawing Images is rendered directly into the context.

## See Also

### Deprecated

- [init(cglContext:pixelFormat:colorSpace:options:)](coreimage/cicontext/init(cglcontext:pixelformat:colorspace:options:)-6rp6d.md)
- [init(eaglContext:options:)](coreimage/cicontext/init(eaglcontext:options:)-6uyqj.md)
- [init(forOfflineGPUAtIndex:)](coreimage/cicontext/init(forofflinegpuatindex:).md)
- [init(forOfflineGPUAtIndex:colorSpace:options:sharedContext:)](coreimage/cicontext/init(forofflinegpuatindex:colorspace:options:sharedcontext:).md)
- [createCGLayer(with:info:)](coreimage/cicontext/createcglayer(with:info:).md)
- [draw(_:at:from:)](coreimage/cicontext/draw(_:at:from:).md)
