How to get EGLContext in cocos2d-x

I am trying to integrate the [C++ Port of the GPUImage library for iOS [https://github.com/Dexterp37/GPUImage]]. The library was intended to perform image processing in the background and hence creates its own EGLDisplay, EGLSurface and EGLContext.
Since, cocos2d-x has already initialized these objects before, it conflicts with the ones created by the GPUImage library. I would like to know how I can get the EGLContxt from cocos2d-x and then pass it to GPUImage so that only one context exists and there is no conflict.

Is it possible to do this directly? or do I have to modify some of cocos2d-x framework code ?
Any help here is really appreciated.

Very very interesting project but unfortunately I’m not an openGL expert.
You’d better try to ask to the cocos2d-x programmers directly I guess.

Good luck,
Massimo

Yes, you should modify cocos2d-x code (see EGLView implementations in cocos2dx/platform/$PLATFORM_NAME folder).