# Failed to allocate GL context

**URL:** <https://discourse.libcinder.org/t/failed-to-allocate-gl-context/631>\
**Category:** Uncategorized\
**Created:** [April 1, 2017, 10:41pm UTC](https://discourse.libcinder.org/t/failed-to-allocate-gl-context/631 "2017-04-01T22:41:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperRockG](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@SuperRockG](https://discourse.libcinder.org/u/SuperRockG)\
**Post date:** [April 1, 2017, 10:41pm UTC](https://discourse.libcinder.org/t/failed-to-allocate-gl-context/631/1 "2017-04-01T22:41:40Z")

</div>

Hi,

I have the created a iOS project using TinderBox on mac. Building and running my project on my iPad mini causes a “Failed to allocate GL context” exception.

Any one know why this is happening? Because of old hardware? Metal renderer problem?

Am at a lost as why i am suddenly having this problem, i usually have no problem running cinser iOS projects.

---

<div class="post-metadata">

**Author:** ![nselikoff](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nselikoff/32/157_2.png) [@nselikoff](https://discourse.libcinder.org/u/nselikoff)\
**Post date:** [April 14, 2017, 10:16pm UTC](https://discourse.libcinder.org/t/failed-to-allocate-gl-context/631/2 "2017-04-14T22:16:24Z")

</div>

Same thing happening here. XCode 8.2.1, iPad 3rd Generation, Cinder 0.9.1 (github tag checkout), TinderBox Basic OpenGL template.

---

<div class="post-metadata">

**Author:** ![nselikoff](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nselikoff/32/157_2.png) [@nselikoff](https://discourse.libcinder.org/u/nselikoff)\
**Post date:** [April 15, 2017, 1:32am UTC](https://discourse.libcinder.org/t/failed-to-allocate-gl-context/631/3 "2017-04-15T01:32:04Z")

</div>

For me at least it’s due to a lack of OpenGL ES 3 support on the hardware. ES 3 is now [the default in Cinder](https://libcinder.org/docs/guides/ios-notes/index.html).

> By default, Cinder on iOS targets OpenGL ES 3. In order to use OpenGL ES 2, you must add the CINDER\_GL\_ES\_2 preprocessor definition to the Preprocessor Macros build setting of both your app and Cinder, and you must rebuild Cinder.

You can check whether your device supports opengles-3 on Apple’s [iOS Device Compatibility Reference](https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html).
