0
votes

I have created a window using GLFW3. I have created a child window using another thread with GLX. During GLX opengl context creation, I am passing the main windows opengl context (achieved by glXGetCurrentContext), as sharelist parameter to the opengl context of the child window, as I want to use the textures which are rendered by the child context in the main window. But I am getting this error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Serial number of failed request:  38
  Current serial number in output stream:  39

As I saw in the glxCreateContext documentation,

BadMatch is generated if the context to be created would not share the address space or the screen of the context specified by shareList.

So, does this mean that I cannot share the texture with this context?

1

1 Answers

0
votes

So, I just noticed what is the problem. As one of GL Contexts are on One GPU and the other one is on another GPU, it seems that I cannot share the display objects with each other. So, I have to use glXCopyImageSubDataNV to copy the texture from one gpu to another one.