Is it possible to share an opengl framebuffer object between contexts/threads? Is it possible to share an opengl framebuffer object between contexts/threads? multithreading multithreading

Is it possible to share an opengl framebuffer object between contexts/threads?


It is not possible to share framebuffers between different contexts. See the first paragraph of Appendix D, OpenGL 3.3 spec. However, you can share textures and renderbuffers, which should give you want you need.

As for the threading: It should be possible, but it is generally advised not to issue GL commands from multiple threads (Because it is just very hard to synchronize). Usually, you would copy the contents to a pixel-buffer-object and and map it from the GL thread, then use the mapped pointer from the other thread.