I work on an application that is using one GL context per window that are each on their own thread. There are 4 windows and a fifth shared context.
The application uses glFenceSync object's to try and ensure everything stay's nicely synchroized.
However I was just reading OpenGL Insights chapter 34 Timer Queries and it is makes it look like there's not much of a point in separating context's into different threads being that in figure 34.1 it has the different context's running in parallel. The work was submitted from 1 thread.
If I were able to find a picture of the figure I'm referring too I would have posted it, sorry.
My question is: What is the best way to handle drawing to multiple windows?
Are there any papers / books on this topic? How was this kind of thing handled in the past, before sync objects?
Some more background, is that even though there are 4 windows being drawn too, only 1 (sometimes 2) have any "real" work load. The other windows have pretty minimal things being drawn to them.
Would a better (faster) solution be to have a render target for each window and draw everything to those from one context then let each window draw only their render target?
If there is anything that is not clear, please point it out.