Am Montag 24 Juli 2006 22:01 schrieb Florian Köberle:
When OpenGL draws, child windows get overdrawn.
The suggestions to solve these problem where all based on the idear of clipping that what OpenGL render so that OpenGL doesn't overdraw them.
What do you think of the idear of letting OpenGL overdrawing the child windows, but then after this we redraw all the child windows?
There are two things who have to be done: 1.) find out when OpenGL finished his drawing 2.) find a way to draw the child windows.
possible solutions for 2.) The easiest (but slowest) way of doing this could be a broadcast of the window message WM_PAINT to all child windows.
It could work, but the performance hit would be quite hard(window redrawing is slow), and it still wouldn't sove the placement problem. Furthermore there is the problem that opengl is asynchronous, so it might happen that opengl drawing is started, you detect that the window needs redrawing, redaw and then opengl is finished drawing and draws over the just redrawn window. You would have to wait for gl after every gl call which would make it even slower. It is highly unlikely to ever occur, but it can happen.
Another issue is that the constant redrawing would cause a lot of flickering in the redrawn area which won't look nice.