# Sharing egl context between multiple threads

**URL:** <https://forums.imgtec.com/t/sharing-egl-context-between-multiple-threads/1485>\
**Category:** PowerVR Insider\
**Created:** [July 30, 2012, 5:12pm UTC](https://forums.imgtec.com/t/sharing-egl-context-between-multiple-threads/1485 "2012-07-30T17:12:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceman](https://avatars.discourse-cdn.com/v4/letter/i/46a35a/32.png) [@iceman](https://forums.imgtec.com/u/iceman)\
**Post date:** [July 30, 2012, 5:12pm UTC](https://forums.imgtec.com/t/sharing-egl-context-between-multiple-threads/1485/1 "2012-07-30T17:12:48Z")

</div>

Hi,

  

Is it allowed to create egl context from main() and render from another thread, given the fact that the context handles are passed from main() to the thread's function?

  

Thanks.
iceman2012-07-30 19:14:03

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [July 31, 2012, 12:18pm UTC](https://forums.imgtec.com/t/sharing-egl-context-between-multiple-threads/1485/2 "2012-07-31T12:18:07Z")

</div>

Hi iceman,  
  
This is completely fine - you must make sure to call “eglMakeCurrent” on the rendering thread though to make sure the context is bound to the correct thread.  
  
Thanks,  
  
Tobias
