glxCreateContext sharing textures

I have noticed that glxCreateContext allows the sharing of textures between two contexts. I have a few questions for anybody that has knowledge in this department.

If context A, in thread A were to write into a texture, would context B in thread B somehow “step on A’s toes” if it were to try to render using that texture? Would I have to implement some sort of locking to get it to work?

Another thing, might it be more efficient than passing a buffer from one thread to another, and sending it to texture there, within one context?

Thanks a lot

Rob Stoddard

Yes.
Parallel OpenGL FAQ

You can fill buffers in another thread, but it’s best to keep only one thread talking to OpenGL. That avoids all the locking and sharing overhead.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.