View Full Version : FBOs - shared or no in OpenGL 3.3?

10-23-2010, 05:33 PM
My inclination would be to make them shared, but this seems to indicate they are not? What's the story?:

If they aren't shared, is there any cost of calling wglMakeCurrent()? I already use a background hidden window context to share all contexts with, so I could just create FBOs on this persistent context and switch to it whenever I render to an FBO.

10-23-2010, 10:39 PM
I am having good results switching to the persistent hidden context whenever an FBO is used. Hopefully there will be something I can do like that on Mac and Linux.

10-24-2010, 01:03 AM
FBO cannot be shared.
FBO does not consume resources, replicate the FBO in all your contexts and use it.

10-28-2010, 12:25 PM
Yeah, but then you have to have a map to look up the FBO by context and you have to set it up and check it each time it is used in a new context, and then clean it up when a context is deleted. It's unnecessarily messy.

10-28-2010, 12:29 PM
Yes, it is harder. But there is no other way. You can also use thread local storage if you have 1 context per one thread.