I was curious, in windows, what the back buffer is associated with - the device context, the window, or the rendering context. SwapBuffers() takes a handle to a device context as a parameter, which would lead one to believe it’s associated with the device context. However, it is equally feasible that it is associated with the rendering context. If this is the case, is a new back(and possibly front) buffer allocated with each wglMakeCurrent() call?
I’m trying to figure out the best way to handle having multiple windows - whether to keep one rendering context and call wglMakeCurrent() each time to assoicate it with a window, or to keep a context for each window to avoid a possible buffer allocation.
Do you driver developers know the answer to these?