Re: GLX Pixmap destroy issue
Aaron asked me to comment here. I'm the other employee he was referring to :-)
First of all, this is not what texture_from_pixmap was intended for at all. When you wish to knowingly render to a texture with OpenGL, the correct solution is to use FBO. Search for EXT_framebuffer_object on google for all the details and specifications.
However, this won't work if you want to share the object between processes AND use direct rendering, as you can not share objects between GLX context's in different address spaces. For this reason, your idea of using texture sharing with texture from pixmap also won't work.
I think the best way to accomplish what you're trying to do is by using multiple threads and the FBO extension rather than multiple separate processes and the texture from pixmap extension. If this is not possible in your situation, could you explain why?
Now, assuming you can't make this work with FBO, there is a way to use a GLX drawable in two different processes. Rather than create 2 GLX drawables, just use the same GLX drawable in both processes. You're already sharing the X pixmap ID; sharing the GLX pixmap ID should also work. X resources should not be process-specific. I THINK this is supposed to work even with direct rendering according to the spec, but I wouldn't be surprised if it is broken right now in our driver. I'll look into it, but please try the FBO/multiple threads approach if at all possible.