Currently I used Vivante OpenGLES 2.0 and EGL 1.4 library in i.MX6 platform, and I want to share resource(such as texture) between two egl context in one thread.
Here is what I am doing:
mSharedContext = eglCreateContext( mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttribs);
mMainContext = eglCreateContext( mEglDisplay, mEglConfig, mSharedContext , contextAttribs);
on the shared context, I call eglMakeCurrent() and render to a texture. The contenet of the texture is right.
on the main contexnt, I draw the texture which was rendered in shared context to the screen, but the screen is blank.
If I draw the texture on the shared context, I could see the context of the texture on the screen.
So I wonder whether i.MX6 platform or Vivante OpenGLES 2.0 library could support shared resources(such as texture) between two egl context.
Could anyone have any ideas about it?
Solved! Go to Solution.
As of our latest GPU driver, texture object sharing between context is supported. Frame Buffer Objects (FBO) are supported as well, but sharing Vertex Buffer Objects (VBO) is not supported.
Do you have a simple test case you could share so I can provide better help?
As you said, latest GPU driver support shared resource between contexts, but I still confuse the sharing relationship of two contexts.
I want to know whether the sharing releationship is bidirectional.
If mMainContext has texture object "T1" and mSharedContext has texture object "T2", I could use "T1" on mSharedContext and use "T2" on mMainContext.
Is it right? If not, which is right?
Thanks for your reply.
All what I need is to share texture between context, so the latest GPU driver could satisfy my requirement.
But I don't have a simple test case for you to test till now.
Could you please tell me the version of Linux BSP which includes the latest GPU driver to support shared texture between context?