- // A mapping from FBO number to format details. This is filled if the
- // FBO is given out to a client or on the freelist, but not if it is
- // deleted from the freelist.
- std::map<GLuint, FBO> fbo_formats;
+ // For each context, a mapping from FBO number to format details. This is
+ // filled if the FBO is given out to a client or on the freelist, but
+ // not if it is deleted from the freelist.
+ std::map<std::pair<void *, GLuint>, FBO> fbo_formats;
+ typedef std::map<std::pair<void *, GLuint>, FBO>::iterator FBOFormatIterator;