fbo sharelists crash

I’ve got a multi-window stereo app where each of the two stereo windows uses wglShareList to share textures and display lists with a main control window.

I just updated some rendertexture stuff within the program from pbuffers to fbo to increase speed and make it more future proof.

Unfortunately, though, when I delete my fbo class, I get a crash in nvoglnt.dll.

The crash only happens when I’m running with multiple windows, so it has something to do with sharing textures, I guess.

Also, it only happens if I attach more than one texture to the fbo at different times in the program.

Has anyone else experienced this? Is there something I need to be careful about when doing memory cleanup on FBO’s that are shared amongst multiple windows?

Not sure what exactly is happening, possibly a driver bug, but I would recommend against sharing FBOs. You can share the attachments themselves but create an FBO per context.