I am trying to create two contexts, context1 and context2 where context2 passes context1 as the sharedContext parameter of eglCreateContext. I started with the Hello_Triangles example from https://www.khronos.org/assets/uploads/books/openglr_es_20_programming_guide_sample.pdf and added a second thread. I extended the CreateEGLContext function to create two contexts, context1 & context2. I also moved the call to Init from main to the thread function.
The example doesn’t work if context2 passes context1 as the “shared context” parameter of eglCreateContext but it does if I pass EGL_NO_CONTEXT.
I’ve attached the three files that I modified to this message.
Any ideas why the shared context doesn’t work?